devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes
@ 2025-08-28 13:50 Andrea della Porta
  2025-08-28 13:50 ` [PATCH 2/2] arm64: dts: broadcom: Enable USB devicetree entries for Rpi5 Andrea della Porta
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrea della Porta @ 2025-08-28 13:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Andrea della Porta,
	devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	iivanov, svarbanov, mbrugger, Jonathan Bell, Phil Elwell

The RaspberryPi 5 has RP1 chipset containing two USB host controller,
while presenting two USB 2.0 and two USB 3.0 ports to the outside.

Add the relevant USB nodes to the devicetree.

Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 arch/arm64/boot/dts/broadcom/rp1-common.dtsi | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/rp1-common.dtsi b/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
index 5002a375eb0b..116617fcb1eb 100644
--- a/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
+++ b/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
@@ -39,4 +39,32 @@ rp1_gpio: pinctrl@400d0000 {
 			     <1 IRQ_TYPE_LEVEL_HIGH>,
 			     <2 IRQ_TYPE_LEVEL_HIGH>;
 	};
+
+	rp1_usb0: usb@40200000 {
+		reg = <0x00 0x40200000  0x0 0x100000>;
+		compatible = "snps,dwc3";
+		dr_mode = "host";
+		interrupts = <31 IRQ_TYPE_EDGE_RISING>;
+		usb3-lpm-capable;
+		snps,dis_rxdet_inp3_quirk;
+		snps,parkmode-disable-ss-quirk;
+		snps,parkmode-disable-hs-quirk;
+		snps,tx-max-burst = /bits/ 8 <8>;
+		snps,tx-thr-num-pkt = /bits/ 8 <2>;
+		status = "disabled";
+	};
+
+	rp1_usb1: usb@40300000 {
+		reg = <0x00 0x40300000  0x0 0x100000>;
+		compatible = "snps,dwc3";
+		dr_mode = "host";
+		interrupts = <36 IRQ_TYPE_EDGE_RISING>;
+		usb3-lpm-capable;
+		snps,dis_rxdet_inp3_quirk;
+		snps,parkmode-disable-ss-quirk;
+		snps,parkmode-disable-hs-quirk;
+		snps,tx-max-burst = /bits/ 8 <8>;
+		snps,tx-thr-num-pkt = /bits/ 8 <2>;
+		status = "disabled";
+	};
 };
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] arm64: dts: broadcom: Enable USB devicetree entries for Rpi5
  2025-08-28 13:50 [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes Andrea della Porta
@ 2025-08-28 13:50 ` Andrea della Porta
  2025-09-04 10:46 ` [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes Stanimir Varbanov
  2025-09-04 11:05 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 4+ messages in thread
From: Andrea della Porta @ 2025-08-28 13:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Andrea della Porta,
	devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	iivanov, svarbanov, mbrugger, Jonathan Bell, Phil Elwell

RaspberryPi 5 presents two USB 2.0 and two USB 3.0 ports.

Configure and enable the USB nodes in the devicetree.

Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 .../arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
index 865f092608a6..95ab67c7aa47 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
@@ -21,3 +21,20 @@
 &pcie2 {
 	#include "rp1-nexus.dtsi"
 };
+
+&rp1_gpio {
+	usb_vbus_default_state: usb-vbus-default-state {
+		function = "vbus1";
+		groups = "vbus1";
+	};
+};
+
+&rp1_usb0 {
+	pinctrl-0 = <&usb_vbus_default_state>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&rp1_usb1 {
+	status = "okay";
+};
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes
  2025-08-28 13:50 [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes Andrea della Porta
  2025-08-28 13:50 ` [PATCH 2/2] arm64: dts: broadcom: Enable USB devicetree entries for Rpi5 Andrea della Porta
