xref: /linux/Documentation/devicetree/bindings/net/cpsw.txt (revision 10d7fac4c52618d94a42d701d28f114147291ecc)
12eb32b0aSMugunthan V NTI SoC Ethernet Switch Controller Device Tree Bindings
22eb32b0aSMugunthan V N------------------------------------------------------
32eb32b0aSMugunthan V N
42eb32b0aSMugunthan V NRequired properties:
5472204feSMugunthan V N- compatible		: Should be one of the below:-
6472204feSMugunthan V N			  "ti,cpsw" for backward compatible
7472204feSMugunthan V N			  "ti,am335x-cpsw" for AM335x controllers
8472204feSMugunthan V N			  "ti,am4372-cpsw" for AM437x controllers
9472204feSMugunthan V N			  "ti,dra7-cpsw" for DRA7x controllers
102eb32b0aSMugunthan V N- reg			: physical base address and size of the cpsw
112eb32b0aSMugunthan V N			  registers map
122eb32b0aSMugunthan V N- interrupts		: property with a value describing the interrupt
132eb32b0aSMugunthan V N			  number
142eb32b0aSMugunthan V N- cpdma_channels 	: Specifies number of channels in CPDMA
152eb32b0aSMugunthan V N- ale_entries		: Specifies No of entries ALE can hold
162eb32b0aSMugunthan V N- bd_ram_size		: Specifies internal descriptor RAM size
172eb32b0aSMugunthan V N- mac_control		: Specifies Default MAC control register content
182eb32b0aSMugunthan V N			  for the specific platform
192eb32b0aSMugunthan V N- slaves		: Specifies number for slaves
20e86ac13bSMugunthan V N- active_slave		: Specifies the slave to use for time stamping,
21e86ac13bSMugunthan V N			  ethtool and SIOCGMIIPHY
22*10d7fac4STony Lindgren- cpsw-phy-sel		: Specifies the phandle to the CPSW phy mode selection
23*10d7fac4STony Lindgren			  device. See also cpsw-phy-sel.txt for it's binding.
24*10d7fac4STony Lindgren			  Note that in legacy cases cpsw-phy-sel may be
25*10d7fac4STony Lindgren			  a child device instead of a phandle.
262eb32b0aSMugunthan V N
272eb32b0aSMugunthan V NOptional properties:
282eb32b0aSMugunthan V N- ti,hwmods		: Must be "cpgmac0"
29d9ba8f9eSMugunthan V N- dual_emac		: Specifies Switch to act as Dual EMAC
300ba517b1SMarkus Pargmann- syscon		: Phandle to the system control device node, which is
310ba517b1SMarkus Pargmann			  the control module device of the am33x
321d147ccbSMugunthan V N- mode-gpios		: Should be added if one/multiple gpio lines are
331d147ccbSMugunthan V N			  required to be driven so that cpsw data lines
341d147ccbSMugunthan V N			  can be connected to the phy via selective mux.
351d147ccbSMugunthan V N			  For example in dra72x-evm, pcf gpio has to be
361d147ccbSMugunthan V N			  driven low so that cpsw slave 0 and phy data
371d147ccbSMugunthan V N			  lines are connected via mux.
3888f0f0b0SGrygorii Strashko- cpts_clock_mult	: Numerator to convert input clock ticks into nanoseconds
3988f0f0b0SGrygorii Strashko- cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
4088f0f0b0SGrygorii Strashko			  Mult and shift will be calculated basing on CPTS
4188f0f0b0SGrygorii Strashko			  rftclk frequency if both cpts_clock_shift and
4288f0f0b0SGrygorii Strashko			  cpts_clock_mult properties are not provided.
43470d1474SMugunthan V N
44470d1474SMugunthan V NSlave Properties:
45470d1474SMugunthan V NRequired properties:
46e8f08ee0SSergei Shtylyov- phy-mode		: See ethernet.txt file in the same directory
47470d1474SMugunthan V N
48470d1474SMugunthan V NOptional properties:
49d9ba8f9eSMugunthan V N- dual_emac_res_vlan	: Specifies VID to be used to segregate the ports
50e4a9839bSMarkus Pargmann- mac-address		: See ethernet.txt file in the same directory
51a5d2cb3bSDavid Rivshin- phy_id		: Specifies slave phy id (deprecated, use phy-handle)
529e42f715SHeiko Schocher- phy-handle		: See ethernet.txt file in the same directory
532eb32b0aSMugunthan V N
541f71e8c9SMarkus BrunnerSlave sub-nodes:
551f71e8c9SMarkus Brunner- fixed-link		: See fixed-link.txt file in the same directory
56a5d2cb3bSDavid Rivshin
57a5d2cb3bSDavid RivshinNote: Exactly one of phy_id, phy-handle, or fixed-link must be specified.
581f71e8c9SMarkus Brunner
592eb32b0aSMugunthan V NNote: "ti,hwmods" field is used to fetch the base address and irq
602eb32b0aSMugunthan V Nresources from TI, omap hwmod data base during device registration.
612eb32b0aSMugunthan V NFuture plan is to migrate hwmod data base contents into device tree
622eb32b0aSMugunthan V Nblob so that, all the required data will be used from device tree dts
632eb32b0aSMugunthan V Nfile.
642eb32b0aSMugunthan V N
652eb32b0aSMugunthan V NExamples:
662eb32b0aSMugunthan V N
67afc3bca4SRob Herring	mac: ethernet@4a100000 {
682eb32b0aSMugunthan V N		compatible = "ti,cpsw";
692eb32b0aSMugunthan V N		reg = <0x4A100000 0x1000>;
702eb32b0aSMugunthan V N		interrupts = <55 0x4>;
712eb32b0aSMugunthan V N		interrupt-parent = <&intc>;
72e07b94f1SMugunthan V N		cpdma_channels = <8>;
73e07b94f1SMugunthan V N		ale_entries = <1024>;
74e07b94f1SMugunthan V N		bd_ram_size = <0x2000>;
75e07b94f1SMugunthan V N		rx_descs = <64>;
76e07b94f1SMugunthan V N		mac_control = <0x20>;
77e07b94f1SMugunthan V N		slaves = <2>;
78e86ac13bSMugunthan V N		active_slave = <0>;
7900ab94eeSRichard Cochran		cpts_clock_mult = <0x80000000>;
8000ab94eeSRichard Cochran		cpts_clock_shift = <29>;
810ba517b1SMarkus Pargmann		syscon = <&cm>;
82*10d7fac4STony Lindgren		cpsw-phy-sel = <&phy_sel>;
83e07b94f1SMugunthan V N		cpsw_emac0: slave@0 {
84549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <0>;
85c5ceea7aSMugunthan V N			phy-mode = "rgmii-txid";
86e07b94f1SMugunthan V N			/* Filled in by U-Boot */
87e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
882eb32b0aSMugunthan V N		};
89e07b94f1SMugunthan V N		cpsw_emac1: slave@1 {
90549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <1>;
91c5ceea7aSMugunthan V N			phy-mode = "rgmii-txid";
92e07b94f1SMugunthan V N			/* Filled in by U-Boot */
93e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
942eb32b0aSMugunthan V N		};
952eb32b0aSMugunthan V N	};
962eb32b0aSMugunthan V N
972eb32b0aSMugunthan V N(or)
98afc3bca4SRob Herring	mac: ethernet@4a100000 {
992eb32b0aSMugunthan V N		compatible = "ti,cpsw";
1002eb32b0aSMugunthan V N		ti,hwmods = "cpgmac0";
101e07b94f1SMugunthan V N		cpdma_channels = <8>;
102e07b94f1SMugunthan V N		ale_entries = <1024>;
103e07b94f1SMugunthan V N		bd_ram_size = <0x2000>;
104e07b94f1SMugunthan V N		rx_descs = <64>;
105e07b94f1SMugunthan V N		mac_control = <0x20>;
106e07b94f1SMugunthan V N		slaves = <2>;
107e86ac13bSMugunthan V N		active_slave = <0>;
10800ab94eeSRichard Cochran		cpts_clock_mult = <0x80000000>;
10900ab94eeSRichard Cochran		cpts_clock_shift = <29>;
1100ba517b1SMarkus Pargmann		syscon = <&cm>;
111*10d7fac4STony Lindgren		cpsw-phy-sel = <&phy_sel>;
112e07b94f1SMugunthan V N		cpsw_emac0: slave@0 {
113549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <0>;
114c5ceea7aSMugunthan V N			phy-mode = "rgmii-txid";
115e07b94f1SMugunthan V N			/* Filled in by U-Boot */
116e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
1172eb32b0aSMugunthan V N		};
118e07b94f1SMugunthan V N		cpsw_emac1: slave@1 {
119549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <1>;
120c5ceea7aSMugunthan V N			phy-mode = "rgmii-txid";
121e07b94f1SMugunthan V N			/* Filled in by U-Boot */
122e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
1232eb32b0aSMugunthan V N		};
1242eb32b0aSMugunthan V N	};
125