]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - Documentation/devicetree/bindings/net/keystone-netcp.txt
net: netcp: use separate reg region for individual ethss modules
[mirror_ubuntu-artful-kernel.git] / Documentation / devicetree / bindings / net / keystone-netcp.txt
CommitLineData
44eefcdf
KM
1This document describes the device tree bindings associated with the
2keystone network coprocessor(NetCP) driver support.
3
4The network coprocessor (NetCP) is a hardware accelerator that processes
5Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsytem with a ethernet
6switch sub-module to send and receive packets. NetCP also includes a packet
7accelerator (PA) module to perform packet classification operations such as
8header matching, and packet modification operations such as checksum
9generation. NetCP can also optionally include a Security Accelerator (SA)
10capable of performing IPSec operations on ingress/egress packets.
11
12Keystone II SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which
13includes a 3-port Ethernet switch sub-module capable of 10Gb/s and 1Gb/s rates
14per Ethernet port.
15
16Keystone NetCP driver has a plug-in module architecture where each of the NetCP
17sub-modules exist as a loadable kernel module which plug in to the netcp core.
18These sub-modules are represented as "netcp-devices" in the dts bindings. It is
19mandatory to have the ethernet switch sub-module for the ethernet interface to
20be operational. Any other sub-module like the PA is optional.
21
22NetCP Ethernet SubSystem Layout:
23
24-----------------------------
25 NetCP subsystem(10G or 1G)
26-----------------------------
27 |
28 |-> NetCP Devices -> |
29 | |-> GBE/XGBE Switch
30 | |
31 | |-> Packet Accelerator
32 | |
33 | |-> Security Accelerator
34 |
35 |
36 |
37 |-> NetCP Interfaces -> |
38 |-> Ethernet Port 0
39 |
40 |-> Ethernet Port 1
41 |
42 |-> Ethernet Port 2
43 |
44 |-> Ethernet Port 3
45
46
47NetCP subsystem properties:
48Required properties:
49- compatible: Should be "ti,netcp-1.0"
50- clocks: phandle to the reference clocks for the subsystem.
51- dma-id: Navigator packet dma instance id.
21e0e0dd 52- ranges: address range of NetCP (includes, Ethernet SS, PA and SA)
44eefcdf
KM
53
54Optional properties:
55- reg: register location and the size for the following register
56 regions in the specified order.
57 - Efuse MAC address register
58- dma-coherent: Present if dma operations are coherent
59- big-endian: Keystone devices can be operated in a mode where the DSP is in
60 the big endian mode. In such cases enable this option. This
61 option should also be enabled if the ARM is operated in
62 big endian mode with the DSP in little endian.
63
64NetCP device properties: Device specification for NetCP sub-modules.
651Gb/10Gb (gbe/xgbe) ethernet switch sub-module specifications.
66Required properties:
67- label: Must be "netcp-gbe" for 1Gb & "netcp-xgbe" for 10Gb.
68- reg: register location and the size for the following register
69 regions in the specified order.
21e0e0dd
KM
70 - switch subsystem registers
71 - sgmii port3/4 module registers (only for NetCP 1.4)
72 - switch module registers
73 - serdes registers (only for 10G)
44eefcdf
KM
74- tx-channel: the navigator packet dma channel name for tx.
75- tx-queue: the navigator queue number associated with the tx dma channel.
76- interfaces: specification for each of the switch port to be registered as a
77 network interface in the stack.
78-- slave-port: Switch port number, 0 based numbering.
79-- link-interface: type of link interface, supported options are
80 - mac<->mac auto negotiate mode: 0
81 - mac<->phy mode: 1
82 - mac<->mac forced mode: 2
83 - mac<->fiber mode: 3
84 - mac<->phy mode with no mdio: 4
85 - 10Gb mac<->phy mode : 10
86 - 10Gb mac<->mac forced mode : 11
87----phy-handle: phandle to PHY device
88
89Optional properties:
90- enable-ale: NetCP driver keeps the address learning feature in the ethernet
91 switch module disabled. This attribute is to enable the address
92 learning.
93- secondary-slave-ports: specification for each of the switch port not be
94 registered as a network interface. NetCP driver
95 will only initialize these ports and attach PHY
96 driver to them if needed.
97
98NetCP interface properties: Interface specification for NetCP sub-modules.
99Required properties:
100- rx-channel: the navigator packet dma channel name for rx.
101- rx-queue: the navigator queue number associated with rx dma channel.
102- rx-pool: specifies the number of descriptors to be used & the region-id
103 for creating the rx descriptor pool.
104- tx-pool: specifies the number of descriptors to be used & the region-id
105 for creating the tx descriptor pool.
106- rx-queue-depth: number of descriptors in each of the free descriptor
107 queue (FDQ) for the pktdma Rx flow. There can be at
108 present a maximum of 4 queues per Rx flow.
109- rx-buffer-size: the buffer size for each of the Rx flow FDQ.
110- tx-completion-queue: the navigator queue number where the descriptors are
111 recycled after Tx DMA completion.
112
113Optional properties:
114- efuse-mac: If this is 1, then the MAC address for the interface is
115 obtained from the device efuse mac address register
116- local-mac-address: the driver is designed to use the of_get_mac_address api
117 only if efuse-mac is 0. When efuse-mac is 0, the MAC
118 address is obtained from local-mac-address. If this
119 attribute is not present, then the driver will use a
120 random MAC address.
121- "netcp-device label": phandle to the device specification for each of NetCP
122 sub-module attached to this interface.
123
124Example binding:
125
21e0e0dd 126netcp: netcp@2000000 {
44eefcdf
KM
127 reg = <0x2620110 0x8>;
128 reg-names = "efuse";
129 compatible = "ti,netcp-1.0";
130 #address-cells = <1>;
131 #size-cells = <1>;
21e0e0dd 132 ranges = <0 0x2000000 0xfffff>;
44eefcdf
KM
133 clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
134 dma-coherent;
135 /* big-endian; */
136 dma-id = <0>;
137
138 netcp-devices {
139 #address-cells = <1>;
140 #size-cells = <1>;
141 ranges;
21e0e0dd 142 gbe@90000 {
44eefcdf 143 label = "netcp-gbe";
21e0e0dd 144 reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>;
44eefcdf
KM
145 /* enable-ale; */
146 tx-queue = <648>;
147 tx-channel = <8>;
148
149 interfaces {
150 gbe0: interface-0 {
151 slave-port = <0>;
152 link-interface = <4>;
153 };
154 gbe1: interface-1 {
155 slave-port = <1>;
156 link-interface = <4>;
157 };
158 };
159
160 secondary-slave-ports {
161 port-2 {
162 slave-port = <2>;
163 link-interface = <2>;
164 };
165 port-3 {
166 slave-port = <3>;
167 link-interface = <2>;
168 };
169 };
170 };
171 };
172
173 netcp-interfaces {
174 interface-0 {
175 rx-channel = <22>;
176 rx-pool = <1024 12>;
177 tx-pool = <1024 12>;
178 rx-queue-depth = <128 128 0 0>;
179 rx-buffer-size = <1518 4096 0 0>;
180 rx-queue = <8704>;
181 tx-completion-queue = <8706>;
182 efuse-mac = <1>;
183 netcp-gbe = <&gbe0>;
184
185 };
186 interface-1 {
187 rx-channel = <23>;
188 rx-pool = <1024 12>;
189 tx-pool = <1024 12>;
190 rx-queue-depth = <128 128 0 0>;
191 rx-buffer-size = <1518 4096 0 0>;
192 rx-queue = <8705>;
193 tx-completion-queue = <8707>;
194 efuse-mac = <0>;
195 local-mac-address = [02 18 31 7e 3e 6f];
196 netcp-gbe = <&gbe1>;
197 };
198 };
199};