diff options
author | Karicheri, Muralidharan <m-karicheri2@ti.com> | 2015-01-15 19:12:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-19 15:07:39 -0500 |
commit | 44eefcdfb9a35f7fd73e1896aefb6292124046d2 (patch) | |
tree | 0236a3fac420ecd204619661483fdfbca22e32af | |
parent | 92cb13fb21c60b3567c7bb7e55be7c38dc6bda38 (diff) |
Documentation: dt: net: Add binding doc for Keystone NetCP ethernet driver
The network coprocessor (NetCP) is a hardware accelerator that processes
Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with a ethernet
switch sub-module to send and receive packets. NetCP also includes a packet
accelerator (PA) module to perform packet classification operations such as
header matching, and packet modification operations such as checksum
generation. NetCP can also optionally include a Security Accelerator(SA)
capable of performing IPSec operations on ingress/egress packets.
Keystone SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which
includes a 3-port Ethernet switch sub-module capable of 10Gb/s and
1Gb/s rates per Ethernet port.
NetCP Subsystem device tree layout looks something like below:
-----------------------------
NetCP subsystem(10G or 1G)
-----------------------------
|
|-> NetCP Devices -> |
| |-> GBE/XGBE Switch
| |
| |-> Packet Accelerator
| |
| |-> Security Accelerator
|
|
|
|-> NetCP Interfaces -> |
|-> Ethernet Port 0
|
|-> Ethernet Port 1
|
|-> Ethernet Port 2
|
|-> Ethernet Port 3
Common driver supports GBE as well XGBE network processors.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: David Miller <davem@davemloft.net>
Cc: Santosh Shilimkar <santosh.shilimkar@kernel.org>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | Documentation/devicetree/bindings/net/keystone-netcp.txt | 197 |
1 files changed, 197 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/net/keystone-netcp.txt b/Documentation/devicetree/bindings/net/keystone-netcp.txt new file mode 100644 index 000000000000..f9c07710478d --- /dev/null +++ b/Documentation/devicetree/bindings/net/keystone-netcp.txt | |||
@@ -0,0 +1,197 @@ | |||
1 | This document describes the device tree bindings associated with the | ||
2 | keystone network coprocessor(NetCP) driver support. | ||
3 | |||
4 | The network coprocessor (NetCP) is a hardware accelerator that processes | ||
5 | Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsytem with a ethernet | ||
6 | switch sub-module to send and receive packets. NetCP also includes a packet | ||
7 | accelerator (PA) module to perform packet classification operations such as | ||
8 | header matching, and packet modification operations such as checksum | ||
9 | generation. NetCP can also optionally include a Security Accelerator (SA) | ||
10 | capable of performing IPSec operations on ingress/egress packets. | ||
11 | |||
12 | Keystone II SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which | ||
13 | includes a 3-port Ethernet switch sub-module capable of 10Gb/s and 1Gb/s rates | ||
14 | per Ethernet port. | ||
15 | |||
16 | Keystone NetCP driver has a plug-in module architecture where each of the NetCP | ||
17 | sub-modules exist as a loadable kernel module which plug in to the netcp core. | ||
18 | These sub-modules are represented as "netcp-devices" in the dts bindings. It is | ||
19 | mandatory to have the ethernet switch sub-module for the ethernet interface to | ||
20 | be operational. Any other sub-module like the PA is optional. | ||
21 | |||
22 | NetCP 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 | |||
47 | NetCP subsystem properties: | ||
48 | Required 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 | |||
53 | Optional 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 | |||
63 | NetCP device properties: Device specification for NetCP sub-modules. | ||
64 | 1Gb/10Gb (gbe/xgbe) ethernet switch sub-module specifications. | ||
65 | Required 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 | |||
86 | Optional 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 | |||
95 | NetCP interface properties: Interface specification for NetCP sub-modules. | ||
96 | Required 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 | |||
110 | Optional 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 | |||
121 | Example binding: | ||
122 | |||
123 | netcp: 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 | }; | ||