[source] bcm53xx: backport DTS commits that setup USB LEDs

LEDE Commits lede-commits at lists.infradead.org
Thu Aug 17 02:06:09 PDT 2017


rmilecki pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/cae20f64b555cfb76f74eb115b2d01fcb22ca462

commit cae20f64b555cfb76f74eb115b2d01fcb22ca462
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Thu Aug 17 09:43:37 2017 +0200

    bcm53xx: backport DTS commits that setup USB LEDs
    
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 ...5301X-Specify-USB-ports-for-each-controll.patch |  74 +++++++++++
 ...5301X-Specify-USB-ports-for-USB-LEDs-of-f.patch | 139 +++++++++++++++++++++
 ...-Add-power-button-for-Buffalo-WZR-1750DHP.patch |   2 +-
 3 files changed, 214 insertions(+), 1 deletion(-)

diff --git a/target/linux/bcm53xx/patches-4.4/049-v4.14-0001-ARM-dts-BCM5301X-Specify-USB-ports-for-each-controll.patch b/target/linux/bcm53xx/patches-4.4/049-v4.14-0001-ARM-dts-BCM5301X-Specify-USB-ports-for-each-controll.patch
new file mode 100644
index 0000000..9857dec
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.4/049-v4.14-0001-ARM-dts-BCM5301X-Specify-USB-ports-for-each-controll.patch
@@ -0,0 +1,74 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Tue, 27 Jun 2017 19:35:27 +0200
+Subject: [PATCH] ARM: dts: BCM5301X: Specify USB ports for each controller
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Northstar has 3 controllers: OHCI and EHCI (each with 2 ports) and XHCI
+(with just 1 port). Describe them in the DT. In future this will allow
+to reference them as trigger sources.
+
+Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm5301x.dtsi | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -272,6 +272,19 @@
+ 				reg = <0x00021000 0x1000>;
+ 				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ 				phys = <&usb2_phy>;
++
++				#address-cells = <1>;
++				#size-cells = <0>;
++
++				ehci_port1: port at 1 {
++					reg = <1>;
++					#trigger-source-cells = <0>;
++				};
++
++				ehci_port2: port at 2 {
++					reg = <2>;
++					#trigger-source-cells = <0>;
++				};
+ 			};
+ 
+ 			ohci: ohci at 22000 {
+@@ -280,6 +293,19 @@
+ 				compatible = "generic-ohci";
+ 				reg = <0x00022000 0x1000>;
+ 				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
++
++				#address-cells = <1>;
++				#size-cells = <0>;
++
++				ohci_port1: port at 1 {
++					reg = <1>;
++					#trigger-source-cells = <0>;
++				};
++
++				ohci_port2: port at 2 {
++					reg = <2>;
++					#trigger-source-cells = <0>;
++				};
+ 			};
+ 		};
+ 
+@@ -300,6 +326,14 @@
+ 				interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+ 				phys = <&usb3_phy>;
+ 				phy-names = "usb";
++
++				#address-cells = <1>;
++				#size-cells = <0>;
++
++				xhci_port1: port at 1 {
++					reg = <1>;
++					#trigger-source-cells = <0>;
++				};
+ 			};
+ 		};
+ 
diff --git a/target/linux/bcm53xx/patches-4.4/049-v4.14-0002-ARM-dts-BCM5301X-Specify-USB-ports-for-USB-LEDs-of-f.patch b/target/linux/bcm53xx/patches-4.4/049-v4.14-0002-ARM-dts-BCM5301X-Specify-USB-ports-for-USB-LEDs-of-f.patch
new file mode 100644
index 0000000..c2195b1
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.4/049-v4.14-0002-ARM-dts-BCM5301X-Specify-USB-ports-for-USB-LEDs-of-f.patch
@@ -0,0 +1,139 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Wed, 2 Aug 2017 06:40:41 +0200
+Subject: [PATCH] ARM: dts: BCM5301X: Specify USB ports for USB LEDs of few
+ devices
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This uses trigger-sources documented in commit 80dc6e1cd85fc ("dt-bindings:
+leds: document new trigger-sources property") to specify USB ports. Such an
+information can be used by operating system to setup LEDs behavior.
+
+I updated dts files for 7 devices I own and I was able to test.
+
+Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts  | 4 ++++
+ arch/arm/boot/dts/bcm4708-netgear-r6250.dts        | 3 +++
+ arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts      | 6 ++++++
+ arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 ++++
+ arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts  | 5 +++++
+ arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts      | 3 +++
+ arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts      | 3 +++
+ 7 files changed, 28 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
+@@ -52,6 +52,10 @@
+ 		usb {
+ 			label = "bcm53xx:blue:usb";
+ 			gpios = <&hc595 0 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&ohci_port1>, <&ehci_port1>,
++					  <&xhci_port1>, <&ohci_port2>,
++					  <&ehci_port2>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		power0 {
+--- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
++++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
+@@ -48,6 +48,9 @@
+ 		usb {
+ 			label = "bcm53xx:blue:usb";
+ 			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
++			trigger-sources = <&ohci_port1>, <&ehci_port1>,
++					  <&xhci_port1>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		wireless {
+--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
++++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
+@@ -42,16 +42,22 @@
+ 		usb2 {
+ 			label = "bcm53xx:white:usb2";
+ 			gpios = <&chipcommon 3 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&ohci_port2>, <&ehci_port2>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		usb3-white {
+ 			label = "bcm53xx:white:usb3";
+ 			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&xhci_port1>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		usb3-green {
+ 			label = "bcm53xx:green:usb3";
+ 			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&ohci_port1>, <&ehci_port1>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		wps {
+--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
+@@ -36,6 +36,8 @@
+ 		usb2-port1 {
+ 			label = "bcm53xx:green:usb2-port1";
+ 			gpios = <&chipcommon 2 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&ohci_port1>, <&ehci_port1>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		power {
+@@ -67,6 +69,8 @@
+ 		usb2-port2 {
+ 			label = "bcm53xx:green:usb2-port2";
+ 			gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&ohci_port2>, <&ehci_port2>;
++			linux,default-trigger = "usbport";
+ 		};
+ 	};
+ 
+--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
+@@ -46,11 +46,16 @@
+ 		usb3 {
+ 			label = "bcm53xx:blue:usb3";
+ 			gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&ohci_port1>, <&ehci_port1>,
++					  <&xhci_port1>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		usb2 {
+ 			label = "bcm53xx:blue:usb2";
+ 			gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
++			trigger-sources = <&ohci_port2>, <&ehci_port2>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		wan-blue {
+--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
+@@ -71,6 +71,9 @@
+ 		usb3-white {
+ 			label = "bcm53xx:white:usb3";
+ 			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
++			trigger-sources = <&ohci_port1>, <&ehci_port1>,
++					  <&xhci_port1>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		2ghz {
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
+@@ -59,6 +59,9 @@
+ 		usb3	{
+ 			label = "bcm53xx:green:usb3";
+ 			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
++			trigger-sources = <&ohci_port1>, <&ehci_port1>,
++					  <&xhci_port1>;
++			linux,default-trigger = "usbport";
+ 		};
+ 
+ 		status	{
diff --git a/target/linux/bcm53xx/patches-4.4/332-ARM-BCM5301X-Add-power-button-for-Buffalo-WZR-1750DHP.patch b/target/linux/bcm53xx/patches-4.4/332-ARM-BCM5301X-Add-power-button-for-Buffalo-WZR-1750DHP.patch
index 425c420..3903499 100644
--- a/target/linux/bcm53xx/patches-4.4/332-ARM-BCM5301X-Add-power-button-for-Buffalo-WZR-1750DHP.patch
+++ b/target/linux/bcm53xx/patches-4.4/332-ARM-BCM5301X-Add-power-button-for-Buffalo-WZR-1750DHP.patch
@@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
-@@ -98,6 +98,12 @@
+@@ -102,6 +102,12 @@
  		#address-cells = <1>;
  		#size-cells = <0>;
  



More information about the lede-commits mailing list