diff mbox series

[V2,2/2] ARM: dts: bcm2711: Add generic xHCI

Message ID 20231130154229.22334-3-wahrenst@gmx.net (mailing list archive)
State New, archived
Headers show
Series ARM: dts: bcm2711: Add generic xHCI | expand

Commit Message

Stefan Wahren Nov. 30, 2023, 3:42 p.m. UTC
The BCM2711 SoC also has a generic xHCI. The USB port is currently
only usable on the Compute Module 4 (e.g. via IO board). Because
DWC2 and xHCI share the same PHY, we let the bootloader enable it
on demand.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi |  5 +++++
 arch/arm/boot/dts/broadcom/bcm2711.dtsi     | 14 ++++++++++++++
 2 files changed, 19 insertions(+)

--
2.34.1

Comments

Florian Fainelli Nov. 30, 2023, 6:09 p.m. UTC | #1
On 11/30/23 07:42, Stefan Wahren wrote:
> The BCM2711 SoC also has a generic xHCI. The USB port is currently
> only usable on the Compute Module 4 (e.g. via IO board). Because
> DWC2 and xHCI share the same PHY, we let the bootloader enable it
> on demand.
> 
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>

And this gives a consistent + 4MB/sec throughput compared to dwc2, so 
this looks great!
Justin Chen Nov. 30, 2023, 6:28 p.m. UTC | #2
On 11/30/23 7:42 AM, Stefan Wahren wrote:
> The BCM2711 SoC also has a generic xHCI. The USB port is currently
> only usable on the Compute Module 4 (e.g. via IO board). Because
> DWC2 and xHCI share the same PHY, we let the bootloader enable it
> on demand.
> 
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>

Reviewed-by: Justin Chen <justin.chen@broadcom.com>

> ---
>   arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi |  5 +++++
>   arch/arm/boot/dts/broadcom/bcm2711.dtsi     | 14 ++++++++++++++
>   2 files changed, 19 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
> index 98817a6675b9..d233a191c139 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
> +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
> @@ -1,6 +1,7 @@
>   // SPDX-License-Identifier: GPL-2.0
>   #include "bcm2835-rpi.dtsi"
> 
> +#include <dt-bindings/power/raspberrypi-power.h>
>   #include <dt-bindings/reset/raspberrypi,firmware-reset.h>
> 
>   / {
> @@ -76,3 +77,7 @@ &v3d {
>   &vchiq {
>   	interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
>   };
> +
> +&xhci {
> +	power-domains = <&power RPI_POWER_DOMAIN_USB>;
> +};
> diff --git a/arch/arm/boot/dts/broadcom/bcm2711.dtsi b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
> index 4a379a14966d..8e68884c2f0d 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi
> +++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
> @@ -604,6 +604,20 @@ genet_mdio: mdio@e14 {
>   			};
>   		};
> 
> +		xhci: usb@7e9c0000 {
> +			compatible = "brcm,xhci-brcm-v2";
> +			reg = <0x0 0x7e9c0000 0x100000>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
> +			/* DWC2 and this IP block share the same USB PHY,
> +			 * enabling both at the same time results in lockups.
> +			 * So keep this node disabled and let the bootloader
> +			 * decide which interface should be enabled.
> +			 */
> +			status = "disabled";
> +		};
> +
>   		v3d: gpu@7ec00000 {
>   			compatible = "brcm,2711-v3d";
>   			reg = <0x0 0x7ec00000 0x4000>,
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
index 98817a6675b9..d233a191c139 100644
--- a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
@@ -1,6 +1,7 @@ 
 // SPDX-License-Identifier: GPL-2.0
 #include "bcm2835-rpi.dtsi"

+#include <dt-bindings/power/raspberrypi-power.h>
 #include <dt-bindings/reset/raspberrypi,firmware-reset.h>

 / {
@@ -76,3 +77,7 @@  &v3d {
 &vchiq {
 	interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
 };
+
+&xhci {
+	power-domains = <&power RPI_POWER_DOMAIN_USB>;
+};
diff --git a/arch/arm/boot/dts/broadcom/bcm2711.dtsi b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
index 4a379a14966d..8e68884c2f0d 100644
--- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
@@ -604,6 +604,20 @@  genet_mdio: mdio@e14 {
 			};
 		};

+		xhci: usb@7e9c0000 {
+			compatible = "brcm,xhci-brcm-v2";
+			reg = <0x0 0x7e9c0000 0x100000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+			/* DWC2 and this IP block share the same USB PHY,
+			 * enabling both at the same time results in lockups.
+			 * So keep this node disabled and let the bootloader
+			 * decide which interface should be enabled.
+			 */
+			status = "disabled";
+		};
+
 		v3d: gpu@7ec00000 {
 			compatible = "brcm,2711-v3d";
 			reg = <0x0 0x7ec00000 0x4000>,