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