blob: f9c07710478d9cfe4de4d451bd52774ad06a04c1 [file] [log] [blame]
Karicheri, Muralidharan44eefcd2015-01-15 19:12:49 -05001This 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.
52
53Optional properties:
54- reg: register location and the size for the following register
55 regions in the specified order.
56 - Efuse MAC address register
57- dma-coherent: Present if dma operations are coherent
58- big-endian: Keystone devices can be operated in a mode where the DSP is in
59 the big endian mode. In such cases enable this option. This
60 option should also be enabled if the ARM is operated in
61 big endian mode with the DSP in little endian.
62
63NetCP device properties: Device specification for NetCP sub-modules.
641Gb/10Gb (gbe/xgbe) ethernet switch sub-module specifications.
65Required properties:
66- label: Must be "netcp-gbe" for 1Gb & "netcp-xgbe" for 10Gb.
67- reg: register location and the size for the following register
68 regions in the specified order.
69 - subsystem registers
70 - serdes registers
71- tx-channel: the navigator packet dma channel name for tx.
72- tx-queue: the navigator queue number associated with the tx dma channel.
73- interfaces: specification for each of the switch port to be registered as a
74 network interface in the stack.
75-- slave-port: Switch port number, 0 based numbering.
76-- link-interface: type of link interface, supported options are
77 - mac<->mac auto negotiate mode: 0
78 - mac<->phy mode: 1
79 - mac<->mac forced mode: 2
80 - mac<->fiber mode: 3
81 - mac<->phy mode with no mdio: 4
82 - 10Gb mac<->phy mode : 10
83 - 10Gb mac<->mac forced mode : 11
84----phy-handle: phandle to PHY device
85
86Optional properties:
87- enable-ale: NetCP driver keeps the address learning feature in the ethernet
88 switch module disabled. This attribute is to enable the address
89 learning.
90- secondary-slave-ports: specification for each of the switch port not be
91 registered as a network interface. NetCP driver
92 will only initialize these ports and attach PHY
93 driver to them if needed.
94
95NetCP interface properties: Interface specification for NetCP sub-modules.
96Required properties:
97- rx-channel: the navigator packet dma channel name for rx.
98- rx-queue: the navigator queue number associated with rx dma channel.
99- rx-pool: specifies the number of descriptors to be used & the region-id
100 for creating the rx descriptor pool.
101- tx-pool: specifies the number of descriptors to be used & the region-id
102 for creating the tx descriptor pool.
103- rx-queue-depth: number of descriptors in each of the free descriptor
104 queue (FDQ) for the pktdma Rx flow. There can be at
105 present a maximum of 4 queues per Rx flow.
106- rx-buffer-size: the buffer size for each of the Rx flow FDQ.
107- tx-completion-queue: the navigator queue number where the descriptors are
108 recycled after Tx DMA completion.
109
110Optional properties:
111- efuse-mac: If this is 1, then the MAC address for the interface is
112 obtained from the device efuse mac address register
113- local-mac-address: the driver is designed to use the of_get_mac_address api
114 only if efuse-mac is 0. When efuse-mac is 0, the MAC
115 address is obtained from local-mac-address. If this
116 attribute is not present, then the driver will use a
117 random MAC address.
118- "netcp-device label": phandle to the device specification for each of NetCP
119 sub-module attached to this interface.
120
121Example binding:
122
123netcp: netcp@2090000 {
124 reg = <0x2620110 0x8>;
125 reg-names = "efuse";
126 compatible = "ti,netcp-1.0";
127 #address-cells = <1>;
128 #size-cells = <1>;
129 ranges;
130
131 clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
132 dma-coherent;
133 /* big-endian; */
134 dma-id = <0>;
135
136 netcp-devices {
137 #address-cells = <1>;
138 #size-cells = <1>;
139 ranges;
140 gbe@0x2090000 {
141 label = "netcp-gbe";
142 reg = <0x2090000 0xf00>;
143 /* enable-ale; */
144 tx-queue = <648>;
145 tx-channel = <8>;
146
147 interfaces {
148 gbe0: interface-0 {
149 slave-port = <0>;
150 link-interface = <4>;
151 };
152 gbe1: interface-1 {
153 slave-port = <1>;
154 link-interface = <4>;
155 };
156 };
157
158 secondary-slave-ports {
159 port-2 {
160 slave-port = <2>;
161 link-interface = <2>;
162 };
163 port-3 {
164 slave-port = <3>;
165 link-interface = <2>;
166 };
167 };
168 };
169 };
170
171 netcp-interfaces {
172 interface-0 {
173 rx-channel = <22>;
174 rx-pool = <1024 12>;
175 tx-pool = <1024 12>;
176 rx-queue-depth = <128 128 0 0>;
177 rx-buffer-size = <1518 4096 0 0>;
178 rx-queue = <8704>;
179 tx-completion-queue = <8706>;
180 efuse-mac = <1>;
181 netcp-gbe = <&gbe0>;
182
183 };
184 interface-1 {
185 rx-channel = <23>;
186 rx-pool = <1024 12>;
187 tx-pool = <1024 12>;
188 rx-queue-depth = <128 128 0 0>;
189 rx-buffer-size = <1518 4096 0 0>;
190 rx-queue = <8705>;
191 tx-completion-queue = <8707>;
192 efuse-mac = <0>;
193 local-mac-address = [02 18 31 7e 3e 6f];
194 netcp-gbe = <&gbe1>;
195 };
196 };
197};