From: Rosen Penev Date: Tue, 6 Aug 2024 22:05:13 +0000 (-0700) Subject: mpc85xx: panda: use DSA B53 driver X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7abc89dabee21fc269017224900aca23a71930da;p=openwrt%2Fstaging%2Fxback.git mpc85xx: panda: use DSA B53 driver It's upstream and a replacement for the swconfig driver. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16124 Signed-off-by: Robert Marko --- diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index 2574ebc9b9..e5afcf7df6 100644 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -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" diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts index 4b3b52d35b..c4125052ec 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts @@ -87,6 +87,7 @@ }; switch0: ethernet-phy@0 { + compatible = "brcm,bcm53128"; reg = <0x0>; ports { @@ -135,7 +136,8 @@ port@8 { reg = <8>; - label = "cpu"; + phy-mode = "rgmii-id"; + ethernet = <&enet0>; fixed-link { speed = <1000>; @@ -160,7 +162,6 @@ enet0: ethernet@b0000 { phy-connection-type = "rgmii-id"; - phy-handle = <&switch0>; fixed-link { speed = <1000>; diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index e3902d23d6..c310b26c87 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -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 diff --git a/target/linux/mpc85xx/p1020/config-default b/target/linux/mpc85xx/p1020/config-default index d1c0532582..36ace8015f 100644 --- a/target/linux/mpc85xx/p1020/config-default +++ b/target/linux/mpc85xx/p1020/config-default @@ -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