Merge tag 'for-f2fs-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[sfrench/cifs-2.6.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 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
10 - 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
16 - ale_entries           : Specifies No of entries ALE can hold
17 - bd_ram_size           : Specifies internal descriptor RAM size
18 - mac_control           : Specifies Default MAC control register content
19                           for the specific platform
20 - slaves                : Specifies number for slaves
21 - active_slave          : Specifies the slave to use for time stamping,
22                           ethtool and SIOCGMIIPHY
23
24 Optional properties:
25 - ti,hwmods             : Must be "cpgmac0"
26 - no_bd_ram             : Must be 0 or 1
27 - dual_emac             : Specifies Switch to act as Dual EMAC
28 - syscon                : Phandle to the system control device node, which is
29                           the control module device of the am33x
30 - mode-gpios            : Should be added if one/multiple gpio lines are
31                           required to be driven so that cpsw data lines
32                           can be connected to the phy via selective mux.
33                           For example in dra72x-evm, pcf gpio has to be
34                           driven low so that cpsw slave 0 and phy data
35                           lines are connected via mux.
36 - cpts_clock_mult       : Numerator to convert input clock ticks into nanoseconds
37 - cpts_clock_shift      : Denominator to convert input clock ticks into nanoseconds
38                           Mult and shift will be calculated basing on CPTS
39                           rftclk frequency if both cpts_clock_shift and
40                           cpts_clock_mult properties are not provided.
41
42 Slave Properties:
43 Required properties:
44 - phy-mode              : See ethernet.txt file in the same directory
45
46 Optional properties:
47 - dual_emac_res_vlan    : Specifies VID to be used to segregate the ports
48 - mac-address           : See ethernet.txt file in the same directory
49 - phy_id                : Specifies slave phy id (deprecated, use phy-handle)
50 - phy-handle            : See ethernet.txt file in the same directory
51
52 Slave sub-nodes:
53 - fixed-link            : See fixed-link.txt file in the same directory
54
55 Note: Exactly one of phy_id, phy-handle, or fixed-link must be specified.
56
57 Note: "ti,hwmods" field is used to fetch the base address and irq
58 resources from TI, omap hwmod data base during device registration.
59 Future plan is to migrate hwmod data base contents into device tree
60 blob so that, all the required data will be used from device tree dts
61 file.
62
63 Examples:
64
65         mac: ethernet@4A100000 {
66                 compatible = "ti,cpsw";
67                 reg = <0x4A100000 0x1000>;
68                 interrupts = <55 0x4>;
69                 interrupt-parent = <&intc>;
70                 cpdma_channels = <8>;
71                 ale_entries = <1024>;
72                 bd_ram_size = <0x2000>;
73                 no_bd_ram = <0>;
74                 rx_descs = <64>;
75                 mac_control = <0x20>;
76                 slaves = <2>;
77                 active_slave = <0>;
78                 cpts_clock_mult = <0x80000000>;
79                 cpts_clock_shift = <29>;
80                 syscon = <&cm>;
81                 cpsw_emac0: slave@0 {
82                         phy_id = <&davinci_mdio>, <0>;
83                         phy-mode = "rgmii-txid";
84                         /* Filled in by U-Boot */
85                         mac-address = [ 00 00 00 00 00 00 ];
86                 };
87                 cpsw_emac1: slave@1 {
88                         phy_id = <&davinci_mdio>, <1>;
89                         phy-mode = "rgmii-txid";
90                         /* Filled in by U-Boot */
91                         mac-address = [ 00 00 00 00 00 00 ];
92                 };
93         };
94
95 (or)
96         mac: ethernet@4A100000 {
97                 compatible = "ti,cpsw";
98                 ti,hwmods = "cpgmac0";
99                 cpdma_channels = <8>;
100                 ale_entries = <1024>;
101                 bd_ram_size = <0x2000>;
102                 no_bd_ram = <0>;
103                 rx_descs = <64>;
104                 mac_control = <0x20>;
105                 slaves = <2>;
106                 active_slave = <0>;
107                 cpts_clock_mult = <0x80000000>;
108                 cpts_clock_shift = <29>;
109                 syscon = <&cm>;
110                 cpsw_emac0: slave@0 {
111                         phy_id = <&davinci_mdio>, <0>;
112                         phy-mode = "rgmii-txid";
113                         /* Filled in by U-Boot */
114                         mac-address = [ 00 00 00 00 00 00 ];
115                 };
116                 cpsw_emac1: slave@1 {
117                         phy_id = <&davinci_mdio>, <1>;
118                         phy-mode = "rgmii-txid";
119                         /* Filled in by U-Boot */
120                         mac-address = [ 00 00 00 00 00 00 ];
121                 };
122         };