144eefcdfSKaricheri, MuralidharanThis document describes the device tree bindings associated with the 244eefcdfSKaricheri, Muralidharankeystone network coprocessor(NetCP) driver support. 344eefcdfSKaricheri, Muralidharan 444eefcdfSKaricheri, MuralidharanThe network coprocessor (NetCP) is a hardware accelerator that processes 59b9a553cSMasanari IidaEthernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with a ethernet 644eefcdfSKaricheri, Muralidharanswitch sub-module to send and receive packets. NetCP also includes a packet 744eefcdfSKaricheri, Muralidharanaccelerator (PA) module to perform packet classification operations such as 844eefcdfSKaricheri, Muralidharanheader matching, and packet modification operations such as checksum 944eefcdfSKaricheri, Muralidharangeneration. NetCP can also optionally include a Security Accelerator (SA) 1044eefcdfSKaricheri, Muralidharancapable of performing IPSec operations on ingress/egress packets. 1144eefcdfSKaricheri, Muralidharan 1244eefcdfSKaricheri, MuralidharanKeystone II SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which 1344eefcdfSKaricheri, Muralidharanincludes a 3-port Ethernet switch sub-module capable of 10Gb/s and 1Gb/s rates 1444eefcdfSKaricheri, Muralidharanper Ethernet port. 1544eefcdfSKaricheri, Muralidharan 1644eefcdfSKaricheri, MuralidharanKeystone NetCP driver has a plug-in module architecture where each of the NetCP 1744eefcdfSKaricheri, Muralidharansub-modules exist as a loadable kernel module which plug in to the netcp core. 1844eefcdfSKaricheri, MuralidharanThese sub-modules are represented as "netcp-devices" in the dts bindings. It is 1944eefcdfSKaricheri, Muralidharanmandatory to have the ethernet switch sub-module for the ethernet interface to 2044eefcdfSKaricheri, Muralidharanbe operational. Any other sub-module like the PA is optional. 2144eefcdfSKaricheri, Muralidharan 2244eefcdfSKaricheri, MuralidharanNetCP Ethernet SubSystem Layout: 2344eefcdfSKaricheri, Muralidharan 2444eefcdfSKaricheri, Muralidharan----------------------------- 2544eefcdfSKaricheri, Muralidharan NetCP subsystem(10G or 1G) 2644eefcdfSKaricheri, Muralidharan----------------------------- 2744eefcdfSKaricheri, Muralidharan | 2844eefcdfSKaricheri, Muralidharan |-> NetCP Devices -> | 2944eefcdfSKaricheri, Muralidharan | |-> GBE/XGBE Switch 3044eefcdfSKaricheri, Muralidharan | | 3144eefcdfSKaricheri, Muralidharan | |-> Packet Accelerator 3244eefcdfSKaricheri, Muralidharan | | 3344eefcdfSKaricheri, Muralidharan | |-> Security Accelerator 3444eefcdfSKaricheri, Muralidharan | 3544eefcdfSKaricheri, Muralidharan | 3644eefcdfSKaricheri, Muralidharan | 3744eefcdfSKaricheri, Muralidharan |-> NetCP Interfaces -> | 3844eefcdfSKaricheri, Muralidharan |-> Ethernet Port 0 3944eefcdfSKaricheri, Muralidharan | 4044eefcdfSKaricheri, Muralidharan |-> Ethernet Port 1 4144eefcdfSKaricheri, Muralidharan | 4244eefcdfSKaricheri, Muralidharan |-> Ethernet Port 2 4344eefcdfSKaricheri, Muralidharan | 4444eefcdfSKaricheri, Muralidharan |-> Ethernet Port 3 4544eefcdfSKaricheri, Muralidharan 4644eefcdfSKaricheri, Muralidharan 4744eefcdfSKaricheri, MuralidharanNetCP subsystem properties: 4844eefcdfSKaricheri, MuralidharanRequired properties: 4944eefcdfSKaricheri, Muralidharan- compatible: Should be "ti,netcp-1.0" 5044eefcdfSKaricheri, Muralidharan- clocks: phandle to the reference clocks for the subsystem. 5144eefcdfSKaricheri, Muralidharan- dma-id: Navigator packet dma instance id. 5221e0e0ddSKaricheri, Muralidharan- ranges: address range of NetCP (includes, Ethernet SS, PA and SA) 5344eefcdfSKaricheri, Muralidharan 5444eefcdfSKaricheri, MuralidharanOptional properties: 5544eefcdfSKaricheri, Muralidharan- reg: register location and the size for the following register 5644eefcdfSKaricheri, Muralidharan regions in the specified order. 5744eefcdfSKaricheri, Muralidharan - Efuse MAC address register 5844eefcdfSKaricheri, Muralidharan- dma-coherent: Present if dma operations are coherent 5944eefcdfSKaricheri, Muralidharan- big-endian: Keystone devices can be operated in a mode where the DSP is in 6044eefcdfSKaricheri, Muralidharan the big endian mode. In such cases enable this option. This 6144eefcdfSKaricheri, Muralidharan option should also be enabled if the ARM is operated in 6244eefcdfSKaricheri, Muralidharan big endian mode with the DSP in little endian. 6344eefcdfSKaricheri, Muralidharan 6444eefcdfSKaricheri, MuralidharanNetCP device properties: Device specification for NetCP sub-modules. 6544eefcdfSKaricheri, Muralidharan1Gb/10Gb (gbe/xgbe) ethernet switch sub-module specifications. 6644eefcdfSKaricheri, MuralidharanRequired properties: 6744eefcdfSKaricheri, Muralidharan- label: Must be "netcp-gbe" for 1Gb & "netcp-xgbe" for 10Gb. 689a391c7bSWingMan Kwok- compatible: Must be one of below:- 699a391c7bSWingMan Kwok "ti,netcp-gbe" for 1GbE on NetCP 1.4 709a391c7bSWingMan Kwok "ti,netcp-gbe-5" for 1GbE N NetCP 1.5 (N=5) 719a391c7bSWingMan Kwok "ti,netcp-gbe-9" for 1GbE N NetCP 1.5 (N=9) 729a391c7bSWingMan Kwok "ti,netcp-gbe-2" for 1GbE N NetCP 1.5 (N=2) 739a391c7bSWingMan Kwok "ti,netcp-xgbe" for 10 GbE 749a391c7bSWingMan Kwok 7544eefcdfSKaricheri, Muralidharan- reg: register location and the size for the following register 7644eefcdfSKaricheri, Muralidharan regions in the specified order. 7721e0e0ddSKaricheri, Muralidharan - switch subsystem registers 7821e0e0ddSKaricheri, Muralidharan - sgmii port3/4 module registers (only for NetCP 1.4) 7921e0e0ddSKaricheri, Muralidharan - switch module registers 8021e0e0ddSKaricheri, Muralidharan - serdes registers (only for 10G) 819a391c7bSWingMan Kwok 829a391c7bSWingMan Kwok NetCP 1.4 ethss, here is the order 839a391c7bSWingMan Kwok index #0 - switch subsystem registers 849a391c7bSWingMan Kwok index #1 - sgmii port3/4 module registers 859a391c7bSWingMan Kwok index #2 - switch module registers 869a391c7bSWingMan Kwok 879a391c7bSWingMan Kwok NetCP 1.5 ethss 9 port, 5 port and 2 port 889a391c7bSWingMan Kwok index #0 - switch subsystem registers 899a391c7bSWingMan Kwok index #1 - switch module registers 909a391c7bSWingMan Kwok index #2 - serdes registers 919a391c7bSWingMan Kwok 9244eefcdfSKaricheri, Muralidharan- tx-channel: the navigator packet dma channel name for tx. 9344eefcdfSKaricheri, Muralidharan- tx-queue: the navigator queue number associated with the tx dma channel. 9444eefcdfSKaricheri, Muralidharan- interfaces: specification for each of the switch port to be registered as a 9544eefcdfSKaricheri, Muralidharan network interface in the stack. 9644eefcdfSKaricheri, Muralidharan-- slave-port: Switch port number, 0 based numbering. 9744eefcdfSKaricheri, Muralidharan-- link-interface: type of link interface, supported options are 9844eefcdfSKaricheri, Muralidharan - mac<->mac auto negotiate mode: 0 9944eefcdfSKaricheri, Muralidharan - mac<->phy mode: 1 10044eefcdfSKaricheri, Muralidharan - mac<->mac forced mode: 2 10144eefcdfSKaricheri, Muralidharan - mac<->fiber mode: 3 10244eefcdfSKaricheri, Muralidharan - mac<->phy mode with no mdio: 4 10344eefcdfSKaricheri, Muralidharan - 10Gb mac<->phy mode : 10 10444eefcdfSKaricheri, Muralidharan - 10Gb mac<->mac forced mode : 11 10544eefcdfSKaricheri, Muralidharan----phy-handle: phandle to PHY device 10644eefcdfSKaricheri, Muralidharan 107*12775af5SGrygorii Strashko- cpts: sub-node time synchronization (CPTS) submodule configuration 108*12775af5SGrygorii Strashko-- clocks: CPTS reference clock. Should point on cpts-refclk-mux clock. 109*12775af5SGrygorii Strashko-- clock-names: should be "cpts" 110*12775af5SGrygorii Strashko-- cpts-refclk-mux: multiplexer clock definition sub-node for CPTS reference (RFTCLK) clock 111*12775af5SGrygorii Strashko--- #clock-cells: should be 0 112*12775af5SGrygorii Strashko--- clocks: list of CPTS reference (RFTCLK) clock's parents as defined in Data manual 113*12775af5SGrygorii Strashko--- ti,mux-tbl: array of multiplexer indexes as defined in Data manual 114*12775af5SGrygorii Strashko--- assigned-clocks: should point on cpts-refclk-mux clock 115*12775af5SGrygorii Strashko--- assigned-clock-parents: should point on required RFTCLK clock parent to be selected 116*12775af5SGrygorii Strashko-- cpts_clock_mult: (optional) Numerator to convert input clock ticks 117*12775af5SGrygorii Strashko into nanoseconds 118*12775af5SGrygorii Strashko-- cpts_clock_shift: (optional) Denominator to convert input clock ticks into 119*12775af5SGrygorii Strashko nanoseconds. 120*12775af5SGrygorii Strashko Mult and shift will be calculated basing on CPTS 121*12775af5SGrygorii Strashko rftclk frequency if both cpts_clock_shift and 122*12775af5SGrygorii Strashko cpts_clock_mult properties are not provided. 123*12775af5SGrygorii Strashko 12444eefcdfSKaricheri, MuralidharanOptional properties: 12544eefcdfSKaricheri, Muralidharan- enable-ale: NetCP driver keeps the address learning feature in the ethernet 12644eefcdfSKaricheri, Muralidharan switch module disabled. This attribute is to enable the address 12744eefcdfSKaricheri, Muralidharan learning. 12844eefcdfSKaricheri, Muralidharan- secondary-slave-ports: specification for each of the switch port not be 12944eefcdfSKaricheri, Muralidharan registered as a network interface. NetCP driver 13044eefcdfSKaricheri, Muralidharan will only initialize these ports and attach PHY 13144eefcdfSKaricheri, Muralidharan driver to them if needed. 13244eefcdfSKaricheri, Muralidharan 13344eefcdfSKaricheri, MuralidharanNetCP interface properties: Interface specification for NetCP sub-modules. 13444eefcdfSKaricheri, MuralidharanRequired properties: 13544eefcdfSKaricheri, Muralidharan- rx-channel: the navigator packet dma channel name for rx. 13644eefcdfSKaricheri, Muralidharan- rx-queue: the navigator queue number associated with rx dma channel. 13744eefcdfSKaricheri, Muralidharan- rx-pool: specifies the number of descriptors to be used & the region-id 13844eefcdfSKaricheri, Muralidharan for creating the rx descriptor pool. 13944eefcdfSKaricheri, Muralidharan- tx-pool: specifies the number of descriptors to be used & the region-id 14044eefcdfSKaricheri, Muralidharan for creating the tx descriptor pool. 14144eefcdfSKaricheri, Muralidharan- rx-queue-depth: number of descriptors in each of the free descriptor 14244eefcdfSKaricheri, Muralidharan queue (FDQ) for the pktdma Rx flow. There can be at 14344eefcdfSKaricheri, Muralidharan present a maximum of 4 queues per Rx flow. 14444eefcdfSKaricheri, Muralidharan- rx-buffer-size: the buffer size for each of the Rx flow FDQ. 14544eefcdfSKaricheri, Muralidharan- tx-completion-queue: the navigator queue number where the descriptors are 14644eefcdfSKaricheri, Muralidharan recycled after Tx DMA completion. 14744eefcdfSKaricheri, Muralidharan 14844eefcdfSKaricheri, MuralidharanOptional properties: 14944eefcdfSKaricheri, Muralidharan- efuse-mac: If this is 1, then the MAC address for the interface is 15071382bc0SWingMan Kwok obtained from the device efuse mac address register. 15171382bc0SWingMan Kwok If this is 2, the two DWORDs occupied by the MAC address 15271382bc0SWingMan Kwok are swapped. The netcp driver will swap the two DWORDs 15371382bc0SWingMan Kwok back to the proper order when this property is set to 2 15471382bc0SWingMan Kwok when it obtains the mac address from efuse. 15544eefcdfSKaricheri, Muralidharan- "netcp-device label": phandle to the device specification for each of NetCP 15644eefcdfSKaricheri, Muralidharan sub-module attached to this interface. 15744eefcdfSKaricheri, Muralidharan 158687e3d55SPetr ŠtetiarThe MAC address will be determined using the optional properties defined in 15951828950SPetr Štetiarethernet.txt and only if efuse-mac is set to 0. If all of the optional MAC 16051828950SPetr Štetiaraddress properties are not present, then the driver will use a random MAC 16151828950SPetr Štetiaraddress. 162687e3d55SPetr Štetiar 16344eefcdfSKaricheri, MuralidharanExample binding: 16444eefcdfSKaricheri, Muralidharan 16521e0e0ddSKaricheri, Muralidharannetcp: netcp@2000000 { 16644eefcdfSKaricheri, Muralidharan reg = <0x2620110 0x8>; 16744eefcdfSKaricheri, Muralidharan reg-names = "efuse"; 16844eefcdfSKaricheri, Muralidharan compatible = "ti,netcp-1.0"; 16944eefcdfSKaricheri, Muralidharan #address-cells = <1>; 17044eefcdfSKaricheri, Muralidharan #size-cells = <1>; 17121e0e0ddSKaricheri, Muralidharan ranges = <0 0x2000000 0xfffff>; 17244eefcdfSKaricheri, Muralidharan clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>; 17344eefcdfSKaricheri, Muralidharan dma-coherent; 17444eefcdfSKaricheri, Muralidharan /* big-endian; */ 17544eefcdfSKaricheri, Muralidharan dma-id = <0>; 17644eefcdfSKaricheri, Muralidharan 17744eefcdfSKaricheri, Muralidharan netcp-devices { 17844eefcdfSKaricheri, Muralidharan #address-cells = <1>; 17944eefcdfSKaricheri, Muralidharan #size-cells = <1>; 18044eefcdfSKaricheri, Muralidharan ranges; 18121e0e0ddSKaricheri, Muralidharan gbe@90000 { 18244eefcdfSKaricheri, Muralidharan label = "netcp-gbe"; 18321e0e0ddSKaricheri, Muralidharan reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>; 18444eefcdfSKaricheri, Muralidharan /* enable-ale; */ 18544eefcdfSKaricheri, Muralidharan tx-queue = <648>; 18644eefcdfSKaricheri, Muralidharan tx-channel = <8>; 18744eefcdfSKaricheri, Muralidharan 188*12775af5SGrygorii Strashko cpts { 189*12775af5SGrygorii Strashko clocks = <&cpts_refclk_mux>; 190*12775af5SGrygorii Strashko clock-names = "cpts"; 191*12775af5SGrygorii Strashko 192*12775af5SGrygorii Strashko cpts_refclk_mux: cpts-refclk-mux { 193*12775af5SGrygorii Strashko #clock-cells = <0>; 194*12775af5SGrygorii Strashko clocks = <&chipclk12>, <&chipclk13>, 195*12775af5SGrygorii Strashko <&timi0>, <&timi1>, 196*12775af5SGrygorii Strashko <&tsipclka>, <&tsrefclk>, 197*12775af5SGrygorii Strashko <&tsipclkb>; 198*12775af5SGrygorii Strashko ti,mux-tbl = <0x0>, <0x1>, <0x2>, 199*12775af5SGrygorii Strashko <0x3>, <0x4>, <0x8>, <0xC>; 200*12775af5SGrygorii Strashko assigned-clocks = <&cpts_refclk_mux>; 201*12775af5SGrygorii Strashko assigned-clock-parents = <&chipclk12>; 202*12775af5SGrygorii Strashko }; 203*12775af5SGrygorii Strashko }; 204*12775af5SGrygorii Strashko 20544eefcdfSKaricheri, Muralidharan interfaces { 20644eefcdfSKaricheri, Muralidharan gbe0: interface-0 { 20744eefcdfSKaricheri, Muralidharan slave-port = <0>; 20844eefcdfSKaricheri, Muralidharan link-interface = <4>; 20944eefcdfSKaricheri, Muralidharan }; 21044eefcdfSKaricheri, Muralidharan gbe1: interface-1 { 21144eefcdfSKaricheri, Muralidharan slave-port = <1>; 21244eefcdfSKaricheri, Muralidharan link-interface = <4>; 21344eefcdfSKaricheri, Muralidharan }; 21444eefcdfSKaricheri, Muralidharan }; 21544eefcdfSKaricheri, Muralidharan 21644eefcdfSKaricheri, Muralidharan secondary-slave-ports { 21744eefcdfSKaricheri, Muralidharan port-2 { 21844eefcdfSKaricheri, Muralidharan slave-port = <2>; 21944eefcdfSKaricheri, Muralidharan link-interface = <2>; 22044eefcdfSKaricheri, Muralidharan }; 22144eefcdfSKaricheri, Muralidharan port-3 { 22244eefcdfSKaricheri, Muralidharan slave-port = <3>; 22344eefcdfSKaricheri, Muralidharan link-interface = <2>; 22444eefcdfSKaricheri, Muralidharan }; 22544eefcdfSKaricheri, Muralidharan }; 22644eefcdfSKaricheri, Muralidharan }; 22744eefcdfSKaricheri, Muralidharan }; 22844eefcdfSKaricheri, Muralidharan 22944eefcdfSKaricheri, Muralidharan netcp-interfaces { 23044eefcdfSKaricheri, Muralidharan interface-0 { 23144eefcdfSKaricheri, Muralidharan rx-channel = <22>; 23244eefcdfSKaricheri, Muralidharan rx-pool = <1024 12>; 23344eefcdfSKaricheri, Muralidharan tx-pool = <1024 12>; 23444eefcdfSKaricheri, Muralidharan rx-queue-depth = <128 128 0 0>; 23544eefcdfSKaricheri, Muralidharan rx-buffer-size = <1518 4096 0 0>; 23644eefcdfSKaricheri, Muralidharan rx-queue = <8704>; 23744eefcdfSKaricheri, Muralidharan tx-completion-queue = <8706>; 23844eefcdfSKaricheri, Muralidharan efuse-mac = <1>; 23944eefcdfSKaricheri, Muralidharan netcp-gbe = <&gbe0>; 24044eefcdfSKaricheri, Muralidharan 24144eefcdfSKaricheri, Muralidharan }; 24244eefcdfSKaricheri, Muralidharan interface-1 { 24344eefcdfSKaricheri, Muralidharan rx-channel = <23>; 24444eefcdfSKaricheri, Muralidharan rx-pool = <1024 12>; 24544eefcdfSKaricheri, Muralidharan tx-pool = <1024 12>; 24644eefcdfSKaricheri, Muralidharan rx-queue-depth = <128 128 0 0>; 24744eefcdfSKaricheri, Muralidharan rx-buffer-size = <1518 4096 0 0>; 24844eefcdfSKaricheri, Muralidharan rx-queue = <8705>; 24944eefcdfSKaricheri, Muralidharan tx-completion-queue = <8707>; 25044eefcdfSKaricheri, Muralidharan efuse-mac = <0>; 25144eefcdfSKaricheri, Muralidharan local-mac-address = [02 18 31 7e 3e 6f]; 25244eefcdfSKaricheri, Muralidharan netcp-gbe = <&gbe1>; 25344eefcdfSKaricheri, Muralidharan }; 25444eefcdfSKaricheri, Muralidharan }; 25544eefcdfSKaricheri, Muralidharan}; 256*12775af5SGrygorii Strashko 257*12775af5SGrygorii StrashkoCPTS board configuration - select external CPTS RFTCLK: 258*12775af5SGrygorii Strashko 259*12775af5SGrygorii Strashko&tsrefclk{ 260*12775af5SGrygorii Strashko clock-frequency = <500000000>; 261*12775af5SGrygorii Strashko}; 262*12775af5SGrygorii Strashko 263*12775af5SGrygorii Strashko&cpts_refclk_mux { 264*12775af5SGrygorii Strashko assigned-clock-parents = <&tsrefclk>; 265*12775af5SGrygorii Strashko}; 266