From patchwork Tue Dec 13 13:32:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 2913 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp121158wrn; Tue, 13 Dec 2022 05:33:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5PlJLEyhKhhb609J6xa80+nrF32jt41vAd8nJrv4HC+Zc/IV/6NO/xQ4lGuItWtBx8ZoDx X-Received: by 2002:a17:902:c189:b0:189:c94c:6906 with SMTP id d9-20020a170902c18900b00189c94c6906mr22099058pld.60.1670938437588; Tue, 13 Dec 2022 05:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670938437; cv=none; d=google.com; s=arc-20160816; b=LIg4UK+N1qFmHvYNKlfhYw2LmD0O1oj5CPvxDveDCDaRtcqIiiDZpEj1nY6IgAWnKq inUVahpC+yMu/V7s0UNkVytj7b1LFDXB3jN11nYbTcYxz1nx/pPzWUzMSF+lYvb6loSz iV4Gr5OgkSEL2Ig56hwq2Qy0bl1nGehI3eJI8nhrIJGQ5SEP8/OpjNqzMm2Bnci/MVGJ IAVX517RxcvOgEbS2DY9E7JNlkWom2YT2OoaK2RW/UQe22Pw+h2BS1uc3rsac0unC/4L OBq5AaddUwKMRgXA0vUXJozdpkJkNK7As5eukcDk8OoHhu5q2aWfamXVp+D3GW0A6dkq s8Fw== 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=FaZcbvxhHbNhfKGb06AAUPmEIZmHhk0GuKAwAJvTwYU=; b=qJeT/vHj7IEiEMJgjrJNu4tMKKAEQK27YjtUymxP1+OiKqWVf6HK4XrS7PWzCvlZKF ngRswXm0oGH0VM5/xxjX6MjkS83VAPVNpHGxU13qouvoSVX9FbPb/xj+f5rcXnSJc4MR q9U8xb2fFFDPR8Zk6ID0fqRy7JgFCsD2I/5Z3/tfiuVIGXk8srq60DaqymyCzSC7//XY e5PFMrS0D3Rnk9eBIA41F0x308EKX6kWltKmikow0O+El7Z3hBptJjFeFJg9p65RQNqo vdx4IycG7yyeWMdQIg08ig6GSQr7XNseBRKzWx/BS+gFOlWGTMWfURdDoxdRiNKc8iCd zkdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QdtfiuX7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 203-20020a6301d4000000b0047813913663si12613429pgb.839.2022.12.13.05.33.44; Tue, 13 Dec 2022 05:33:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QdtfiuX7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235025AbiLMNdQ (ORCPT + 99 others); Tue, 13 Dec 2022 08:33:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbiLMNdL (ORCPT ); Tue, 13 Dec 2022 08:33:11 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70E5F19025; Tue, 13 Dec 2022 05:33:08 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 190B240005; Tue, 13 Dec 2022 13:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670938387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FaZcbvxhHbNhfKGb06AAUPmEIZmHhk0GuKAwAJvTwYU=; b=QdtfiuX75JtMbXMDdbWIR7fTXtO3mtWjHMhv/05JoSUEaUYE4qA73zGG5X1FH08N7uJycy LxF6StlEnYvi8JMNv5o2tnFDt3WKhwyDxCkpHoN3LWMzo6tupeNOu1/a0iPU/zkecSVdnL ABKtFVrj/TV9002tyc47QqsIE1Cehr1jYy0FCy8nuqS6HTMNA3Gkb9fFu4yqk2TzSNUVQo hN9pgo/OEc0Tmx26j8DwlVJVhKXgmNGnSp2bOQ+eZ8ouf+DhsrwX+EcGo9jxH89Cpzpi6D TbKqD0VWvmRrUQ4Y/tvIsUzDLbp24VRBDnjA7oQGOsF5tqJDMgtVAEfOoCzMDg== From: Herve Codina To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Herve Codina , Greg Kroah-Hartman , Magnus Damm , Gareth Williams Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Thomas Petazzoni , Miquel Raynal Subject: [PATCH v4 0/5] Add the Renesas USBF controller support Date: Tue, 13 Dec 2022 14:32:57 +0100 Message-Id: <20221213133302.218955-1-herve.codina@bootlin.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751573221018056138?= X-GMAIL-MSGID: =?utf-8?q?1752105942737048606?= Hi, This series add support for the Renesas USBF controller (USB Device Controller) available in the Renesas RZ/N1 SoC. Based on previous iteration: https://lore.kernel.org/all/20221207162435.1001782-1-herve.codina@bootlin.com/ The 'depends-on' property was removed. Patches 1, 3, 4 and 5 are related to the USBF controller with a new binding definition, the driver itself and myself as a maintainer of this controller. Patch 2 handles h2mode in sysctrl. Hope that this v4 can lead to some feedbacks on the USB device controller itself (patch 3). Best regards, Herve Codina Changes v3 -> v4: - v3 patches 1, 2, 3 and 4 removed - Patch 1 (v3 patch 5) Remove 'depends-on' property - Patch 2 (v3 patch 6) Add 'Reviewed-by: Geert Uytterhoeven ' - Patch 3 (v3 patch 7) Fix warning raised by the kernel test robot - Patch 4 (v3 patch 8) Remove 'depends-on' property add 'Reviewed-by: Geert Uytterhoeven ' - Patch 5 (v3 patch 9) No changes Changes v2 -> v3: - v2 Patches 1, 2 and 3 removed. - Patches 1, 2, 3 and 4 (new patches) - Patch 5 (v2 patch 4): Add 'depends-on' property Removed redundant 'binding' word - Patch 6 (new patch) - Patch 7 (v2 patch 5) Removed h2mode checking. This check is no more needed and the API no more available. - Patch 8 (v2 patch 6) Add 'depends-on' property - Patch 9 (v2 patch 7) Fix file name Changes v1 -> v2: - Patch 1: Rename r9a06g032_sysctrl_get_usb_h2mode to r9a06g032_sysctrl_get_usb_role and return USB_ROLE_{HOST,DEVICE} or an error code. Reword commit log - Patches 2 and 3: No changes. Some previous feedbacks still need to be taken into account https://lore.kernel.org/all/20221107182642.05a09f2f@bootlin.com/ https://lore.kernel.org/all/20221107173614.474707d7@bootlin.com/ - Patch 4: Rename file from renesas,usbf.yaml to renesas,rzn1-usbf.yaml. Remove 'oneOf'. Add blank line and line break. Add 'power-domains'. Reword commit log - Patch 5: Remove clocks handling (handled by runtime PM through the clock domain pointed by power-domains). Fix compilation warning raised by the 'kernel test robot'. - Patch 6: Add 'power-domains' - Patch 7: Add 'Reviewed-by: Geert Uytterhoeven ' Herve Codina (5): dt-bindings: usb: add the Renesas RZ/N1 USBF controller soc: renesas: r9a06g032-sysctrl: Handle h2mode setting based on USBF presence usb: gadget: udc: add Renesas RZ/N1 USBF controller support ARM: dts: r9a06g032: Add the USBF controller node MAINTAINERS: add the Renesas RZ/N1 USBF controller entry .../bindings/usb/renesas,rzn1-usbf.yaml | 68 + MAINTAINERS | 8 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/clk/renesas/r9a06g032-clocks.c | 28 + drivers/usb/gadget/udc/Kconfig | 11 + drivers/usb/gadget/udc/Makefile | 1 + drivers/usb/gadget/udc/renesas_usbf.c | 3420 +++++++++++++++++ 7 files changed, 3548 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.yaml create mode 100644 drivers/usb/gadget/udc/renesas_usbf.c