documentation: dt: bindings: cpsw: cleanup documentation
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / net / cpsw.txt
1 TI SoC Ethernet Switch Controller Device Tree Bindings
2 ------------------------------------------------------
3
4 Required 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
12 - ale_entries           : Specifies No of entries ALE can hold
13 - 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
18 - cpts_active_slave     : Specifies the slave to use for time stamping
19 - cpts_clock_mult       : Numerator to convert input clock ticks into nanoseconds
20 - cpts_clock_shift      : Denominator to convert input clock ticks into nanoseconds
21
22 Optional properties:
23 - ti,hwmods             : Must be "cpgmac0"
24 - no_bd_ram             : Must be 0 or 1
25 - dual_emac             : Specifies Switch to act as Dual EMAC
26
27 Slave Properties:
28 Required properties:
29 - phy_id                : Specifies slave phy id
30 - mac-address           : Specifies slave MAC address
31
32 Optional properties:
33 - dual_emac_res_vlan    : Specifies VID to be used to segregate the ports
34
35 Note: "ti,hwmods" field is used to fetch the base address and irq
36 resources from TI, omap hwmod data base during device registration.
37 Future plan is to migrate hwmod data base contents into device tree
38 blob so that, all the required data will be used from device tree dts
39 file.
40
41 Examples:
42
43         mac: ethernet@4A100000 {
44                 compatible = "ti,cpsw";
45                 reg = <0x4A100000 0x1000>;
46                 interrupts = <55 0x4>;
47                 interrupt-parent = <&intc>;
48                 cpdma_channels = <8>;
49                 ale_entries = <1024>;
50                 bd_ram_size = <0x2000>;
51                 no_bd_ram = <0>;
52                 rx_descs = <64>;
53                 mac_control = <0x20>;
54                 slaves = <2>;
55                 cpts_active_slave = <0>;
56                 cpts_clock_mult = <0x80000000>;
57                 cpts_clock_shift = <29>;
58                 cpsw_emac0: slave@0 {
59                         phy_id = <&davinci_mdio>, <0>;
60                         /* Filled in by U-Boot */
61                         mac-address = [ 00 00 00 00 00 00 ];
62                 };
63                 cpsw_emac1: slave@1 {
64                         phy_id = <&davinci_mdio>, <1>;
65                         /* Filled in by U-Boot */
66                         mac-address = [ 00 00 00 00 00 00 ];
67                 };
68         };
69
70 (or)
71         mac: ethernet@4A100000 {
72                 compatible = "ti,cpsw";
73                 ti,hwmods = "cpgmac0";
74                 cpdma_channels = <8>;
75                 ale_entries = <1024>;
76                 bd_ram_size = <0x2000>;
77                 no_bd_ram = <0>;
78                 rx_descs = <64>;
79                 mac_control = <0x20>;
80                 slaves = <2>;
81                 cpts_active_slave = <0>;
82                 cpts_clock_mult = <0x80000000>;
83                 cpts_clock_shift = <29>;
84                 cpsw_emac0: slave@0 {
85                         phy_id = <&davinci_mdio>, <0>;
86                         /* Filled in by U-Boot */
87                         mac-address = [ 00 00 00 00 00 00 ];
88                 };
89                 cpsw_emac1: slave@1 {
90                         phy_id = <&davinci_mdio>, <1>;
91                         /* Filled in by U-Boot */
92                         mac-address = [ 00 00 00 00 00 00 ];
93                 };
94         };