xref: /linux/Documentation/devicetree/bindings/net/cpsw.txt (revision 048c9acca90ca7da42b92745445fe008a48add88)
1TI SoC Ethernet Switch Controller Device Tree Bindings
2------------------------------------------------------
3
4Required properties:
5- compatible		: Should be "ti,cpsw"
6- reg			: physical base address and size of the cpsw
7			  registers map
8- interrupts		: property with a value describing the interrupt
9			  number
10- interrupt-parent	: The parent interrupt controller
11- cpdma_channels 	: Specifies number of channels in CPDMA
12- ale_entries		: Specifies No of entries ALE can hold
13- bd_ram_size		: Specifies internal descriptor RAM size
14- rx_descs		: Specifies number of Rx descriptors
15- mac_control		: Specifies Default MAC control register content
16			  for the specific platform
17- slaves		: Specifies number for slaves
18- active_slave		: Specifies the slave to use for time stamping,
19			  ethtool and SIOCGMIIPHY
20- cpts_clock_mult	: Numerator to convert input clock ticks into nanoseconds
21- cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
22
23Optional properties:
24- ti,hwmods		: Must be "cpgmac0"
25- no_bd_ram		: Must be 0 or 1
26- dual_emac		: Specifies Switch to act as Dual EMAC
27
28Slave Properties:
29Required properties:
30- phy_id		: Specifies slave phy id
31- mac-address		: Specifies slave MAC address
32
33Optional properties:
34- dual_emac_res_vlan	: Specifies VID to be used to segregate the ports
35
36Note: "ti,hwmods" field is used to fetch the base address and irq
37resources from TI, omap hwmod data base during device registration.
38Future plan is to migrate hwmod data base contents into device tree
39blob so that, all the required data will be used from device tree dts
40file.
41
42Examples:
43
44	mac: ethernet@4A100000 {
45		compatible = "ti,cpsw";
46		reg = <0x4A100000 0x1000>;
47		interrupts = <55 0x4>;
48		interrupt-parent = <&intc>;
49		cpdma_channels = <8>;
50		ale_entries = <1024>;
51		bd_ram_size = <0x2000>;
52		no_bd_ram = <0>;
53		rx_descs = <64>;
54		mac_control = <0x20>;
55		slaves = <2>;
56		active_slave = <0>;
57		cpts_clock_mult = <0x80000000>;
58		cpts_clock_shift = <29>;
59		cpsw_emac0: slave@0 {
60			phy_id = <&davinci_mdio>, <0>;
61			/* Filled in by U-Boot */
62			mac-address = [ 00 00 00 00 00 00 ];
63		};
64		cpsw_emac1: slave@1 {
65			phy_id = <&davinci_mdio>, <1>;
66			/* Filled in by U-Boot */
67			mac-address = [ 00 00 00 00 00 00 ];
68		};
69	};
70
71(or)
72	mac: ethernet@4A100000 {
73		compatible = "ti,cpsw";
74		ti,hwmods = "cpgmac0";
75		cpdma_channels = <8>;
76		ale_entries = <1024>;
77		bd_ram_size = <0x2000>;
78		no_bd_ram = <0>;
79		rx_descs = <64>;
80		mac_control = <0x20>;
81		slaves = <2>;
82		active_slave = <0>;
83		cpts_clock_mult = <0x80000000>;
84		cpts_clock_shift = <29>;
85		cpsw_emac0: slave@0 {
86			phy_id = <&davinci_mdio>, <0>;
87			/* Filled in by U-Boot */
88			mac-address = [ 00 00 00 00 00 00 ];
89		};
90		cpsw_emac1: slave@1 {
91			phy_id = <&davinci_mdio>, <1>;
92			/* Filled in by U-Boot */
93			mac-address = [ 00 00 00 00 00 00 ];
94		};
95	};
96