1 NXP SJA1105 switch driver
2 =========================
15 Although the device ID could be detected at runtime, explicit bindings
16 are required in order to be able to statically check their validity.
17 For example, SGMII can only be specified on port 4 of R and S devices,
18 and the non-SGMII devices, while pin-compatible, are not equal in terms
19 of support for RGMII internal delays (supported on P/Q/R/S, but not on
26 Boolean properties that can be assigned under each port node. By
27 default (unless otherwise specified) a port is configured as MAC if it
28 is driving a PHY (phy-handle is present) or as PHY if it is PHY-less
29 (fixed-link specified, presumably because it is connected to a MAC).
30 The effect of this property (in either its implicit or explicit form)
32 - In the case of MII or RMII it specifies whether the SJA1105 port is a
33 clock source or sink for this interface (not applicable for RGMII
34 where there is a Tx and an Rx clock).
35 - In the case of RGMII it affects the behavior regarding internal
37 1. If sja1105,role-mac is specified, and the phy-mode property is one
38 of "rgmii-id", "rgmii-txid" or "rgmii-rxid", then the entity
39 designated to apply the delay/clock skew necessary for RGMII
40 is the PHY. The SJA1105 MAC does not apply any internal delays.
41 2. If sja1105,role-phy is specified, and the phy-mode property is one
42 of the above, the designated entity to apply the internal delays
43 is the SJA1105 MAC (if hardware-supported). This is only supported
44 by the second-generation (P/Q/R/S) hardware. On a first-generation
45 E or T device, it is an error to specify an RGMII phy-mode other
46 than "rgmii" for a port that is in fixed-link mode. In that case,
47 the clock skew must either be added by the MAC at the other end of
48 the fixed-link, or by PCB serpentine traces on the board.
49 These properties are required, for example, in the case where SJA1105
50 ports are at both ends of a MII/RMII PHY-less setup. One end would need
51 to have sja1105,role-mac, while the other sja1105,role-phy.
53 See Documentation/devicetree/bindings/net/dsa/dsa.txt for the list of standard
54 DSA required and optional properties.
59 The SJA1105 SPI interface requires a CS-to-CLK time (t2 in UM10944) of at least
60 one half of t_CLK. At an SPI frequency of 1MHz, this means a minimum
61 cs_sck_delay of 500ns. Ensuring that this SPI timing requirement is observed
62 depends on the SPI bus master driver.
67 Ethernet switch connected via SPI to the host, CPU port wired to enet2:
69 arch/arm/boot/dts/ls1021a-tsn.dts:
71 /* SPI controller of the LS1021 */
77 compatible = "nxp,sja1105t";
78 spi-max-frequency = <4000000>;
79 fsl,spi-cs-sck-delay = <1000>;
80 fsl,spi-sck-cs-delay = <1000>;
85 /* ETH5 written on chassis */
87 phy-handle = <&rgmii_phy6>;
88 phy-mode = "rgmii-id";
90 /* Implicit "sja1105,role-mac;" */
93 /* ETH2 written on chassis */
95 phy-handle = <&rgmii_phy3>;
96 phy-mode = "rgmii-id";
98 /* Implicit "sja1105,role-mac;" */
101 /* ETH3 written on chassis */
103 phy-handle = <&rgmii_phy4>;
104 phy-mode = "rgmii-id";
106 /* Implicit "sja1105,role-mac;" */
109 /* ETH4 written on chassis */
110 phy-handle = <&rgmii_phy5>;
112 phy-mode = "rgmii-id";
114 /* Implicit "sja1105,role-mac;" */
117 /* Internal port connected to eth2 */
121 /* Implicit "sja1105,role-phy;" */
131 /* MDIO controller of the LS1021 */
134 rgmii_phy3: ethernet-phy@3 {
137 rgmii_phy4: ethernet-phy@4 {
140 rgmii_phy5: ethernet-phy@5 {
143 rgmii_phy6: ethernet-phy@6 {
148 /* Ethernet master port of the LS1021 */
150 phy-connection-type = "rgmii";