ipq40xx: Convert Google Wifi to DSA, reenable
authorBrian Norris <computersforpeace@gmail.com>
Sat, 22 Oct 2022 20:00:38 +0000 (13:00 -0700)
committerPetr Štetiar <ynezz@true.cz>
Sun, 23 Oct 2022 06:27:40 +0000 (08:27 +0200)
Undo parts of these:

116feb4a1cad ipq40xx: remove non-converted network configs
db19efee9512 ipq40xx: disable boards not converted to DSA

Reintroduce the DT paths /soc/edma@c080000/gmac{0,1}, because the stock
bootloader has memorized them (instead of following aliases); then plug
the MAC address back in via 05_set_iface_mac_ipq40xx.sh, since the
'local-mac-address' property is no longer in the correct node.

Cc: David Bauer <mail@david-bauer.net>
Cc: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
target/linux/ipq40xx/image/chromium.mk

index fc9751eb13f6eed29b3ae4713c8d0846aa9189dd..57c228e123dc738da5782f66fa321812842d5379 100644 (file)
@@ -32,6 +32,7 @@ ipq40xx_setup_interfaces()
        cilab,meshpoint-one|\
        edgecore,ecw5211|\
        glinet,gl-b2200|\
+       google,wifi|\
        luma,wrtq-329acn|\
        mikrotik,cap-ac|\
        netgear,wac510|\
@@ -119,6 +120,10 @@ ipq40xx_setup_macs()
        ezviz,cs-w3-wd1200g-eup)
                label_mac=$(mtd_get_mac_binary "ART" 0x6)
                ;;
+       google,wifi)
+               wan_mac=$(get_mac_label)
+               lan_mac=$(macaddr_add "$wan_mac" 1)
+               ;;
        linksys,ea6350v3|\
        linksys,ea8300  |\
        linksys,mr8300)
index 643449f8e4c8946cd623e6e1d7d4384543068add..65f593330558e3c6bad0a0e4b4e2d11603aad008 100644 (file)
        model = "Google WiFi (Gale)";
        compatible = "google,wifi", "google,gale-v2", "qcom,ipq4019";
 
+       aliases {
+               label-mac-device = &gmac0;
+       };
+
        chosen {
                /*
                 * rootwait: in case we're booting from slow/async USB storage.
                device_type = "memory";
                reg = <0x80000000 0x20000000>; /* 512MB */
        };
+
+       soc {
+               edma@c080000 {
+                       /*
+                        * Factory bootloader (depthcharge) will fail to boot
+                        * if this exact path (soc/edma@c080000/gmac0) doesn't
+                        * exist.
+                        */
+                       gmac0: gmac0 {
+                       };
+
+                       /*
+                        * Factory bootloader (depthcharge) will fail to boot
+                        * if this exact path (soc/edma@c080000/gmac1) doesn't
+                        * exist.
+                        */
+                       gmac1 {
+                       };
+               };
+       };
 };
 
 &tlmm {
        status = "okay";
 };
 
+&gmac {
+       status = "okay";
+};
+
 &mdio {
        status = "okay";
        pinctrl-0 = <&mdio_pins>;
        non-removable;
 };
 
+&switch {
+       status = "okay";
+};
+
+&swport4 {
+       status = "okay";
+
+       label = "lan";
+};
+
+&swport5 {
+       status = "okay";
+};
+
 &usb2 {
        status = "okay";
 };
index 7410794fb4c7559dec3968e658042fb84202290d..2abd2df02ae4dd018ced778e2dc2c654a907fe0c 100644 (file)
@@ -33,5 +33,4 @@ define Device/google_wifi
        DEVICE_PACKAGES := partx-utils mkf2fs e2fsprogs \
                           kmod-fs-ext4 kmod-fs-f2fs kmod-google-firmware
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += google_wifi
+TARGET_DEVICES += google_wifi