1 From 203a34f815c7e9320140bb2259ae5884575f0658 Mon Sep 17 00:00:00 2001
2 From: Calvin Johnson <calvin.johnson@nxp.com>
3 Date: Tue, 20 Nov 2018 21:52:03 +0530
4 Subject: [PATCH] arm64: dts: ls1012a: use phy-handle to handle phy params
6 Replace properties "fsl,gemac-phy-id" and "fsl,pfe-phy-if-flags"
7 and use phy-handle instead.
8 Create mdio node with phy-handles defining PHYs available on the
11 Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
13 .../boot/dts/freescale/fsl-ls1012a-2g5rdb.dts | 25 +++++++++++++---------
14 arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts | 23 +++++++++++---------
15 arch/arm64/boot/dts/freescale/fsl-ls1012a-frwy.dts | 23 +++++++++++---------
16 arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 25 +++++++++++++---------
17 arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts | 22 ++++++++++---------
18 5 files changed, 68 insertions(+), 50 deletions(-)
20 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-2g5rdb.dts
21 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-2g5rdb.dts
24 reg = <0x0>; /* GEM_ID */
25 fsl,gemac-bus-id = <0x0>; /* BUS_ID */
26 - fsl,gemac-phy-id = <0x1>; /* PHY_ID */
27 fsl,mdio-mux-val = <0x0>;
28 phy-mode = "sgmii-2500";
29 - fsl,pfe-phy-if-flags = <0x0>;
32 - reg = <0x1>; /* enabled/disabled */
34 + phy-handle = <&sgmii_phy1>;
40 reg = <0x1>; /* GEM_ID */
41 fsl,gemac-bus-id = < 0x0>; /* BUS_ID */
42 - fsl,gemac-phy-id = < 0x2>; /* PHY_ID */
43 fsl,mdio-mux-val = <0x0>;
44 phy-mode = "sgmii-2500";
45 - fsl,pfe-phy-if-flags = <0x0>;
46 + phy-handle = <&sgmii_phy2>;
50 + #address-cells = <1>;
53 + sgmii_phy1: ethernet-phy@1 {
54 + compatible = "ethernet-phy-ieee802.3-c45";
59 - reg = <0x0>; /* enabled/disabled */
60 + sgmii_phy2: ethernet-phy@2 {
61 + compatible = "ethernet-phy-ieee802.3-c45";
66 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
67 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
70 reg = <0x0>; /* GEM_ID */
71 fsl,gemac-bus-id = <0x0>; /* BUS_ID */
72 - fsl,gemac-phy-id = <0x2>; /* PHY_ID */
73 fsl,mdio-mux-val = <0x0>;
75 - fsl,pfe-phy-if-flags = <0x0>;
78 - reg = <0x1>; /* enabled/disabled */
80 + phy-handle = <&sgmii_phy1>;
86 reg = <0x1>; /* GEM_ID */
87 fsl,gemac-bus-id = <0x1>; /* BUS_ID */
88 - fsl,gemac-phy-id = <0x1>; /* PHY_ID */
89 fsl,mdio-mux-val = <0x0>;
91 - fsl,pfe-phy-if-flags = <0x0>;
92 + phy-handle = <&sgmii_phy2>;
96 + #address-cells = <1>;
99 + sgmii_phy1: ethernet-phy@2 {
104 - reg = <0x0>; /* enabled/disabled */
105 + sgmii_phy2: ethernet-phy@1 {
110 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frwy.dts
111 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frwy.dts
114 reg = <0x0>; /* GEM_ID */
115 fsl,gemac-bus-id = <0x0>; /* BUS_ID */
116 - fsl,gemac-phy-id = <0x2>; /* PHY_ID */
117 fsl,mdio-mux-val = <0x0>;
119 - fsl,pfe-phy-if-flags = <0x0>;
122 - reg = <0x1>; /* enabled/disabled */
124 + phy-handle = <&sgmii_phy1>;
128 @@ -127,13 +122,21 @@
130 reg = <0x1>; /* GEM_ID */
131 fsl,gemac-bus-id = <0x1>; /* BUS_ID */
132 - fsl,gemac-phy-id = <0x1>; /* PHY_ID */
133 fsl,mdio-mux-val = <0x0>;
135 - fsl,pfe-phy-if-flags = <0x0>;
136 + phy-handle = <&sgmii_phy2>;
140 + #address-cells = <1>;
143 + sgmii_phy1: ethernet-phy@2 {
148 - reg = <0x0>; /* enabled/disabled */
149 + sgmii_phy2: ethernet-phy@1 {
154 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
155 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
158 reg = <0x0>; /* GEM_ID */
159 fsl,gemac-bus-id = <0x0>; /* BUS_ID */
160 - fsl,gemac-phy-id = <0x1>; /* PHY_ID */
161 fsl,mdio-mux-val = <0x2>;
162 phy-mode = "sgmii-2500";
163 - fsl,pfe-phy-if-flags = <0x0>;
166 - reg = <0x1>; /* enabled/disabled */
168 + phy-handle = <&sgmii_phy1>;
172 @@ -164,13 +159,23 @@
174 reg = <0x1>; /* GEM_ID */
175 fsl,gemac-bus-id = <0x1>; /* BUS_ID */
176 - fsl,gemac-phy-id = <0x2>; /* PHY_ID */
177 fsl,mdio-mux-val = <0x3>;
178 phy-mode = "sgmii-2500";
179 - fsl,pfe-phy-if-flags = <0x0>;
180 + phy-handle = <&sgmii_phy2>;
184 + #address-cells = <1>;
187 + sgmii_phy1: ethernet-phy@1 {
188 + compatible = "ethernet-phy-ieee802.3-c45";
193 - reg = <0x0>; /* enabled/disabled */
194 + sgmii_phy2: ethernet-phy@2 {
195 + compatible = "ethernet-phy-ieee802.3-c45";
200 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
201 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
204 reg = <0x0>; /* GEM_ID */
205 fsl,gemac-bus-id = <0x0>; /* BUS_ID */
206 - fsl,gemac-phy-id = <0x2>; /* PHY_ID */
207 fsl,mdio-mux-val = <0x0>;
209 - fsl,pfe-phy-if-flags = <0x0>;
212 - reg = <0x1>; /* enabled/disabled */
214 + phy-handle = <&sgmii_phy>;
220 reg = <0x1>; /* GEM_ID */
221 fsl,gemac-bus-id = < 0x1 >; /* BUS_ID */
222 - fsl,gemac-phy-id = < 0x1 >; /* PHY_ID */
223 fsl,mdio-mux-val = <0x0>;
224 phy-mode = "rgmii-txid";
225 - fsl,pfe-phy-if-flags = <0x0>;
226 + phy-handle = <&rgmii_phy>;
229 + #address-cells = <1>;
232 + sgmii_phy: ethernet-phy@2 {
237 - reg = <0x0>; /* enabled/disabled */
238 + rgmii_phy: ethernet-phy@1 {