1*c66ec88fSEmmanuel VadotQorIQ DPAA Queue Manager Device Tree Binding 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotCopyright (C) 2008 - 2014 Freescale Semiconductor Inc. 4*c66ec88fSEmmanuel Vadot 5*c66ec88fSEmmanuel VadotCONTENTS 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadot - QMan Node 8*c66ec88fSEmmanuel Vadot - QMan Private Memory Nodes 9*c66ec88fSEmmanuel Vadot - Example 10*c66ec88fSEmmanuel Vadot 11*c66ec88fSEmmanuel VadotQMan Node 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel VadotThe Queue Manager is part of the Data-Path Acceleration Architecture (DPAA). QMan 14*c66ec88fSEmmanuel Vadotsupports queuing and QoS scheduling of frames to CPUs, network interfaces and 15*c66ec88fSEmmanuel VadotDPAA logic modules, maintains packet ordering within flows. Besides providing 16*c66ec88fSEmmanuel Vadotflow-level queuing, is also responsible for congestion management functions such 17*c66ec88fSEmmanuel Vadotas RED/WRED, congestion notifications and tail discards. This binding covers the 18*c66ec88fSEmmanuel VadotCCSR space programming model 19*c66ec88fSEmmanuel Vadot 20*c66ec88fSEmmanuel VadotPROPERTIES 21*c66ec88fSEmmanuel Vadot 22*c66ec88fSEmmanuel Vadot- compatible 23*c66ec88fSEmmanuel Vadot Usage: Required 24*c66ec88fSEmmanuel Vadot Value type: <stringlist> 25*c66ec88fSEmmanuel Vadot Definition: Must include "fsl,qman" 26*c66ec88fSEmmanuel Vadot May include "fsl,<SoC>-qman" 27*c66ec88fSEmmanuel Vadot 28*c66ec88fSEmmanuel Vadot- reg 29*c66ec88fSEmmanuel Vadot Usage: Required 30*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 31*c66ec88fSEmmanuel Vadot Definition: Registers region within the CCSR address space 32*c66ec88fSEmmanuel Vadot 33*c66ec88fSEmmanuel VadotThe QMan revision information is located in the QMAN_IP_REV_1/2 registers which 34*c66ec88fSEmmanuel Vadotare located at offsets 0xbf8 and 0xbfc 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel Vadot- interrupts 37*c66ec88fSEmmanuel Vadot Usage: Required 38*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 39*c66ec88fSEmmanuel Vadot Definition: Standard property. The error interrupt 40*c66ec88fSEmmanuel Vadot 41*c66ec88fSEmmanuel Vadot- fsl,qman-portals 42*c66ec88fSEmmanuel Vadot Usage: Required 43*c66ec88fSEmmanuel Vadot Value type: <phandle> 44*c66ec88fSEmmanuel Vadot Definition: Phandle to this QMan instance's portals 45*c66ec88fSEmmanuel Vadot 46*c66ec88fSEmmanuel Vadot- fsl,liodn 47*c66ec88fSEmmanuel Vadot Usage: See pamu.txt 48*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 49*c66ec88fSEmmanuel Vadot Definition: PAMU property used for static LIODN assignment 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel Vadot- fsl,iommu-parent 52*c66ec88fSEmmanuel Vadot Usage: See pamu.txt 53*c66ec88fSEmmanuel Vadot Value type: <phandle> 54*c66ec88fSEmmanuel Vadot Definition: PAMU property used for dynamic LIODN assignment 55*c66ec88fSEmmanuel Vadot 56*c66ec88fSEmmanuel Vadot For additional details about the PAMU/LIODN binding(s) see pamu.txt 57*c66ec88fSEmmanuel Vadot 58*c66ec88fSEmmanuel Vadot- clocks 59*c66ec88fSEmmanuel Vadot Usage: See clock-bindings.txt and qoriq-clock.txt 60*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 61*c66ec88fSEmmanuel Vadot Definition: Reference input clock. Its frequency is half of the 62*c66ec88fSEmmanuel Vadot platform clock 63*c66ec88fSEmmanuel Vadot- memory-regions 64*c66ec88fSEmmanuel Vadot Usage: Required for ARM 65*c66ec88fSEmmanuel Vadot Value type: <phandle array> 66*c66ec88fSEmmanuel Vadot Definition: List of phandles referencing the QMan private memory 67*c66ec88fSEmmanuel Vadot nodes (described below). The qman-fqd node must be 68*c66ec88fSEmmanuel Vadot first followed by qman-pfdr node. Only used on ARM 69*c66ec88fSEmmanuel Vadot 70*c66ec88fSEmmanuel VadotDevices connected to a QMan instance via Direct Connect Portals (DCP) must link 71*c66ec88fSEmmanuel Vadotto the respective QMan instance 72*c66ec88fSEmmanuel Vadot 73*c66ec88fSEmmanuel Vadot- fsl,qman 74*c66ec88fSEmmanuel Vadot Usage: Required 75*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 76*c66ec88fSEmmanuel Vadot Description: List of phandle and DCP index pairs, to the QMan instance 77*c66ec88fSEmmanuel Vadot to which this device is connected via the DCP 78*c66ec88fSEmmanuel Vadot 79*c66ec88fSEmmanuel VadotQMan Private Memory Nodes 80*c66ec88fSEmmanuel Vadot 81*c66ec88fSEmmanuel VadotQMan requires two contiguous range of physical memory used for the backing store 82*c66ec88fSEmmanuel Vadotfor QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR). 83*c66ec88fSEmmanuel VadotThis memory is reserved/allocated as a node under the /reserved-memory node. 84*c66ec88fSEmmanuel Vadot 85*c66ec88fSEmmanuel VadotFor additional details about reserved memory regions see reserved-memory.txt 86*c66ec88fSEmmanuel Vadot 87*c66ec88fSEmmanuel VadotThe QMan FQD memory node must be named "qman-fqd" 88*c66ec88fSEmmanuel Vadot 89*c66ec88fSEmmanuel VadotPROPERTIES 90*c66ec88fSEmmanuel Vadot 91*c66ec88fSEmmanuel Vadot- compatible 92*c66ec88fSEmmanuel Vadot Usage: required 93*c66ec88fSEmmanuel Vadot Value type: <stringlist> 94*c66ec88fSEmmanuel Vadot Definition: PPC platforms: Must include "fsl,qman-fqd" 95*c66ec88fSEmmanuel Vadot ARM platforms: Must include "shared-dma-pool" 96*c66ec88fSEmmanuel Vadot as well as the "no-map" property 97*c66ec88fSEmmanuel Vadot 98*c66ec88fSEmmanuel VadotThe QMan PFDR memory node must be named "qman-pfdr" 99*c66ec88fSEmmanuel Vadot 100*c66ec88fSEmmanuel VadotPROPERTIES 101*c66ec88fSEmmanuel Vadot 102*c66ec88fSEmmanuel Vadot- compatible 103*c66ec88fSEmmanuel Vadot Usage: required 104*c66ec88fSEmmanuel Vadot Value type: <stringlist> 105*c66ec88fSEmmanuel Vadot Definition: PPC platforms: Must include "fsl,qman-pfdr" 106*c66ec88fSEmmanuel Vadot ARM platforms: Must include "shared-dma-pool" 107*c66ec88fSEmmanuel Vadot as well as the "no-map" property 108*c66ec88fSEmmanuel Vadot 109*c66ec88fSEmmanuel VadotThe following constraints are relevant to the FQD and PFDR private memory: 110*c66ec88fSEmmanuel Vadot - The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to 111*c66ec88fSEmmanuel Vadot 1 GiB 112*c66ec88fSEmmanuel Vadot - The alignment must be a muliptle of the memory size 113*c66ec88fSEmmanuel Vadot 114*c66ec88fSEmmanuel VadotThe size of the FQD and PFDP must be chosen by observing the hardware features 115*c66ec88fSEmmanuel Vadotconfigured via the Reset Configuration Word (RCW) and that are relevant to a 116*c66ec88fSEmmanuel Vadotspecific board (e.g. number of MAC(s) pinned-out, number of offline/host command 117*c66ec88fSEmmanuel VadotFMan ports, etc.). The size configured in the DT must reflect the hardware 118*c66ec88fSEmmanuel Vadotcapabilities and not the specific needs of an application 119*c66ec88fSEmmanuel Vadot 120*c66ec88fSEmmanuel VadotFor additional details about reserved memory regions see reserved-memory.txt 121*c66ec88fSEmmanuel Vadot 122*c66ec88fSEmmanuel VadotEXAMPLE 123*c66ec88fSEmmanuel Vadot 124*c66ec88fSEmmanuel VadotThe example below shows a QMan FQD and a PFDR dynamic allocation memory nodes 125*c66ec88fSEmmanuel Vadot 126*c66ec88fSEmmanuel Vadot reserved-memory { 127*c66ec88fSEmmanuel Vadot #address-cells = <2>; 128*c66ec88fSEmmanuel Vadot #size-cells = <2>; 129*c66ec88fSEmmanuel Vadot ranges; 130*c66ec88fSEmmanuel Vadot 131*c66ec88fSEmmanuel Vadot qman_fqd: qman-fqd { 132*c66ec88fSEmmanuel Vadot compatible = "shared-dma-pool"; 133*c66ec88fSEmmanuel Vadot size = <0 0x400000>; 134*c66ec88fSEmmanuel Vadot alignment = <0 0x400000>; 135*c66ec88fSEmmanuel Vadot no-map; 136*c66ec88fSEmmanuel Vadot }; 137*c66ec88fSEmmanuel Vadot qman_pfdr: qman-pfdr { 138*c66ec88fSEmmanuel Vadot compatible = "shared-dma-pool"; 139*c66ec88fSEmmanuel Vadot size = <0 0x2000000>; 140*c66ec88fSEmmanuel Vadot alignment = <0 0x2000000>; 141*c66ec88fSEmmanuel Vadot no-map; 142*c66ec88fSEmmanuel Vadot }; 143*c66ec88fSEmmanuel Vadot }; 144*c66ec88fSEmmanuel Vadot 145*c66ec88fSEmmanuel VadotThe example below shows a (P4080) QMan CCSR-space node 146*c66ec88fSEmmanuel Vadot 147*c66ec88fSEmmanuel Vadot qportals: qman-portals@ff4200000 { 148*c66ec88fSEmmanuel Vadot ... 149*c66ec88fSEmmanuel Vadot }; 150*c66ec88fSEmmanuel Vadot 151*c66ec88fSEmmanuel Vadot clockgen: global-utilities@e1000 { 152*c66ec88fSEmmanuel Vadot ... 153*c66ec88fSEmmanuel Vadot sysclk: sysclk { 154*c66ec88fSEmmanuel Vadot ... 155*c66ec88fSEmmanuel Vadot }; 156*c66ec88fSEmmanuel Vadot ... 157*c66ec88fSEmmanuel Vadot platform_pll: platform-pll@c00 { 158*c66ec88fSEmmanuel Vadot #clock-cells = <1>; 159*c66ec88fSEmmanuel Vadot reg = <0xc00 0x4>; 160*c66ec88fSEmmanuel Vadot compatible = "fsl,qoriq-platform-pll-1.0"; 161*c66ec88fSEmmanuel Vadot clocks = <&sysclk>; 162*c66ec88fSEmmanuel Vadot clock-output-names = "platform-pll", "platform-pll-div2"; 163*c66ec88fSEmmanuel Vadot }; 164*c66ec88fSEmmanuel Vadot ... 165*c66ec88fSEmmanuel Vadot }; 166*c66ec88fSEmmanuel Vadot 167*c66ec88fSEmmanuel Vadot crypto@300000 { 168*c66ec88fSEmmanuel Vadot ... 169*c66ec88fSEmmanuel Vadot fsl,qman = <&qman, 2>; 170*c66ec88fSEmmanuel Vadot ... 171*c66ec88fSEmmanuel Vadot }; 172*c66ec88fSEmmanuel Vadot 173*c66ec88fSEmmanuel Vadot qman: qman@318000 { 174*c66ec88fSEmmanuel Vadot compatible = "fsl,qman"; 175*c66ec88fSEmmanuel Vadot reg = <0x318000 0x1000>; 176*c66ec88fSEmmanuel Vadot interrupts = <16 2 1 3> 177*c66ec88fSEmmanuel Vadot fsl,liodn = <0x16>; 178*c66ec88fSEmmanuel Vadot fsl,qman-portals = <&qportals>; 179*c66ec88fSEmmanuel Vadot memory-region = <&qman_fqd &qman_pfdr>; 180*c66ec88fSEmmanuel Vadot clocks = <&platform_pll 1>; 181*c66ec88fSEmmanuel Vadot }; 182*c66ec88fSEmmanuel Vadot 183*c66ec88fSEmmanuel Vadot fman@400000 { 184*c66ec88fSEmmanuel Vadot ... 185*c66ec88fSEmmanuel Vadot fsl,qman = <&qman, 0>; 186*c66ec88fSEmmanuel Vadot ... 187*c66ec88fSEmmanuel Vadot }; 188