qman.txt 4.88 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
QorIQ DPAA Queue Manager Device Tree Binding

Copyright (C) 2008 - 2014 Freescale Semiconductor Inc.

CONTENTS

	- QMan Node
	- QMan Private Memory Nodes
	- Example

QMan Node

The Queue Manager is part of the Data-Path Acceleration Architecture (DPAA). QMan
supports queuing and QoS scheduling of frames to CPUs, network interfaces and
DPAA logic modules, maintains packet ordering within flows. Besides providing
flow-level queuing, is also responsible for congestion management functions such
as RED/WRED, congestion notifications and tail discards. This binding covers the
CCSR space programming model

PROPERTIES

- compatible
	Usage:		Required
	Value type:	<stringlist>
	Definition:	Must include "fsl,qman"
			May include "fsl,<SoC>-qman"

- reg
	Usage:		Required
	Value type:	<prop-encoded-array>
	Definition:	Registers region within the CCSR address space

The QMan revision information is located in the QMAN_IP_REV_1/2 registers which
are located at offsets 0xbf8 and 0xbfc

- interrupts
	Usage:		Required
	Value type:	<prop-encoded-array>
	Definition:	Standard property. The error interrupt

41 42 43 44 45
- fsl,qman-portals
	Usage:		Required
	Value type:	<phandle>
	Definition:	Phandle to this QMan instance's portals

46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
- fsl,liodn
	Usage:		See pamu.txt
	Value type:	<prop-encoded-array>
	Definition:	PAMU property used for static LIODN assignment

- fsl,iommu-parent
	Usage:		See pamu.txt
	Value type:	<phandle>
	Definition:	PAMU property used for dynamic LIODN assignment

	For additional details about the PAMU/LIODN binding(s) see pamu.txt

- clocks
	Usage:		See clock-bindings.txt and qoriq-clock.txt
	Value type:	<prop-encoded-array>
	Definition:	Reference input clock. Its frequency is half of the
			platform clock
63 64 65 66 67 68
- memory-regions
	Usage:		Required for ARM
	Value type:	<phandle array>
	Definition:	List of phandles referencing the QMan private memory
			nodes (described below). The qman-fqd node must be
			first followed by qman-pfdr node. Only used on ARM
69 70 71 72 73 74 75 76 77 78 79 80 81 82

Devices connected to a QMan instance via Direct Connect Portals (DCP) must link
to the respective QMan instance

- fsl,qman
	Usage:		Required
	Value type:	<prop-encoded-array>
	Description:	List of phandle and DCP index pairs, to the QMan instance
			to which this device is connected via the DCP

QMan Private Memory Nodes

QMan requires two contiguous range of physical memory used for the backing store
for QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR).
83 84 85
This memory is reserved/allocated as a node under the /reserved-memory node.

For additional details about reserved memory regions see reserved-memory.txt
86 87 88 89 90 91 92 93

The QMan FQD memory node must be named "qman-fqd"

PROPERTIES

- compatible
	Usage:		required
	Value type:	<stringlist>
94 95 96
	Definition:	PPC platforms: Must include "fsl,qman-fqd"
			ARM platforms: Must include "shared-dma-pool"
				       as well as the "no-map" property
97 98 99 100 101 102 103 104

The QMan PFDR memory node must be named "qman-pfdr"

PROPERTIES

- compatible
	Usage:		required
	Value type:	<stringlist>
105 106 107
	Definition:	PPC platforms: Must include "fsl,qman-pfdr"
			ARM platforms: Must include "shared-dma-pool"
				       as well as the "no-map" property
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131

The following constraints are relevant to the FQD and PFDR private memory:
	- The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to
	  1 GiB
	- The alignment must be a muliptle of the memory size

The size of the FQD and PFDP must be chosen by observing the hardware features
configured via the Reset Configuration Word (RCW) and that are relevant to a
specific board (e.g. number of MAC(s) pinned-out, number of offline/host command
FMan ports, etc.). The size configured in the DT must reflect the hardware
capabilities and not the specific needs of an application

For additional details about reserved memory regions see reserved-memory.txt

EXAMPLE

The example below shows a QMan FQD and a PFDR dynamic allocation memory nodes

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		qman_fqd: qman-fqd {
132
			compatible = "shared-dma-pool";
133 134
			size = <0 0x400000>;
			alignment = <0 0x400000>;
135
			no-map;
136 137
		};
		qman_pfdr: qman-pfdr {
138
			compatible = "shared-dma-pool";
139 140
			size = <0 0x2000000>;
			alignment = <0 0x2000000>;
141
			no-map;
142 143 144 145 146
		};
	};

The example below shows a (P4080) QMan CCSR-space node

147 148 149 150
	qportals: qman-portals@ff4200000 {
		...
	};

151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
	clockgen: global-utilities@e1000 {
		...
		sysclk: sysclk {
			...
		};
		...
		platform_pll: platform-pll@c00 {
			#clock-cells = <1>;
			reg = <0xc00 0x4>;
			compatible = "fsl,qoriq-platform-pll-1.0";
			clocks = <&sysclk>;
			clock-output-names = "platform-pll", "platform-pll-div2";
		};
		...
	};

	crypto@300000 {
		...
		fsl,qman = <&qman, 2>;
		...
	};

	qman: qman@318000 {
		compatible = "fsl,qman";
		reg = <0x318000 0x1000>;
		interrupts = <16 2 1 3>
		fsl,liodn = <0x16>;
178
		fsl,qman-portals = <&qportals>;
179 180 181 182 183 184 185 186 187
		memory-region = <&qman_fqd &qman_pfdr>;
		clocks = <&platform_pll 1>;
	};

	fman@400000 {
		...
		fsl,qman = <&qman, 0>;
		...
	};