18c2ecf20Sopenharmony_ciTime stamps from MII bus snooping devices
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis binding supports non-PHY devices that snoop the MII bus and
48c2ecf20Sopenharmony_ciprovide time stamps.  In contrast to PHY time stamping drivers (which
58c2ecf20Sopenharmony_cican simply attach their interface directly to the PHY instance), stand
68c2ecf20Sopenharmony_cialone MII time stamping drivers use this binding to specify the
78c2ecf20Sopenharmony_ciconnection between the snooping device and a given network interface.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciNon-PHY MII time stamping drivers typically talk to the control
108c2ecf20Sopenharmony_ciinterface over another bus like I2C, SPI, UART, or via a memory mapped
118c2ecf20Sopenharmony_ciperipheral.  This controller device is associated with one or more
128c2ecf20Sopenharmony_citime stamping channels, each of which snoops on a MII bus.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciThe "timestamper" property lives in a phy node and links a time
158c2ecf20Sopenharmony_cistamping channel from the controller device to that phy's MII bus.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciExample:
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci	tstamper: timestamper@10000000 {
208c2ecf20Sopenharmony_ci		compatible = "ines,ptp-ctrl";
218c2ecf20Sopenharmony_ci		reg = <0x10000000 0x80>;
228c2ecf20Sopenharmony_ci	};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci	ethernet@20000000 {
258c2ecf20Sopenharmony_ci		mdio {
268c2ecf20Sopenharmony_ci			ethernet-phy@1 {
278c2ecf20Sopenharmony_ci				timestamper = <&tstamper 0>;
288c2ecf20Sopenharmony_ci			};
298c2ecf20Sopenharmony_ci		};
308c2ecf20Sopenharmony_ci	};
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci	ethernet@30000000 {
338c2ecf20Sopenharmony_ci		mdio {
348c2ecf20Sopenharmony_ci			ethernet-phy@2 {
358c2ecf20Sopenharmony_ci				timestamper = <&tstamper 1>;
368c2ecf20Sopenharmony_ci			};
378c2ecf20Sopenharmony_ci		};
388c2ecf20Sopenharmony_ci	};
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciIn this example, time stamps from the MII bus attached to phy@1 will
418c2ecf20Sopenharmony_ciappear on time stamp channel 0 (zero), and those from phy@2 appear on
428c2ecf20Sopenharmony_cichannel 1.
43