Skip to contentSkip to conversation

ARM: dts: am335x-baltos: use phy-phandle declarations

PATCH New yegorslists at googlemail.com 2 participants 2 messages Nov 23, 2016 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: am335x-baltos: use phy-phandle declarations

From: Yegor Yefremov <[email protected]>

phy-phandle is now a preferred method to reference a PHY device. Especially in regards to cpsw it enables PHY specific settings like max-speed etc. being specified in DTS.

---
Changes:
v2: add patch description (Tony Lindgren)

 arch/arm/boot/dts/am335x-baltos-ir2110.dts | 10 ++++++++--
 arch/arm/boot/dts/am335x-baltos-ir3220.dts |  2 +-
 arch/arm/boot/dts/am335x-baltos-ir5221.dts |  2 +-
 arch/arm/boot/dts/am335x-baltos.dtsi       |  5 ++++-
 4 files changed, 14 insertions(+), 5 deletions(-)
arch/arm/boot/dts/am335x-baltos-ir2110.dts +8 -2
index a9a9730..501c752 100644
@@ -54,16 +54,22 @@
 	dr_mode = "host";
 };
 
+&davinci_mdio {
+	phy0: ethernet-phy at 0 {
+		reg = <1>;
+	};
+};
+
 &cpsw_emac0 {
-	phy_id = <&davinci_mdio>, <1>;
 	phy-mode = "rmii";
 	dual_emac_res_vlan = <1>;
+	phy-handle = <&phy0>;
 };
 
 &cpsw_emac1 {
-	phy_id = <&davinci_mdio>, <7>;
 	phy-mode = "rgmii-txid";
 	dual_emac_res_vlan = <2>;
+	phy-handle = <&phy1>;
 };
 
 &phy_sel {
arch/arm/boot/dts/am335x-baltos-ir3220.dts +1 -1
index fe002a1..19f53b8 100644
@@ -109,9 +109,9 @@
 };
 
 &cpsw_emac1 {
-	phy_id = <&davinci_mdio>, <7>;
 	phy-mode = "rgmii-txid";
 	dual_emac_res_vlan = <2>;
+	phy-handle = <&phy1>;
 };
 
 &phy_sel {
arch/arm/boot/dts/am335x-baltos-ir5221.dts +1 -1
index f599350..2b9d7f4 100644
@@ -127,9 +127,9 @@
 };
 
 &cpsw_emac1 {
-	phy_id = <&davinci_mdio>, <7>;
 	phy-mode = "rgmii-txid";
 	dual_emac_res_vlan = <2>;
+	phy-handle = <&phy1>;
 };
 
 &phy_sel {
arch/arm/boot/dts/am335x-baltos.dtsi +4 -1
index 09b9541..efb5eae 100644
@@ -364,11 +364,14 @@
 };
 
 &davinci_mdio {
+	status = "okay";
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
 
-	status = "okay";
+	phy1: ethernet-phy at 1 {
+		reg = <7>;
+	};
 };
 
 &mmc1 {
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/1 ARM: dts: am335x-baltos: use phy-phandle declarations

Quoted 5 lines · yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

phy-phandle is now a preferred method to reference a PHY device. Especially in regards to cpsw it enables PHY specific settings like max-speed etc. being specified in DTS.

Applying into omap-for-v4.10/dt thanks.

Tony