blob: a9df21aaa1548a64da26c74dfbbef13e652cf3da [file] [log] [blame]
Mugunthan V N2eb32b02012-07-30 10:17:14 +00001TI SoC Ethernet Switch Controller Device Tree Bindings
2------------------------------------------------------
3
4Required properties:
Mugunthan V N472204f2015-08-31 11:51:29 +05305- 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
Mugunthan V N2eb32b02012-07-30 10:17:14 +000010- reg : physical base address and size of the cpsw
11 registers map
12- interrupts : property with a value describing the interrupt
13 number
14- interrupt-parent : The parent interrupt controller
15- cpdma_channels : Specifies number of channels in CPDMA
Mugunthan V N2eb32b02012-07-30 10:17:14 +000016- ale_entries : Specifies No of entries ALE can hold
Mugunthan V N2eb32b02012-07-30 10:17:14 +000017- bd_ram_size : Specifies internal descriptor RAM size
18- rx_descs : Specifies number of Rx descriptors
19- mac_control : Specifies Default MAC control register content
20 for the specific platform
21- slaves : Specifies number for slaves
Mugunthan V Ne86ac132013-03-11 23:16:35 +000022- active_slave : Specifies the slave to use for time stamping,
23 ethtool and SIOCGMIIPHY
Richard Cochran00ab94e2012-10-29 08:45:19 +000024- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
25- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
Mugunthan V N2eb32b02012-07-30 10:17:14 +000026
27Optional properties:
28- ti,hwmods : Must be "cpgmac0"
29- no_bd_ram : Must be 0 or 1
Mugunthan V Nd9ba8f92013-02-11 09:52:20 +000030- dual_emac : Specifies Switch to act as Dual EMAC
Markus Pargmann0ba517b2014-09-29 08:53:17 +020031- syscon : Phandle to the system control device node, which is
32 the control module device of the am33x
Mugunthan V N470d1472013-03-11 23:16:34 +000033
34Slave Properties:
35Required properties:
36- phy_id : Specifies slave phy id
Sergei Shtylyove8f08ee2014-02-18 02:41:59 +030037- phy-mode : See ethernet.txt file in the same directory
Mugunthan V N470d1472013-03-11 23:16:34 +000038
39Optional properties:
Mugunthan V Nd9ba8f92013-02-11 09:52:20 +000040- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
Markus Pargmanne4a98392014-09-29 08:53:13 +020041- mac-address : See ethernet.txt file in the same directory
Mugunthan V N2eb32b02012-07-30 10:17:14 +000042
43Note: "ti,hwmods" field is used to fetch the base address and irq
44resources from TI, omap hwmod data base during device registration.
45Future plan is to migrate hwmod data base contents into device tree
46blob so that, all the required data will be used from device tree dts
47file.
48
49Examples:
50
51 mac: ethernet@4A100000 {
52 compatible = "ti,cpsw";
53 reg = <0x4A100000 0x1000>;
54 interrupts = <55 0x4>;
55 interrupt-parent = <&intc>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000056 cpdma_channels = <8>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000057 ale_entries = <1024>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000058 bd_ram_size = <0x2000>;
59 no_bd_ram = <0>;
60 rx_descs = <64>;
61 mac_control = <0x20>;
62 slaves = <2>;
Mugunthan V Ne86ac132013-03-11 23:16:35 +000063 active_slave = <0>;
Richard Cochran00ab94e2012-10-29 08:45:19 +000064 cpts_clock_mult = <0x80000000>;
65 cpts_clock_shift = <29>;
Markus Pargmann0ba517b2014-09-29 08:53:17 +020066 syscon = <&cm>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000067 cpsw_emac0: slave@0 {
Richard Cochran549985e2012-11-14 09:07:56 +000068 phy_id = <&davinci_mdio>, <0>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +000069 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000070 /* Filled in by U-Boot */
71 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +000072 };
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000073 cpsw_emac1: slave@1 {
Richard Cochran549985e2012-11-14 09:07:56 +000074 phy_id = <&davinci_mdio>, <1>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +000075 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000076 /* Filled in by U-Boot */
77 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +000078 };
79 };
80
81(or)
Mugunthan V N2eb32b02012-07-30 10:17:14 +000082 mac: ethernet@4A100000 {
83 compatible = "ti,cpsw";
84 ti,hwmods = "cpgmac0";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000085 cpdma_channels = <8>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000086 ale_entries = <1024>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000087 bd_ram_size = <0x2000>;
88 no_bd_ram = <0>;
89 rx_descs = <64>;
90 mac_control = <0x20>;
91 slaves = <2>;
Mugunthan V Ne86ac132013-03-11 23:16:35 +000092 active_slave = <0>;
Richard Cochran00ab94e2012-10-29 08:45:19 +000093 cpts_clock_mult = <0x80000000>;
94 cpts_clock_shift = <29>;
Markus Pargmann0ba517b2014-09-29 08:53:17 +020095 syscon = <&cm>;
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000096 cpsw_emac0: slave@0 {
Richard Cochran549985e2012-11-14 09:07:56 +000097 phy_id = <&davinci_mdio>, <0>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +000098 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +000099 /* Filled in by U-Boot */
100 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +0000101 };
Mugunthan V Ne07b94f2012-08-06 05:05:58 +0000102 cpsw_emac1: slave@1 {
Richard Cochran549985e2012-11-14 09:07:56 +0000103 phy_id = <&davinci_mdio>, <1>;
Mugunthan V Nc5ceea72013-06-03 20:10:10 +0000104 phy-mode = "rgmii-txid";
Mugunthan V Ne07b94f2012-08-06 05:05:58 +0000105 /* Filled in by U-Boot */
106 mac-address = [ 00 00 00 00 00 00 ];
Mugunthan V N2eb32b02012-07-30 10:17:14 +0000107 };
Mugunthan V N2eb32b02012-07-30 10:17:14 +0000108 };