From: Robert Marko Date: Tue, 14 Dec 2021 00:00:00 +0000 (+0100) Subject: ipq40xx: convert some boards to DSA X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=550253bdf99280b3017baf56dec36406fa395734;p=openwrt%2Fstaging%2Fsvanheule.git ipq40xx: convert some boards to DSA Convert IPQ40xx boards to DSA setup. Signed-off-by: Leon M. George Signed-off-by: Lech Perczak Signed-off-by: Nick Hainke Signed-off-by: ChunAm See Signed-off-by: Jeff Kletsky Signed-off-by: Andrew Sim Signed-off-by: Robert Marko --- diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 4b9522af92..74f31e778f 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -10,7 +10,7 @@ board=$(board_name) case "$board" in alfa-network,ap120c-ac) - ucidef_set_led_netdev "wan" "WAN" "amber:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "amber:wan" "wan" ;; asus,rt-ac42u) ucidef_set_led_switch "lan1" "LAN1" "blue:lan-1" "switch0" "0x02" @@ -24,7 +24,7 @@ asus,rt-ac58u) ;; avm,fritzbox-4040) ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" "phy1tpt" - ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e" ;; avm,fritzbox-7530 |\ @@ -58,17 +58,17 @@ glinet,gl-ap1300) mikrotik,cap-ac) ucidef_set_led_default "power" "POWER" "blue:power" "1" ucidef_set_led_default "user" "USER" "green:user" "0" - ucidef_set_led_switch "eth1" "ETH1" "green:eth1" "switch0" "0x20" - ucidef_set_led_switch "eth2" "ETH2" "green:eth2" "switch0" "0x10" + ucidef_set_led_netdev "eth1" "ETH1" "green:eth1" "wan" + ucidef_set_led_netdev "eth2" "ETH2" "green:eth2" "lan" ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt" ;; mikrotik,hap-ac3) - ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" - ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08" - ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x04" - ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" + ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "lan1" + ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "lan2" + ucidef_set_led_netdev "lan3" "LAN3" "green:lan3" "lan3" + ucidef_set_led_netdev "lan4" "LAN4" "green:lan4" "lan4" ucidef_set_led_gpio "poe" "POE" "red:poe" "452" "0" ;; mikrotik,sxtsq-5-ac) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index d13d21334c..f57e3fd5d2 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -12,28 +12,58 @@ ipq40xx_setup_interfaces() case "$board" in 8dev,habanero-dvk|\ + avm,fritzbox-4040|\ + asus,rt-ac58u|\ + linksys,ea6350v3|\ + linksys,ea8300|\ + linksys,mr8300|\ + mikrotik,hap-ac2|\ + mikrotik,hap-ac3|\ + p2w,r619ac-64m|\ + p2w,r619ac-128m|\ + zyxel,nbg6617) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" + ;; 8dev,jalapeno|\ alfa-network,ap120c-ac|\ + asus,map-ac2200|\ + cilab,meshpoint-one|\ + edgecore,ecw5211|\ + glinet,gl-b2200|\ + mikrotik,cap-ac|\ + netgear,wac510) + ucidef_set_interfaces_lan_wan "lan" "wan" + ;; + aruba,ap-303|\ + avm,fritzrepeater-1200|\ + meraki,mr33|\ + meraki,mr74|\ + mikrotik,lhgg-60ad|\ + mikrotik,sxtsq-5-ac) + ucidef_set_interface_lan "lan" + ;; + avm,fritzbox-7530) + ucidef_set_interface_lan "lan1 lan2 lan3 lan4" + ;; + cellc,rtl30vw) + ucidef_set_interface_lan "lan1 lan2" + ;; + glinet,gl-b1300) + ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" + ;; engenius,emr3500|\ engenius,ens620ext|\ luma,wrtq-329acn|\ - netgear,wac510|\ plasmacloud,pa1200|\ plasmacloud,pa2200|\ sony,ncp-hg100-cellular) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; - aruba,ap-303|\ aruba,ap-365|\ - avm,fritzrepeater-1200|\ dlink,dap-2610 |\ engenius,eap1300|\ engenius,emd1|\ extreme-networks,ws-ap3915i|\ - meraki,mr33|\ - meraki,mr74|\ - mikrotik,lhgg-60ad|\ - mikrotik,sxtsq-5-ac|\ netgear,ex6100v2|\ netgear,ex6150v2|\ zyxel,wre6606) @@ -45,8 +75,6 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan" ;; - asus,map-ac2200|\ - cilab,meshpoint-one|\ edgecore,ecw5211|\ edgecore,oap100|\ google,wifi|\ @@ -54,34 +82,8 @@ ipq40xx_setup_interfaces() openmesh,a62) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; - mikrotik,cap-ac) - ucidef_add_switch "switch0" \ - "0t@eth0" "4:lan" "5:wan" - ;; - asus,rt-ac42u|\ - asus,rt-ac58u|\ - mikrotik,hap-ac2|\ - mikrotik,hap-ac3|\ - p2w,r619ac-64m|\ - p2w,r619ac-128m|\ - zyxel,nbg6617) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" - ;; - avm,fritzbox-4040|\ - linksys,ea6350v3|\ - linksys,ea8300) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" - ;; - linksys,mr8300) + asus,rt-ac42u) ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" - ;; - avm,fritzbox-7530) ucidef_add_switch "switch0" \ "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; @@ -101,10 +103,8 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1" ;; - cellc,rtl30vw) - ucidef_set_interface_lan "eth0" - ucidef_add_switch "switch0" \ - "0u@eth0" "3:lan" "4:lan" + compex,wpj428) + ucidef_set_interface_lan "lan1 lan2" ;; devolo,magic-2-wifi-next) ucidef_set_interface_lan "eth0 eth1 eth2" @@ -115,17 +115,11 @@ ipq40xx_setup_interfaces() "0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "0u@eth1" "5:wan" ;; glinet,gl-ap1300 |\ - glinet,gl-b1300 |\ glinet,gl-s1300) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ "0u@eth0" "3:lan" "4:lan" ;; - glinet,gl-b2200) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "5:lan" "0u@eth1" "4:wan" - ;; mobipromo,cm520-79f) ucidef_add_switch "switch0" \ "0u@eth0" "3:lan:2" "4:lan:1" @@ -157,9 +151,7 @@ ipq40xx_setup_interfaces() "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" ;; zte,mf286d) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "0u@eth1" "5:wan" + ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan" ;; zte,mf289f) ucidef_set_interfaces_lan_wan "eth0" "eth1" @@ -216,7 +208,9 @@ ipq40xx_setup_macs() ezviz,cs-w3-wd1200g-eup) label_mac=$(mtd_get_mac_binary "ART" 0x6) ;; - linksys,ea6350v3) + linksys,ea6350v3|\ + linksys,ea8300 |\ + linksys,mr8300) wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) lan_mac=$(macaddr_add "$wan_mac" 1) ;; diff --git a/target/linux/ipq40xx/base-files/etc/board.d/05_compat-version b/target/linux/ipq40xx/base-files/etc/board.d/05_compat-version new file mode 100644 index 0000000000..70272f99ed --- /dev/null +++ b/target/linux/ipq40xx/base-files/etc/board.d/05_compat-version @@ -0,0 +1,18 @@ +# +# Copyright (C) 2022 OpenWrt.org +# + +. /lib/functions.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in + *) + ucidef_set_compat_version "1.1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 940af0528d..3c247ae6aa 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -21,8 +21,8 @@ preinit_set_mac_address() { linksys,ea8300|\ linksys,mr8300) base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - ip link set dev eth0 address "$base_mac" - ip link set dev eth1 address $(macaddr_add "$base_mac" 1) + ip link set dev lan1 address $(macaddr_add "$base_mac" 1) + ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) ;; meraki,mr33|\ meraki,mr74) diff --git a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh deleted file mode 100644 index a8a4469e6c..0000000000 --- a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh +++ /dev/null @@ -1,24 +0,0 @@ -set_preinit_iface() { - . /lib/functions.sh - - case $(board_name) in - aruba,ap-303| \ - asus,rt-ac42u| \ - asus,rt-ac58u| \ - avm,fritzbox-4040| \ - ezviz,cs-w3-wd1200g-eup| \ - glinet,gl-b1300| \ - linksys,ea8300| \ - linksys,mr8300| \ - meraki,mr33| \ - meraki,mr74| \ - zyxel,nbg6617) - ifname=eth0 - ;; - devolo,magic-2-wifi-next) - ifname=eth1 - ;; - esac -} - -boot_hook_add preinit_main set_preinit_iface diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts index def355b465..def0401ac5 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts @@ -14,6 +14,7 @@ led-failsafe = &status; led-running = &status; led-upgrade = &status; + ethernet1 = &swport5; }; keys { @@ -320,6 +321,24 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + + label = "lan"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts index 515d71b456..0609324310 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts @@ -222,6 +222,24 @@ #gpio-cells = <2>; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + + label = "lan"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts index 0fd9654111..75b556a7f9 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts @@ -102,6 +102,34 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; +}; + +&swport2 { + status = "okay"; +}; + +&swport3 { + status = "okay"; +}; + +&swport4 { + status = "okay"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts index df2ef37f17..3060b7bd1c 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts @@ -14,6 +14,8 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; + ethernet0 = &swport5; + ethernet1 = &gmac; }; chosen { @@ -287,6 +289,24 @@ pinctrl-names = "default"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + + label = "lan"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts index d962ca58fa..e448206c36 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts @@ -273,6 +273,34 @@ #gpio-cells = <2>; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; +}; + +&swport2 { + status = "okay"; +}; + +&swport3 { + status = "okay"; +}; + +&swport4 { + status = "okay"; +}; + +&swport5 { + status = "okay"; +}; + &usb3_ss_phy { status = "okay"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts index ee174a29d1..c8868d8b30 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts @@ -251,6 +251,38 @@ qcom,single-led-10; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; + label = "lan4"; +}; + +&swport2 { + status = "okay"; + label = "lan3"; +}; + +&swport3 { + status = "okay"; + label = "lan2"; +}; + +&swport4 { + status = "okay"; + label = "lan1"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi index ee94a15c00..4d09e86dd6 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi @@ -7,6 +7,10 @@ #include / { + aliases { + ethernet1 = &swport5; + }; + soc { rng@22000 { status = "okay"; @@ -227,6 +231,24 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + + label = "lan"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts index 4922938692..ff7252d696 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts @@ -302,6 +302,42 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; + + label = "lan4"; +}; + +&swport2 { + status = "okay"; + + label = "lan3"; +}; + +&swport3 { + status = "okay"; + + label = "lan2"; +}; + +&swport4 { + status = "okay"; + + label = "lan1"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "ZyXEL-NBG6617"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts index 1d860627b5..87705e5f60 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts @@ -277,6 +277,34 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; +}; + +&swport2 { + status = "okay"; +}; + +&swport3 { + status = "okay"; +}; + +&swport4 { + status = "okay"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "RT-AC58U"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts index 415bec5a8f..07fa80742e 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts @@ -220,3 +220,20 @@ &mdio { status = "okay"; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; + + /delete-property/ psgmii-ethphy; +}; + +&swport5 { + status = "okay"; + + label = "lan"; + phy-mode = "rgmii"; +}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts index aa54f43e85..2dbfaa086e 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts @@ -16,6 +16,7 @@ led-failsafe = &led_power_amber; led-running = &led_power_green; led-upgrade = &led_power_amber; + ethernet1 = &swport5; }; chosen { @@ -336,6 +337,24 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + + label = "lan"; +}; + +&swport5 { + status = "okay"; +}; + &mdio { status = "okay"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts index af79020121..a0ceb299b4 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts @@ -262,6 +262,30 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; +}; + +&swport2 { + status = "okay"; +}; + +&swport3 { + status = "okay"; +}; + +&swport4 { + status = "okay"; +}; + &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "AVM-FRITZBox-7530"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts index 20b981a372..723f2161c6 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts @@ -26,6 +26,10 @@ status = "okay"; pinctrl-0 = <&mdio_pins>; pinctrl-names = "default"; + + ethphy: ethernet-phy@0 { + reg = <0x0>; + }; }; tcsr@1949000 { @@ -237,8 +241,32 @@ status = "okay"; }; -ðphy0 { - status = "disabled"; +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200"; +}; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; + + /delete-property/ psgmii-ethphy; +}; + +&swport5 { + status = "okay"; + + label = "lan"; + phy-handle = <ðphy>; + phy-mode = "rgmii-id"; }; ðphy1 { @@ -260,13 +288,3 @@ &psgmiiphy { status = "disabled"; }; - -&wifi0 { - status = "okay"; - qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200"; -}; - -&wifi1 { - status = "okay"; - qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200"; -}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts index 6fdc361ee7..e17609ff6f 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts @@ -18,6 +18,10 @@ bootargs-append = " root=/dev/mmcblk0p2 rw rootwait clk_ignore_unused"; }; + aliases { + ethernet1 = &swport4; + }; + soc { rng@22000 { status = "okay"; @@ -346,6 +350,26 @@ }; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + + label = "wan"; +}; + +&swport5 { + status = "okay"; + + label = "lan"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts index c467d85049..23a654dcff 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts @@ -15,6 +15,7 @@ led-failsafe = &led_status; led-running = &led_status; led-upgrade = &led_upgrade; + ethernet1 = &swport5; }; soc { @@ -331,6 +332,34 @@ }; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; +}; + +&swport2 { + status = "okay"; +}; + +&swport3 { + status = "okay"; +}; + +&swport4 { + status = "okay"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts index c03762eac1..35c4c26a2c 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts @@ -306,6 +306,38 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; + label = "lan4"; +}; + +&swport2 { + status = "okay"; + label = "lan3"; +}; + +&swport3 { + status = "okay"; + label = "lan2"; +}; + +&swport4 { + status = "okay"; + label = "lan1"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts index c208bf33ee..38bacfa2ba 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts @@ -261,3 +261,21 @@ &psgmiiphy { status = "disabled"; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; + + /delete-property/ psgmii-ethphy; +}; + +&swport5 { + status = "okay"; + + label = "lan"; + phy-handle = <ðphy0>; + phy-mode = "rgmii-id"; +}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts index 94e94beb81..32f0473fb1 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts @@ -15,6 +15,7 @@ led-failsafe = &led_red0; led-running = &led_blue0; led-upgrade = &led_red0; + ethernet1 = &swport4; }; soc { @@ -340,3 +341,23 @@ pinctrl-names = "default"; status = "okay"; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + + label = "wan"; +}; + +&swport5 { + status = "okay"; + + label = "lan"; +}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts index d2a010055c..a832e2392a 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts @@ -217,6 +217,12 @@ status = "okay"; }; +&gmac { + status = "okay"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_config_0>; +}; + &nand { pinctrl-0 = <&nand_pins>; pinctrl-names = "default"; @@ -319,6 +325,36 @@ status = "okay"; }; +&switch { + status = "okay"; +}; + +&swport2 { + status = "okay"; + + label = "lan4"; +}; + +&swport3 { + status = "okay"; + + label = "lan3"; +}; + +&swport4 { + status = "okay"; + + label = "lan2"; +}; + +&swport5 { + status = "okay"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_config_0>; + mac-address-increment = <1>; +}; + &tlmm { i2c_0_pins: i2c_0_pinmux { mux { diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi index f66c9c86ea..d7a987f98d 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi @@ -320,6 +320,42 @@ qcom,single-led-10; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; + + label = "lan4"; +}; + +&swport2 { + status = "okay"; + + label = "lan3"; +}; + +&swport3 { + status = "okay"; + + label = "lan2"; +}; + +&swport4 { + status = "okay"; + + label = "lan1"; +}; + +&swport5 { + status = "okay"; +}; + &usb3_ss_phy { status = "okay"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts index 8db7226ce1..3205b7d564 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts @@ -371,3 +371,23 @@ status = "okay"; qcom,ath10k-calibration-variant = "cellc,rtl30vw"; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport3 { + status = "okay"; + + label = "lan2"; +}; + +&swport4 { + status = "okay"; + + label = "lan1"; +}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi index 8c9d1c7f03..4f2cf1f516 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi @@ -3,7 +3,7 @@ /* * Device Tree Source for Linksys xx8300 (Dallas) * - * Copyright (C) 2019 Jeff Kletsky + * Copyright (C) 2019, 2022 Jeff Kletsky * Updated 2020 Hans Geiblinger * */ @@ -286,3 +286,31 @@ &usb3_ss_phy { status = "okay"; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; +}; + +&swport2 { + status = "okay"; +}; + +&swport3 { + status = "okay"; +}; + +&swport4 { + status = "okay"; +}; + +&swport5 { + status = "okay"; +}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts index b6ce8c027f..48b5cd53d8 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts @@ -227,6 +227,14 @@ precal_art_5000: precal@5000 { reg = <0x5000 0x2f20>; }; + + macaddr_art_e010: mac-address@e010 { + reg = <0xe010 0x6>; + }; + + macaddr_art_e018: mac-address@e018 { + reg = <0xe018 0x6>; + }; }; partition6@180000 { compatible = "denx,fit"; @@ -247,6 +255,30 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + label = "lan1"; + + nvmem-cells = <&macaddr_art_e018>; + nvmem-cell-names = "mac-address"; +}; + +&swport5 { + status = "okay"; + label = "lan2"; + + nvmem-cells = <&macaddr_art_e010>; + nvmem-cell-names = "mac-address"; +}; + &usb3_ss_phy { status = "okay"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi index 0925561ed0..41de6bb218 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi @@ -21,7 +21,7 @@ pinctrl-0 = <&mdio_pins>; pinctrl-names = "default"; - ethernet-phy@5 { + ethphy: ethernet-phy@5 { reg = <0x5>; }; }; @@ -214,6 +214,24 @@ }; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; + + /delete-property/ psgmii-ethphy; +}; + +&swport5 { + status = "okay"; + + label = "lan"; + phy-handle = <ðphy>; + phy-mode = "rgmii-id"; +}; + ðphy0 { status = "disabled"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts index e8a14c9dee..9e46555480 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts @@ -266,6 +266,30 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport3 { + status = "okay"; + + label = "lan2"; +}; + +&swport4 { + status = "okay"; + + label = "lan1"; +}; + +&swport5 { + status = "okay"; +}; + &wifi0 { status = "okay"; nvmem-cell-names = "pre-calibration"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi index fa755b3873..bc385d330e 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi @@ -386,3 +386,41 @@ status = "okay"; qcom,ath10k-calibration-variant = "Meraki-MR33"; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; + + /delete-property/ psgmii-ethphy; +}; + +&swport5 { + status = "okay"; + + label = "lan"; + phy-handle = <ðphy1>; + phy-mode = "rgmii-rxid"; +}; + +ðphy0 { + status = "disabled"; +}; + +ðphy2 { + status = "disabled"; +}; + +ðphy3 { + status = "disabled"; +}; + +ðphy4 { + status = "disabled"; +}; + +&psgmiiphy { + status = "disabled"; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 5851b29875..2ba4c779a0 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -10,6 +10,8 @@ define Device/Default IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata IMAGE/sysupgrade.bin/squashfs := + DEVICE_COMPAT_VERSION := 1.1 + DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA endef include $(SUBTARGET).mk