xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/nxp,sja1105.yaml (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1*5956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*5956d97fSEmmanuel Vadot%YAML 1.2
3*5956d97fSEmmanuel Vadot---
4*5956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/nxp,sja1105.yaml#
5*5956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*5956d97fSEmmanuel Vadot
7*5956d97fSEmmanuel Vadottitle: NXP SJA1105 Automotive Ethernet Switch Family Device Tree Bindings
8*5956d97fSEmmanuel Vadot
9*5956d97fSEmmanuel Vadotdescription:
10*5956d97fSEmmanuel Vadot  The SJA1105 SPI interface requires a CS-to-CLK time (t2 in UM10944.pdf) of at
11*5956d97fSEmmanuel Vadot  least one half of t_CLK. At an SPI frequency of 1MHz, this means a minimum
12*5956d97fSEmmanuel Vadot  cs_sck_delay of 500ns. Ensuring that this SPI timing requirement is observed
13*5956d97fSEmmanuel Vadot  depends on the SPI bus master driver.
14*5956d97fSEmmanuel Vadot
15*5956d97fSEmmanuel VadotallOf:
16*5956d97fSEmmanuel Vadot  - $ref: "dsa.yaml#"
17*5956d97fSEmmanuel Vadot
18*5956d97fSEmmanuel Vadotmaintainers:
19*5956d97fSEmmanuel Vadot  - Vladimir Oltean <vladimir.oltean@nxp.com>
20*5956d97fSEmmanuel Vadot
21*5956d97fSEmmanuel Vadotproperties:
22*5956d97fSEmmanuel Vadot  compatible:
23*5956d97fSEmmanuel Vadot    enum:
24*5956d97fSEmmanuel Vadot      - nxp,sja1105e
25*5956d97fSEmmanuel Vadot      - nxp,sja1105t
26*5956d97fSEmmanuel Vadot      - nxp,sja1105p
27*5956d97fSEmmanuel Vadot      - nxp,sja1105q
28*5956d97fSEmmanuel Vadot      - nxp,sja1105r
29*5956d97fSEmmanuel Vadot      - nxp,sja1105s
30*5956d97fSEmmanuel Vadot      - nxp,sja1110a
31*5956d97fSEmmanuel Vadot      - nxp,sja1110b
32*5956d97fSEmmanuel Vadot      - nxp,sja1110c
33*5956d97fSEmmanuel Vadot      - nxp,sja1110d
34*5956d97fSEmmanuel Vadot
35*5956d97fSEmmanuel Vadot  reg:
36*5956d97fSEmmanuel Vadot    maxItems: 1
37*5956d97fSEmmanuel Vadot
38*5956d97fSEmmanuel Vadot  # Optional container node for the 2 internal MDIO buses of the SJA1110
39*5956d97fSEmmanuel Vadot  # (one for the internal 100base-T1 PHYs and the other for the single
40*5956d97fSEmmanuel Vadot  # 100base-TX PHY). The "reg" property does not have physical significance.
41*5956d97fSEmmanuel Vadot  # The PHY addresses to port correspondence is as follows: for 100base-T1,
42*5956d97fSEmmanuel Vadot  # port 5 has PHY 1, port 6 has PHY 2 etc, while for 100base-TX, port 1 has
43*5956d97fSEmmanuel Vadot  # PHY 1.
44*5956d97fSEmmanuel Vadot  mdios:
45*5956d97fSEmmanuel Vadot    type: object
46*5956d97fSEmmanuel Vadot
47*5956d97fSEmmanuel Vadot    properties:
48*5956d97fSEmmanuel Vadot      '#address-cells':
49*5956d97fSEmmanuel Vadot        const: 1
50*5956d97fSEmmanuel Vadot      '#size-cells':
51*5956d97fSEmmanuel Vadot        const: 0
52*5956d97fSEmmanuel Vadot
53*5956d97fSEmmanuel Vadot    patternProperties:
54*5956d97fSEmmanuel Vadot      "^mdio@[0-1]$":
55*5956d97fSEmmanuel Vadot        type: object
56*5956d97fSEmmanuel Vadot
57*5956d97fSEmmanuel Vadot        allOf:
58*5956d97fSEmmanuel Vadot          - $ref: "http://devicetree.org/schemas/net/mdio.yaml#"
59*5956d97fSEmmanuel Vadot
60*5956d97fSEmmanuel Vadot        properties:
61*5956d97fSEmmanuel Vadot          compatible:
62*5956d97fSEmmanuel Vadot            oneOf:
63*5956d97fSEmmanuel Vadot              - enum:
64*5956d97fSEmmanuel Vadot                  - nxp,sja1110-base-t1-mdio
65*5956d97fSEmmanuel Vadot                  - nxp,sja1110-base-tx-mdio
66*5956d97fSEmmanuel Vadot
67*5956d97fSEmmanuel Vadot          reg:
68*5956d97fSEmmanuel Vadot            oneOf:
69*5956d97fSEmmanuel Vadot              - enum:
70*5956d97fSEmmanuel Vadot                  - 0
71*5956d97fSEmmanuel Vadot                  - 1
72*5956d97fSEmmanuel Vadot
73*5956d97fSEmmanuel Vadot        required:
74*5956d97fSEmmanuel Vadot          - compatible
75*5956d97fSEmmanuel Vadot          - reg
76*5956d97fSEmmanuel Vadot
77*5956d97fSEmmanuel Vadotrequired:
78*5956d97fSEmmanuel Vadot  - compatible
79*5956d97fSEmmanuel Vadot  - reg
80*5956d97fSEmmanuel Vadot
81*5956d97fSEmmanuel VadotunevaluatedProperties: false
82*5956d97fSEmmanuel Vadot
83*5956d97fSEmmanuel Vadotexamples:
84*5956d97fSEmmanuel Vadot  - |
85*5956d97fSEmmanuel Vadot    spi {
86*5956d97fSEmmanuel Vadot            #address-cells = <1>;
87*5956d97fSEmmanuel Vadot            #size-cells = <0>;
88*5956d97fSEmmanuel Vadot
89*5956d97fSEmmanuel Vadot            ethernet-switch@1 {
90*5956d97fSEmmanuel Vadot                    reg = <0x1>;
91*5956d97fSEmmanuel Vadot                    compatible = "nxp,sja1105t";
92*5956d97fSEmmanuel Vadot
93*5956d97fSEmmanuel Vadot                    ethernet-ports {
94*5956d97fSEmmanuel Vadot                            #address-cells = <1>;
95*5956d97fSEmmanuel Vadot                            #size-cells = <0>;
96*5956d97fSEmmanuel Vadot
97*5956d97fSEmmanuel Vadot                            port@0 {
98*5956d97fSEmmanuel Vadot                                    phy-handle = <&rgmii_phy6>;
99*5956d97fSEmmanuel Vadot                                    phy-mode = "rgmii-id";
100*5956d97fSEmmanuel Vadot                                    reg = <0>;
101*5956d97fSEmmanuel Vadot                            };
102*5956d97fSEmmanuel Vadot
103*5956d97fSEmmanuel Vadot                            port@1 {
104*5956d97fSEmmanuel Vadot                                    phy-handle = <&rgmii_phy3>;
105*5956d97fSEmmanuel Vadot                                    phy-mode = "rgmii-id";
106*5956d97fSEmmanuel Vadot                                    reg = <1>;
107*5956d97fSEmmanuel Vadot                            };
108*5956d97fSEmmanuel Vadot
109*5956d97fSEmmanuel Vadot                            port@2 {
110*5956d97fSEmmanuel Vadot                                    phy-handle = <&rgmii_phy4>;
111*5956d97fSEmmanuel Vadot                                    phy-mode = "rgmii-id";
112*5956d97fSEmmanuel Vadot                                    reg = <2>;
113*5956d97fSEmmanuel Vadot                            };
114*5956d97fSEmmanuel Vadot
115*5956d97fSEmmanuel Vadot                            port@3 {
116*5956d97fSEmmanuel Vadot                                    phy-mode = "rgmii-id";
117*5956d97fSEmmanuel Vadot                                    reg = <3>;
118*5956d97fSEmmanuel Vadot                            };
119*5956d97fSEmmanuel Vadot
120*5956d97fSEmmanuel Vadot                            port@4 {
121*5956d97fSEmmanuel Vadot                                    ethernet = <&enet2>;
122*5956d97fSEmmanuel Vadot                                    phy-mode = "rgmii";
123*5956d97fSEmmanuel Vadot                                    reg = <4>;
124*5956d97fSEmmanuel Vadot
125*5956d97fSEmmanuel Vadot                                    fixed-link {
126*5956d97fSEmmanuel Vadot                                            speed = <1000>;
127*5956d97fSEmmanuel Vadot                                            full-duplex;
128*5956d97fSEmmanuel Vadot                                    };
129*5956d97fSEmmanuel Vadot                            };
130*5956d97fSEmmanuel Vadot                    };
131*5956d97fSEmmanuel Vadot            };
132*5956d97fSEmmanuel Vadot    };
133