blob: 6c74496ec8eb1db34288ba65befc7ad1ce53d353 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 153d669864c9280698641a6708c5ddcffbfeda26 Mon Sep 17 00:00:00 2001
2From: Calvin Johnson <calvin.johnson@nxp.com>
3Date: Tue, 20 Nov 2018 21:51:53 +0530
4Subject: [PATCH] net: fsl_ppfe: update dts properties for phy
5
6Use commonly used phy-handle property and mdio subnode to handle
7phy properties.
8
9Deprecate bindings fsl,gemac-phy-id & fsl,pfe-phy-if-flags.
10
11Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
12---
13 .../devicetree/bindings/net/fsl_ppfe/pfe.txt | 60 ++++++++++++++++------
14 1 file changed, 43 insertions(+), 17 deletions(-)
15
16--- a/Documentation/devicetree/bindings/net/fsl_ppfe/pfe.txt
17+++ b/Documentation/devicetree/bindings/net/fsl_ppfe/pfe.txt
18@@ -127,11 +127,12 @@ PROPERTIES
19 Definition: Must be present. Value should be the id of the bus
20 connected to gemac.
21
22-- fsl,gemac-phy-id
23- Usage: required
24- Value type: <u32>
25- Definition: Must be present. Value should be the id of the phy
26- connected to gemac.
27+- fsl,gemac-phy-id (deprecated binding)
28+ Usage: required
29+ Value type: <u32>
30+ Definition: This binding shouldn't be used with new platforms.
31+ Must be present. Value should be the id of the phy
32+ connected to gemac.
33
34 - fsl,mdio-mux-val
35 Usage: required
36@@ -144,15 +145,20 @@ PROPERTIES
37 Value type: <string>
38 Definition: Must include "sgmii"
39
40-- fsl,pfe-phy-if-flags
41- Usage: required
42- Value type: <u32>
43- Definition: Must be present. Value should be 0 by default.
44- If there is not phy connected, this need to be 1.
45+- fsl,pfe-phy-if-flags (deprecated binding)
46+ Usage: required
47+ Value type: <u32>
48+ Definition: This binding shouldn't be used with new platforms.
49+ Must be present. Value should be 0 by default.
50+ If there is not phy connected, this need to be 1.
51+
52+- phy-handle
53+ Usage: optional
54+ Value type: <phandle>
55+ Definition: phandle to the PHY device connected to this device.
56
57-- mdio
58- optional subnode that specifies the mdio bus. This has reg
59- property which is used to enable/disable the mdio bus.
60+- mdio : A required subnode which specifies the mdio bus in the PFE and used as
61+a container for phy nodes according to ../phy.txt.
62
63 EXAMPLE
64
65@@ -162,12 +168,32 @@ ethernet@0 {
66 #size-cells = <0>;
67 reg = <0x0>; /* GEM_ID */
68 fsl,gemac-bus-id = <0x0>; /* BUS_ID */
69- fsl,gemac-phy-id = <0x2>; /* PHY_ID */
70 fsl,mdio-mux-val = <0x0>;
71 phy-mode = "sgmii";
72- fsl,pfe-phy-if-flags = <0x0>;
73+ phy-handle = <&sgmii_phy1>;
74+};
75+
76+
77+ethernet@1 {
78+ compatible = "fsl,pfe-gemac-port";
79+ #address-cells = <1>;
80+ #size-cells = <0>;
81+ reg = <0x1>; /* GEM_ID */
82+ fsl,gemac-bus-id = <0x1>; /* BUS_ID */
83+ fsl,mdio-mux-val = <0x0>;
84+ phy-mode = "sgmii";
85+ phy-handle = <&sgmii_phy2>;
86+};
87+
88+mdio@0 {
89+ #address-cells = <1>;
90+ #size-cells = <0>;
91+
92+ sgmii_phy1: ethernet-phy@2 {
93+ reg = <0x2>;
94+ };
95
96- mdio@0 {
97- reg = <0x1>; /* enabled/disabled */
98+ sgmii_phy2: ethernet-phy@1 {
99+ reg = <0x1>;
100 };
101 };