Message ID | 20221107135825.583877-5-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2066039wru; Mon, 7 Nov 2022 06:01:07 -0800 (PST) X-Google-Smtp-Source: AMsMyM7/AX2JM2Y+ZF9OATeoL8pwEhSBr4Q+3P7A8+FF1hSkUaIA5erXJ74Fbt/0JV9H4FrlRluC X-Received: by 2002:a17:90b:19ca:b0:212:d2c4:83ac with SMTP id nm10-20020a17090b19ca00b00212d2c483acmr68814247pjb.166.1667829667282; Mon, 07 Nov 2022 06:01:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667829667; cv=none; d=google.com; s=arc-20160816; b=wgMJhH0LsTjt3WPxdFCeloO5J9aZSG/bq4P4kgMCU0rXqe9sbq3sUZuR4e7Sl9nrNr M6HcfUw6wk4lgKVbfTafCe3OzcUi/EIsK+lYKjZ5Wmi+AL5tuKtfrDK+aR/362L3xQk+ mlXBzG4ykIlbvNjJeVOqe5EWgsInO/Mdjp/eN7+LSta7QoNkf1ocQcrPoX0fGQLFZ5/p 22AwxyCV5Pr1+w9C+88R6x8fO8pcHMq5dsZvgaICc3kheJxbo4C2X4712BugfVQbo5hU Q3A39JPLo7rPMr8guZLywqs22G1FetJarMD7nojHqxDBttWtPNw/ntLX+dMr2TDwqb9m OTcg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Nr0MWFd6v89DxvG5hmkKma8o7WLm2qLInkEbwYJ1akc=; b=z4CWJpwDxGlt0389IxO/uYFO9msC4jCbvhFmV86DttTTvJc+RNbmvnhQUI3dfOYeOT yvvmLeQ8I0cAkXgU/dhtAUrr3XjhlLF91Zfyz1HNL/DzvRghor9NmRv6fNOYxXDxILFF zurL8bfswvz9znryF/2SKlVRnTrPkrWh26d/E2OfK2WYs8YfWuWQNyn4uif1dW/tMATE G1BF2V7PktHhW6O8LXg/YAJQSZWTefI7MRKv4qLBM6eQ1iHahcvv40OL3UydRQqhzAdL xTCvdWnH6zcQXFnPjVidbVqeVo3xtFhrkHT6SwOjC3QbhYwPVQP2mWRb1yLA2oH8t68i 2n1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="fd1/3FMy"; 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 ds9-20020a056a004ac900b0053836f22d73si8881906pfb.214.2022.11.07.06.00.52; Mon, 07 Nov 2022 06:01:07 -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="fd1/3FMy"; 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 S232093AbiKGOAJ (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Mon, 7 Nov 2022 09:00:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232099AbiKGOAE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Nov 2022 09:00:04 -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 56183635E; Mon, 7 Nov 2022 06:00:01 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id EA3F24000D; Mon, 7 Nov 2022 13:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667829600; 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: in-reply-to:in-reply-to:references:references; bh=Nr0MWFd6v89DxvG5hmkKma8o7WLm2qLInkEbwYJ1akc=; b=fd1/3FMy9oIhCDEYAPt26LG7Aho5Yiu2RZ2E8Ah607tirDLJFySgvqDtzWNkfnBZn7YKxs GVOo/407JcsjxNx9eIGvl2bQJ8GZScaHKWtM0c2GXVTuMdUo6CLs8D7UxP4uccKzAsd6Tz Ed3qfyb24ALN3oPxrdXm/1Ho2t31fUBgC9b3rO7rZ23zDT1PlcUVclEcWrFfAS+MciKtMv 5xYXcSTvpZlGzIg5bD0eO1BQro+jmPiShJQ/IlQaqT1aG1Jd71UFSZcwJjrN1v1QyP8cso pZX5/f0+Gi/0BwRoeH7KIk8N6wu1LgQxO2gRyRoF14AsW0SyT3Dm59j0CDGMOQ== From: Herve Codina <herve.codina@bootlin.com> To: Geert Uytterhoeven <geert+renesas@glider.be>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Herve Codina <herve.codina@bootlin.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Magnus Damm <magnus.damm@gmail.com>, Gareth Williams <gareth.williams.jx@renesas.com> 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 <thomas.petazzoni@bootlin.com>, Miquel Raynal <miquel.raynal@bootlin.com> Subject: [PATCH 4/7] dt-bindings: usb: add the Renesas USBF controller binding Date: Mon, 7 Nov 2022 14:58:22 +0100 Message-Id: <20221107135825.583877-5-herve.codina@bootlin.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221107135825.583877-1-herve.codina@bootlin.com> References: <20221107135825.583877-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748846160924813228?= X-GMAIL-MSGID: =?utf-8?q?1748846160924813228?= |
Series |
Add the Renesas USBF controller support
|
|
Commit Message
Herve Codina
Nov. 7, 2022, 1:58 p.m. UTC
The Renesas USBF controller is an USB2.0 device controller
(UDC) available in Renesas r9a06g032 SoC (RZ/N1 family).
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
.../devicetree/bindings/usb/renesas,usbf.yaml | 64 +++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/renesas,usbf.yaml
Comments
Hi Hervé, On Mon, Nov 7, 2022 at 3:00 PM Herve Codina <herve.codina@bootlin.com> wrote: > The Renesas USBF controller is an USB2.0 device controller > (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family). > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> Thanks for your patch! > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas USBF (USB Function) controller binding > + > +description: | > + The Renesas USBF controller is an USB2.0 device > + controller (UDC). > + > +maintainers: > + - Herve Codina <herve.codina@bootlin.com> Hervé? ;-) > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - renesas,r9a06g032-usbf > + - const: renesas,rzn1-usbf > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Internal bus clock (AHB) for Function > + - description: Internal bus clock (AHB) for Power Management > + clock-names: > + items: > + - const: hclkf > + - const: hclkpm power-domains? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, On Mon, 7 Nov 2022 15:26:43 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote: > Hi Hervé, > > On Mon, Nov 7, 2022 at 3:00 PM Herve Codina <herve.codina@bootlin.com> wrote: > > The Renesas USBF controller is an USB2.0 device controller > > (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family). > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > Thanks for your patch! > [...] > > +maintainers: > > + - Herve Codina <herve.codina@bootlin.com> > > Hervé? ;-) Sure, you're right but in all my commits, signed-off-by and other places where my email appears, I spell Hervé as "Herve" So, to be consistent and avoid future confusion, I prefer to keep Herve here. > > > + > > +properties: > > + compatible: > > + oneOf: > > + - items: > > + - enum: > > + - renesas,r9a06g032-usbf > > + - const: renesas,rzn1-usbf > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + items: > > + - description: Internal bus clock (AHB) for Function > > + - description: Internal bus clock (AHB) for Power Management > > + clock-names: > > + items: > > + - const: hclkf > > + - const: hclkpm > > power-domains? Will be added in v2. Thanks for the review, Hervé
On 07/11/2022 14:58, Herve Codina wrote: > The Renesas USBF controller is an USB2.0 device controller > (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family). > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > --- > .../devicetree/bindings/usb/renesas,usbf.yaml | 64 +++++++++++++++++++ > 1 file changed, 64 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/renesas,usbf.yaml > > diff --git a/Documentation/devicetree/bindings/usb/renesas,usbf.yaml b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml > new file mode 100644 > index 000000000000..f2b146d9d37b > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml# Filename based on compatible, so renesas,rzn1-usbf.yaml. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas USBF (USB Function) controller binding > + > +description: | > + The Renesas USBF controller is an USB2.0 device > + controller (UDC). > + > +maintainers: > + - Herve Codina <herve.codina@bootlin.com> > + > +properties: > + compatible: > + oneOf: You have only one possibility, so oneOf is not needed. Unless you already predict it will grow with new incompatible lists? > + - items: > + - enum: > + - renesas,r9a06g032-usbf > + - const: renesas,rzn1-usbf > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Internal bus clock (AHB) for Function > + - description: Internal bus clock (AHB) for Power Management Blank line > + clock-names: > + items: > + - const: hclkf > + - const: hclkpm > + > + interrupts: > + items: > + - description: The USBF EPC interrupt > + - description: The USBF AHB-EPC interrupt > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/clock/r9a06g032-sysctrl.h> > + > + usb@4001e000 { > + compatible = "renesas,r9a06g032-usbf", "renesas,rzn1-usbf"; > + reg = <0x4001e000 0x2000>; > + interrupts = No need for line break. It's not helping in readability. > + <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&sysctrl R9A06G032_HCLK_USBF>, > + <&sysctrl R9A06G032_HCLK_USBPM>; > + clock-names = "hclkf", "hclkpm"; > + }; Best regards, Krzysztof
Hi Krzysztof, On Mon, 7 Nov 2022 19:24:01 +0100 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 07/11/2022 14:58, Herve Codina wrote: > > The Renesas USBF controller is an USB2.0 device controller > > (UDC) available in Renesas r9a06g032 SoC (RZ/N1 family). > > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > --- > > .../devicetree/bindings/usb/renesas,usbf.yaml | 64 +++++++++++++++++++ > > 1 file changed, 64 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/usb/renesas,usbf.yaml > > > > diff --git a/Documentation/devicetree/bindings/usb/renesas,usbf.yaml b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml > > new file mode 100644 > > index 000000000000..f2b146d9d37b > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml > > @@ -0,0 +1,64 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml# > > Filename based on compatible, so renesas,rzn1-usbf.yaml. Will be fixed in the v2 series. > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Renesas USBF (USB Function) controller binding > > + > > +description: | > > + The Renesas USBF controller is an USB2.0 device > > + controller (UDC). > > + > > +maintainers: > > + - Herve Codina <herve.codina@bootlin.com> > > + > > +properties: > > + compatible: > > + oneOf: > > You have only one possibility, so oneOf is not needed. Unless you > already predict it will grow with new incompatible lists? No new compatible planned right now. So, oneOf will be removed in the v2 series. > > > + - items: > > + - enum: > > + - renesas,r9a06g032-usbf > > + - const: renesas,rzn1-usbf > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + items: > > + - description: Internal bus clock (AHB) for Function > > + - description: Internal bus clock (AHB) for Power Management > > Blank line Will be fixed in the v2 series > > > + clock-names: > > + items: > > + - const: hclkf > > + - const: hclkpm > > + > > + interrupts: > > + items: > > + - description: The USBF EPC interrupt > > + - description: The USBF AHB-EPC interrupt > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - clock-names > > + - interrupts > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > + #include <dt-bindings/clock/r9a06g032-sysctrl.h> > > + > > + usb@4001e000 { > > + compatible = "renesas,r9a06g032-usbf", "renesas,rzn1-usbf"; > > + reg = <0x4001e000 0x2000>; > > + interrupts = > > No need for line break. It's not helping in readability. Will be fixed in the v2 series > > > > + <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&sysctrl R9A06G032_HCLK_USBF>, > > + <&sysctrl R9A06G032_HCLK_USBPM>; > > + clock-names = "hclkf", "hclkpm"; > > + }; > > Best regards, > Krzysztof > Thanks for the review, Hervé
diff --git a/Documentation/devicetree/bindings/usb/renesas,usbf.yaml b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml new file mode 100644 index 000000000000..f2b146d9d37b --- /dev/null +++ b/Documentation/devicetree/bindings/usb/renesas,usbf.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/renesas,usbf.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas USBF (USB Function) controller binding + +description: | + The Renesas USBF controller is an USB2.0 device + controller (UDC). + +maintainers: + - Herve Codina <herve.codina@bootlin.com> + +properties: + compatible: + oneOf: + - items: + - enum: + - renesas,r9a06g032-usbf + - const: renesas,rzn1-usbf + + reg: + maxItems: 1 + + clocks: + items: + - description: Internal bus clock (AHB) for Function + - description: Internal bus clock (AHB) for Power Management + clock-names: + items: + - const: hclkf + - const: hclkpm + + interrupts: + items: + - description: The USBF EPC interrupt + - description: The USBF AHB-EPC interrupt + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/r9a06g032-sysctrl.h> + + usb@4001e000 { + compatible = "renesas,r9a06g032-usbf", "renesas,rzn1-usbf"; + reg = <0x4001e000 0x2000>; + interrupts = + <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_USBF>, + <&sysctrl R9A06G032_HCLK_USBPM>; + clock-names = "hclkf", "hclkpm"; + };