xref: /linux/Documentation/devicetree/bindings/net/cpsw.txt (revision 00ab94eeaf6c1ad38ad7368c5148fed31403c8a2)
12eb32b0aSMugunthan V NTI SoC Ethernet Switch Controller Device Tree Bindings
22eb32b0aSMugunthan V N------------------------------------------------------
32eb32b0aSMugunthan V N
42eb32b0aSMugunthan V NRequired properties:
52eb32b0aSMugunthan V N- compatible		: Should be "ti,cpsw"
62eb32b0aSMugunthan V N- reg			: physical base address and size of the cpsw
72eb32b0aSMugunthan V N			  registers map
82eb32b0aSMugunthan V N- interrupts		: property with a value describing the interrupt
92eb32b0aSMugunthan V N			  number
102eb32b0aSMugunthan V N- interrupt-parent	: The parent interrupt controller
112eb32b0aSMugunthan V N- cpdma_channels 	: Specifies number of channels in CPDMA
122eb32b0aSMugunthan V N- host_port_no		: Specifies host port shift
132eb32b0aSMugunthan V N- cpdma_reg_ofs		: Specifies CPDMA submodule register offset
14e07b94f1SMugunthan V N- cpdma_sram_ofs	: Specifies CPDMA SRAM offset
152eb32b0aSMugunthan V N- ale_reg_ofs		: Specifies ALE submodule register offset
162eb32b0aSMugunthan V N- ale_entries		: Specifies No of entries ALE can hold
172eb32b0aSMugunthan V N- host_port_reg_ofs	: Specifies host port register offset
182eb32b0aSMugunthan V N- hw_stats_reg_ofs	: Specifies hardware statistics register offset
196b60393eSRichard Cochran- cpts_reg_ofs		: Specifies the offset of the CPTS registers
202eb32b0aSMugunthan V N- bd_ram_ofs		: Specifies internal desciptor RAM offset
212eb32b0aSMugunthan V N- bd_ram_size		: Specifies internal descriptor RAM size
222eb32b0aSMugunthan V N- rx_descs		: Specifies number of Rx descriptors
232eb32b0aSMugunthan V N- mac_control		: Specifies Default MAC control register content
242eb32b0aSMugunthan V N			  for the specific platform
252eb32b0aSMugunthan V N- slaves		: Specifies number for slaves
2678ca0b28SRichard Cochran- cpts_active_slave	: Specifies the slave to use for time stamping
27*00ab94eeSRichard Cochran- cpts_clock_mult	: Numerator to convert input clock ticks into nanoseconds
28*00ab94eeSRichard Cochran- cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
292eb32b0aSMugunthan V N- slave_reg_ofs		: Specifies slave register offset
302eb32b0aSMugunthan V N- sliver_reg_ofs	: Specifies slave sliver register offset
312eb32b0aSMugunthan V N- phy_id		: Specifies slave phy id
322eb32b0aSMugunthan V N- mac-address		: Specifies slave MAC address
332eb32b0aSMugunthan V N
342eb32b0aSMugunthan V NOptional properties:
352eb32b0aSMugunthan V N- ti,hwmods		: Must be "cpgmac0"
362eb32b0aSMugunthan V N- no_bd_ram		: Must be 0 or 1
372eb32b0aSMugunthan V N
382eb32b0aSMugunthan V NNote: "ti,hwmods" field is used to fetch the base address and irq
392eb32b0aSMugunthan V Nresources from TI, omap hwmod data base during device registration.
402eb32b0aSMugunthan V NFuture plan is to migrate hwmod data base contents into device tree
412eb32b0aSMugunthan V Nblob so that, all the required data will be used from device tree dts
422eb32b0aSMugunthan V Nfile.
432eb32b0aSMugunthan V N
442eb32b0aSMugunthan V NExamples:
452eb32b0aSMugunthan V N
462eb32b0aSMugunthan V N	mac: ethernet@4A100000 {
472eb32b0aSMugunthan V N		compatible = "ti,cpsw";
482eb32b0aSMugunthan V N		reg = <0x4A100000 0x1000>;
492eb32b0aSMugunthan V N		interrupts = <55 0x4>;
502eb32b0aSMugunthan V N		interrupt-parent = <&intc>;
51e07b94f1SMugunthan V N		cpdma_channels = <8>;
52e07b94f1SMugunthan V N		host_port_no = <0>;
53e07b94f1SMugunthan V N		cpdma_reg_ofs = <0x800>;
54e07b94f1SMugunthan V N		cpdma_sram_ofs = <0xa00>;
55e07b94f1SMugunthan V N		ale_reg_ofs = <0xd00>;
56e07b94f1SMugunthan V N		ale_entries = <1024>;
57e07b94f1SMugunthan V N		host_port_reg_ofs = <0x108>;
58e07b94f1SMugunthan V N		hw_stats_reg_ofs = <0x900>;
596b60393eSRichard Cochran		cpts_reg_ofs = <0xc00>;
60e07b94f1SMugunthan V N		bd_ram_ofs = <0x2000>;
61e07b94f1SMugunthan V N		bd_ram_size = <0x2000>;
62e07b94f1SMugunthan V N		no_bd_ram = <0>;
63e07b94f1SMugunthan V N		rx_descs = <64>;
64e07b94f1SMugunthan V N		mac_control = <0x20>;
65e07b94f1SMugunthan V N		slaves = <2>;
6678ca0b28SRichard Cochran		cpts_active_slave = <0>;
67*00ab94eeSRichard Cochran		cpts_clock_mult = <0x80000000>;
68*00ab94eeSRichard Cochran		cpts_clock_shift = <29>;
69e07b94f1SMugunthan V N		cpsw_emac0: slave@0 {
709750a3adSRichard Cochran			slave_reg_ofs = <0x200>;
71e07b94f1SMugunthan V N			sliver_reg_ofs = <0xd80>;
72e07b94f1SMugunthan V N			phy_id = "davinci_mdio.16:00";
73e07b94f1SMugunthan V N			/* Filled in by U-Boot */
74e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
752eb32b0aSMugunthan V N		};
76e07b94f1SMugunthan V N		cpsw_emac1: slave@1 {
779750a3adSRichard Cochran			slave_reg_ofs = <0x300>;
78e07b94f1SMugunthan V N			sliver_reg_ofs = <0xdc0>;
79e07b94f1SMugunthan V N			phy_id = "davinci_mdio.16:01";
80e07b94f1SMugunthan V N			/* Filled in by U-Boot */
81e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
822eb32b0aSMugunthan V N		};
832eb32b0aSMugunthan V N	};
842eb32b0aSMugunthan V N
852eb32b0aSMugunthan V N(or)
862eb32b0aSMugunthan V N	mac: ethernet@4A100000 {
872eb32b0aSMugunthan V N		compatible = "ti,cpsw";
882eb32b0aSMugunthan V N		ti,hwmods = "cpgmac0";
89e07b94f1SMugunthan V N		cpdma_channels = <8>;
90e07b94f1SMugunthan V N		host_port_no = <0>;
91e07b94f1SMugunthan V N		cpdma_reg_ofs = <0x800>;
92e07b94f1SMugunthan V N		cpdma_sram_ofs = <0xa00>;
93e07b94f1SMugunthan V N		ale_reg_ofs = <0xd00>;
94e07b94f1SMugunthan V N		ale_entries = <1024>;
95e07b94f1SMugunthan V N		host_port_reg_ofs = <0x108>;
96e07b94f1SMugunthan V N		hw_stats_reg_ofs = <0x900>;
976b60393eSRichard Cochran		cpts_reg_ofs = <0xc00>;
98e07b94f1SMugunthan V N		bd_ram_ofs = <0x2000>;
99e07b94f1SMugunthan V N		bd_ram_size = <0x2000>;
100e07b94f1SMugunthan V N		no_bd_ram = <0>;
101e07b94f1SMugunthan V N		rx_descs = <64>;
102e07b94f1SMugunthan V N		mac_control = <0x20>;
103e07b94f1SMugunthan V N		slaves = <2>;
10478ca0b28SRichard Cochran		cpts_active_slave = <0>;
105*00ab94eeSRichard Cochran		cpts_clock_mult = <0x80000000>;
106*00ab94eeSRichard Cochran		cpts_clock_shift = <29>;
107e07b94f1SMugunthan V N		cpsw_emac0: slave@0 {
1089750a3adSRichard Cochran			slave_reg_ofs = <0x200>;
109e07b94f1SMugunthan V N			sliver_reg_ofs = <0xd80>;
110e07b94f1SMugunthan V N			phy_id = "davinci_mdio.16:00";
111e07b94f1SMugunthan V N			/* Filled in by U-Boot */
112e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
1132eb32b0aSMugunthan V N		};
114e07b94f1SMugunthan V N		cpsw_emac1: slave@1 {
1159750a3adSRichard Cochran			slave_reg_ofs = <0x300>;
116e07b94f1SMugunthan V N			sliver_reg_ofs = <0xdc0>;
117e07b94f1SMugunthan V N			phy_id = "davinci_mdio.16:01";
118e07b94f1SMugunthan V N			/* Filled in by U-Boot */
119e07b94f1SMugunthan V N			mac-address = [ 00 00 00 00 00 00 ];
1202eb32b0aSMugunthan V N		};
1212eb32b0aSMugunthan V N	};
122