1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/net/ti,cpsw-switch.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: TI SoC Ethernet Switch Controller (CPSW) Device Tree Bindings
10 - Grygorii Strashko <grygorii.strashko@ti.com>
11 - Sekhar Nori <nsekhar@ti.com>
14 The 3-port switch gigabit ethernet subsystem provides ethernet packet
15 communication and can be configured as an ethernet switch. It provides the
16 gigabit media independent interface (GMII),reduced gigabit media
17 independent interface (RGMII), reduced media independent interface (RMII),
18 the management data input output (MDIO) for physical layer device (PHY)
24 - const: ti,cpsw-switch
26 - const: ti,am335x-cpsw-switch
27 - const: ti,cpsw-switch
29 - const: ti,am4372-cpsw-switch
30 - const: ti,cpsw-switch
32 - const: ti,dra7-cpsw-switch
33 - const: ti,cpsw-switch
38 The physical base address and size of full the CPSW module IO range
50 description: CPSW functional clock
58 - description: RX_THRESH interrupt
59 - description: RX interrupt
60 - description: TX interrupt
61 - description: MISC interrupt
73 $ref: /schemas/types.yaml#/definitions/phandle
75 Phandle to the system control device node which provides access to
76 efuse IO range with MAC addresses
89 description: CPSW external ports
92 - $ref: ethernet-controller.yaml#
98 description: CPSW port number
102 description: phandle on phy-gmii-sel PHY
105 description: label associated with this port
108 $ref: /schemas/types.yaml#/definitions/uint32
112 Specifies default PORT VID to be used to segregate
113 ports. Default value - CPSW port number.
122 The Common Platform Time Sync (CPTS) module
127 description: CPTS reference clock
134 $ref: /schemas/types.yaml#/definitions/uint32
136 Numerator to convert input clock ticks into ns
139 $ref: /schemas/types.yaml#/definitions/uint32
141 Denominator to convert input clock ticks into ns.
142 Mult and shift will be calculated basing on CPTS rftclk frequency if
143 both cpts_clock_shift and cpts_clock_mult properties are not provided.
154 $ref: "ti,davinci-mdio.yaml#"
168 additionalProperties: false
172 #include <dt-bindings/interrupt-controller/irq.h>
173 #include <dt-bindings/interrupt-controller/arm-gic.h>
174 #include <dt-bindings/clock/dra7.h>
177 compatible = "ti,dra7-cpsw-switch","ti,cpsw-switch";
179 ranges = <0 0 0x4000>;
180 clocks = <&gmac_main_clk>;
182 #address-cells = <1>;
184 syscon = <&scm_conf>;
186 interrupts = <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
187 <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
188 <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
189 <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>;
190 interrupt-names = "rx_thresh", "rx", "tx", "misc";
193 #address-cells = <1>;
199 mac-address = [ 00 00 00 00 00 00 ];
200 phys = <&phy_gmii_sel 1>;
201 phy-handle = <ðphy0_sw>;
203 ti,dual-emac-pvid = <1>;
209 mac-address = [ 00 00 00 00 00 00 ];
210 phys = <&phy_gmii_sel 2>;
211 phy-handle = <ðphy1_sw>;
213 ti,dual-emac-pvid = <2>;
217 davinci_mdio_sw: mdio@1000 {
218 compatible = "ti,cpsw-mdio","ti,davinci_mdio";
219 reg = <0x1000 0x100>;
220 clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 0>;
222 #address-cells = <1>;
224 bus_freq = <1000000>;
226 ethphy0_sw: ethernet-phy@0 {
230 ethphy1_sw: ethernet-phy@1 {
236 clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 25>;
237 clock-names = "cpts";