xref: /linux/Documentation/devicetree/bindings/net/cpsw.txt (revision 1d147ccbfc35d7d45c87fb0c767e6e40c316aa32)
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- rx_descs		: Specifies number of Rx descriptors
19- mac_control		: Specifies Default MAC control register content
20			  for the specific platform
21- slaves		: Specifies number for slaves
22- active_slave		: Specifies the slave to use for time stamping,
23			  ethtool and SIOCGMIIPHY
24- cpts_clock_mult	: Numerator to convert input clock ticks into nanoseconds
25- cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
26
27Optional properties:
28- ti,hwmods		: Must be "cpgmac0"
29- no_bd_ram		: Must be 0 or 1
30- dual_emac		: Specifies Switch to act as Dual EMAC
31- syscon		: Phandle to the system control device node, which is
32			  the control module device of the am33x
33- mode-gpios		: Should be added if one/multiple gpio lines are
34			  required to be driven so that cpsw data lines
35			  can be connected to the phy via selective mux.
36			  For example in dra72x-evm, pcf gpio has to be
37			  driven low so that cpsw slave 0 and phy data
38			  lines are connected via mux.
39
40
41Slave Properties:
42Required properties:
43- phy_id		: Specifies slave phy id
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
50Note: "ti,hwmods" field is used to fetch the base address and irq
51resources from TI, omap hwmod data base during device registration.
52Future plan is to migrate hwmod data base contents into device tree
53blob so that, all the required data will be used from device tree dts
54file.
55
56Examples:
57
58	mac: ethernet@4A100000 {
59		compatible = "ti,cpsw";
60		reg = <0x4A100000 0x1000>;
61		interrupts = <55 0x4>;
62		interrupt-parent = <&intc>;
63		cpdma_channels = <8>;
64		ale_entries = <1024>;
65		bd_ram_size = <0x2000>;
66		no_bd_ram = <0>;
67		rx_descs = <64>;
68		mac_control = <0x20>;
69		slaves = <2>;
70		active_slave = <0>;
71		cpts_clock_mult = <0x80000000>;
72		cpts_clock_shift = <29>;
73		syscon = <&cm>;
74		cpsw_emac0: slave@0 {
75			phy_id = <&davinci_mdio>, <0>;
76			phy-mode = "rgmii-txid";
77			/* Filled in by U-Boot */
78			mac-address = [ 00 00 00 00 00 00 ];
79		};
80		cpsw_emac1: slave@1 {
81			phy_id = <&davinci_mdio>, <1>;
82			phy-mode = "rgmii-txid";
83			/* Filled in by U-Boot */
84			mac-address = [ 00 00 00 00 00 00 ];
85		};
86	};
87
88(or)
89	mac: ethernet@4A100000 {
90		compatible = "ti,cpsw";
91		ti,hwmods = "cpgmac0";
92		cpdma_channels = <8>;
93		ale_entries = <1024>;
94		bd_ram_size = <0x2000>;
95		no_bd_ram = <0>;
96		rx_descs = <64>;
97		mac_control = <0x20>;
98		slaves = <2>;
99		active_slave = <0>;
100		cpts_clock_mult = <0x80000000>;
101		cpts_clock_shift = <29>;
102		syscon = <&cm>;
103		cpsw_emac0: slave@0 {
104			phy_id = <&davinci_mdio>, <0>;
105			phy-mode = "rgmii-txid";
106			/* Filled in by U-Boot */
107			mac-address = [ 00 00 00 00 00 00 ];
108		};
109		cpsw_emac1: slave@1 {
110			phy_id = <&davinci_mdio>, <1>;
111			phy-mode = "rgmii-txid";
112			/* Filled in by U-Boot */
113			mac-address = [ 00 00 00 00 00 00 ];
114		};
115	};
116