ipq806x: ubnt,unifi-ac-hd: use on-board PHYs
authorMark Mentovai <mark@moxienet.com>
Mon, 12 Apr 2021 15:59:19 +0000 (11:59 -0400)
committerPetr Štetiar <ynezz@true.cz>
Fri, 7 May 2021 05:05:16 +0000 (07:05 +0200)
Unlike many ipq806x devices, Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301)
has no switch on board. Its two Ethernet ports are connected to Atheros
AR8033 PHYs. It is not appropriate to use fixed-link in this
configuration. Instead, configure the correct PHYs in the device tree
configuration to allow the at803x driver to load.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd

target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts

index 7c2d6c9d13076d398457f8fe189114c564052d0b..70c51b90f316b33ea18bb69a10746f2eabbf81ac 100644 (file)
@@ -16,6 +16,8 @@
                led-running = &led_dome_blue;
                led-upgrade = &led_dome_blue;
                mdio-gpio0 = &mdio0;
+               ethernet0 = &gmac1;
+               ethernet1 = &gmac2;
        };
 
        leds {
 
        pinctrl-0 = <&mdio0_pins>;
        pinctrl-names = "default";
-};
-
-&gmac2 {
-       status = "okay";
 
-       phy-mode = "sgmii";
-       qcom,id = <2>;
-       qcom,emulation = <0>;
-       mdiobus = <&mdio0>;
-
-       mtd-mac-address = <&eeprom 0x0>;
+       phy4: ethernet-phy@4 {
+               reg = <4>;
+       };
 
-       fixed-link {
-               speed = <1000>;
-               full-duplex;
+       phy5: ethernet-phy@5 {
+               reg = <5>;
        };
 };
 
 &gmac1 {
        status = "okay";
 
+       mdiobus = <&mdio0>;
+       phy-handle = <&phy5>;
        phy-mode = "sgmii";
        qcom,id = <1>;
-       qcom,emulation = <0>;
-       mdiobus = <&mdio0>;
 
        mtd-mac-address = <&eeprom 0x6>;
+};
 
-       fixed-link {
-               speed = <1000>;
-               full-duplex;
-       };
+&gmac2 {
+       status = "okay";
+
+       mdiobus = <&mdio0>;
+       phy-handle = <&phy4>;
+       phy-mode = "sgmii";
+       qcom,id = <2>;
+
+       mtd-mac-address = <&eeprom 0x0>;
 };
 
 &pcie0 {