From patchwork Tue May 11 08:50:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 434170 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3621943jao; Tue, 11 May 2021 01:51:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG5k1hBBosBhsjB7ahOgUSVSjD640dpNBpsSi6Gd15lD3koipsnmg8JyrJBkqrd9pRctcI X-Received: by 2002:a05:6402:31b1:: with SMTP id dj17mr34549169edb.7.1620723075179; Tue, 11 May 2021 01:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620723075; cv=none; d=google.com; s=arc-20160816; b=hTfpOaTDQcP5iBzHR05L+ndypc4vlruGE4FgFI0M3a5fWFOSmciA4HfOHWurIytSbC Bnq6pXDcvb7Y9m5ih3afSGIH3qlxXW/oi/YWEzuSkZMKjEWUqk5IaCB0KUBA+YZZ0Z+J Sg5bDP7yWACAi5knSNF9SEonzMGh9VREo2jqnS2lMXV1oOIQ3Didl7LXGv+c3+cEHKpy zBAw7lnOcc/4iEEI0FkppLuXHBHot35sjIUpsuWPzH8W+p6xG9bDnJnZh7GqLOY8SQhE 22QWSujfUGvT7nwjPFeyG87rMpPzuAW5FHylcqRU/1wXItThmuvsyyy94i6IdJnL30FV B2xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QF3gKv7VTtDVAFANjakXh9njdRISNpRUS3Lr86kJVaY=; b=CwoSbHA+e0BBi05ogIrlo/vV1eiiGsxU4YH6s4x5Z9P/W5djL9GOjYCF/DqYJd/m75 iAXgYNevadF17yAaNWb2NoDYF/QjvUT9bEdNbR30RXVN6jyYsjXZhd+Ky1xy7wCt89qQ b7sSfVtz3ZWGv3KvqA5kc0Vo1cKfJdw763DJvfM03erIsvx19853zhGK8H0Hg6vzeOEQ DB7rheeHGGRqsnIg6JC+HoaraBGozKlUukZaljgbJmSL3RJzrp66EVLAjYySRsKbwvBj H3vqbgfUlwh8ew+HORjsoBsChgrm+e/b+bRxkpwJG9VuTyIZxD06F1AcBOD6PQg+312D Kg7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=okWZdckE; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e20si16333456ejt.19.2021.05.11.01.51.14; Tue, 11 May 2021 01:51:15 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=okWZdckE; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230386AbhEKIwO (ORCPT + 7 others); Tue, 11 May 2021 04:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbhEKIwN (ORCPT ); Tue, 11 May 2021 04:52:13 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454ABC061574 for ; Tue, 11 May 2021 01:51:07 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id g65so10644243wmg.2 for ; Tue, 11 May 2021 01:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QF3gKv7VTtDVAFANjakXh9njdRISNpRUS3Lr86kJVaY=; b=okWZdckEqGZUXxO3Zjpwgy3oHKs5yLJFHVgqgQY+OITUgoGjavCiCBgizlvL21Tlq/ xfu8EdJWz4GZ4rKFkbbjrAukgz3gMZiNs52UxS4PKXG/G5b4AkL4N5ruDcRO35ykUkKW qKCV8M06TMNJ4l860Mi8zjMC8AML3nGgzuE8PnU48rhmFYWKmeQmRRoAwFqpygGyQ1kA QVfxeXJBVB2x98WTh/9U98c8+4JOGuCgi4qoEFsz0MPPW/NgJrIHsleiWbtoQxgc7Xcn aFPxfLozWrqfiXDQUSPE+qcws/5x6Upc+mfQng4oT7h0qZVszE7dswxrUEfL1ASv4V88 N+bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QF3gKv7VTtDVAFANjakXh9njdRISNpRUS3Lr86kJVaY=; b=mdnmVSu+SvhqMh0ptsHGIzhSV1Eg7PYN6psZiM0mKdoaKITB6c+FqE60A17CBTNh5q Pj5+Tgmvq4CBN/4RmA7/DC6utjP4cnTjW8Bz3+cq1ToO2n3lh903/vOKxoJPavUF1Hj4 ZH9aUr6KBHT5J0IBEX+Rn1X3uKzT5QGFhYuRkdmdsbtwsPysh7zR1hCeWxPRqoz/kf3K tYiuzM8OW280Z7ChzTkySd0GCwFepGhSmrWbpONCnU0RFl2OW4HauMIAj/MICPCpqY/T 4kQ3R8cE5OD/f8ugvFF9mM3p3nH9yQDx6yrwT+AsagWa4iFOTgXOz7fA4WoAOYQoaJpU ONdw== X-Gm-Message-State: AOAM531DsdzunI0dmWTNP8HEV0HLo7Fl6KETJWGeT4458bba6uDecx8P 7LlUFE4uxTepKP/QZ0fBOhFz1A== X-Received: by 2002:a1c:c90f:: with SMTP id f15mr4159209wmb.142.1620723065986; Tue, 11 May 2021 01:51:05 -0700 (PDT) Received: from arch-thunder.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id j7sm23042980wmi.21.2021.05.11.01.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 01:51:05 -0700 (PDT) From: Rui Miguel Silva To: Greg Kroah-Hartman , Sebastian Siewior , Laurent Pinchart , Rob Herring Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, Rui Miguel Silva Subject: [PATCH v2 0/9] usb: isp1760: extend support for isp1763 Date: Tue, 11 May 2021 09:50:52 +0100 Message-Id: <20210511085101.2081399-1-rui.silva@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Arm MPS3 FPGA prototyping board [0] have an isp1763 [1] as USB controller. There is already support for the isp1760 and isp1761 in tree, this series extend the support also for the isp1763. Move register access using regmap, remove some platform data and code, refactor the mempool, use dr_mode to align to existing bindings, then add the support for isp1763 host mode, add bindings files that did not existed and at the end add also support for peripheral mode for isp1763. @Laurent and @Sebastian, I add both of you in the bindings files as maintainers (it is a mandatory field)since you were the ones which contributed with the initial code and peripheral code, let me know if you are ok with it. If yes I may send a follow up to add also entries in MAINTAINERS file that it is also missing. v1 [2] -> v2: kernel test robot: - add two patches (1/9 and 3/9) to fix dozens of pre-existing sparse warnings so that this series does not introduce new ones. No sparse warning left. - fix duplication of regmap fields Laurent: - move initializers from .h to .c - change interrupt registers setup from field to one shot register setting (did not change hcd hw mode init because I think it did not make the difference and even avoid artifact around setting twice the register) Rob test bot: - fix suffix at compatible string to clean up warning in bindings Cheers, Rui [0]: https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps3 [1]: https://media.digikey.com/pdf/Data%20Sheets/ST%20Ericsson%20PDFs/ISP1763A.pdf [2]: https://lore.kernel.org/linux-devicetree/20210504101910.18619-1-rui.silva@linaro.org/ Rui Miguel Silva (9): usb: isp1760: fix strict typechecking usb: isp1760: move to regmap for register access usb: isp1760: use relaxed primitives usb: isp1760: remove platform data struct and code usb: isp1760: hcd: refactor mempool config and setup usb: isp1760: use dr_mode binding usb: isp1760: add support for isp1763 dt-bindings: usb: nxp,isp1760: add bindings usb: isp1763: add peripheral mode .../devicetree/bindings/usb/nxp,isp1760.yaml | 59 + arch/arm/boot/dts/arm-realview-eb.dtsi | 2 +- arch/arm/boot/dts/arm-realview-pb1176.dts | 2 +- arch/arm/boot/dts/arm-realview-pb11mp.dts | 2 +- arch/arm/boot/dts/arm-realview-pbx.dtsi | 2 +- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 2 +- arch/arm/boot/dts/vexpress-v2m.dtsi | 2 +- drivers/usb/isp1760/Kconfig | 4 +- drivers/usb/isp1760/isp1760-core.c | 513 ++++++++- drivers/usb/isp1760/isp1760-core.h | 44 +- drivers/usb/isp1760/isp1760-hcd.c | 1021 ++++++++++++----- drivers/usb/isp1760/isp1760-hcd.h | 57 +- drivers/usb/isp1760/isp1760-if.c | 41 +- drivers/usb/isp1760/isp1760-regs.h | 435 ++++--- drivers/usb/isp1760/isp1760-udc.c | 250 ++-- drivers/usb/isp1760/isp1760-udc.h | 13 +- include/linux/usb/isp1760.h | 19 - 17 files changed, 1758 insertions(+), 710 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/nxp,isp1760.yaml delete mode 100644 include/linux/usb/isp1760.h -- 2.31.1