Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: ptp: Introduce MII time stamping devices.

This patch add a new binding that allows non-PHY MII time stamping
devices to find their buses. The new documentation covers both the
generic binding and one upcoming user.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Richard Cochran and committed by
David S. Miller
25d12e1d 767ff483

+77
+35
Documentation/devicetree/bindings/ptp/ptp-ines.txt
··· 1 + ZHAW InES PTP time stamping IP core 2 + 3 + The IP core needs two different kinds of nodes. The control node 4 + lives somewhere in the memory map and specifies the address of the 5 + control registers. There can be up to three port handles placed as 6 + attributes of PHY nodes. These associate a particular MII bus with a 7 + port index within the IP core. 8 + 9 + Required properties of the control node: 10 + 11 + - compatible: "ines,ptp-ctrl" 12 + - reg: physical address and size of the register bank 13 + 14 + Required format of the port handle within the PHY node: 15 + 16 + - timestamper: provides control node reference and 17 + the port channel within the IP core 18 + 19 + Example: 20 + 21 + tstamper: timestamper@60000000 { 22 + compatible = "ines,ptp-ctrl"; 23 + reg = <0x60000000 0x80>; 24 + }; 25 + 26 + ethernet@80000000 { 27 + ... 28 + mdio { 29 + ... 30 + ethernet-phy@3 { 31 + ... 32 + timestamper = <&tstamper 0>; 33 + }; 34 + }; 35 + };
+42
Documentation/devicetree/bindings/ptp/timestamper.txt
··· 1 + Time stamps from MII bus snooping devices 2 + 3 + This binding supports non-PHY devices that snoop the MII bus and 4 + provide time stamps. In contrast to PHY time stamping drivers (which 5 + can simply attach their interface directly to the PHY instance), stand 6 + alone MII time stamping drivers use this binding to specify the 7 + connection between the snooping device and a given network interface. 8 + 9 + Non-PHY MII time stamping drivers typically talk to the control 10 + interface over another bus like I2C, SPI, UART, or via a memory mapped 11 + peripheral. This controller device is associated with one or more 12 + time stamping channels, each of which snoops on a MII bus. 13 + 14 + The "timestamper" property lives in a phy node and links a time 15 + stamping channel from the controller device to that phy's MII bus. 16 + 17 + Example: 18 + 19 + tstamper: timestamper@10000000 { 20 + compatible = "ines,ptp-ctrl"; 21 + reg = <0x10000000 0x80>; 22 + }; 23 + 24 + ethernet@20000000 { 25 + mdio { 26 + ethernet-phy@1 { 27 + timestamper = <&tstamper 0>; 28 + }; 29 + }; 30 + }; 31 + 32 + ethernet@30000000 { 33 + mdio { 34 + ethernet-phy@2 { 35 + timestamper = <&tstamper 1>; 36 + }; 37 + }; 38 + }; 39 + 40 + In this example, time stamps from the MII bus attached to phy@1 will 41 + appear on time stamp channel 0 (zero), and those from phy@2 appear on 42 + channel 1.