162306a36Sopenharmony_ci* Freescale Management Complex 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe Freescale Management Complex (fsl-mc) is a hardware resource 462306a36Sopenharmony_cimanager that manages specialized hardware objects used in 562306a36Sopenharmony_cinetwork-oriented packet processing applications. After the fsl-mc 662306a36Sopenharmony_ciblock is enabled, pools of hardware resources are available, such as 762306a36Sopenharmony_ciqueues, buffer pools, I/O interfaces. These resources are building 862306a36Sopenharmony_ciblocks that can be used to create functional hardware objects/devices 962306a36Sopenharmony_cisuch as network interfaces, crypto accelerator instances, L2 switches, 1062306a36Sopenharmony_cietc. 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciFor an overview of the DPAA2 architecture and fsl-mc bus see: 1362306a36Sopenharmony_ciDocumentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciAs described in the above overview, all DPAA2 objects in a DPRC share the 1662306a36Sopenharmony_cisame hardware "isolation context" and a 10-bit value called an ICID 1762306a36Sopenharmony_ci(isolation context id) is expressed by the hardware to identify 1862306a36Sopenharmony_cithe requester. 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciThe generic 'iommus' property is insufficient to describe the relationship 2162306a36Sopenharmony_cibetween ICIDs and IOMMUs, so an iommu-map property is used to define 2262306a36Sopenharmony_cithe set of possible ICIDs under a root DPRC and how they map to 2362306a36Sopenharmony_cian IOMMU. 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ciFor generic IOMMU bindings, see 2662306a36Sopenharmony_ciDocumentation/devicetree/bindings/iommu/iommu.txt. 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ciFor arm-smmu binding, see: 2962306a36Sopenharmony_ciDocumentation/devicetree/bindings/iommu/arm,smmu.yaml. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciThe MSI writes are accompanied by sideband data which is derived from the ICID. 3262306a36Sopenharmony_ciThe msi-map property is used to associate the devices with both the ITS 3362306a36Sopenharmony_cicontroller and the sideband data which accompanies the writes. 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciFor generic MSI bindings, see 3662306a36Sopenharmony_ciDocumentation/devicetree/bindings/interrupt-controller/msi.txt. 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciFor GICv3 and GIC ITS bindings, see: 3962306a36Sopenharmony_ciDocumentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml. 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciRequired properties: 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci - compatible 4462306a36Sopenharmony_ci Value type: <string> 4562306a36Sopenharmony_ci Definition: Must be "fsl,qoriq-mc". A Freescale Management Complex 4662306a36Sopenharmony_ci compatible with this binding must have Block Revision 4762306a36Sopenharmony_ci Registers BRR1 and BRR2 at offset 0x0BF8 and 0x0BFC in 4862306a36Sopenharmony_ci the MC control register region. 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci - reg 5162306a36Sopenharmony_ci Value type: <prop-encoded-array> 5262306a36Sopenharmony_ci Definition: A standard property. Specifies one or two regions 5362306a36Sopenharmony_ci defining the MC's registers: 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci -the first region is the command portal for the 5662306a36Sopenharmony_ci this machine and must always be present 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci -the second region is the MC control registers. This 5962306a36Sopenharmony_ci region may not be present in some scenarios, such 6062306a36Sopenharmony_ci as in the device tree presented to a virtual machine. 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci - ranges 6362306a36Sopenharmony_ci Value type: <prop-encoded-array> 6462306a36Sopenharmony_ci Definition: A standard property. Defines the mapping between the child 6562306a36Sopenharmony_ci MC address space and the parent system address space. 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci The MC address space is defined by 3 components: 6862306a36Sopenharmony_ci <region type> <offset hi> <offset lo> 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci Valid values for region type are 7162306a36Sopenharmony_ci 0x0 - MC portals 7262306a36Sopenharmony_ci 0x1 - QBMAN portals 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci - #address-cells 7562306a36Sopenharmony_ci Value type: <u32> 7662306a36Sopenharmony_ci Definition: Must be 3. (see definition in 'ranges' property) 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci - #size-cells 7962306a36Sopenharmony_ci Value type: <u32> 8062306a36Sopenharmony_ci Definition: Must be 1. 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ciSub-nodes: 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci The fsl-mc node may optionally have dpmac sub-nodes that describe 8562306a36Sopenharmony_ci the relationship between the Ethernet MACs which belong to the MC 8662306a36Sopenharmony_ci and the Ethernet PHYs on the system board. 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci The dpmac nodes must be under a node named "dpmacs" which contains 8962306a36Sopenharmony_ci the following properties: 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci - #address-cells 9262306a36Sopenharmony_ci Value type: <u32> 9362306a36Sopenharmony_ci Definition: Must be present if dpmac sub-nodes are defined and must 9462306a36Sopenharmony_ci have a value of 1. 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci - #size-cells 9762306a36Sopenharmony_ci Value type: <u32> 9862306a36Sopenharmony_ci Definition: Must be present if dpmac sub-nodes are defined and must 9962306a36Sopenharmony_ci have a value of 0. 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci These nodes must have the following properties: 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci - compatible 10462306a36Sopenharmony_ci Value type: <string> 10562306a36Sopenharmony_ci Definition: Must be "fsl,qoriq-mc-dpmac". 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci - reg 10862306a36Sopenharmony_ci Value type: <prop-encoded-array> 10962306a36Sopenharmony_ci Definition: Specifies the id of the dpmac. 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci - phy-handle 11262306a36Sopenharmony_ci Value type: <phandle> 11362306a36Sopenharmony_ci Definition: Specifies the phandle to the PHY device node associated 11462306a36Sopenharmony_ci with the this dpmac. 11562306a36Sopenharmony_ciOptional properties: 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci- iommu-map: Maps an ICID to an IOMMU and associated iommu-specifier 11862306a36Sopenharmony_ci data. 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci The property is an arbitrary number of tuples of 12162306a36Sopenharmony_ci (icid-base,iommu,iommu-base,length). 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci Any ICID i in the interval [icid-base, icid-base + length) is 12462306a36Sopenharmony_ci associated with the listed IOMMU, with the iommu-specifier 12562306a36Sopenharmony_ci (i - icid-base + iommu-base). 12662306a36Sopenharmony_ci 12762306a36Sopenharmony_ci- msi-map: Maps an ICID to a GIC ITS and associated msi-specifier 12862306a36Sopenharmony_ci data. 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci The property is an arbitrary number of tuples of 13162306a36Sopenharmony_ci (icid-base,gic-its,msi-base,length). 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci Any ICID in the interval [icid-base, icid-base + length) is 13462306a36Sopenharmony_ci associated with the listed GIC ITS, with the msi-specifier 13562306a36Sopenharmony_ci (i - icid-base + msi-base). 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ciDeprecated properties: 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci - msi-parent 14062306a36Sopenharmony_ci Value type: <phandle> 14162306a36Sopenharmony_ci Definition: Describes the MSI controller node handling message 14262306a36Sopenharmony_ci interrupts for the MC. When there is no translation 14362306a36Sopenharmony_ci between the ICID and deviceID this property can be used 14462306a36Sopenharmony_ci to describe the MSI controller used by the devices on the 14562306a36Sopenharmony_ci mc-bus. 14662306a36Sopenharmony_ci The use of this property for mc-bus is deprecated. Please 14762306a36Sopenharmony_ci use msi-map. 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ciExample: 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci smmu: iommu@5000000 { 15262306a36Sopenharmony_ci compatible = "arm,mmu-500"; 15362306a36Sopenharmony_ci #iommu-cells = <1>; 15462306a36Sopenharmony_ci stream-match-mask = <0x7C00>; 15562306a36Sopenharmony_ci ... 15662306a36Sopenharmony_ci }; 15762306a36Sopenharmony_ci 15862306a36Sopenharmony_ci gic: interrupt-controller@6000000 { 15962306a36Sopenharmony_ci compatible = "arm,gic-v3"; 16062306a36Sopenharmony_ci ... 16162306a36Sopenharmony_ci } 16262306a36Sopenharmony_ci its: gic-its@6020000 { 16362306a36Sopenharmony_ci compatible = "arm,gic-v3-its"; 16462306a36Sopenharmony_ci msi-controller; 16562306a36Sopenharmony_ci ... 16662306a36Sopenharmony_ci }; 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ci fsl_mc: fsl-mc@80c000000 { 16962306a36Sopenharmony_ci compatible = "fsl,qoriq-mc"; 17062306a36Sopenharmony_ci reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */ 17162306a36Sopenharmony_ci <0x00000000 0x08340000 0 0x40000>; /* MC control reg */ 17262306a36Sopenharmony_ci /* define map for ICIDs 23-64 */ 17362306a36Sopenharmony_ci iommu-map = <23 &smmu 23 41>; 17462306a36Sopenharmony_ci /* define msi map for ICIDs 23-64 */ 17562306a36Sopenharmony_ci msi-map = <23 &its 23 41>; 17662306a36Sopenharmony_ci #address-cells = <3>; 17762306a36Sopenharmony_ci #size-cells = <1>; 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci /* 18062306a36Sopenharmony_ci * Region type 0x0 - MC portals 18162306a36Sopenharmony_ci * Region type 0x1 - QBMAN portals 18262306a36Sopenharmony_ci */ 18362306a36Sopenharmony_ci ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000 18462306a36Sopenharmony_ci 0x1 0x0 0x0 0x8 0x18000000 0x8000000>; 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ci dpmacs { 18762306a36Sopenharmony_ci #address-cells = <1>; 18862306a36Sopenharmony_ci #size-cells = <0>; 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ci dpmac@1 { 19162306a36Sopenharmony_ci compatible = "fsl,qoriq-mc-dpmac"; 19262306a36Sopenharmony_ci reg = <1>; 19362306a36Sopenharmony_ci phy-handle = <&mdio0_phy0>; 19462306a36Sopenharmony_ci } 19562306a36Sopenharmony_ci } 19662306a36Sopenharmony_ci }; 197