mpc85xx: panda: use DSA B53 driver
authorRosen Penev <rosenp@gmail.com>
Tue, 6 Aug 2024 22:05:13 +0000 (15:05 -0700)
committerRobert Marko <robimarko@gmail.com>
Mon, 19 Aug 2024 16:42:45 +0000 (18:42 +0200)
It's upstream and a replacement for the swconfig driver.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16124
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/mpc85xx/base-files/etc/board.d/02_network
target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts
target/linux/mpc85xx/image/p1020.mk
target/linux/mpc85xx/p1020/config-default

index 2574ebc9b9458de3c3e87bf956521f33cb4673a8..e5afcf7df67d7809ff5f3f2dfc3668ce575fd50f 100644 (file)
@@ -24,9 +24,7 @@ hpe,msm460)
        ucidef_set_interface_lan "eth0"
        ;;      
 ocedo,panda)
-       ucidef_set_interface_wan "eth1"
-       ucidef_add_switch "switch0" \
-               "0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8u@eth0"
+       ucidef_set_interface_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8" "eth1"
        ;;
 tplink,tl-wdr4900-v1)
        ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
index 4b3b52d35b129061c810ed85b9d34668923fd50f..c4125052ec242f0a9cf6d598def08b93bc1e7217 100644 (file)
@@ -87,6 +87,7 @@
                        };
 
                        switch0: ethernet-phy@0 {
+                               compatible = "brcm,bcm53128";
                                reg = <0x0>;
 
                                ports {
 
                                        port@8 {
                                                reg = <8>;
-                                               label = "cpu";
+                                               phy-mode = "rgmii-id";
+                                               ethernet = <&enet0>;
 
                                                fixed-link {
                                                        speed = <1000>;
 
                enet0: ethernet@b0000 {
                        phy-connection-type = "rgmii-id";
-                       phy-handle = <&switch0>;
 
                        fixed-link {
                                speed = <1000>;
index e3902d23d661cc918a22447c3442d9c89e113919..c310b26c87dde7a6b27c1c498bc543d717bd287e 100644 (file)
@@ -120,5 +120,7 @@ define Device/ocedo_panda
   IMAGES := fdt.bin sysupgrade.bin
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
   IMAGE/fdt.bin := append-dtb
+  DEVICE_COMPAT_VERSION := 1.1
+  DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
 endef
 TARGET_DEVICES += ocedo_panda
index d1c053258225e7058bb20bafa62702a400c05306..36ace8015f7229384fbf419d0a37f2f677ca7bc8 100644 (file)
@@ -1,5 +1,8 @@
 CONFIG_ARCH_HAS_TICK_BROADCAST=y
 CONFIG_AT803X_PHY=y
+CONFIG_B53=y
+CONFIG_B53_MDIO_DRIVER=y
+CONFIG_BCM_NET_PHYLIB=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_CMDLINE_OVERRIDE=y
 CONFIG_CPU_RMAP=y
@@ -8,6 +11,7 @@ CONFIG_EEPROM_LEGACY=y
 CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
 CONFIG_GENERIC_TBSYNC=y
 CONFIG_GPIO_74X164=y
+CONFIG_GRO_CELLS=y
 # CONFIG_GPIO_MAX77620 is not set
 CONFIG_HAVE_RCU_TABLE_FREE=y
 CONFIG_HIVEAP_330=y
@@ -32,7 +36,15 @@ CONFIG_MTD_UBI_BEB_LIMIT=20
 CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_TAG_BRCM=y
+CONFIG_NET_DSA_TAG_BRCM_COMMON=y
+CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
+CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
+CONFIG_NET_DSA_TAG_NONE=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_SWITCHDEV=y
 CONFIG_NR_CPUS=2
 CONFIG_PADATA=y
 CONFIG_REGMAP_IRQ=y
@@ -43,13 +55,6 @@ CONFIG_RPS=y
 CONFIG_RWSEM_SPIN_ON_OWNER=y
 CONFIG_SMP=y
 CONFIG_SPI_GPIO=y
-CONFIG_SWCONFIG=y
-CONFIG_SWCONFIG_B53=y
-# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set
-CONFIG_SWCONFIG_B53_PHY_DRIVER=y
-# CONFIG_SWCONFIG_B53_PHY_FIXUP is not set
-# CONFIG_SWCONFIG_B53_SPI_DRIVER is not set
-# CONFIG_SWCONFIG_B53_SRAB_DRIVER is not set
 CONFIG_TREE_RCU=y
 CONFIG_UBIFS_FS=y
 CONFIG_WS_AP3710I=y