162306a36Sopenharmony_ciFreescale Peripheral Management Access Unit (PAMU) Device Tree Binding
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciDESCRIPTION
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciThe PAMU is an I/O MMU that provides device-to-memory access control and
662306a36Sopenharmony_ciaddress translation capabilities.
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciRequired properties:
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci- compatible	: <string>
1162306a36Sopenharmony_ci		  First entry is a version-specific string, such as
1262306a36Sopenharmony_ci		  "fsl,pamu-v1.0".  The second is "fsl,pamu".
1362306a36Sopenharmony_ci- ranges	: <prop-encoded-array>
1462306a36Sopenharmony_ci		  A standard property. Utilized to describe the memory mapped
1562306a36Sopenharmony_ci		  I/O space utilized by the controller.  The size should
1662306a36Sopenharmony_ci		  be set to the total size of the register space of all
1762306a36Sopenharmony_ci		  physically present PAMU controllers.  For example, for
1862306a36Sopenharmony_ci		  PAMU v1.0, on an SOC that has five PAMU devices, the size
1962306a36Sopenharmony_ci		  is 0x5000.
2062306a36Sopenharmony_ci- interrupts	: <prop-encoded-array>
2162306a36Sopenharmony_ci		  Interrupt mappings.  The first tuple is the normal PAMU
2262306a36Sopenharmony_ci		  interrupt, used for reporting access violations.  The second
2362306a36Sopenharmony_ci		  is for PAMU hardware errors, such as PAMU operation errors
2462306a36Sopenharmony_ci		  and ECC errors.
2562306a36Sopenharmony_ci- #address-cells: <u32>
2662306a36Sopenharmony_ci		  A standard property.
2762306a36Sopenharmony_ci- #size-cells	: <u32>
2862306a36Sopenharmony_ci		  A standard property.
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciOptional properties:
3162306a36Sopenharmony_ci- reg		: <prop-encoded-array>
3262306a36Sopenharmony_ci		  A standard property.   It represents the CCSR registers of
3362306a36Sopenharmony_ci		  all child PAMUs combined.  Include it to provide support
3462306a36Sopenharmony_ci		  for legacy drivers.
3562306a36Sopenharmony_ci- fsl,portid-mapping : <u32>
3662306a36Sopenharmony_ci		  The Coherency Subdomain ID Port Mapping Registers and
3762306a36Sopenharmony_ci		  Snoop ID Port Mapping registers, which are part of the
3862306a36Sopenharmony_ci		  CoreNet Coherency fabric (CCF), provide a CoreNet
3962306a36Sopenharmony_ci		  Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping
4062306a36Sopenharmony_ci		  functions.  Certain bits from these registers should be
4162306a36Sopenharmony_ci		  set if PAMUs should be snooped.  This property defines
4262306a36Sopenharmony_ci		  a bitmask which selects the bits that should be set if
4362306a36Sopenharmony_ci		  PAMUs should be snooped.
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ciChild nodes:
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ciEach child node represents one PAMU controller.  Each SOC device that is
4862306a36Sopenharmony_ciconnected to a specific PAMU device should have a "fsl,pamu-phandle" property
4962306a36Sopenharmony_cithat links to the corresponding specific child PAMU controller.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci- reg		: <prop-encoded-array>
5262306a36Sopenharmony_ci		  A standard property.  Specifies the physical address and
5362306a36Sopenharmony_ci		  length (relative to the parent 'ranges' property) of this
5462306a36Sopenharmony_ci		  PAMU controller's configuration registers.  The size should
5562306a36Sopenharmony_ci		  be set to the size of this PAMU controllers's register space.
5662306a36Sopenharmony_ci		  For PAMU v1.0, this size is 0x1000.
5762306a36Sopenharmony_ci- fsl,primary-cache-geometry
5862306a36Sopenharmony_ci		: <prop-encoded-array>
5962306a36Sopenharmony_ci		  Two cells that specify the geometry of the primary PAMU
6062306a36Sopenharmony_ci		  cache.  The first is the number of cache lines, and the
6162306a36Sopenharmony_ci		  second is the number of "ways".  For direct-mapped caches,
6262306a36Sopenharmony_ci		  specify a value of 1.
6362306a36Sopenharmony_ci- fsl,secondary-cache-geometry
6462306a36Sopenharmony_ci		: <prop-encoded-array>
6562306a36Sopenharmony_ci		  Two cells that specify the geometry of the secondary PAMU
6662306a36Sopenharmony_ci		  cache.  The first is the number of cache lines, and the
6762306a36Sopenharmony_ci		  second is the number of "ways".  For direct-mapped caches,
6862306a36Sopenharmony_ci		  specify a value of 1.
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciDevice nodes:
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciDevices that have LIODNs need to specify links to the parent PAMU controller
7362306a36Sopenharmony_ci(the actual PAMU controller that this device is connected to) and a pointer to
7462306a36Sopenharmony_cithe LIODN register, if applicable.
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci- fsl,iommu-parent
7762306a36Sopenharmony_ci		: <phandle>
7862306a36Sopenharmony_ci		Phandle to the single, specific PAMU controller node to which
7962306a36Sopenharmony_ci		this device is connect.  The PAMU topology is represented in
8062306a36Sopenharmony_ci		the device tree to assist code that dynamically determines the
8162306a36Sopenharmony_ci		best LIODN values to minimize PAMU cache thrashing.
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci- fsl,liodn-reg : <prop-encoded-array>
8462306a36Sopenharmony_ci		  Two cells that specify the location of the LIODN register
8562306a36Sopenharmony_ci		  for this device.  Required for devices that have a single
8662306a36Sopenharmony_ci		  LIODN.  The first cell is a phandle to a node that contains
8762306a36Sopenharmony_ci		  the registers where the LIODN is to be set.  The second is
8862306a36Sopenharmony_ci		  the offset from the first "reg" resource of the node where
8962306a36Sopenharmony_ci		  the specific LIODN register is located.
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ciExample:
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_ci	iommu@20000 {
9562306a36Sopenharmony_ci		compatible = "fsl,pamu-v1.0", "fsl,pamu";
9662306a36Sopenharmony_ci		reg = <0x20000 0x5000>;
9762306a36Sopenharmony_ci		ranges = <0 0x20000 0x5000>;
9862306a36Sopenharmony_ci		fsl,portid-mapping = <0xf80000>;
9962306a36Sopenharmony_ci		#address-cells = <1>;
10062306a36Sopenharmony_ci		#size-cells = <1>;
10162306a36Sopenharmony_ci		interrupts = <
10262306a36Sopenharmony_ci			24 2 0 0
10362306a36Sopenharmony_ci			16 2 1 30>;
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci		pamu0: pamu@0 {
10662306a36Sopenharmony_ci			reg = <0 0x1000>;
10762306a36Sopenharmony_ci			fsl,primary-cache-geometry = <32 1>;
10862306a36Sopenharmony_ci			fsl,secondary-cache-geometry = <128 2>;
10962306a36Sopenharmony_ci		};
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci		pamu1: pamu@1000 {
11262306a36Sopenharmony_ci			reg = <0x1000 0x1000>;
11362306a36Sopenharmony_ci			fsl,primary-cache-geometry = <32 1>;
11462306a36Sopenharmony_ci			fsl,secondary-cache-geometry = <128 2>;
11562306a36Sopenharmony_ci		};
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci		pamu2: pamu@2000 {
11862306a36Sopenharmony_ci			reg = <0x2000 0x1000>;
11962306a36Sopenharmony_ci			fsl,primary-cache-geometry = <32 1>;
12062306a36Sopenharmony_ci			fsl,secondary-cache-geometry = <128 2>;
12162306a36Sopenharmony_ci		};
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci		pamu3: pamu@3000 {
12462306a36Sopenharmony_ci			reg = <0x3000 0x1000>;
12562306a36Sopenharmony_ci			fsl,primary-cache-geometry = <32 1>;
12662306a36Sopenharmony_ci			fsl,secondary-cache-geometry = <128 2>;
12762306a36Sopenharmony_ci		};
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci		pamu4: pamu@4000 {
13062306a36Sopenharmony_ci			reg = <0x4000 0x1000>;
13162306a36Sopenharmony_ci			fsl,primary-cache-geometry = <32 1>;
13262306a36Sopenharmony_ci			fsl,secondary-cache-geometry = <128 2>;
13362306a36Sopenharmony_ci		};
13462306a36Sopenharmony_ci	};
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ci	guts: global-utilities@e0000 {
13762306a36Sopenharmony_ci		compatible = "fsl,qoriq-device-config-1.0";
13862306a36Sopenharmony_ci		reg = <0xe0000 0xe00>;
13962306a36Sopenharmony_ci		fsl,has-rstcr;
14062306a36Sopenharmony_ci		#sleep-cells = <1>;
14162306a36Sopenharmony_ci		fsl,liodn-bits = <12>;
14262306a36Sopenharmony_ci	};
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci/include/ "qoriq-dma-0.dtsi"
14562306a36Sopenharmony_ci	dma@100300 {
14662306a36Sopenharmony_ci		fsl,iommu-parent = <&pamu0>;
14762306a36Sopenharmony_ci		fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
14862306a36Sopenharmony_ci	};
149