@ 2025-09-04 10:46 ` Stanimir Varbanov
  2025-09-04 11:05 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 4+ messages in thread
From: Stanimir Varbanov @ 2025-09-04 10:46 UTC (permalink / raw)
  To: Andrea della Porta, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, devicetree,
	linux-rpi-kernel, linux-arm-kernel, linux-kernel, iivanov,
	svarbanov, mbrugger, Jonathan Bell, Phil Elwell

Hi Andrea,

Thank you for the patch!

On 8/28/25 4:50 PM, Andrea della Porta wrote:
> The RaspberryPi 5 has RP1 chipset containing two USB host controller,
> while presenting two USB 2.0 and two USB 3.0 ports to the outside.
> 
> Add the relevant USB nodes to the devicetree.
> 
> Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
> ---
>  arch/arm64/boot/dts/broadcom/rp1-common.dtsi | 28 ++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/broadcom/rp1-common.dtsi b/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
> index 5002a375eb0b..116617fcb1eb 100644
> --- a/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
> +++ b/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
> @@ -39,4 +39,32 @@ rp1_gpio: pinctrl@400d0000 {
>  			     <1 IRQ_TYPE_LEVEL_HIGH>,
>  			     <2 IRQ_TYPE_LEVEL_HIGH>;
>  	};
> +
> +	rp1_usb0: usb@40200000 {
> +		reg = <0x00 0x40200000  0x0 0x100000>;
> +		compatible = "snps,dwc3";
> +		dr_mode = "host";
> +		interrupts = <31 IRQ_TYPE_EDGE_RISING>;
> +		usb3-lpm-capable;
> +		snps,dis_rxdet_inp3_quirk;
> +		snps,parkmode-disable-ss-quirk;
> +		snps,parkmode-disable-hs-quirk;
> +		snps,tx-max-burst = /bits/ 8 <8>;
> +		snps,tx-thr-num-pkt = /bits/ 8 <2>;
> +		status = "disabled";
> +	};
> +

I'd order the generic properties first and then vendor specific.
Something like this:

rp1_usb0: usb@40200000 {
	compatible = "snps,dwc3";
	reg = <0x00 0x40200000 0x0 0x100000>;
	interrupts = <31 IRQ_TYPE_EDGE_RISING>;
	dr_mode = "host";
        ....
}

> +	rp1_usb1: usb@40300000 {
> +		reg = <0x00 0x40300000  0x0 0x100000>;
> +		compatible = "snps,dwc3";
> +		dr_mode = "host";
> +		interrupts = <36 IRQ_TYPE_EDGE_RISING>;
> +		usb3-lpm-capable;
> +		snps,dis_rxdet_inp3_quirk;
> +		snps,parkmode-disable-ss-quirk;
> +		snps,parkmode-disable-hs-quirk;
> +		snps,tx-max-burst = /bits/ 8 <8>;
> +		snps,tx-thr-num-pkt = /bits/ 8 <2>;
> +		status = "disabled";
> +	};
>  };


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes
  2025-08-28 13:50 [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes Andrea della Porta
  2025-08-28 13:50 ` [PATCH 2/2] arm64: dts: broadcom: Enable USB devicetree entries for Rpi5 Andrea della Porta
  2025-09-04 10:46 ` [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes Stanimir Varbanov
@ 2025-09-04 11:05 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-04 11:05 UTC (permalink / raw)
  To: Andrea della Porta, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, devicetree,
	linux-rpi-kernel, linux-arm-kernel, linux-kernel, iivanov,
	svarbanov, mbrugger, Jonathan Bell, Phil Elwell

On 28/08/2025 15:50, Andrea della Porta wrote:
> The RaspberryPi 5 has RP1 chipset containing two USB host controller,
> while presenting two USB 2.0 and two USB 3.0 ports to the outside.
> 
> Add the relevant USB nodes to the devicetree.
> 
> Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
> ---
>  arch/arm64/boot/dts/broadcom/rp1-common.dtsi | 28 ++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/broadcom/rp1-common.dtsi b/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
> index 5002a375eb0b..116617fcb1eb 100644
> --- a/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
> +++ b/arch/arm64/boot/dts/broadcom/rp1-common.dtsi
> @@ -39,4 +39,32 @@ rp1_gpio: pinctrl@400d0000 {
>  			     <1 IRQ_TYPE_LEVEL_HIGH>,
>  			     <2 IRQ_TYPE_LEVEL_HIGH>;
>  	};
> +
> +	rp1_usb0: usb@40200000 {
> +		reg = <0x00 0x40200000  0x0 0x100000>;
> +		compatible = "snps,dwc3";
Please order properties and nodes according to DTS coding style.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-04 11:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 13:50 [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes Andrea della Porta
2025-08-28 13:50 ` [PATCH 2/2] arm64: dts: broadcom: Enable USB devicetree entries for Rpi5 Andrea della Porta
2025-09-04 10:46 ` [PATCH 1/2] arm64: dts: broadcom: rp1: Add USB nodes Stanimir Varbanov
2025-09-04 11:05 ` Krzysztof Kozlowski

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).