bcm53xx: backport early DT patches queued for 5.16
authorRafał Miłecki <rafal@milecki.pl>
Wed, 22 Sep 2021 20:01:10 +0000 (22:01 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 23 Sep 2021 05:55:55 +0000 (07:55 +0200)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
13 files changed:
target/linux/bcm53xx/patches-5.10/033-v5.16-0013-ARM-dts-NSP-Add-bcm958623hr-board-name-to-dts.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0014-ARM-dts-NSP-Fix-mpcore-mmc-node-names.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0015-ARM-dts-NSP-Fix-MDIO-mux-node-names.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0016-ARM-dts-NSP-Fix-MX64-MX65-eeprom-node-name.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0017-ARM-dts-NSP-Fix-MX65-MDIO-mux-warnings.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0018-ARM-dts-BCM5301X-Specify-switch-ports-for-more-devic.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0019-ARM-dts-BCM53573-Describe-on-SoC-BCM53125-rev-4-swit.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0020-ARM-dts-BCM53573-Add-Tenda-AC9-switch-ports.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0021-ARM-BCM53016-Specify-switch-ports-for-Meraki-MR32.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0022-ARM-BCM53016-MR32-get-mac-address-from-nvmem.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/033-v5.16-0023-ARM-dts-BCM5301X-Add-DT-for-Asus-RT-AC88U.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.10/130-ARM-dts-BCM5301X-Specify-switch-ports-for-more-devic.patch [deleted file]
target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch

diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0013-ARM-dts-NSP-Add-bcm958623hr-board-name-to-dts.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0013-ARM-dts-NSP-Add-bcm958623hr-board-name-to-dts.patch
new file mode 100644 (file)
index 0000000..c5f2847
--- /dev/null
@@ -0,0 +1,27 @@
+From 695717eb4c61173d05a277e37132b5e2c6531bf1 Mon Sep 17 00:00:00 2001
+From: Matthew Hagan <mnhagan88@gmail.com>
+Date: Sun, 29 Aug 2021 22:37:47 +0000
+Subject: [PATCH] ARM: dts: NSP: Add bcm958623hr board name to dts
+
+This board was previously added to
+Documentation/devicetree/bindings/arm/bcm/brcm,nsp.yaml
+however the dts file was not updated to reflect this change. This patch
+corrects bcm958623hr.dts by adding the board name to the compatible.
+
+Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm958623hr.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/bcm958623hr.dts
++++ b/arch/arm/boot/dts/bcm958623hr.dts
+@@ -37,7 +37,7 @@
+ / {
+       model = "NorthStar Plus SVK (BCM958623HR)";
+-      compatible = "brcm,bcm58623", "brcm,nsp";
++      compatible = "brcm,bcm958623hr", "brcm,bcm58623", "brcm,nsp";
+       chosen {
+               stdout-path = "serial0:115200n8";
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0014-ARM-dts-NSP-Fix-mpcore-mmc-node-names.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0014-ARM-dts-NSP-Fix-mpcore-mmc-node-names.patch
new file mode 100644 (file)
index 0000000..eab3fd3
--- /dev/null
@@ -0,0 +1,40 @@
+From 15a563d008ef9d04df525f0c476cd7d7127bb883 Mon Sep 17 00:00:00 2001
+From: Matthew Hagan <mnhagan88@gmail.com>
+Date: Sun, 29 Aug 2021 22:37:48 +0000
+Subject: [PATCH] ARM: dts: NSP: Fix mpcore, mmc node names
+
+Running dtbs_check yielded the issues with bcm-nsp.dtsi.
+
+Firstly this patch fixes the following message by appending "-bus" to
+the mpcore node name:
+mpcore@19000000: $nodename:0: 'mpcore@19000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
+
+Secondly mmc node name. The label name can remain as is.
+sdhci@21000: $nodename:0: 'sdhci@21000' does not match '^mmc(@.*)?$'
+
+Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm-nsp.dtsi | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm-nsp.dtsi
++++ b/arch/arm/boot/dts/bcm-nsp.dtsi
+@@ -77,7 +77,7 @@
+               interrupt-affinity = <&cpu0>, <&cpu1>;
+       };
+-      mpcore@19000000 {
++      mpcore-bus@19000000 {
+               compatible = "simple-bus";
+               ranges = <0x00000000 0x19000000 0x00023000>;
+               #address-cells = <1>;
+@@ -219,7 +219,7 @@
+                       status = "disabled";
+               };
+-              sdio: sdhci@21000 {
++              sdio: mmc@21000 {
+                       compatible = "brcm,sdhci-iproc-cygnus";
+                       reg = <0x21000 0x100>;
+                       interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0015-ARM-dts-NSP-Fix-MDIO-mux-node-names.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0015-ARM-dts-NSP-Fix-MDIO-mux-node-names.patch
new file mode 100644 (file)
index 0000000..a7c0f16
--- /dev/null
@@ -0,0 +1,47 @@
+From 38f8111369f318a538e9d4d89d8e48030c22fb40 Mon Sep 17 00:00:00 2001
+From: Matthew Hagan <mnhagan88@gmail.com>
+Date: Sun, 29 Aug 2021 22:37:49 +0000
+Subject: [PATCH] ARM: dts: NSP: Fix MDIO mux node names
+
+While functional, the mdio-mux-mmioreg binding does not conform to
+Documentation/devicetree/bindings/net/mdio-mux-mmioreg.yaml in that an
+mdio-mux compatible is also required. Without this the following output
+is observed when running dtbs_check:
+
+mdio-mux@32000: compatible: ['mdio-mux-mmioreg'] is too short
+
+This change brings conformance to this requirement and corresponds
+likewise to Rafal Milecki's change to the BCM5301x platform[1].
+
+[1] https://lore.kernel.org/linux-arm-kernel/20210822191256.3715003-1-f.fainelli@gmail.com/T/
+
+Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm-nsp.dtsi                | 2 +-
+ arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm-nsp.dtsi
++++ b/arch/arm/boot/dts/bcm-nsp.dtsi
+@@ -371,7 +371,7 @@
+               };
+               mdio-mux@32000 {
+-                      compatible = "mdio-mux-mmioreg";
++                      compatible = "mdio-mux-mmioreg", "mdio-mux";
+                       reg = <0x32000 0x4>;
+                       mux-mask = <0x200>;
+                       #address-cells = <1>;
+--- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
++++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
+@@ -72,7 +72,7 @@
+       };
+       mdio-mii-mux {
+-              compatible = "mdio-mux-mmioreg";
++              compatible = "mdio-mux-mmioreg", "mdio-mux";
+               reg = <0x1803f1c0 0x4>;
+               mux-mask = <0x2000>;
+               mdio-parent-bus = <&mdio_ext>;
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0016-ARM-dts-NSP-Fix-MX64-MX65-eeprom-node-name.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0016-ARM-dts-NSP-Fix-MX64-MX65-eeprom-node-name.patch
new file mode 100644 (file)
index 0000000..4cffad1
--- /dev/null
@@ -0,0 +1,28 @@
+From 56e4e548427240d85fd220460d0ab5987e1dec00 Mon Sep 17 00:00:00 2001
+From: Matthew Hagan <mnhagan88@gmail.com>
+Date: Sun, 29 Aug 2021 22:37:50 +0000
+Subject: [PATCH] ARM: dts: NSP: Fix MX64/MX65 eeprom node name
+
+Running dtbs_check yields the following message when checking the
+MX64/MX65 devicetree:
+at24@50: $nodename:0: 'at24@50' does not match '^eeprom@[0-9a-f]{1,2}$'
+
+This patch fixes the issue by renaming the at24 node appropriately.
+
+Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
++++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
+@@ -48,7 +48,7 @@
+ &i2c0 {
+       status = "okay";
+-      at24@50 {
++      eeprom@50 {
+               compatible = "atmel,24c64";
+               reg = <0x50>;
+               pagesize = <32>;
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0017-ARM-dts-NSP-Fix-MX65-MDIO-mux-warnings.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0017-ARM-dts-NSP-Fix-MX65-MDIO-mux-warnings.patch
new file mode 100644 (file)
index 0000000..cad7388
--- /dev/null
@@ -0,0 +1,52 @@
+From f5fc9044e5d45a4d97b5240c8723f4677f647c9f Mon Sep 17 00:00:00 2001
+From: Matthew Hagan <mnhagan88@gmail.com>
+Date: Sun, 29 Aug 2021 22:37:51 +0000
+Subject: [PATCH] ARM: dts: NSP: Fix MX65 MDIO mux warnings
+
+The naming of this node is based upon that of the initial EA9500 dts[1].
+However this does not conform with the mdio-mux format, yielding the
+following message when running dtbs_check:
+mdio-mii-mux: $nodename:0: 'mdio-mii-mux' does not match '^mdio-mux[\\-@]?'
+
+Secondly, this node should be moved to within the axi node and given the
+appropriate unit address. This also requires exposing the axi node via a
+label in bcm-nsp.dtsi. This fixes the following warning:
+Warning (unit_address_vs_reg): /mdio-mii-mux: node has a reg or ranges property, but no unit name
+
+[1]https://patchwork.ozlabs.org/project/linux-imx/patch/20180618174159.86150-1-npcomplete13@gmail.com/#1941353
+
+Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm-nsp.dtsi                | 2 +-
+ arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 6 ++++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm-nsp.dtsi
++++ b/arch/arm/boot/dts/bcm-nsp.dtsi
+@@ -166,7 +166,7 @@
+               };
+       };
+-      axi@18000000 {
++      axi: axi@18000000 {
+               compatible = "simple-bus";
+               ranges = <0x00000000 0x18000000 0x0011c40c>;
+               #address-cells = <1>;
+--- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
++++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
+@@ -70,10 +70,12 @@
+                       gpios = <&gpioa 31 GPIO_ACTIVE_HIGH>;
+               };
+       };
++};
+-      mdio-mii-mux {
++&axi {
++      mdio-mux@3f1c0 {
+               compatible = "mdio-mux-mmioreg", "mdio-mux";
+-              reg = <0x1803f1c0 0x4>;
++              reg = <0x3f1c0 0x4>;
+               mux-mask = <0x2000>;
+               mdio-parent-bus = <&mdio_ext>;
+               #address-cells = <1>;
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0018-ARM-dts-BCM5301X-Specify-switch-ports-for-more-devic.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0018-ARM-dts-BCM5301X-Specify-switch-ports-for-more-devic.patch
new file mode 100644 (file)
index 0000000..b309771
--- /dev/null
@@ -0,0 +1,290 @@
+From 225ffaf3d0e00daa2d0c7b68e8fd731ebbde3c03 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Tue, 7 Sep 2021 08:00:48 +0200
+Subject: [PATCH] ARM: dts: BCM5301X: Specify switch ports for more devices
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Those are remaining models I have that didn't have ports yet. All
+tested.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm4708-netgear-r6250.dts   | 37 ++++++++++++++++
+ .../boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 37 ++++++++++++++++
+ arch/arm/boot/dts/bcm4709-netgear-r8000.dts   | 42 +++++++++++++++++++
+ arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 42 +++++++++++++++++++
+ arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 37 ++++++++++++++++
+ arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 37 ++++++++++++++++
+ 6 files changed, 232 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
++++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
+@@ -94,3 +94,40 @@
+ &usb3_phy {
+       status = "okay";
+ };
++
++&srab {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "lan4";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan3";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan2";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan1";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "wan";
++              };
++
++              port@5 {
++                      reg = <5>;
++                      label = "cpu";
++                      ethernet = <&gmac0>;
++              };
++      };
++};
+--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
++++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
+@@ -117,3 +117,40 @@
+               };
+       };
+ };
++
++&srab {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "lan1";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan2";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan3";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan4";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "wan";
++              };
++
++              port@5 {
++                      reg = <5>;
++                      label = "cpu";
++                      ethernet = <&gmac0>;
++              };
++      };
++};
+--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
+@@ -187,3 +187,45 @@
+ &usb3_phy {
+       status = "okay";
+ };
++
++&srab {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "lan1";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan2";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan3";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan4";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "wan";
++              };
++
++              port@8 {
++                      reg = <8>;
++                      label = "cpu";
++                      ethernet = <&gmac2>;
++
++                      fixed-link {
++                              speed = <1000>;
++                              full-duplex;
++                      };
++              };
++      };
++};
+--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
+@@ -118,3 +118,45 @@
+ &usb3_phy {
+       status = "okay";
+ };
++
++&srab {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "lan4";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan3";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan2";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan1";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "wan";
++              };
++
++              port@8 {
++                      reg = <8>;
++                      label = "cpu";
++                      ethernet = <&gmac2>;
++
++                      fixed-link {
++                              speed = <1000>;
++                              full-duplex;
++                      };
++              };
++      };
++};
+--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
+@@ -68,3 +68,40 @@
+ &usb3_phy {
+       status = "okay";
+ };
++
++&srab {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "wan";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan4";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan3";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan2";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "lan1";
++              };
++
++              port@5 {
++                      reg = <5>;
++                      label = "cpu";
++                      ethernet = <&gmac0>;
++              };
++      };
++};
+--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
+@@ -68,3 +68,40 @@
+ &usb3_phy {
+       status = "okay";
+ };
++
++&srab {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "wan";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan4";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan3";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan2";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "lan1";
++              };
++
++              port@5 {
++                      reg = <5>;
++                      label = "cpu";
++                      ethernet = <&gmac0>;
++              };
++      };
++};
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0019-ARM-dts-BCM53573-Describe-on-SoC-BCM53125-rev-4-swit.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0019-ARM-dts-BCM53573-Describe-on-SoC-BCM53125-rev-4-swit.patch
new file mode 100644 (file)
index 0000000..3a5438c
--- /dev/null
@@ -0,0 +1,44 @@
+From 9fb90ae6cae7f8fe4fbf626945f32cd9da2c3892 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Mon, 20 Sep 2021 16:10:23 +0200
+Subject: [PATCH] ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+BCM53573 family SoC have Ethernet switch connected to the first Ethernet
+controller (accessible over MDIO).
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm53573.dtsi | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm53573.dtsi
++++ b/arch/arm/boot/dts/bcm53573.dtsi
+@@ -180,6 +180,24 @@
+               gmac0: ethernet@5000 {
+                       reg = <0x5000 0x1000>;
++
++                      mdio {
++                              #address-cells = <1>;
++                              #size-cells = <0>;
++
++                              switch: switch@1e {
++                                      compatible = "brcm,bcm53125";
++                                      reg = <0x1e>;
++
++                                      status = "disabled";
++
++                                      /* ports are defined in board DTS */
++                                      ports {
++                                              #address-cells = <1>;
++                                              #size-cells = <0>;
++                                      };
++                              };
++                      };
+               };
+               gmac1: ethernet@b000 {
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0020-ARM-dts-BCM53573-Add-Tenda-AC9-switch-ports.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0020-ARM-dts-BCM53573-Add-Tenda-AC9-switch-ports.patch
new file mode 100644 (file)
index 0000000..c6d9957
--- /dev/null
@@ -0,0 +1,59 @@
+From 64612828628cca6e3992e421f45c242dc6625647 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Mon, 20 Sep 2021 16:10:24 +0200
+Subject: [PATCH] ARM: dts: BCM53573: Add Tenda AC9 switch ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This router has 1 WAN and 4 LAN ports.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 37 ++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
+@@ -105,3 +105,40 @@
+               };
+       };
+ };
++
++&switch {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "wan";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan1";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan2";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan3";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "lan4";
++              };
++
++              port@5 {
++                      reg = <5>;
++                      label = "cpu";
++                      ethernet = <&gmac0>;
++              };
++      };
++};
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0021-ARM-BCM53016-Specify-switch-ports-for-Meraki-MR32.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0021-ARM-BCM53016-Specify-switch-ports-for-Meraki-MR32.patch
new file mode 100644 (file)
index 0000000..a65b199
--- /dev/null
@@ -0,0 +1,57 @@
+From 6abc4ca5a28070945e0d68cb4160b309bfbf4b8b Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey@gmail.com>
+Date: Sat, 18 Sep 2021 19:29:30 +0200
+Subject: [PATCH] ARM: BCM53016: Specify switch ports for Meraki MR32
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+the switch identifies itself as a BCM53012 (rev 5)...
+This patch has been tested & verified on OpenWrt's
+snapshot with Linux 5.10 (didn't test any older kernels).
+The MR32 is able to "talk to the network" as before with
+OpenWrt's SWITCHDEV b53 driver.
+
+| b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 5
+| libphy: dsa slave smi: probed
+| b53-srab-switch 18007000.ethernet-switch poe (uninitialized):
+|      PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
+| b53-srab-switch 18007000.ethernet-switch: Using legacy PHYLIB callbacks.
+|      Please migrate to PHYLINK!
+| DSA: tree 0 setup
+
+Reported-by: Rafał Miłecki <zajec5@gmail.com>
+Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
+@@ -195,3 +195,25 @@
+               };
+       };
+ };
++
++&srab {
++      status = "okay";
++
++      ports {
++              port@0 {
++                      reg = <0>;
++                      label = "poe";
++              };
++
++              port@5 {
++                      reg = <5>;
++                      label = "cpu";
++                      ethernet = <&gmac0>;
++
++                      fixed-link {
++                              speed = <1000>;
++                              duplex-full;
++                      };
++              };
++      };
++};
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0022-ARM-BCM53016-MR32-get-mac-address-from-nvmem.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0022-ARM-BCM53016-MR32-get-mac-address-from-nvmem.patch
new file mode 100644 (file)
index 0000000..70a1882
--- /dev/null
@@ -0,0 +1,41 @@
+From 477ffdbdf389cc91294d66e251cc6f856da5820c Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey@gmail.com>
+Date: Sat, 18 Sep 2021 19:29:31 +0200
+Subject: [PATCH] ARM: BCM53016: MR32: get mac-address from nvmem
+
+The MAC-Address of the MR32's sole ethernet port is
+located in offset 0x66 of the attached AT24C64 eeprom.
+
+Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
+@@ -110,6 +110,12 @@
+                       reg = <0x50>;
+                       pagesize = <32>;
+                       read-only;
++                      #address-cells = <1>;
++                      #size-cells = <1>;
++
++                      mac_address: mac-address@66 {
++                              reg = <0x66 0x6>;
++                      };
+               };
+       };
+ };
+@@ -133,6 +139,11 @@
+        */
+ };
++&gmac0 {
++      nvmem-cell-names = "mac-address";
++      nvmem-cells = <&mac_address>;
++};
++
+ &gmac1 {
+       status = "disabled";
+ };
diff --git a/target/linux/bcm53xx/patches-5.10/033-v5.16-0023-ARM-dts-BCM5301X-Add-DT-for-Asus-RT-AC88U.patch b/target/linux/bcm53xx/patches-5.10/033-v5.16-0023-ARM-dts-BCM5301X-Add-DT-for-Asus-RT-AC88U.patch
new file mode 100644 (file)
index 0000000..7095526
--- /dev/null
@@ -0,0 +1,242 @@
+From beff77b93452cd2057c859694709dd34a181488f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
+Date: Tue, 21 Sep 2021 20:19:01 +0800
+Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Hardware Info
+-------------
+
+Processor      - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
+Switch         - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
+DDR3 RAM       - 512 MB
+Flash          - 128 MB (ESMT F59L1G81LA-25T)
+2.4GHz         - BCM4366 4×4 2.4/5G single chip 802.11ac SoC
+5GHz           - BCM4366 4×4 2.4/5G single chip 802.11ac SoC
+Ports          - 8 Ports, 1 WAN Ports
+
+Tested on OpenWrt on kernel 5.10 built with DSA driver.
+
+Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/Makefile                   |   1 +
+ arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 200 +++++++++++++++++++
+ 2 files changed, 201 insertions(+)
+ create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
+
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -118,6 +118,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
+       bcm4709-netgear-r7000.dtb \
+       bcm4709-netgear-r8000.dtb \
+       bcm4709-tplink-archer-c9-v1.dtb \
++      bcm47094-asus-rt-ac88u.dtb \
+       bcm47094-dlink-dir-885l.dtb \
+       bcm47094-linksys-panamera.dtb \
+       bcm47094-luxul-abr-4500.dtb \
+--- /dev/null
++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
+@@ -0,0 +1,200 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/*
++ * Copyright (C) 2021 Arınç ÜNAL <arinc.unal@arinc9.com>
++ */
++
++/dts-v1/;
++
++#include "bcm47094.dtsi"
++#include "bcm5301x-nand-cs0-bch8.dtsi"
++
++/ {
++      compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
++      model = "Asus RT-AC88U";
++
++      chosen {
++              bootargs = "earlycon";
++      };
++
++      memory@0 {
++              device_type = "memory";
++              reg = <0x00000000 0x08000000>,
++                    <0x88000000 0x18000000>;
++      };
++
++      nvram@1c080000 {
++              compatible = "brcm,nvram";
++              reg = <0x1c080000 0x00180000>;
++      };
++
++      leds {
++              compatible = "gpio-leds";
++
++              power {
++                      label = "white:power";
++                      gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
++                      linux,default-trigger = "default-on";
++              };
++
++              wan-red {
++                      label = "red:wan";
++                      gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
++              };
++
++              lan {
++                      label = "white:lan";
++                      gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
++              };
++
++              usb2 {
++                      label = "white:usb2";
++                      gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
++                      trigger-sources = <&ehci_port2>;
++                      linux,default-trigger = "usbport";
++              };
++
++              usb3 {
++                      label = "white:usb3";
++                      gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
++                      trigger-sources = <&ehci_port1>, <&xhci_port1>;
++                      linux,default-trigger = "usbport";
++              };
++
++              wps {
++                      label = "white:wps";
++                      gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
++              };
++      };
++
++      gpio-keys {
++              compatible = "gpio-keys";
++              #address-cells = <1>;
++              #size-cells = <0>;
++
++              wps {
++                      label = "WPS";
++                      linux,code = <KEY_WPS_BUTTON>;
++                      gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
++              };
++
++              reset {
++                      label = "Reset";
++                      linux,code = <KEY_RESTART>;
++                      gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
++              };
++
++              wifi {
++                      label = "Wi-Fi";
++                      linux,code = <KEY_RFKILL>;
++                      gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
++              };
++
++              led {
++                      label = "Backlight";
++                      linux,code = <KEY_BRIGHTNESS_ZERO>;
++                      gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
++              };
++      };
++};
++
++&srab {
++      compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
++      status = "okay";
++      dsa,member = <0 0>;
++
++      ports {
++              #address-cells = <1>;
++              #size-cells = <0>;
++
++              port@0 {
++                      reg = <0>;
++                      label = "lan4";
++              };
++
++              port@1 {
++                      reg = <1>;
++                      label = "lan3";
++              };
++
++              port@2 {
++                      reg = <2>;
++                      label = "lan2";
++              };
++
++              port@3 {
++                      reg = <3>;
++                      label = "lan1";
++              };
++
++              port@4 {
++                      reg = <4>;
++                      label = "wan";
++              };
++
++              sw0_p5: port@5 {
++                      reg = <5>;
++                      label = "extsw";
++
++                      fixed-link {
++                              speed = <1000>;
++                              full-duplex;
++                      };
++              };
++
++              port@7 {
++                      reg = <7>;
++                      ethernet = <&gmac1>;
++                      label = "cpu";
++
++                      fixed-link {
++                              speed = <1000>;
++                              full-duplex;
++                      };
++              };
++
++              port@8 {
++                      reg = <8>;
++                      ethernet = <&gmac2>;
++                      label = "cpu";
++                      status = "disabled";
++
++                      fixed-link {
++                              speed = <1000>;
++                              full-duplex;
++                      };
++              };
++      };
++};
++
++&usb2 {
++      vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
++};
++
++&usb3_phy {
++      status = "okay";
++};
++
++&nandcs {
++      partitions {
++              compatible = "fixed-partitions";
++              #address-cells = <1>;
++              #size-cells = <1>;
++
++              partition@0 {
++                      label = "boot";
++                      reg = <0x00000000 0x00080000>;
++                      read-only;
++              };
++
++              partition@80000 {
++                      label = "nvram";
++                      reg = <0x00080000 0x00180000>;
++              };
++
++              partition@200000 {
++                      label = "firmware";
++                      reg = <0x00200000 0x07e00000>;
++                      compatible = "brcm,trx";
++              };
++      };
++};
diff --git a/target/linux/bcm53xx/patches-5.10/130-ARM-dts-BCM5301X-Specify-switch-ports-for-more-devic.patch b/target/linux/bcm53xx/patches-5.10/130-ARM-dts-BCM5301X-Specify-switch-ports-for-more-devic.patch
deleted file mode 100644 (file)
index 211de34..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Tue, 7 Sep 2021 07:51:17 +0200
-Subject: [PATCH next] ARM: dts: BCM5301X: Specify switch ports for more
- devices
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Those are remaining models I have that didn't have ports yet. All
-tested.
-
-Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
----
- arch/arm/boot/dts/bcm4708-netgear-r6250.dts   | 37 ++++++++++++++++
- .../boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 37 ++++++++++++++++
- arch/arm/boot/dts/bcm4709-netgear-r8000.dts   | 42 +++++++++++++++++++
- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 42 +++++++++++++++++++
- arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 37 ++++++++++++++++
- arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 37 ++++++++++++++++
- 6 files changed, 232 insertions(+)
-
---- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
-+++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
-@@ -94,3 +94,40 @@
- &usb3_phy {
-       status = "okay";
- };
-+
-+&srab {
-+      status = "okay";
-+
-+      ports {
-+              port@0 {
-+                      reg = <0>;
-+                      label = "lan4";
-+              };
-+
-+              port@1 {
-+                      reg = <1>;
-+                      label = "lan3";
-+              };
-+
-+              port@2 {
-+                      reg = <2>;
-+                      label = "lan2";
-+              };
-+
-+              port@3 {
-+                      reg = <3>;
-+                      label = "lan1";
-+              };
-+
-+              port@4 {
-+                      reg = <4>;
-+                      label = "wan";
-+              };
-+
-+              port@5 {
-+                      reg = <5>;
-+                      label = "cpu";
-+                      ethernet = <&gmac0>;
-+              };
-+      };
-+};
---- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
-+++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
-@@ -117,3 +117,40 @@
-               };
-       };
- };
-+
-+&srab {
-+      status = "okay";
-+
-+      ports {
-+              port@0 {
-+                      reg = <0>;
-+                      label = "lan1";
-+              };
-+
-+              port@1 {
-+                      reg = <1>;
-+                      label = "lan2";
-+              };
-+
-+              port@2 {
-+                      reg = <2>;
-+                      label = "lan3";
-+              };
-+
-+              port@3 {
-+                      reg = <3>;
-+                      label = "lan4";
-+              };
-+
-+              port@4 {
-+                      reg = <4>;
-+                      label = "wan";
-+              };
-+
-+              port@5 {
-+                      reg = <5>;
-+                      label = "cpu";
-+                      ethernet = <&gmac0>;
-+              };
-+      };
-+};
---- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
-+++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
-@@ -187,3 +187,45 @@
- &usb3_phy {
-       status = "okay";
- };
-+
-+&srab {
-+      status = "okay";
-+
-+      ports {
-+              port@0 {
-+                      reg = <0>;
-+                      label = "lan1";
-+              };
-+
-+              port@1 {
-+                      reg = <1>;
-+                      label = "lan2";
-+              };
-+
-+              port@2 {
-+                      reg = <2>;
-+                      label = "lan3";
-+              };
-+
-+              port@3 {
-+                      reg = <3>;
-+                      label = "lan4";
-+              };
-+
-+              port@4 {
-+                      reg = <4>;
-+                      label = "wan";
-+              };
-+
-+              port@8 {
-+                      reg = <8>;
-+                      label = "cpu";
-+                      ethernet = <&gmac2>;
-+
-+                      fixed-link {
-+                              speed = <1000>;
-+                              full-duplex;
-+                      };
-+              };
-+      };
-+};
---- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
-+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
-@@ -118,3 +118,45 @@
- &usb3_phy {
-       status = "okay";
- };
-+
-+&srab {
-+      status = "okay";
-+
-+      ports {
-+              port@0 {
-+                      reg = <0>;
-+                      label = "lan4";
-+              };
-+
-+              port@1 {
-+                      reg = <1>;
-+                      label = "lan3";
-+              };
-+
-+              port@2 {
-+                      reg = <2>;
-+                      label = "lan2";
-+              };
-+
-+              port@3 {
-+                      reg = <3>;
-+                      label = "lan1";
-+              };
-+
-+              port@4 {
-+                      reg = <4>;
-+                      label = "wan";
-+              };
-+
-+              port@8 {
-+                      reg = <8>;
-+                      label = "cpu";
-+                      ethernet = <&gmac2>;
-+
-+                      fixed-link {
-+                              speed = <1000>;
-+                              full-duplex;
-+                      };
-+              };
-+      };
-+};
---- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
-+++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
-@@ -68,3 +68,40 @@
- &usb3_phy {
-       status = "okay";
- };
-+
-+&srab {
-+      status = "okay";
-+
-+      ports {
-+              port@0 {
-+                      reg = <0>;
-+                      label = "wan";
-+              };
-+
-+              port@1 {
-+                      reg = <1>;
-+                      label = "lan4";
-+              };
-+
-+              port@2 {
-+                      reg = <2>;
-+                      label = "lan3";
-+              };
-+
-+              port@3 {
-+                      reg = <3>;
-+                      label = "lan2";
-+              };
-+
-+              port@4 {
-+                      reg = <4>;
-+                      label = "lan1";
-+              };
-+
-+              port@5 {
-+                      reg = <5>;
-+                      label = "cpu";
-+                      ethernet = <&gmac0>;
-+              };
-+      };
-+};
---- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
-+++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
-@@ -68,3 +68,40 @@
- &usb3_phy {
-       status = "okay";
- };
-+
-+&srab {
-+      status = "okay";
-+
-+      ports {
-+              port@0 {
-+                      reg = <0>;
-+                      label = "wan";
-+              };
-+
-+              port@1 {
-+                      reg = <1>;
-+                      label = "lan4";
-+              };
-+
-+              port@2 {
-+                      reg = <2>;
-+                      label = "lan3";
-+              };
-+
-+              port@3 {
-+                      reg = <3>;
-+                      label = "lan2";
-+              };
-+
-+              port@4 {
-+                      reg = <4>;
-+                      label = "lan1";
-+              };
-+
-+              port@5 {
-+                      reg = <5>;
-+                      label = "cpu";
-+                      ethernet = <&gmac0>;
-+              };
-+      };
-+};
index e67d36a4e2b3b24d8b45d3af8e02a3fc8ca4b180..7c2dad6ae275e9099c9d5252cb85ca0224c05cdc 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
 +      bcm4709-netgear-r7900.dtb \
        bcm4709-netgear-r8000.dtb \
        bcm4709-tplink-archer-c9-v1.dtb \
-       bcm47094-dlink-dir-885l.dtb \
+       bcm47094-asus-rt-ac88u.dtb \
 --- /dev/null
 +++ b/arch/arm/boot/dts/bcm4709-netgear-r7900.dts
 @@ -0,0 +1,42 @@