xref: /linux/Documentation/devicetree/bindings/net/cpsw.txt (revision 687e3d5550c7b0e4dca0179103741a44cd3f7864)
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
2210d7fac4STony Lindgren- cpsw-phy-sel		: Specifies the phandle to the CPSW phy mode selection
2310d7fac4STony Lindgren			  device. See also cpsw-phy-sel.txt for it's binding.
2410d7fac4STony Lindgren			  Note that in legacy cases cpsw-phy-sel may be
25ad57b785SGrygorii Strashko			  a child device instead of a phandle
26ad57b785SGrygorii Strashko			  (DEPRECATED, use phys property instead).
272eb32b0aSMugunthan V N
282eb32b0aSMugunthan V NOptional properties:
292eb32b0aSMugunthan V N- ti,hwmods		: Must be "cpgmac0"
30d9ba8f9eSMugunthan V N- dual_emac		: Specifies Switch to act as Dual EMAC
310ba517b1SMarkus Pargmann- syscon		: Phandle to the system control device node, which is
320ba517b1SMarkus Pargmann			  the control module device of the am33x
331d147ccbSMugunthan V N- mode-gpios		: Should be added if one/multiple gpio lines are
341d147ccbSMugunthan V N			  required to be driven so that cpsw data lines
351d147ccbSMugunthan V N			  can be connected to the phy via selective mux.
361d147ccbSMugunthan V N			  For example in dra72x-evm, pcf gpio has to be
371d147ccbSMugunthan V N			  driven low so that cpsw slave 0 and phy data
381d147ccbSMugunthan V N			  lines are connected via mux.
3988f0f0b0SGrygorii Strashko- cpts_clock_mult	: Numerator to convert input clock ticks into nanoseconds
4088f0f0b0SGrygorii Strashko- cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
4188f0f0b0SGrygorii Strashko			  Mult and shift will be calculated basing on CPTS
4288f0f0b0SGrygorii Strashko			  rftclk frequency if both cpts_clock_shift and
4388f0f0b0SGrygorii Strashko			  cpts_clock_mult properties are not provided.
44470d1474SMugunthan V N
45470d1474SMugunthan V NSlave Properties:
46470d1474SMugunthan V NRequired properties:
47e8f08ee0SSergei Shtylyov- phy-mode		: See ethernet.txt file in the same directory
48ad57b785SGrygorii Strashko- phys			: phandle on phy-gmii-sel PHY (see phy/ti-phy-gmii-sel.txt)
49470d1474SMugunthan V N
50470d1474SMugunthan V NOptional properties:
51d9ba8f9eSMugunthan V N- dual_emac_res_vlan	: Specifies VID to be used to segregate the ports
52a5d2cb3bSDavid Rivshin- phy_id		: Specifies slave phy id (deprecated, use phy-handle)
539e42f715SHeiko Schocher- phy-handle		: See ethernet.txt file in the same directory
542eb32b0aSMugunthan V N
55*687e3d55SPetr ŠtetiarThe MAC address will be determined using the optional properties
56*687e3d55SPetr Štetiardefined in ethernet.txt.
57*687e3d55SPetr Štetiar
581f71e8c9SMarkus BrunnerSlave sub-nodes:
591f71e8c9SMarkus Brunner- fixed-link		: See fixed-link.txt file in the same directory
60a5d2cb3bSDavid Rivshin
61a5d2cb3bSDavid RivshinNote: Exactly one of phy_id, phy-handle, or fixed-link must be specified.
621f71e8c9SMarkus Brunner
632eb32b0aSMugunthan V NNote: "ti,hwmods" field is used to fetch the base address and irq
642eb32b0aSMugunthan V Nresources from TI, omap hwmod data base during device registration.
652eb32b0aSMugunthan V NFuture plan is to migrate hwmod data base contents into device tree
662eb32b0aSMugunthan V Nblob so that, all the required data will be used from device tree dts
672eb32b0aSMugunthan V Nfile.
682eb32b0aSMugunthan V N
692eb32b0aSMugunthan V NExamples:
702eb32b0aSMugunthan V N
71afc3bca4SRob Herring	mac: ethernet@4a100000 {
722eb32b0aSMugunthan V N		compatible = "ti,cpsw";
732eb32b0aSMugunthan V N		reg = <0x4A100000 0x1000>;
742eb32b0aSMugunthan V N		interrupts = <55 0x4>;
752eb32b0aSMugunthan V N		interrupt-parent = <&intc>;
76e07b94f1SMugunthan V N		cpdma_channels = <8>;
77e07b94f1SMugunthan V N		ale_entries = <1024>;
78e07b94f1SMugunthan V N		bd_ram_size = <0x2000>;
79e07b94f1SMugunthan V N		rx_descs = <64>;
80e07b94f1SMugunthan V N		mac_control = <0x20>;
81e07b94f1SMugunthan V N		slaves = <2>;
82e86ac13bSMugunthan V N		active_slave = <0>;
8300ab94eeSRichard Cochran		cpts_clock_mult = <0x80000000>;
8400ab94eeSRichard Cochran		cpts_clock_shift = <29>;
850ba517b1SMarkus Pargmann		syscon = <&cm>;
8610d7fac4STony Lindgren		cpsw-phy-sel = <&phy_sel>;
87e07b94f1SMugunthan V N		cpsw_emac0: slave@0 {
88549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <0>;
89c5ceea7aSMugunthan V N			phy-mode = "rgmii-txid";
90e07b94f1SMugunthan V N			/* Filled in by U-Boot */
91e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
92ad57b785SGrygorii Strashko			phys = <&phy_gmii_sel 1 0>;
932eb32b0aSMugunthan V N		};
94e07b94f1SMugunthan V N		cpsw_emac1: slave@1 {
95549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <1>;
96c5ceea7aSMugunthan V N			phy-mode = "rgmii-txid";
97e07b94f1SMugunthan V N			/* Filled in by U-Boot */
98e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
99ad57b785SGrygorii Strashko			phys = <&phy_gmii_sel 2 0>;
1002eb32b0aSMugunthan V N		};
1012eb32b0aSMugunthan V N	};
1022eb32b0aSMugunthan V N
1032eb32b0aSMugunthan V N(or)
104afc3bca4SRob Herring	mac: ethernet@4a100000 {
1052eb32b0aSMugunthan V N		compatible = "ti,cpsw";
1062eb32b0aSMugunthan V N		ti,hwmods = "cpgmac0";
107e07b94f1SMugunthan V N		cpdma_channels = <8>;
108e07b94f1SMugunthan V N		ale_entries = <1024>;
109e07b94f1SMugunthan V N		bd_ram_size = <0x2000>;
110e07b94f1SMugunthan V N		rx_descs = <64>;
111e07b94f1SMugunthan V N		mac_control = <0x20>;
112e07b94f1SMugunthan V N		slaves = <2>;
113e86ac13bSMugunthan V N		active_slave = <0>;
11400ab94eeSRichard Cochran		cpts_clock_mult = <0x80000000>;
11500ab94eeSRichard Cochran		cpts_clock_shift = <29>;
1160ba517b1SMarkus Pargmann		syscon = <&cm>;
11710d7fac4STony Lindgren		cpsw-phy-sel = <&phy_sel>;
118e07b94f1SMugunthan V N		cpsw_emac0: slave@0 {
119549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <0>;
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 ];
123ad57b785SGrygorii Strashko			phys = <&phy_gmii_sel 1 0>;
1242eb32b0aSMugunthan V N		};
125e07b94f1SMugunthan V N		cpsw_emac1: slave@1 {
126549985eeSRichard Cochran			phy_id = <&davinci_mdio>, <1>;
127c5ceea7aSMugunthan V N			phy-mode = "rgmii-txid";
128e07b94f1SMugunthan V N			/* Filled in by U-Boot */
129e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
130ad57b785SGrygorii Strashko			phys = <&phy_gmii_sel 2 0>;
1312eb32b0aSMugunthan V N		};
1322eb32b0aSMugunthan V N	};
133