xref: /freebsd/sys/contrib/device-tree/Bindings/soc/fsl/bman.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotQorIQ DPAA Buffer Manager Device Tree Bindings
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotCopyright (C) 2008 - 2014 Freescale Semiconductor Inc.
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel VadotCONTENTS
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadot	- BMan Node
8*c66ec88fSEmmanuel Vadot	- BMan Private Memory Node
9*c66ec88fSEmmanuel Vadot	- Example
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel VadotBMan Node
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel VadotThe Buffer Manager is part of the Data-Path Acceleration Architecture (DPAA).
14*c66ec88fSEmmanuel VadotBMan supports hardware allocation and deallocation of buffers belonging to pools
15*c66ec88fSEmmanuel Vadotoriginally created by software with configurable depletion thresholds. This
16*c66ec88fSEmmanuel Vadotbinding covers the CCSR space programming model
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel VadotPROPERTIES
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadot- compatible
21*c66ec88fSEmmanuel Vadot	Usage:		Required
22*c66ec88fSEmmanuel Vadot	Value type:	<stringlist>
23*c66ec88fSEmmanuel Vadot	Definition:	Must include "fsl,bman"
24*c66ec88fSEmmanuel Vadot			May include "fsl,<SoC>-bman"
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel Vadot- reg
27*c66ec88fSEmmanuel Vadot	Usage:		Required
28*c66ec88fSEmmanuel Vadot	Value type:	<prop-encoded-array>
29*c66ec88fSEmmanuel Vadot	Definition:	Registers region within the CCSR address space
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel VadotThe BMan revision information is located in the BMAN_IP_REV_1/2 registers which
32*c66ec88fSEmmanuel Vadotare located at offsets 0xbf8 and 0xbfc
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel Vadot- interrupts
35*c66ec88fSEmmanuel Vadot	Usage:		Required
36*c66ec88fSEmmanuel Vadot	Value type:	<prop-encoded-array>
37*c66ec88fSEmmanuel Vadot	Definition:	Standard property. The error interrupt
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot- fsl,bman-portals
40*c66ec88fSEmmanuel Vadot	Usage:		Required
41*c66ec88fSEmmanuel Vadot	Value type:	<phandle>
42*c66ec88fSEmmanuel Vadot	Definition:	Phandle to this BMan instance's portals
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel Vadot- fsl,liodn
45*c66ec88fSEmmanuel Vadot	Usage:		See pamu.txt
46*c66ec88fSEmmanuel Vadot	Value type:	<prop-encoded-array>
47*c66ec88fSEmmanuel Vadot	Definition:	PAMU property used for static LIODN assignment
48*c66ec88fSEmmanuel Vadot
49*c66ec88fSEmmanuel Vadot- fsl,iommu-parent
50*c66ec88fSEmmanuel Vadot	Usage:		See pamu.txt
51*c66ec88fSEmmanuel Vadot	Value type:	<phandle>
52*c66ec88fSEmmanuel Vadot	Definition:	PAMU property used for dynamic LIODN assignment
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadot	For additional details about the PAMU/LIODN binding(s) see pamu.txt
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel VadotDevices connected to a BMan instance via Direct Connect Portals (DCP) must link
57*c66ec88fSEmmanuel Vadotto the respective BMan instance
58*c66ec88fSEmmanuel Vadot
59*c66ec88fSEmmanuel Vadot- fsl,bman
60*c66ec88fSEmmanuel Vadot	Usage:		Required
61*c66ec88fSEmmanuel Vadot	Value type:	<prop-encoded-array>
62*c66ec88fSEmmanuel Vadot	Description:	List of phandle and DCP index pairs, to the BMan instance
63*c66ec88fSEmmanuel Vadot			to which this device is connected via the DCP
64*c66ec88fSEmmanuel Vadot
65*c66ec88fSEmmanuel VadotBMan Private Memory Node
66*c66ec88fSEmmanuel Vadot
67*c66ec88fSEmmanuel VadotBMan requires a contiguous range of physical memory used for the backing store
68*c66ec88fSEmmanuel Vadotfor BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as
69*c66ec88fSEmmanuel Vadota node under the /reserved-memory node.
70*c66ec88fSEmmanuel Vadot
71*c66ec88fSEmmanuel VadotThe BMan FBPR memory node must be named "bman-fbpr"
72*c66ec88fSEmmanuel Vadot
73*c66ec88fSEmmanuel VadotPROPERTIES
74*c66ec88fSEmmanuel Vadot
75*c66ec88fSEmmanuel Vadot- compatible
76*c66ec88fSEmmanuel Vadot	Usage:		required
77*c66ec88fSEmmanuel Vadot	Value type:	<stringlist>
78*c66ec88fSEmmanuel Vadot	Definition:	PPC platforms: Must include "fsl,bman-fbpr"
79*c66ec88fSEmmanuel Vadot			ARM platforms: Must include "shared-dma-pool"
80*c66ec88fSEmmanuel Vadot				       as well as the "no-map" property
81*c66ec88fSEmmanuel Vadot
82*c66ec88fSEmmanuel VadotThe following constraints are relevant to the FBPR private memory:
83*c66ec88fSEmmanuel Vadot	- The size must be 2^(size + 1), with size = 11..33. That is 4 KiB to
84*c66ec88fSEmmanuel Vadot	  16 GiB
85*c66ec88fSEmmanuel Vadot	- The alignment must be a muliptle of the memory size
86*c66ec88fSEmmanuel Vadot
87*c66ec88fSEmmanuel VadotThe size of the FBPR must be chosen by observing the hardware features configured
88*c66ec88fSEmmanuel Vadotvia the Reset Configuration Word (RCW) and that are relevant to a specific board
89*c66ec88fSEmmanuel Vadot(e.g. number of MAC(s) pinned-out, number of offline/host command FMan ports,
90*c66ec88fSEmmanuel Vadotetc.). The size configured in the DT must reflect the hardware capabilities and
91*c66ec88fSEmmanuel Vadotnot the specific needs of an application
92*c66ec88fSEmmanuel Vadot
93*c66ec88fSEmmanuel VadotFor additional details about reserved memory regions see reserved-memory.txt
94*c66ec88fSEmmanuel Vadot
95*c66ec88fSEmmanuel VadotEXAMPLE
96*c66ec88fSEmmanuel Vadot
97*c66ec88fSEmmanuel VadotThe example below shows a BMan FBPR dynamic allocation memory node
98*c66ec88fSEmmanuel Vadot
99*c66ec88fSEmmanuel Vadot	reserved-memory {
100*c66ec88fSEmmanuel Vadot		#address-cells = <2>;
101*c66ec88fSEmmanuel Vadot		#size-cells = <2>;
102*c66ec88fSEmmanuel Vadot		ranges;
103*c66ec88fSEmmanuel Vadot
104*c66ec88fSEmmanuel Vadot		bman_fbpr: bman-fbpr {
105*c66ec88fSEmmanuel Vadot			compatible = "shared-mem-pool";
106*c66ec88fSEmmanuel Vadot			size = <0 0x1000000>;
107*c66ec88fSEmmanuel Vadot			alignment = <0 0x1000000>;
108*c66ec88fSEmmanuel Vadot			no-map;
109*c66ec88fSEmmanuel Vadot		};
110*c66ec88fSEmmanuel Vadot	};
111*c66ec88fSEmmanuel Vadot
112*c66ec88fSEmmanuel VadotThe example below shows a (P4080) BMan CCSR-space node
113*c66ec88fSEmmanuel Vadot
114*c66ec88fSEmmanuel Vadot	bportals: bman-portals@ff4000000 {
115*c66ec88fSEmmanuel Vadot		...
116*c66ec88fSEmmanuel Vadot	};
117*c66ec88fSEmmanuel Vadot
118*c66ec88fSEmmanuel Vadot	crypto@300000 {
119*c66ec88fSEmmanuel Vadot		...
120*c66ec88fSEmmanuel Vadot		fsl,bman = <&bman, 2>;
121*c66ec88fSEmmanuel Vadot		...
122*c66ec88fSEmmanuel Vadot	};
123*c66ec88fSEmmanuel Vadot
124*c66ec88fSEmmanuel Vadot	bman: bman@31a000 {
125*c66ec88fSEmmanuel Vadot		compatible = "fsl,bman";
126*c66ec88fSEmmanuel Vadot		reg = <0x31a000 0x1000>;
127*c66ec88fSEmmanuel Vadot		interrupts = <16 2 1 2>;
128*c66ec88fSEmmanuel Vadot		fsl,liodn = <0x17>;
129*c66ec88fSEmmanuel Vadot		fsl,bman-portals = <&bportals>;
130*c66ec88fSEmmanuel Vadot		memory-region = <&bman_fbpr>;
131*c66ec88fSEmmanuel Vadot	};
132*c66ec88fSEmmanuel Vadot
133*c66ec88fSEmmanuel Vadot	fman@400000 {
134*c66ec88fSEmmanuel Vadot		...
135*c66ec88fSEmmanuel Vadot		fsl,bman = <&bman, 0>;
136*c66ec88fSEmmanuel Vadot		...
137*c66ec88fSEmmanuel Vadot	};
138