[OpenWrt-Devel] [PATCH] ath79: harmonize ethernet-phy naming scheme
Adrian Schmutzler
freifunk at adrianschmutzler.de
Mon Jan 27 08:15:56 EST 2020
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 at adrianschmutzler.de>
---
target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts | 4 ++--
target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts | 4 ++--
target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts | 7 ++++---
target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi | 9 ++++++---
target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts | 8 +++++---
target/linux/ath79/dts/qca9563_tplink_re450-v2.dts | 8 ++++++--
6 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
index 804b71170e..3e6dd2daea 100644
--- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
+++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
@@ -110,7 +110,7 @@
&mdio0 {
status = "okay";
- phy0: ethernet-phy at c {
+ phy12: ethernet-phy at c {
reg = <0xc>;
phy-mode = "mii";
};
@@ -122,7 +122,7 @@
phy-mode = "mii";
mtd-mac-address = <&uboot 0x1fc00>;
- phy-handle = <&phy0>;
+ phy-handle = <&phy12>;
};
&wmac {
diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts
index 6ac79b0c1e..eac2a4268a 100644
--- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts
+++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts
@@ -17,7 +17,7 @@
phy4-mii-enable;
phy-mask = <0x23>;
- phy4: ethernet-phy at 0 {
+ phy0: ethernet-phy at 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>;
diff --git a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
index a797750e7e..f802de271e 100644
--- a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
@@ -88,7 +88,7 @@
gpios = <&gpio 23 GPIO_ACTIVE_HIGH>,
<&gpio 18 GPIO_ACTIVE_HIGH>;
- phy0: ethernet-phy at 4 {
+ phy4: ethernet-phy at 4 {
reg = <4>;
phy-mode = "rgmii-rxid";
@@ -101,9 +101,10 @@
ð0 {
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>;
diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
index 17e172d547..8827990eb5 100644
--- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
+++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
@@ -93,7 +93,7 @@
#address-cells = <1>;
#size-cells = <0>;
- phy0: ethernet-phy at 4 {
+ phy4: ethernet-phy at 4 {
reg = <4>;
reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
@@ -167,13 +167,16 @@
ð0 {
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)>;
diff --git a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
index 5a896d52bc..4ad65c31e8 100644
--- a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
+++ b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
@@ -200,8 +200,8 @@
&mdio0 {
status = "okay";
- phy0: ethernet-phy at 0 {
- reg = <17>;
+ phy17: ethernet-phy at 11 {
+ reg = <0x11>;
phy-mode = "rgmii-id";
};
@@ -236,7 +236,8 @@
status = "okay";
pll-data = <0xa6000000 0x00000101 0x00001616>;
- phy-handle = <&phy0>;
+ phy-handle = <&phy17>;
+
fixed-link {
speed = <1000>;
full-duplex;
@@ -248,6 +249,7 @@
pll-data = <0x03000101 0x00000101 0x00001616>;
phy-handle = <&phy1>;
+
fixed-link {
speed = <1000>;
full-duplex;
diff --git a/target/linux/ath79/dts/qca9563_tplink_re450-v2.dts b/target/linux/ath79/dts/qca9563_tplink_re450-v2.dts
index 464be73449..28fefe224d 100644
--- a/target/linux/ath79/dts/qca9563_tplink_re450-v2.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_re450-v2.dts
@@ -103,7 +103,7 @@
#address-cells = <1>;
#size-cells = <0>;
- phy0: ethernet-phy at 4 {
+ phy4: ethernet-phy at 4 {
reg = <4>;
device_type = "ethernet-phy";
reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
@@ -125,6 +125,7 @@
&spi {
status = "okay";
+
num-cs = <1>;
flash at 0 {
@@ -178,12 +179,15 @@
ð0 {
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>;
};
--
2.20.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list