forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/Documentation/devicetree/bindings/net/keystone-netcp.txt
....@@ -104,6 +104,23 @@
104104 - 10Gb mac<->mac forced mode : 11
105105 ----phy-handle: phandle to PHY device
106106
107
+- cpts: sub-node time synchronization (CPTS) submodule configuration
108
+-- clocks: CPTS reference clock. Should point on cpts-refclk-mux clock.
109
+-- clock-names: should be "cpts"
110
+-- cpts-refclk-mux: multiplexer clock definition sub-node for CPTS reference (RFTCLK) clock
111
+--- #clock-cells: should be 0
112
+--- clocks: list of CPTS reference (RFTCLK) clock's parents as defined in Data manual
113
+--- ti,mux-tbl: array of multiplexer indexes as defined in Data manual
114
+--- assigned-clocks: should point on cpts-refclk-mux clock
115
+--- assigned-clock-parents: should point on required RFTCLK clock parent to be selected
116
+-- cpts_clock_mult: (optional) Numerator to convert input clock ticks
117
+ into nanoseconds
118
+-- cpts_clock_shift: (optional) Denominator to convert input clock ticks into
119
+ nanoseconds.
120
+ Mult and shift will be calculated basing on CPTS
121
+ rftclk frequency if both cpts_clock_shift and
122
+ cpts_clock_mult properties are not provided.
123
+
107124 Optional properties:
108125 - enable-ale: NetCP driver keeps the address learning feature in the ethernet
109126 switch module disabled. This attribute is to enable the address
....@@ -135,13 +152,13 @@
135152 are swapped. The netcp driver will swap the two DWORDs
136153 back to the proper order when this property is set to 2
137154 when it obtains the mac address from efuse.
138
-- local-mac-address: the driver is designed to use the of_get_mac_address api
139
- only if efuse-mac is 0. When efuse-mac is 0, the MAC
140
- address is obtained from local-mac-address. If this
141
- attribute is not present, then the driver will use a
142
- random MAC address.
143155 - "netcp-device label": phandle to the device specification for each of NetCP
144156 sub-module attached to this interface.
157
+
158
+The MAC address will be determined using the optional properties defined in
159
+ethernet.txt and only if efuse-mac is set to 0. If all of the optional MAC
160
+address properties are not present, then the driver will use a random MAC
161
+address.
145162
146163 Example binding:
147164
....@@ -167,6 +184,23 @@
167184 /* enable-ale; */
168185 tx-queue = <648>;
169186 tx-channel = <8>;
187
+
188
+ cpts {
189
+ clocks = <&cpts_refclk_mux>;
190
+ clock-names = "cpts";
191
+
192
+ cpts_refclk_mux: cpts-refclk-mux {
193
+ #clock-cells = <0>;
194
+ clocks = <&chipclk12>, <&chipclk13>,
195
+ <&timi0>, <&timi1>,
196
+ <&tsipclka>, <&tsrefclk>,
197
+ <&tsipclkb>;
198
+ ti,mux-tbl = <0x0>, <0x1>, <0x2>,
199
+ <0x3>, <0x4>, <0x8>, <0xC>;
200
+ assigned-clocks = <&cpts_refclk_mux>;
201
+ assigned-clock-parents = <&chipclk12>;
202
+ };
203
+ };
170204
171205 interfaces {
172206 gbe0: interface-0 {
....@@ -219,3 +253,13 @@
219253 };
220254 };
221255 };
256
+
257
+CPTS board configuration - select external CPTS RFTCLK:
258
+
259
+&tsrefclk{
260
+ clock-frequency = <500000000>;
261
+};
262
+
263
+&cpts_refclk_mux {
264
+ assigned-clock-parents = <&tsrefclk>;
265
+};