ipq40xx: convert to DSA and enable Netgear Orbi devices
authorDavide Fioravanti <pantanastyle@gmail.com>
Tue, 4 Oct 2022 21:20:39 +0000 (23:20 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 25 Oct 2022 00:34:46 +0000 (02:34 +0200)
Convert to DSA and enable again Netgear Orbi devices:
 - RBR50
 - RBS50
 - SRR60
 - SRS60

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi
target/linux/ipq40xx/image/generic.mk

index 57c228e123dc738da5782f66fa321812842d5379..c24e4c83739ac84f9bf67e32d1aaff13dc2dd58b 100644 (file)
@@ -64,6 +64,12 @@ ipq40xx_setup_interfaces()
        mikrotik,wap-ac)
                ucidef_set_interface_lan "sw-eth1 sw-eth2"
                ;;
+       netgear,rbr50|\
+       netgear,rbs50|\
+       netgear,srr60|\
+       netgear,srs60)
+               ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
+               ;;
        zte,mf286d)
                ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan"
                ;;
@@ -142,6 +148,10 @@ ipq40xx_setup_macs()
                lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
                label_mac="$lan_mac"
                ;;
+       netgear,rbr50|\
+       netgear,rbs50|\
+       netgear,srr60|\
+       netgear,srs60|\
        pakedge,wr-1)
                wan_mac=$(macaddr_add $(get_mac_label) 1)
                ;;
index 4a575b60eeebf53a69b5a31cfec486c66f4971b5..44dbfef529d9af703cb2dde228fed66885d097b9 100644 (file)
@@ -11,6 +11,7 @@
                led-failsafe = &led_status_red;
                led-running = &led_status_green;
                led-upgrade = &led_status_blue;
+               label-mac-device = &gmac;
        };
 
        soc {
        status = "okay";
 };
 
+&gmac {
+       status = "okay";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport1 {
+       status = "okay";
+
+       label = "wan";
+};
+
+&swport2 {
+       status = "okay";
+
+       label = "lan1";
+};
+
+&swport3 {
+       status = "okay";
+
+       label = "lan2";
+};
+
+&swport4 {
+       status = "okay";
+
+       label = "lan3";
+};
+
+&ethphy4 {
+       status = "disabled";
+};
+
 &pcie0 {
        status = "okay";
 
index fd3140c2aa214e15c1e45a0df7e0b8b680de55b1..e8e6e29e72792fe8f72c92d8657a1bda5fb89053 100644 (file)
@@ -815,8 +815,7 @@ define Device/netgear_rbr50
        DEVICE_VARIANT := v1
        NETGEAR_BOARD_ID := RBR50
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += netgear_rbr50
+TARGET_DEVICES += netgear_rbr50
 
 define Device/netgear_rbs50
        $(call Device/netgear_rbx50)
@@ -824,8 +823,7 @@ define Device/netgear_rbs50
        DEVICE_VARIANT := v1
        NETGEAR_BOARD_ID := RBS50
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += netgear_rbs50
+TARGET_DEVICES += netgear_rbs50
 
 define Device/netgear_srx60
        $(call Device/netgear_orbi)
@@ -840,16 +838,14 @@ define Device/netgear_srr60
        DEVICE_MODEL := SRR60
        NETGEAR_BOARD_ID := SRR60
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += netgear_srr60
+TARGET_DEVICES += netgear_srr60
 
 define Device/netgear_srs60
        $(call Device/netgear_srx60)
        DEVICE_MODEL := SRS60
        NETGEAR_BOARD_ID := SRS60
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += netgear_srs60
+TARGET_DEVICES += netgear_srs60
 
 define Device/netgear_wac510
        $(call Device/FitImage)