^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) Time stamps from MII bus snooping devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) This binding supports non-PHY devices that snoop the MII bus and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) provide time stamps. In contrast to PHY time stamping drivers (which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) can simply attach their interface directly to the PHY instance), stand
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) alone MII time stamping drivers use this binding to specify the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) connection between the snooping device and a given network interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Non-PHY MII time stamping drivers typically talk to the control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) interface over another bus like I2C, SPI, UART, or via a memory mapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) peripheral. This controller device is associated with one or more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) time stamping channels, each of which snoops on a MII bus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) The "timestamper" property lives in a phy node and links a time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) stamping channel from the controller device to that phy's MII bus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) tstamper: timestamper@10000000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) compatible = "ines,ptp-ctrl";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) reg = <0x10000000 0x80>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) ethernet@20000000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) mdio {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) ethernet-phy@1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) timestamper = <&tstamper 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) ethernet@30000000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) mdio {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) ethernet-phy@2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) timestamper = <&tstamper 1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) In this example, time stamps from the MII bus attached to phy@1 will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) appear on time stamp channel 0 (zero), and those from phy@2 appear on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) channel 1.