1*4882a593SmuzhiyunFreescale Peripheral Management Access Unit (PAMU) Device Tree Binding 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunDESCRIPTION 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThe PAMU is an I/O MMU that provides device-to-memory access control and 6*4882a593Smuzhiyunaddress translation capabilities. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunRequired properties: 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun- compatible : <string> 11*4882a593Smuzhiyun First entry is a version-specific string, such as 12*4882a593Smuzhiyun "fsl,pamu-v1.0". The second is "fsl,pamu". 13*4882a593Smuzhiyun- ranges : <prop-encoded-array> 14*4882a593Smuzhiyun A standard property. Utilized to describe the memory mapped 15*4882a593Smuzhiyun I/O space utilized by the controller. The size should 16*4882a593Smuzhiyun be set to the total size of the register space of all 17*4882a593Smuzhiyun physically present PAMU controllers. For example, for 18*4882a593Smuzhiyun PAMU v1.0, on an SOC that has five PAMU devices, the size 19*4882a593Smuzhiyun is 0x5000. 20*4882a593Smuzhiyun- interrupts : <prop-encoded-array> 21*4882a593Smuzhiyun Interrupt mappings. The first tuple is the normal PAMU 22*4882a593Smuzhiyun interrupt, used for reporting access violations. The second 23*4882a593Smuzhiyun is for PAMU hardware errors, such as PAMU operation errors 24*4882a593Smuzhiyun and ECC errors. 25*4882a593Smuzhiyun- #address-cells: <u32> 26*4882a593Smuzhiyun A standard property. 27*4882a593Smuzhiyun- #size-cells : <u32> 28*4882a593Smuzhiyun A standard property. 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunOptional properties: 31*4882a593Smuzhiyun- reg : <prop-encoded-array> 32*4882a593Smuzhiyun A standard property. It represents the CCSR registers of 33*4882a593Smuzhiyun all child PAMUs combined. Include it to provide support 34*4882a593Smuzhiyun for legacy drivers. 35*4882a593Smuzhiyun- fsl,portid-mapping : <u32> 36*4882a593Smuzhiyun The Coherency Subdomain ID Port Mapping Registers and 37*4882a593Smuzhiyun Snoop ID Port Mapping registers, which are part of the 38*4882a593Smuzhiyun CoreNet Coherency fabric (CCF), provide a CoreNet 39*4882a593Smuzhiyun Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping 40*4882a593Smuzhiyun functions. Certain bits from these registers should be 41*4882a593Smuzhiyun set if PAMUs should be snooped. This property defines 42*4882a593Smuzhiyun a bitmask which selects the bits that should be set if 43*4882a593Smuzhiyun PAMUs should be snooped. 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunChild nodes: 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunEach child node represents one PAMU controller. Each SOC device that is 48*4882a593Smuzhiyunconnected to a specific PAMU device should have a "fsl,pamu-phandle" property 49*4882a593Smuzhiyunthat links to the corresponding specific child PAMU controller. 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun- reg : <prop-encoded-array> 52*4882a593Smuzhiyun A standard property. Specifies the physical address and 53*4882a593Smuzhiyun length (relative to the parent 'ranges' property) of this 54*4882a593Smuzhiyun PAMU controller's configuration registers. The size should 55*4882a593Smuzhiyun be set to the size of this PAMU controllers's register space. 56*4882a593Smuzhiyun For PAMU v1.0, this size is 0x1000. 57*4882a593Smuzhiyun- fsl,primary-cache-geometry 58*4882a593Smuzhiyun : <prop-encoded-array> 59*4882a593Smuzhiyun Two cells that specify the geometry of the primary PAMU 60*4882a593Smuzhiyun cache. The first is the number of cache lines, and the 61*4882a593Smuzhiyun second is the number of "ways". For direct-mapped caches, 62*4882a593Smuzhiyun specify a value of 1. 63*4882a593Smuzhiyun- fsl,secondary-cache-geometry 64*4882a593Smuzhiyun : <prop-encoded-array> 65*4882a593Smuzhiyun Two cells that specify the geometry of the secondary PAMU 66*4882a593Smuzhiyun cache. The first is the number of cache lines, and the 67*4882a593Smuzhiyun second is the number of "ways". For direct-mapped caches, 68*4882a593Smuzhiyun specify a value of 1. 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunDevice nodes: 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunDevices that have LIODNs need to specify links to the parent PAMU controller 73*4882a593Smuzhiyun(the actual PAMU controller that this device is connected to) and a pointer to 74*4882a593Smuzhiyunthe LIODN register, if applicable. 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun- fsl,iommu-parent 77*4882a593Smuzhiyun : <phandle> 78*4882a593Smuzhiyun Phandle to the single, specific PAMU controller node to which 79*4882a593Smuzhiyun this device is connect. The PAMU topology is represented in 80*4882a593Smuzhiyun the device tree to assist code that dynamically determines the 81*4882a593Smuzhiyun best LIODN values to minimize PAMU cache thrashing. 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun- fsl,liodn-reg : <prop-encoded-array> 84*4882a593Smuzhiyun Two cells that specify the location of the LIODN register 85*4882a593Smuzhiyun for this device. Required for devices that have a single 86*4882a593Smuzhiyun LIODN. The first cell is a phandle to a node that contains 87*4882a593Smuzhiyun the registers where the LIODN is to be set. The second is 88*4882a593Smuzhiyun the offset from the first "reg" resource of the node where 89*4882a593Smuzhiyun the specific LIODN register is located. 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun 92*4882a593SmuzhiyunExample: 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun iommu@20000 { 95*4882a593Smuzhiyun compatible = "fsl,pamu-v1.0", "fsl,pamu"; 96*4882a593Smuzhiyun reg = <0x20000 0x5000>; 97*4882a593Smuzhiyun ranges = <0 0x20000 0x5000>; 98*4882a593Smuzhiyun fsl,portid-mapping = <0xf80000>; 99*4882a593Smuzhiyun #address-cells = <1>; 100*4882a593Smuzhiyun #size-cells = <1>; 101*4882a593Smuzhiyun interrupts = < 102*4882a593Smuzhiyun 24 2 0 0 103*4882a593Smuzhiyun 16 2 1 30>; 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun pamu0: pamu@0 { 106*4882a593Smuzhiyun reg = <0 0x1000>; 107*4882a593Smuzhiyun fsl,primary-cache-geometry = <32 1>; 108*4882a593Smuzhiyun fsl,secondary-cache-geometry = <128 2>; 109*4882a593Smuzhiyun }; 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun pamu1: pamu@1000 { 112*4882a593Smuzhiyun reg = <0x1000 0x1000>; 113*4882a593Smuzhiyun fsl,primary-cache-geometry = <32 1>; 114*4882a593Smuzhiyun fsl,secondary-cache-geometry = <128 2>; 115*4882a593Smuzhiyun }; 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun pamu2: pamu@2000 { 118*4882a593Smuzhiyun reg = <0x2000 0x1000>; 119*4882a593Smuzhiyun fsl,primary-cache-geometry = <32 1>; 120*4882a593Smuzhiyun fsl,secondary-cache-geometry = <128 2>; 121*4882a593Smuzhiyun }; 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun pamu3: pamu@3000 { 124*4882a593Smuzhiyun reg = <0x3000 0x1000>; 125*4882a593Smuzhiyun fsl,primary-cache-geometry = <32 1>; 126*4882a593Smuzhiyun fsl,secondary-cache-geometry = <128 2>; 127*4882a593Smuzhiyun }; 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun pamu4: pamu@4000 { 130*4882a593Smuzhiyun reg = <0x4000 0x1000>; 131*4882a593Smuzhiyun fsl,primary-cache-geometry = <32 1>; 132*4882a593Smuzhiyun fsl,secondary-cache-geometry = <128 2>; 133*4882a593Smuzhiyun }; 134*4882a593Smuzhiyun }; 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun guts: global-utilities@e0000 { 137*4882a593Smuzhiyun compatible = "fsl,qoriq-device-config-1.0"; 138*4882a593Smuzhiyun reg = <0xe0000 0xe00>; 139*4882a593Smuzhiyun fsl,has-rstcr; 140*4882a593Smuzhiyun #sleep-cells = <1>; 141*4882a593Smuzhiyun fsl,liodn-bits = <12>; 142*4882a593Smuzhiyun }; 143*4882a593Smuzhiyun 144*4882a593Smuzhiyun/include/ "qoriq-dma-0.dtsi" 145*4882a593Smuzhiyun dma@100300 { 146*4882a593Smuzhiyun fsl,iommu-parent = <&pamu0>; 147*4882a593Smuzhiyun fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */ 148*4882a593Smuzhiyun }; 149