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