From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Magnus Damm <magnus.damm@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Biju Das <biju.das.jz@bp.renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 6/6] arm64: dts: renesas: rzt2h-n2h-evk: Enable USB2.0 support
Date: Wed, 3 Sep 2025 20:20:38 +0100 [thread overview]
Message-ID: <CA+V-a8vdktLyjojLbA10SwfL71S+ELSyuVJyozrQdGp8X398tw@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdVb_5+gVDCUYYZ2Xj55gXzZATx+5vaY6uS1TuCNYb9Qeg@mail.gmail.com>
Hi Geert,
Thank you for the review.
On Wed, Sep 3, 2025 at 4:04 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Thu, 21 Aug 2025 at 18:19, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Enable USB2.0 support on RZ/T2H and RZ/N2H EVKs.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Thanks for your patch!
>
> > --- a/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dts
> > @@ -29,6 +29,28 @@
> > */
> > #define SD1_MICRO_SD 1
> >
> > +/*
> > + * USB Pin Configuration:
> > + *
> > + * This board is equipped with three USB connectors: Type-A (CN80), Mini-B (CN79),
> > + * and Micro-AB (CN33). The RZ/T2H SoC has a single USB channel, so either the USB
> > + * host interface or the USB function interface can be used, but not both at the
> > + * same time.
>
> Please reflow the text to fit in 80 columns.
>
Ok, I will reflow it to 80 columns
> The last sentence applies to the CN80 and CN79 connectors only, right?
>
Yes, I'll reword it to say `but not both at the same time while using
CN79 and CN80 connectors.`
> > + *
> > + * By default, the Type-A (CN80) and Mini-B (CN79) connectors are enabled.
> > + * Configure the switches as follows:
> > + * - P00_0 - P00_2 (control signals for USB power supply): SW1[5] = ON
> > + * - USB_VBUSIN (used for USB function): SW7[7] = OFF; SW7[8] = ON
> > + * - USB_VBUSEN (used for USB_HF_VBUSEN): SW7[9] = OFF; SW7[10] = ON
> > + *
> > + * To enable the Micro-AB (CN33) USB OTG connector, set the following macro to 1
> > + * and configure the switches as follows:
> > + * - P00_0 - P00_2 (control signals for USB power supply): SW1[5] = ON
> > + * - USB_VBUSIN (used for USB OTG): SW7[7] = ON; SW7[8] = OFF
> > + * - USB_VBUSEN (used for USB_OTG_VBUSEN): SW7[9] = ON; SW7[10] = OFF
> > + */
> > +#define USB_OTG 0
> > +
> > #include "rzt2h-n2h-evk-common.dtsi"
> >
> > / {
> > @@ -145,4 +167,18 @@ i2c1_pins: i2c1-pins {
> > pinmux = <RZT2H_PORT_PINMUX(5, 0, 0x17)>, /* SDA */
> > <RZT2H_PORT_PINMUX(4, 7, 0x17)>; /* SCL */
> > };
> > +
> > +#if USB_OTG
> > + usb-exicen-hog {
> > + gpio-hog;
> > + gpios = <RZT2H_GPIO(0, 2) GPIO_ACTIVE_HIGH>;
> > + output-high;
> > + line-name = "usb_exicen_a";
> > + };
> > +#endif
> > +
> > + usb_pins: usb-pins {
> > + pinmux = <RZT2H_PORT_PINMUX(0, 0, 0x13)>, /* VBUS */
>
> s/VBUS/VBUSEN/?
>
OK.
> > + <RZT2H_PORT_PINMUX(0, 1, 0x13)>; /* OVRCUR */
> > + };
> > };
> > diff --git a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
> > index 80f358fb2d74..b98b0f7c1128 100644
> > --- a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
> > @@ -33,6 +33,33 @@
> > */
> > #define SD1_MICRO_SD 1
> >
> > +/*
> > + * USB Pin Configuration:
> > + *
> > + * This board is equipped with three USB connectors: Type-A (CN7), Mini-B (CN8),
> > + * and Micro-AB (CN9). The RZ/N2H SoC has a single USB channel, so either the USB
> > + * host interface or the USB function interface can be used, but not both at the
> > + * same time.
>
> Please reflow the text to fit in 80 columns.
>
OK.
> The last sentence applies to the CN7 and CN8 connectors only, right?
>
Yes. I'll reword it to say `but not both at the same time while using
CN7 and CN8 connectors`
> > + *
> > + * By default, the Type-A (CN7) and Mini-B (CN8) connectors are enabled.
> > + * Configure the switches as follows:
> > + * - P02_2 - P02_3 (control signals for USB power supply): DSW2[6] = OFF;
>
> s/DSW2[6]/DSW2[5]/?
>
The above is correct,
DSW2[5] is OFF, P00_0 to P00_2 are connected to BSC2(CN43) and GPT0(CN49).
DSW2[5] is ON, P00_0 to P00_2 are used as control signals for the USB
power-supply IC.
But we are using P02_2 and P02_3
DSW2[5] is OFF, P01_0, P01_2, P01_4 to P01_7, and P02_0 to P02_3 are
connected to ENCIF0(CN44) and GPT0(CN49), and used as control signals
for the USB power-supply IC.
> > + * - P02_2 (used for VBUSEN): DSW14[5] = OFF; DSW14[6] = ON
> > + * - P02_3 (used for USB_OVRCUR): DSW14[1] = OFF; DSW14[2] = ON
> > + * - USB_VBUSIN (used for VBUS of CN8 for function): DSW16[1] = OFF; DSW16[2] = ON
> > + * - USB_VBUSEN (used for USB_HF_VBUSEN): DSW16[3] = OFF; DSW16[4] = ON
> > + *
> > + * To enable the Micro-AB (CN9) USB OTG connector, set the following macro to 1
> > + * and configure the switches as follows:
> > + * - P02_2 - P02_3 (control signals for USB power supply): DSW2[6] = OFF;
>
> s/DSW2[6]/DSW2[5]/?
>
ditto.
> > + * - P02_2 (used for VBUSEN): DSW14[5] = OFF; DSW14[6] = ON
> > + * - P02_3 (used for USB_OVRCUR): DSW14[1] = OFF; DSW14[2] = ON
> > + * - USB_VBUSIN (used for VBUS of CN9 for OTG): DSW16[1] = ON; DSW16[2] = OFF
> > + * - USB_VBUSEN (used for USB_OTG_VBUSEN): DSW16[3] = ON; DSW16[4] = OFF
> > + * - USB_EXICEN (used for USB OTG EXICEN): DSW14[3] = OFF; DSW14[4] = ON
>
> Looks like you could use P00_0 - P00_2 instead of P02_2 - P02_3, like
> on the RZ/T2H EVK?
> But you don't want to do that because you want to use these pins for Ethernet?
>
Yes, I plan to use them for Ethernet.
> > + */
> > +#define USB_OTG 0
> > +
> > #include "rzt2h-n2h-evk-common.dtsi"
> >
> > /*
> > @@ -185,4 +212,18 @@ i2c1_pins: i2c1-pins {
> > pinmux = <RZT2H_PORT_PINMUX(3, 3, 0x17)>,
> > <RZT2H_PORT_PINMUX(3, 4, 0x17)>;
> > };
> > +
> > +#if USB_OTG
> > + usb-exicen-hog {
> > + gpio-hog;
> > + gpios = <RZT2H_GPIO(2, 4) GPIO_ACTIVE_HIGH>;
> > + output-high;
> > + line-name = "usb_exicen_a";
> > + };
> > +#endif
> > +
> > + usb_pins: usb-pins {
> > + pinmux = <RZT2H_PORT_PINMUX(2, 2, 0x13)>, /* VBUS */
>
> s/VBUS/VBUSEN/?
>
OK.
Cheers,
Prabhakar
next prev parent reply other threads:[~2025-09-03 19:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 16:19 [PATCH 0/6] arm64: dts: renesas: Add support for WDT/USB2.0 on RZ/{T2H,N2H} SoCs and EVKs Prabhakar
2025-08-21 16:19 ` [PATCH 1/6] arm64: dts: renesas: r9a09g077: Add WDT nodes Prabhakar
2025-09-03 13:47 ` Geert Uytterhoeven
2025-08-21 16:19 ` [PATCH 2/6] arm64: dts: renesas: r9a09g087: " Prabhakar
2025-09-03 13:48 ` Geert Uytterhoeven
2025-08-21 16:19 ` [PATCH 3/6] arm64: dts: renesas: rzt2h-evk-common: Enable WDT2 Prabhakar
2025-09-03 13:49 ` Geert Uytterhoeven
2025-09-04 9:51 ` Geert Uytterhoeven
2025-08-21 16:19 ` [PATCH 4/6] arm64: dts: renesas: r9a09g077: Add USB2.0 support Prabhakar
2025-09-03 14:05 ` Geert Uytterhoeven
2025-09-03 14:51 ` Lad, Prabhakar
2025-09-04 9:02 ` Geert Uytterhoeven
2025-08-21 16:19 ` [PATCH 5/6] arm64: dts: renesas: r9a09g087: " Prabhakar
2025-09-03 14:06 ` Geert Uytterhoeven
2025-09-04 9:02 ` Geert Uytterhoeven
2025-08-21 16:19 ` [PATCH 6/6] arm64: dts: renesas: rzt2h-n2h-evk: Enable " Prabhakar
2025-09-03 15:04 ` Geert Uytterhoeven
2025-09-03 19:20 ` Lad, Prabhakar [this message]
2025-09-04 7:51 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+V-a8vdktLyjojLbA10SwfL71S+ELSyuVJyozrQdGp8X398tw@mail.gmail.com \
--to=prabhakar.csengg@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert@linux-m68k.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).