bcm53xx: backport more DT changes queued for v6.6
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-5.4 / 044-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch
diff --git a/target/linux/bcm53xx/patches-5.4/044-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch
new file mode 100644 (file)
index 0000000..ab27495
--- /dev/null
@@ -0,0 +1,97 @@
+From 8d6b61ecad2f1c939813c5c4517d53e04672dc48 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Sun, 23 Jul 2023 21:54:15 +0200
+Subject: [PATCH] ARM: dts: BCM53573: Describe BCM53125 switch ports in the
+ main DTS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+BCM53125 always has 5 ports with GPHYs (for LAN/WAN ports) and 2 IMP
+ports. It seems the best place to describe that in the main .dtsi.
+Device specific bits can go to device .dts files. This will help
+avoiding some code duplication.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Link: https://lore.kernel.org/r/20230723195416.7831-2-zajec5@gmail.com
+Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
+---
+ .../boot/dts/broadcom/bcm47189-tenda-ac9.dts  |  7 -----
+ arch/arm/boot/dts/broadcom/bcm53573.dtsi      | 26 ++++++++++++++++++-
+ 2 files changed, 25 insertions(+), 8 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
+@@ -111,34 +111,27 @@
+       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@8 {
+-                      reg = <8>;
+                       label = "cpu";
+-                      ethernet = <&gmac0>;
+               };
+       };
+ };
+--- a/arch/arm/boot/dts/bcm53573.dtsi
++++ b/arch/arm/boot/dts/bcm53573.dtsi
+@@ -192,10 +192,34 @@
+                                       status = "disabled";
+-                                      /* ports are defined in board DTS */
+                                       ports {
+                                               #address-cells = <1>;
+                                               #size-cells = <0>;
++
++                                              port@0 {
++                                                      reg = <0>;
++                                              };
++
++                                              port@1 {
++                                                      reg = <1>;
++                                              };
++
++                                              port@2 {
++                                                      reg = <2>;
++                                              };
++
++                                              port@3 {
++                                                      reg = <3>;
++                                              };
++
++                                              port@4 {
++                                                      reg = <4>;
++                                              };
++
++                                              port@8 {
++                                                      reg = <8>;
++                                                      ethernet = <&gmac0>;
++                                              };
+                                       };
+                               };
+                       };