blob: ae2b8b7f9c38f0bb3d233588b1b2a4cc01f6c900 [file] [log] [blame]
Mugunthan V N2eb32b02012-07-30 10:17:14 +00001TI 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
Mugunthan V N2eb32b02012-07-30 10:17:14 +000012- ale_entries : Specifies No of entries ALE can hold
Mugunthan V N2eb32b02012-07-30 10:17:14 +000013- 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
Mugunthan V Ne86ac132013-03-11 23:16:35 +000018- active_slave : Specifies the slave to use for time stamping,
19 ethtool and SIOCGMIIPHY
Richard Cochran00ab94e2012-10-29 08:45:19 +000020- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
21- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
Mugunthan V N2eb32b02012-07-30 10:17:14 +000022
23Optional properties:
24- ti,hwmods : Must be "cpgmac0"
25- no_bd_ram : Must be 0 or 1
Mugunthan V Nd9ba8f92013-02-11 09:52:20 +000026- dual_emac : Specifies Switch to act as Dual EMAC
Mugunthan V N470d1472013-03-11 23:16:34 +000027
28Slave Properties:
29Required properties:
30- phy_id : Specifies slave phy id
Sergei Shtylyove8f08ee2014-02-18 02:41:59 +030031- phy-mode : See ethernet.txt file in the same directory
32- mac-address : See ethernet.txt file in the same directory
Mugunthan V N470d1472013-03-11 23:16:34 +000033
34Optional properties:
Mugunthan V Nd9ba8f92013-02-11 09:52:20 +000035- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
Mugunthan V N2eb32b02012-07-30 10:17:14 +000036
37Note: "ti,hwmods" field is used to fetch the base address and irq
38resources from TI, omap hwmod data base during device registration.
39Future plan is to migrate hwmod data base contents into device tree
40blob so that, all the required data will be used from device tree dts
41file.
42
43Examples:
44
45 mac: ethernet@4A100000 {
46 compatible = "ti,cpsw";
47 reg = <0x4A100000 0x1000>;
48 interrupts = <55 0x4>;
49 interrupt-parent = <&intc>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000050 cpdma_channels = <8>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000051 ale_entries = <1024>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000052 bd_ram_size = <0x2000>;
53 no_bd_ram = <0>;
54 rx_descs = <64>;
55 mac_control = <0x20>;
56 slaves = <2>;
Mugunthan V Ne86ac132013-03-11 23:16:35 +000057 active_slave = <0>;
Richard Cochran00ab94e2012-10-29 08:45:19 +000058 cpts_clock_mult = <0x80000000>;
59 cpts_clock_shift = <29>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000060 cpsw_emac0: slave@0 {
Richard Cochran549985e2012-11-14 09:07:56 +000061 phy_id = <&davinci_mdio>, <0>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +000062 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000063 /* Filled in by U-Boot */
64 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +000065 };
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000066 cpsw_emac1: slave@1 {
Richard Cochran549985e2012-11-14 09:07:56 +000067 phy_id = <&davinci_mdio>, <1>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +000068 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000069 /* Filled in by U-Boot */
70 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +000071 };
72 };
73
74(or)
Mugunthan V N2eb32b02012-07-30 10:17:14 +000075 mac: ethernet@4A100000 {
76 compatible = "ti,cpsw";
77 ti,hwmods = "cpgmac0";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000078 cpdma_channels = <8>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000079 ale_entries = <1024>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000080 bd_ram_size = <0x2000>;
81 no_bd_ram = <0>;
82 rx_descs = <64>;
83 mac_control = <0x20>;
84 slaves = <2>;
Mugunthan V Ne86ac132013-03-11 23:16:35 +000085 active_slave = <0>;
Richard Cochran00ab94e2012-10-29 08:45:19 +000086 cpts_clock_mult = <0x80000000>;
87 cpts_clock_shift = <29>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000088 cpsw_emac0: slave@0 {
Richard Cochran549985e2012-11-14 09:07:56 +000089 phy_id = <&davinci_mdio>, <0>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +000090 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000091 /* Filled in by U-Boot */
92 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +000093 };
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000094 cpsw_emac1: slave@1 {
Richard Cochran549985e2012-11-14 09:07:56 +000095 phy_id = <&davinci_mdio>, <1>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +000096 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000097 /* Filled in by U-Boot */
98 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +000099 };
Mugunthan V N2eb32b02012-07-30 10:17:14 +0000100 };