xref: /linux/Documentation/devicetree/bindings/net/cpsw.txt (revision ff6d03b9d9cad592320ce21e9b22befe56ebe6b6)
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- phy-handle		: See ethernet.txt file in the same directory
50
51Note: "ti,hwmods" field is used to fetch the base address and irq
52resources from TI, omap hwmod data base during device registration.
53Future plan is to migrate hwmod data base contents into device tree
54blob so that, all the required data will be used from device tree dts
55file.
56
57Examples:
58
59	mac: ethernet@4A100000 {
60		compatible = "ti,cpsw";
61		reg = <0x4A100000 0x1000>;
62		interrupts = <55 0x4>;
63		interrupt-parent = <&intc>;
64		cpdma_channels = <8>;
65		ale_entries = <1024>;
66		bd_ram_size = <0x2000>;
67		no_bd_ram = <0>;
68		rx_descs = <64>;
69		mac_control = <0x20>;
70		slaves = <2>;
71		active_slave = <0>;
72		cpts_clock_mult = <0x80000000>;
73		cpts_clock_shift = <29>;
74		syscon = <&cm>;
75		cpsw_emac0: slave@0 {
76			phy_id = <&davinci_mdio>, <0>;
77			phy-mode = "rgmii-txid";
78			/* Filled in by U-Boot */
79			mac-address = [ 00 00 00 00 00 00 ];
80		};
81		cpsw_emac1: slave@1 {
82			phy_id = <&davinci_mdio>, <1>;
83			phy-mode = "rgmii-txid";
84			/* Filled in by U-Boot */
85			mac-address = [ 00 00 00 00 00 00 ];
86		};
87	};
88
89(or)
90	mac: ethernet@4A100000 {
91		compatible = "ti,cpsw";
92		ti,hwmods = "cpgmac0";
93		cpdma_channels = <8>;
94		ale_entries = <1024>;
95		bd_ram_size = <0x2000>;
96		no_bd_ram = <0>;
97		rx_descs = <64>;
98		mac_control = <0x20>;
99		slaves = <2>;
100		active_slave = <0>;
101		cpts_clock_mult = <0x80000000>;
102		cpts_clock_shift = <29>;
103		syscon = <&cm>;
104		cpsw_emac0: slave@0 {
105			phy_id = <&davinci_mdio>, <0>;
106			phy-mode = "rgmii-txid";
107			/* Filled in by U-Boot */
108			mac-address = [ 00 00 00 00 00 00 ];
109		};
110		cpsw_emac1: slave@1 {
111			phy_id = <&davinci_mdio>, <1>;
112			phy-mode = "rgmii-txid";
113			/* Filled in by U-Boot */
114			mac-address = [ 00 00 00 00 00 00 ];
115		};
116	};
117