Skip to contentSkip to conversation

arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports

PATCH In review Rafał Miłecki 2 participants 4 messages Feb 28, 2023 – Mar 14, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports

From: Rafał Miłecki <[email protected]>

BCM4908 has 3 USB controllers each with 2 USB ports. Home routers often have LEDs indicating state of selected USB ports. Describe those SoC USB ports to allow using them as LED trigger sources.

---
 .../boot/dts/broadcom/bcmbca/bcm4908.dtsi     | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +39 -0
index f4cf0f835db7..457805efb385 100644
@@ -148,6 +148,19 @@ ehci: usb@c300 {
 			interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
 			phys = <&usb_phy PHY_TYPE_USB2>;
 			status = "disabled";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ehci_port1: port@1 {
+				reg = <1>;
+				#trigger-source-cells = <0>;
+			};
+
+			ehci_port2: port@2 {
+				reg = <2>;
+				#trigger-source-cells = <0>;
+			};
 		};
 
 		ohci: usb@c400 {
@@ -156,6 +169,19 @@ ohci: usb@c400 {
 			interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
 			phys = <&usb_phy PHY_TYPE_USB2>;
 			status = "disabled";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ohci_port1: port@1 {
+				reg = <1>;
+				#trigger-source-cells = <0>;
+			};
+
+			ohci_port2: port@2 {
+				reg = <2>;
+				#trigger-source-cells = <0>;
+			};
 		};
 
 		xhci: usb@d000 {
@@ -164,6 +190,19 @@ xhci: usb@d000 {
 			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
 			phys = <&usb_phy PHY_TYPE_USB3>;
 			status = "disabled";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			xhci_port1: port@1 {
+				reg = <1>;
+				#trigger-source-cells = <0>;
+			};
+
+			xhci_port2: port@2 {
+				reg = <2>;
+				#trigger-source-cells = <0>;
+			};
 		};
 
 		bus@80000 {
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 arm64: dts: broadcom: bcmbca: bcm4908: add Netgear R8000P USB LED triggers

From: Rafał Miłecki <[email protected]>

This device has 2 USB LEDs meant to be triggered by devices in relevant USB ports.

---
 .../arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts +4 -0
index d8b60575eb4f..78204d71ecd2 100644
@@ -58,12 +58,16 @@ led-usb2 {
 			function = "usb2";
 			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ohci_port1>, <&ehci_port1>;
+			linux,default-trigger = "usbport";
 		};
 
 		led-usb3 {
 			function = "usb3";
 			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>;
+			linux,default-trigger = "usbport";
 		};
 
 		led-wifi {
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/3 arm64: dts: broadcom: bcmbca: bcm4908: add TP-Link C2300 USB LED triggers

In reply to Rafał Miłecki

From: Rafał Miłecki <[email protected]>

This device has 2 USB LEDs meant to be triggered by devices in relevant USB ports.

While at it fix typo in USB LED name.

---
 .../dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts +5 -1
index 296393d4aaab..fcf092c81b59 100644
@@ -64,12 +64,16 @@ led-usb2 {
 			function = "usb2";
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ohci_port1>, <&ehci_port1>;
+			linux,default-trigger = "usbport";
 		};
 
 		led-usb3 {
-			function = "usbd3";
+			function = "usb3";
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>;
+			linux,default-trigger = "usbport";
 		};
 
 		led-brightness {
Signature · 1 line
2.34.1