ARM: dts: BCM5301X: EA9200: various fixes
Subsystems (2)
cover ARM: dts: BCM5301X: EA9200: various fixes
This series adds extra definitions for the EA9200 that were missing for whatever reason.
Rosen Penev (6):
ARM: dts: BCM5301X: EA9200: add WiFi button
ARM: dts: BCM5301X: EA9200: add USB GPIOs
ARM: dts: BCM5301X: EA9200: add LEDs
ARM: dts: BCM5301X: EA9200: add wifi definitions
ARM: dts: BCM5301X: EA9200: specify partitions
ARM: dts: BCM5301X: EA9200: set MAC from nvram
.../dts/broadcom/bcm4709-linksys-ea9200.dts | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+)
--
2.53.0
PATCH 1/6 ARM: dts: BCM5301X: EA9200: add WiFi button
Adds ability to configure the WiFi button.
--- arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +6 -0
@@ -40,6 +40,12 @@ button-wps { gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; }; + button-rfkill { + label = "WiFi"; + linux,code = <KEY_RFKILL>; + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; + }; + button-restart { label = "Reset"; linux,code = <KEY_RESTART>;
Signature · 1 line
2.53.0
Re: [PATCH 1/6] ARM: dts: BCM5301X: EA9200: add WiFi button
From: Florian Fainelli <[email protected]>
Quoted 4 lines · Rosen Penev
Adds ability to configure the WiFi button.
Signed-off-by Rosen Penev <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! --
Florian
PATCH 2/6 ARM: dts: BCM5301X: EA9200: add USB GPIOs
In reply to Rosen PenevAllows at least halt to turn the USB ports off.
--- arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +8 -0
@@ -58,6 +58,14 @@ &usb3_phy { status = "okay"; }; +&usb2 { + vcc-gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>; +}; + +&usb3 { + vcc-gpios = <&chipcommon 14 GPIO_ACTIVE_HIGH>; +}; + &srab { status = "okay";
Signature · 1 line
2.53.0
Re: [PATCH 2/6] ARM: dts: BCM5301X: EA9200: add USB GPIOs
From: Florian Fainelli <[email protected]>
Quoted 4 lines · Rosen Penev
Allows at least halt to turn the USB ports off.
Signed-off-by Rosen Penev <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! --
Florian
PATCH 3/6 ARM: dts: BCM5301X: EA9200: add LEDs
In reply to Rosen PenevAllows control and configuration of device LEDs.
--- .../dts/broadcom/bcm4709-linksys-ea9200.dts | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +39 -0
@@ -5,6 +5,8 @@ /dts-v1/; +#include <dt-bindings/leds/common.h> + #include "bcm4709.dtsi" #include "bcm5301x-nand-cs0-bch8.dtsi"
@@ -52,6 +54,43 @@ button-restart { gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; }; }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_WLAN; + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "rfkill-none"; + }; + + led-1 { + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_USB; + function-enumerator = <2>; + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "usbport"; + trigger-sources = <&ohci_port2>, <&ehci_port2>; + }; + + led-2 { + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_USB; + function-enumerator = <3>; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "usbport"; + trigger-sources = <&ohci_port1>, <&ehci_port1>, + <&xhci_port1>; + }; + + led-3 { + color = <LED_COLOR_ID_WHITE>; + function = LED_FUNCTION_POWER; + gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on"; + }; + }; }; &usb3_phy {
Signature · 1 line
2.53.0
Re: [PATCH 3/6] ARM: dts: BCM5301X: EA9200: add LEDs
From: Florian Fainelli <[email protected]>
Quoted 4 lines · Rosen Penev
Allows control and configuration of device LEDs.
Signed-off-by Rosen Penev <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! --
Florian
PATCH 4/6 ARM: dts: BCM5301X: EA9200: add wifi definitions
In reply to Rosen Penevbrcm,ccode-map and ieee80211-freq-limit are needed to be specified on some of them for proper operation.
--- .../dts/broadcom/bcm4709-linksys-ea9200.dts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +50 -0
@@ -93,6 +93,56 @@ led-3 { }; }; +&pcie_bridge0 { + pcie@0,0 { + device_type = "pci'; + reg = <0x0000 0 0 0 0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + pcie@1,0 { + device_type = "pci'; + reg = <0x800 0 0 0 0>; + + #address-cells = <3>; + #size-cells = <2>; + + wifi@0,0 { + compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5170000 5250000>; + brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + }; + }; + + pcie@2,0 { + device_type = "pci'; + reg = <0x1000 0 0 0 0>; + + #address-cells = <3>; + #size-cells = <2>; + + wifi@0,0 { + compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac"; + reg = <0x0000 0 0 0 0>; + brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + }; + }; + }; +}; + +&pcie_bridge1 { + wifi@0,0 { + compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5735000 5835000>; + brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + }; +}; + &usb3_phy { status = "okay"; };
Signature · 1 line
2.53.0
Re: [PATCH 4/6] ARM: dts: BCM5301X: EA9200: add wifi definitions
Quoted 19 lines · Rosen Penev
brcm,ccode-map and ieee80211-freq-limit are needed to be specified on some of them for proper operation.
Signed-off-by Rosen Penev <[email protected]>--- .../dts/broadcom/bcm4709-linksys-ea9200.dts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +2
-0@@ -93,6 +93,56 @@ led-3 { }; }; +&pcie_bridge0 { + pcie@0,0 {
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts led-3 { · line 107
Quoted 10 lines
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +10
-0+ device_type = "pci'; + reg = <0x0000 0 0 0 0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + pcie@1,0 { + device_type = "pci';
There are typos here. "pci' vs "pci". Should I resend?
Quoted 44 lines
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +38
-1+ reg = <0x800 0 0 0 0>; + + #address-cells = <3>; + #size-cells = <2>; + + wifi@0,0 { + compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5170000 5250000>; + brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + }; + }; + + pcie@2,0 { + device_type = "pci'; + reg = <0x1000 0 0 0 0>; + + #address-cells = <3>; + #size-cells = <2>; + + wifi@0,0 { + compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac"; + reg = <0x0000 0 0 0 0>; + brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + }; + }; + }; +}; + +&pcie_bridge1 { + wifi@0,0 { + compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5735000 5835000>; + brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + }; +}; + &usb3_phy { status = "okay"; }; --2.53.0
Florian Fainelli
maintainerRe: [PATCH 4/6] ARM: dts: BCM5301X: EA9200: add wifi definitions
Quoted 18 lines · Rosen Penev
Quoted 17 lines · Rosen Penev
brcm,ccode-map and ieee80211-freq-limit are needed to be specified on some of them for proper operation.
Signed-off-by Rosen Penev <[email protected]>--- .../dts/broadcom/bcm4709-linksys-ea9200.dts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +0
-0@@ -93,6 +93,56 @@ led-3 { }; };
Quoted 13 lines
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts led-3 { · line 107
Quoted 12 lines
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +12
-0+&pcie_bridge0 { + pcie@0,0 { + device_type = "pci'; + reg = <0x0000 0 0 0 0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + pcie@1,0 { + device_type = "pci';There are typos here. "pci' vs "pci". Should I resend?
Not necessary, fixed it up while applying, thanks!
Signature · 1 line
Florian
Florian Fainelli
maintainerRe: [PATCH 4/6] ARM: dts: BCM5301X: EA9200: add wifi definitions
Quoted 33 lines · Florian Fainelli
Quoted 18 lines · Rosen Penev
Quoted 17 lines · Rosen Penev
brcm,ccode-map and ieee80211-freq-limit are needed to be specified on some of them for proper operation.
Signed-off-by Rosen Penev <[email protected]>---
.../dts/broadcom/bcm4709-linksys-ea9200.dts | 50 +++++++++++++++++++1 file changed, 50 insertions(+)arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +0
-0@@ -93,6 +93,56 @@ led-3 { }; };Quoted 13 lines
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts led-3 { · line 107
Quoted 12 lines
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +12
-0+&pcie_bridge0 { + pcie@0,0 { + device_type = "pci'; + reg = <0x0000 0 0 0 0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + pcie@1,0 { + device_type = "pci';There are typos here. "pci' vs "pci". Should I resend?
Quoted 1 line
Not necessary, fixed it up while applying, thanks!
Meh, this was not even build tested, even fixing that gives me:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make CHECK_DTBS=y
broadcom/bcm4709-linksys-ea9200.dtb
DTC [C] arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dtb
Lexical error: arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts:107.19-22 Unexpected 'pci'
Error: arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts:107.19-22 syntax error FATAL ERROR: Unable to parse input tree
Please resubmit patches 4 and 6 since I dropped them as a result.
Signature · 1 line
Florian
Re: [PATCH 4/6] ARM: dts: BCM5301X: EA9200: add wifi definitions
Quoted 36 lines · Florian Fainelli
Quoted 34 lines · Florian Fainelli
Quoted 32 lines · Rosen Penev
Quoted 20 lines · Rosen Penev
brcm,ccode-map and ieee80211-freq-limit are needed to be specified on some of them for proper operation.
Signed-off-by Rosen Penev <[email protected]>--- .../dts/broadcom/bcm4709-linksys-ea9200.dts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)(quoted diff) renamed from arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +0
-0
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dtsindex617fb55bc52f..7b1363aa1144100644arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +2
-0@@ -93,6 +93,56 @@ led-3 { }; }; +&pcie_bridge0 { + pcie@0,0 {arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts led-3 { · line 107
Quoted 10 lines
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +10
-0+ device_type = "pci'; + reg = <0x0000 0 0 0 0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + pcie@1,0 { + device_type = "pci';There are typos here. "pci' vs "pci". Should I resend?
Quoted 3 lines
Quoted 1 line
Not necessary, fixed it up while applying, thanks!
Meh, this was not even build tested, even fixing that gives me:
Was build tested on kernel 6.12: https://github.com/openwrt/openwrt/pull/22223
Quoted 11 lines
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make CHECK_DTBS=y
broadcom/bcm4709-linksys-ea9200.dtb
DTC [C]arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dtb
Lexical error:
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts:107.19-22 Unexpected 'pci'
Error: arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts:107.19-22 syntax error
FATAL ERROR: Unable to parse input tree
Quoted 1 line
Please resubmit patches 4 and 6 since I dropped them as a result.
There are three "pci' mistakes that are copy/paste in this patch. I'll resubmit.
Quoted 2 lines
--
Florian
Re: [PATCH 4/6] ARM: dts: BCM5301X: EA9200: add wifi definitions
In reply to Rosen PenevFrom: Florian Fainelli <[email protected]>
Quoted 5 lines · Rosen Penev
brcm,ccode-map and ieee80211-freq-limit are needed to be specified on some of them for proper operation.
Signed-off-by Rosen Penev <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! --
Florian
PATCH 5/6 ARM: dts: BCM5301X: EA9200: specify partitions
In reply to Rosen PenevSome are needed to be specified so that linksys,ns-firmware works properly.
--- .../dts/broadcom/bcm4709-linksys-ea9200.dts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +40 -0
@@ -195,3 +195,43 @@ port@8 { }; }; }; + +&nandcs { + partitions { + compatible = "linksys,ns-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "boot"; + reg = <0x0000000 0x0080000>; + read-only; + }; + + partition@80000 { + label = "nvram"; + reg = <0x080000 0x0100000>; + }; + + partition@180000 { + label = "devinfo"; + reg = <0x0180000 0x080000>; + read-only; + }; + + partition@200000 { + reg = <0x0200000 0x02800000>; + compatible = "linksys,ns-firmware", "brcm,trx"; + }; + + partition@2a00000 { + reg = <0x02a00000 0x02800000>; + compatible = "linksys,ns-firmware", "brcm,trx"; + }; + + partition@5200000 { + label = "system"; + reg = <0x05200000 0x02e00000>; + }; + }; +};
Signature · 1 line
2.53.0
Re: [PATCH 5/6] ARM: dts: BCM5301X: EA9200: specify partitions
From: Florian Fainelli <[email protected]>
Quoted 5 lines · Rosen Penev
Some are needed to be specified so that linksys,ns-firmware works properly.
Signed-off-by Rosen Penev <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! --
Florian
PATCH 6/6 ARM: dts: BCM5301X: EA9200: set MAC from nvram
In reply to Rosen PenevEspecially needed for the WAN port, which is part of the switch and inherits the MAC from GMAC2. Added extra definitions for the wifi interfaces to make everything clear.
--- arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +11 -0
@@ -115,6 +115,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5170000 5250000>; brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + nvmem-cells = <&et2macaddr 2>; + nvmem-cell-names = "mac-address"; }; };
@@ -129,6 +131,8 @@ wifi@0,0 { compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac"; reg = <0x0000 0 0 0 0>; brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + nvmem-cells = <&et2macaddr 3>; + nvmem-cell-names = "mac-address"; }; }; };
@@ -140,6 +144,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5735000 5835000>; brcm,ccode-map = "JP-JP-78", "US-Q2-86"; + nvmem-cells = <&et2macaddr 4>; + nvmem-cell-names = "mac-address"; }; };
@@ -155,6 +161,11 @@ &usb3 { vcc-gpios = <&chipcommon 14 GPIO_ACTIVE_HIGH>; }; +&gmac2 { + nvmem-cells = <&et2macaddr 0>; + nvmem-cell-names = "mac-address"; +}; + &srab { status = "okay";
Signature · 1 line
2.53.0
Re: [PATCH 6/6] ARM: dts: BCM5301X: EA9200: set MAC from nvram
From: Florian Fainelli <[email protected]>
Quoted 6 lines · Rosen Penev
Especially needed for the WAN port, which is part of the switch and inherits the MAC from GMAC2. Added extra definitions for the wifi interfaces to make everything clear.
Signed-off-by Rosen Penev <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! --
Florian