18c2ecf20Sopenharmony_ciFreescale Peripheral Management Access Unit (PAMU) Device Tree Binding 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciDESCRIPTION 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciThe PAMU is an I/O MMU that provides device-to-memory access control and 68c2ecf20Sopenharmony_ciaddress translation capabilities. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciRequired properties: 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci- compatible : <string> 118c2ecf20Sopenharmony_ci First entry is a version-specific string, such as 128c2ecf20Sopenharmony_ci "fsl,pamu-v1.0". The second is "fsl,pamu". 138c2ecf20Sopenharmony_ci- ranges : <prop-encoded-array> 148c2ecf20Sopenharmony_ci A standard property. Utilized to describe the memory mapped 158c2ecf20Sopenharmony_ci I/O space utilized by the controller. The size should 168c2ecf20Sopenharmony_ci be set to the total size of the register space of all 178c2ecf20Sopenharmony_ci physically present PAMU controllers. For example, for 188c2ecf20Sopenharmony_ci PAMU v1.0, on an SOC that has five PAMU devices, the size 198c2ecf20Sopenharmony_ci is 0x5000. 208c2ecf20Sopenharmony_ci- interrupts : <prop-encoded-array> 218c2ecf20Sopenharmony_ci Interrupt mappings. The first tuple is the normal PAMU 228c2ecf20Sopenharmony_ci interrupt, used for reporting access violations. The second 238c2ecf20Sopenharmony_ci is for PAMU hardware errors, such as PAMU operation errors 248c2ecf20Sopenharmony_ci and ECC errors. 258c2ecf20Sopenharmony_ci- #address-cells: <u32> 268c2ecf20Sopenharmony_ci A standard property. 278c2ecf20Sopenharmony_ci- #size-cells : <u32> 288c2ecf20Sopenharmony_ci A standard property. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciOptional properties: 318c2ecf20Sopenharmony_ci- reg : <prop-encoded-array> 328c2ecf20Sopenharmony_ci A standard property. It represents the CCSR registers of 338c2ecf20Sopenharmony_ci all child PAMUs combined. Include it to provide support 348c2ecf20Sopenharmony_ci for legacy drivers. 358c2ecf20Sopenharmony_ci- fsl,portid-mapping : <u32> 368c2ecf20Sopenharmony_ci The Coherency Subdomain ID Port Mapping Registers and 378c2ecf20Sopenharmony_ci Snoop ID Port Mapping registers, which are part of the 388c2ecf20Sopenharmony_ci CoreNet Coherency fabric (CCF), provide a CoreNet 398c2ecf20Sopenharmony_ci Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping 408c2ecf20Sopenharmony_ci functions. Certain bits from these registers should be 418c2ecf20Sopenharmony_ci set if PAMUs should be snooped. This property defines 428c2ecf20Sopenharmony_ci a bitmask which selects the bits that should be set if 438c2ecf20Sopenharmony_ci PAMUs should be snooped. 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciChild nodes: 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ciEach child node represents one PAMU controller. Each SOC device that is 488c2ecf20Sopenharmony_ciconnected to a specific PAMU device should have a "fsl,pamu-phandle" property 498c2ecf20Sopenharmony_cithat links to the corresponding specific child PAMU controller. 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci- reg : <prop-encoded-array> 528c2ecf20Sopenharmony_ci A standard property. Specifies the physical address and 538c2ecf20Sopenharmony_ci length (relative to the parent 'ranges' property) of this 548c2ecf20Sopenharmony_ci PAMU controller's configuration registers. The size should 558c2ecf20Sopenharmony_ci be set to the size of this PAMU controllers's register space. 568c2ecf20Sopenharmony_ci For PAMU v1.0, this size is 0x1000. 578c2ecf20Sopenharmony_ci- fsl,primary-cache-geometry 588c2ecf20Sopenharmony_ci : <prop-encoded-array> 598c2ecf20Sopenharmony_ci Two cells that specify the geometry of the primary PAMU 608c2ecf20Sopenharmony_ci cache. The first is the number of cache lines, and the 618c2ecf20Sopenharmony_ci second is the number of "ways". For direct-mapped caches, 628c2ecf20Sopenharmony_ci specify a value of 1. 638c2ecf20Sopenharmony_ci- fsl,secondary-cache-geometry 648c2ecf20Sopenharmony_ci : <prop-encoded-array> 658c2ecf20Sopenharmony_ci Two cells that specify the geometry of the secondary PAMU 668c2ecf20Sopenharmony_ci cache. The first is the number of cache lines, and the 678c2ecf20Sopenharmony_ci second is the number of "ways". For direct-mapped caches, 688c2ecf20Sopenharmony_ci specify a value of 1. 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ciDevice nodes: 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ciDevices that have LIODNs need to specify links to the parent PAMU controller 738c2ecf20Sopenharmony_ci(the actual PAMU controller that this device is connected to) and a pointer to 748c2ecf20Sopenharmony_cithe LIODN register, if applicable. 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci- fsl,iommu-parent 778c2ecf20Sopenharmony_ci : <phandle> 788c2ecf20Sopenharmony_ci Phandle to the single, specific PAMU controller node to which 798c2ecf20Sopenharmony_ci this device is connect. The PAMU topology is represented in 808c2ecf20Sopenharmony_ci the device tree to assist code that dynamically determines the 818c2ecf20Sopenharmony_ci best LIODN values to minimize PAMU cache thrashing. 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci- fsl,liodn-reg : <prop-encoded-array> 848c2ecf20Sopenharmony_ci Two cells that specify the location of the LIODN register 858c2ecf20Sopenharmony_ci for this device. Required for devices that have a single 868c2ecf20Sopenharmony_ci LIODN. The first cell is a phandle to a node that contains 878c2ecf20Sopenharmony_ci the registers where the LIODN is to be set. The second is 888c2ecf20Sopenharmony_ci the offset from the first "reg" resource of the node where 898c2ecf20Sopenharmony_ci the specific LIODN register is located. 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ciExample: 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci iommu@20000 { 958c2ecf20Sopenharmony_ci compatible = "fsl,pamu-v1.0", "fsl,pamu"; 968c2ecf20Sopenharmony_ci reg = <0x20000 0x5000>; 978c2ecf20Sopenharmony_ci ranges = <0 0x20000 0x5000>; 988c2ecf20Sopenharmony_ci fsl,portid-mapping = <0xf80000>; 998c2ecf20Sopenharmony_ci #address-cells = <1>; 1008c2ecf20Sopenharmony_ci #size-cells = <1>; 1018c2ecf20Sopenharmony_ci interrupts = < 1028c2ecf20Sopenharmony_ci 24 2 0 0 1038c2ecf20Sopenharmony_ci 16 2 1 30>; 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci pamu0: pamu@0 { 1068c2ecf20Sopenharmony_ci reg = <0 0x1000>; 1078c2ecf20Sopenharmony_ci fsl,primary-cache-geometry = <32 1>; 1088c2ecf20Sopenharmony_ci fsl,secondary-cache-geometry = <128 2>; 1098c2ecf20Sopenharmony_ci }; 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci pamu1: pamu@1000 { 1128c2ecf20Sopenharmony_ci reg = <0x1000 0x1000>; 1138c2ecf20Sopenharmony_ci fsl,primary-cache-geometry = <32 1>; 1148c2ecf20Sopenharmony_ci fsl,secondary-cache-geometry = <128 2>; 1158c2ecf20Sopenharmony_ci }; 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci pamu2: pamu@2000 { 1188c2ecf20Sopenharmony_ci reg = <0x2000 0x1000>; 1198c2ecf20Sopenharmony_ci fsl,primary-cache-geometry = <32 1>; 1208c2ecf20Sopenharmony_ci fsl,secondary-cache-geometry = <128 2>; 1218c2ecf20Sopenharmony_ci }; 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci pamu3: pamu@3000 { 1248c2ecf20Sopenharmony_ci reg = <0x3000 0x1000>; 1258c2ecf20Sopenharmony_ci fsl,primary-cache-geometry = <32 1>; 1268c2ecf20Sopenharmony_ci fsl,secondary-cache-geometry = <128 2>; 1278c2ecf20Sopenharmony_ci }; 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci pamu4: pamu@4000 { 1308c2ecf20Sopenharmony_ci reg = <0x4000 0x1000>; 1318c2ecf20Sopenharmony_ci fsl,primary-cache-geometry = <32 1>; 1328c2ecf20Sopenharmony_ci fsl,secondary-cache-geometry = <128 2>; 1338c2ecf20Sopenharmony_ci }; 1348c2ecf20Sopenharmony_ci }; 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci guts: global-utilities@e0000 { 1378c2ecf20Sopenharmony_ci compatible = "fsl,qoriq-device-config-1.0"; 1388c2ecf20Sopenharmony_ci reg = <0xe0000 0xe00>; 1398c2ecf20Sopenharmony_ci fsl,has-rstcr; 1408c2ecf20Sopenharmony_ci #sleep-cells = <1>; 1418c2ecf20Sopenharmony_ci fsl,liodn-bits = <12>; 1428c2ecf20Sopenharmony_ci }; 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci/include/ "qoriq-dma-0.dtsi" 1458c2ecf20Sopenharmony_ci dma@100300 { 1468c2ecf20Sopenharmony_ci fsl,iommu-parent = <&pamu0>; 1478c2ecf20Sopenharmony_ci fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */ 1488c2ecf20Sopenharmony_ci }; 149