xref: /linux/Documentation/devicetree/bindings/net/cpsw.txt (revision e98bdb3059cbf2b1cd4261e126b08429f64466c3)
1TI SoC Ethernet Switch Controller Device Tree Bindings
2------------------------------------------------------
3
4Required properties:
5- compatible		: Should be one of the below:-
6			  "ti,cpsw" for backward compatible
7			  "ti,am335x-cpsw" for AM335x controllers
8			  "ti,am4372-cpsw" for AM437x controllers
9			  "ti,dra7-cpsw" for DRA7x controllers
10- reg			: physical base address and size of the cpsw
11			  registers map
12- interrupts		: property with a value describing the interrupt
13			  number
14- interrupt-parent	: The parent interrupt controller
15- cpdma_channels 	: Specifies number of channels in CPDMA
16- ale_entries		: Specifies No of entries ALE can hold
17- bd_ram_size		: Specifies internal descriptor RAM size
18- mac_control		: Specifies Default MAC control register content
19			  for the specific platform
20- slaves		: Specifies number for slaves
21- active_slave		: Specifies the slave to use for time stamping,
22			  ethtool and SIOCGMIIPHY
23
24Optional properties:
25- ti,hwmods		: Must be "cpgmac0"
26- no_bd_ram		: Must be 0 or 1
27- dual_emac		: Specifies Switch to act as Dual EMAC
28- syscon		: Phandle to the system control device node, which is
29			  the control module device of the am33x
30- mode-gpios		: Should be added if one/multiple gpio lines are
31			  required to be driven so that cpsw data lines
32			  can be connected to the phy via selective mux.
33			  For example in dra72x-evm, pcf gpio has to be
34			  driven low so that cpsw slave 0 and phy data
35			  lines are connected via mux.
36- cpts_clock_mult	: Numerator to convert input clock ticks into nanoseconds
37- cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
38			  Mult and shift will be calculated basing on CPTS
39			  rftclk frequency if both cpts_clock_shift and
40			  cpts_clock_mult properties are not provided.
41
42Slave Properties:
43Required properties:
44- phy-mode		: See ethernet.txt file in the same directory
45
46Optional properties:
47- dual_emac_res_vlan	: Specifies VID to be used to segregate the ports
48- mac-address		: See ethernet.txt file in the same directory
49- phy_id		: Specifies slave phy id (deprecated, use phy-handle)
50- phy-handle		: See ethernet.txt file in the same directory
51
52Slave sub-nodes:
53- fixed-link		: See fixed-link.txt file in the same directory
54
55Note: Exactly one of phy_id, phy-handle, or fixed-link must be specified.
56
57Note: "ti,hwmods" field is used to fetch the base address and irq
58resources from TI, omap hwmod data base during device registration.
59Future plan is to migrate hwmod data base contents into device tree
60blob so that, all the required data will be used from device tree dts
61file.
62
63Examples:
64
65	mac: ethernet@4A100000 {
66		compatible = "ti,cpsw";
67		reg = <0x4A100000 0x1000>;
68		interrupts = <55 0x4>;
69		interrupt-parent = <&intc>;
70		cpdma_channels = <8>;
71		ale_entries = <1024>;
72		bd_ram_size = <0x2000>;
73		no_bd_ram = <0>;
74		rx_descs = <64>;
75		mac_control = <0x20>;
76		slaves = <2>;
77		active_slave = <0>;
78		cpts_clock_mult = <0x80000000>;
79		cpts_clock_shift = <29>;
80		syscon = <&cm>;
81		cpsw_emac0: slave@0 {
82			phy_id = <&davinci_mdio>, <0>;
83			phy-mode = "rgmii-txid";
84			/* Filled in by U-Boot */
85			mac-address = [ 00 00 00 00 00 00 ];
86		};
87		cpsw_emac1: slave@1 {
88			phy_id = <&davinci_mdio>, <1>;
89			phy-mode = "rgmii-txid";
90			/* Filled in by U-Boot */
91			mac-address = [ 00 00 00 00 00 00 ];
92		};
93	};
94
95(or)
96	mac: ethernet@4A100000 {
97		compatible = "ti,cpsw";
98		ti,hwmods = "cpgmac0";
99		cpdma_channels = <8>;
100		ale_entries = <1024>;
101		bd_ram_size = <0x2000>;
102		no_bd_ram = <0>;
103		rx_descs = <64>;
104		mac_control = <0x20>;
105		slaves = <2>;
106		active_slave = <0>;
107		cpts_clock_mult = <0x80000000>;
108		cpts_clock_shift = <29>;
109		syscon = <&cm>;
110		cpsw_emac0: slave@0 {
111			phy_id = <&davinci_mdio>, <0>;
112			phy-mode = "rgmii-txid";
113			/* Filled in by U-Boot */
114			mac-address = [ 00 00 00 00 00 00 ];
115		};
116		cpsw_emac1: slave@1 {
117			phy_id = <&davinci_mdio>, <1>;
118			phy-mode = "rgmii-txid";
119			/* Filled in by U-Boot */
120			mac-address = [ 00 00 00 00 00 00 ];
121		};
122	};
123