ath79: harmonize ethernet-phy naming scheme
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 27 Jan 2020 13:15:56 +0000 (14:15 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 31 Jan 2020 12:40:59 +0000 (13:40 +0100)
A minority of ethernet-phy definitions seems to use numbers in label,
name and reg property relatively random. This patch aligns their
use to have the same numeric value for all of them.

While at it, improve order of properties/add newlines for the ethX
nodes where necessary.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts
target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
target/linux/ath79/dts/qca9563_tplink_re450-v2.dts

index 804b71170ee8e4ebffa1d198b956927100f65a79..3e6dd2daea6c9c3e203fa50c1d9c952da96f66ca 100644 (file)
 &mdio0 {
        status = "okay";
 
-       phy0: ethernet-phy@c {
+       phy12: ethernet-phy@c {
                reg = <0xc>;
                phy-mode = "mii";
        };
        phy-mode = "mii";
        mtd-mac-address = <&uboot 0x1fc00>;
 
-       phy-handle = <&phy0>;
+       phy-handle = <&phy12>;
 };
 
 &wmac {
index 6ac79b0c1ea927def7d2534ca5f088f038d384b4..eac2a4268a9e156abfd80d99ca2aaf3d76a1ed1a 100644 (file)
@@ -17,7 +17,7 @@
        phy4-mii-enable;
        phy-mask = <0x23>;
 
-       phy4: ethernet-phy@0 {
+       phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "mii";
        };
@@ -27,7 +27,7 @@
        status = "okay";
 
        phy-mode = "mii";
-       phy-handle = <&phy4>;
+       phy-handle = <&phy0>;
 
        gmac-config {
                device = <&gmac>;
index a797750e7e34b1409ce9cb7236a38cc0d8429927..f802de271eaf11de1dfde9c07dc582b5596f40f3 100644 (file)
@@ -88,7 +88,7 @@
                gpios = <&gpio 23 GPIO_ACTIVE_HIGH>,
                        <&gpio 18 GPIO_ACTIVE_HIGH>;
 
-               phy0: ethernet-phy@4 {
+               phy4: ethernet-phy@4 {
                        reg = <4>;
 
                        phy-mode = "rgmii-rxid";
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&config 0x10008>;
+       phy-handle = <&phy4>;
        pll-data = <0x9e000000 0x80000101 0x80001313>;
-       phy-handle = <&phy0>;
+
+       mtd-mac-address = <&config 0x10008>;
 
        gmac-config {
                device = <&gmac>;
index 17e172d5471f8a03870b529ff23d58904a263b01..8827990eb57b191ab410a1864458803c18ed32db 100644 (file)
@@ -93,7 +93,7 @@
                #address-cells = <1>;
                #size-cells = <0>;
 
-               phy0: ethernet-phy@4 {
+               phy4: ethernet-phy@4 {
                        reg = <4>;
                        reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
                };
 
 &eth0 {
        status = "okay";
-       mtd-mac-address = <&info 0x8>;
+
+       phy-handle = <&phy4>;
        pll-data = <0xa6000000 0x00000101 0x00001616>;
-       phy-handle = <&phy0>;
+
+       mtd-mac-address = <&info 0x8>;
 };
 
 &wmac {
        status = "okay";
+
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&info 0x8>;
        mtd-mac-address-increment = <(-1)>;
index 5a896d52bcc248f39e3f965e26384f658b02b997..4ad65c31e88a9a174df1a03407018721d676ccf4 100644 (file)
 &mdio0 {
        status = "okay";
 
-       phy0: ethernet-phy@0 {
-               reg = <17>;
+       phy17: ethernet-phy@11 {
+               reg = <0x11>;
                phy-mode = "rgmii-id";
        };
 
        status = "okay";
 
        pll-data = <0xa6000000 0x00000101 0x00001616>;
-       phy-handle = <&phy0>;
+       phy-handle = <&phy17>;
+
        fixed-link {
                speed = <1000>;
                full-duplex;
 
        pll-data = <0x03000101 0x00000101 0x00001616>;
        phy-handle = <&phy1>;
+
        fixed-link {
                speed = <1000>;
                full-duplex;
index 464be7344981469450b96302614dfe6e05d14d80..28fefe224d43123d746c0cd2b06e7507f16ef08e 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
 
-               phy0: ethernet-phy@4 {
+               phy4: ethernet-phy@4 {
                        reg = <4>;
                        device_type = "ethernet-phy";
                        reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 
 &spi {
        status = "okay";
+
        num-cs = <1>;
 
        flash@0 {
 
 &eth0 {
        status = "okay";
+
+       phy-handle = <&phy4>;
+
        mtd-mac-address = <&info 0x8>;
-       phy-handle = <&phy0>;
 };
 
 &wmac {
        status = "okay";
+
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&info 0x8>;
 };