1a5565a21SBhupesh Sharma* Freescale Management Complex 2a5565a21SBhupesh Sharma 3a5565a21SBhupesh SharmaThe Freescale Management Complex (fsl-mc) is a hardware resource 4a5565a21SBhupesh Sharmamanager that manages specialized hardware objects used in 5a5565a21SBhupesh Sharmanetwork-oriented packet processing applications. After the fsl-mc 6a5565a21SBhupesh Sharmablock is enabled, pools of hardware resources are available, such as 7a5565a21SBhupesh Sharmaqueues, buffer pools, I/O interfaces. These resources are building 8a5565a21SBhupesh Sharmablocks that can be used to create functional hardware objects/devices 9a5565a21SBhupesh Sharmasuch as network interfaces, crypto accelerator instances, L2 switches, 10a5565a21SBhupesh Sharmaetc. 11a5565a21SBhupesh Sharma 12c9d8d661SNipun GuptaFor an overview of the DPAA2 architecture and fsl-mc bus see: 13132db935SJakub KicinskiDocumentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst 14c9d8d661SNipun Gupta 15c9d8d661SNipun GuptaAs described in the above overview, all DPAA2 objects in a DPRC share the 16c9d8d661SNipun Guptasame hardware "isolation context" and a 10-bit value called an ICID 17c9d8d661SNipun Gupta(isolation context id) is expressed by the hardware to identify 18c9d8d661SNipun Guptathe requester. 19c9d8d661SNipun Gupta 20c9d8d661SNipun GuptaThe generic 'iommus' property is insufficient to describe the relationship 21c9d8d661SNipun Guptabetween ICIDs and IOMMUs, so an iommu-map property is used to define 22c9d8d661SNipun Guptathe set of possible ICIDs under a root DPRC and how they map to 23c9d8d661SNipun Guptaan IOMMU. 24c9d8d661SNipun Gupta 25c9d8d661SNipun GuptaFor generic IOMMU bindings, see 26c9d8d661SNipun GuptaDocumentation/devicetree/bindings/iommu/iommu.txt. 27c9d8d661SNipun Gupta 28c9d8d661SNipun GuptaFor arm-smmu binding, see: 2954b3719dSMauro Carvalho ChehabDocumentation/devicetree/bindings/iommu/arm,smmu.yaml. 30c9d8d661SNipun Gupta 31*5bda70c6SLaurentiu TudorThe MSI writes are accompanied by sideband data which is derived from the ICID. 32*5bda70c6SLaurentiu TudorThe msi-map property is used to associate the devices with both the ITS 33*5bda70c6SLaurentiu Tudorcontroller and the sideband data which accompanies the writes. 34*5bda70c6SLaurentiu Tudor 35*5bda70c6SLaurentiu TudorFor generic MSI bindings, see 36*5bda70c6SLaurentiu TudorDocumentation/devicetree/bindings/interrupt-controller/msi.txt. 37*5bda70c6SLaurentiu Tudor 38*5bda70c6SLaurentiu TudorFor GICv3 and GIC ITS bindings, see: 39*5bda70c6SLaurentiu TudorDocumentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml. 40*5bda70c6SLaurentiu Tudor 41a5565a21SBhupesh SharmaRequired properties: 42a5565a21SBhupesh Sharma 43a5565a21SBhupesh Sharma - compatible 44a5565a21SBhupesh Sharma Value type: <string> 45a5565a21SBhupesh Sharma Definition: Must be "fsl,qoriq-mc". A Freescale Management Complex 46a5565a21SBhupesh Sharma compatible with this binding must have Block Revision 47a5565a21SBhupesh Sharma Registers BRR1 and BRR2 at offset 0x0BF8 and 0x0BFC in 48a5565a21SBhupesh Sharma the MC control register region. 49a5565a21SBhupesh Sharma 50a5565a21SBhupesh Sharma - reg 51a5565a21SBhupesh Sharma Value type: <prop-encoded-array> 52a5565a21SBhupesh Sharma Definition: A standard property. Specifies one or two regions 53a5565a21SBhupesh Sharma defining the MC's registers: 54a5565a21SBhupesh Sharma 55a5565a21SBhupesh Sharma -the first region is the command portal for the 56a5565a21SBhupesh Sharma this machine and must always be present 57a5565a21SBhupesh Sharma 58a5565a21SBhupesh Sharma -the second region is the MC control registers. This 59a5565a21SBhupesh Sharma region may not be present in some scenarios, such 60a5565a21SBhupesh Sharma as in the device tree presented to a virtual machine. 61a5565a21SBhupesh Sharma 6285222403SStuart Yoder - ranges 6385222403SStuart Yoder Value type: <prop-encoded-array> 6485222403SStuart Yoder Definition: A standard property. Defines the mapping between the child 6585222403SStuart Yoder MC address space and the parent system address space. 6685222403SStuart Yoder 6785222403SStuart Yoder The MC address space is defined by 3 components: 6885222403SStuart Yoder <region type> <offset hi> <offset lo> 6985222403SStuart Yoder 7085222403SStuart Yoder Valid values for region type are 7185222403SStuart Yoder 0x0 - MC portals 7285222403SStuart Yoder 0x1 - QBMAN portals 7385222403SStuart Yoder 7485222403SStuart Yoder - #address-cells 7585222403SStuart Yoder Value type: <u32> 7685222403SStuart Yoder Definition: Must be 3. (see definition in 'ranges' property) 7785222403SStuart Yoder 7885222403SStuart Yoder - #size-cells 7985222403SStuart Yoder Value type: <u32> 8085222403SStuart Yoder Definition: Must be 1. 8185222403SStuart Yoder 8285222403SStuart YoderSub-nodes: 8385222403SStuart Yoder 8485222403SStuart Yoder The fsl-mc node may optionally have dpmac sub-nodes that describe 8585222403SStuart Yoder the relationship between the Ethernet MACs which belong to the MC 8685222403SStuart Yoder and the Ethernet PHYs on the system board. 8785222403SStuart Yoder 8885222403SStuart Yoder The dpmac nodes must be under a node named "dpmacs" which contains 8985222403SStuart Yoder the following properties: 9085222403SStuart Yoder 9185222403SStuart Yoder - #address-cells 9285222403SStuart Yoder Value type: <u32> 9385222403SStuart Yoder Definition: Must be present if dpmac sub-nodes are defined and must 9485222403SStuart Yoder have a value of 1. 9585222403SStuart Yoder 9685222403SStuart Yoder - #size-cells 9785222403SStuart Yoder Value type: <u32> 9885222403SStuart Yoder Definition: Must be present if dpmac sub-nodes are defined and must 9985222403SStuart Yoder have a value of 0. 10085222403SStuart Yoder 10185222403SStuart Yoder These nodes must have the following properties: 10285222403SStuart Yoder 10385222403SStuart Yoder - compatible 10485222403SStuart Yoder Value type: <string> 10585222403SStuart Yoder Definition: Must be "fsl,qoriq-mc-dpmac". 10685222403SStuart Yoder 10785222403SStuart Yoder - reg 10885222403SStuart Yoder Value type: <prop-encoded-array> 10985222403SStuart Yoder Definition: Specifies the id of the dpmac. 11085222403SStuart Yoder 11185222403SStuart Yoder - phy-handle 11285222403SStuart Yoder Value type: <phandle> 11385222403SStuart Yoder Definition: Specifies the phandle to the PHY device node associated 11485222403SStuart Yoder with the this dpmac. 115c9d8d661SNipun GuptaOptional properties: 116c9d8d661SNipun Gupta 117c9d8d661SNipun Gupta- iommu-map: Maps an ICID to an IOMMU and associated iommu-specifier 118c9d8d661SNipun Gupta data. 119c9d8d661SNipun Gupta 120c9d8d661SNipun Gupta The property is an arbitrary number of tuples of 121c9d8d661SNipun Gupta (icid-base,iommu,iommu-base,length). 122c9d8d661SNipun Gupta 123c9d8d661SNipun Gupta Any ICID i in the interval [icid-base, icid-base + length) is 124c9d8d661SNipun Gupta associated with the listed IOMMU, with the iommu-specifier 125c9d8d661SNipun Gupta (i - icid-base + iommu-base). 12685222403SStuart Yoder 127*5bda70c6SLaurentiu Tudor- msi-map: Maps an ICID to a GIC ITS and associated msi-specifier 128*5bda70c6SLaurentiu Tudor data. 129*5bda70c6SLaurentiu Tudor 130*5bda70c6SLaurentiu Tudor The property is an arbitrary number of tuples of 131*5bda70c6SLaurentiu Tudor (icid-base,gic-its,msi-base,length). 132*5bda70c6SLaurentiu Tudor 133*5bda70c6SLaurentiu Tudor Any ICID in the interval [icid-base, icid-base + length) is 134*5bda70c6SLaurentiu Tudor associated with the listed GIC ITS, with the msi-specifier 135*5bda70c6SLaurentiu Tudor (i - icid-base + msi-base). 136*5bda70c6SLaurentiu Tudor 137*5bda70c6SLaurentiu TudorDeprecated properties: 138*5bda70c6SLaurentiu Tudor 139*5bda70c6SLaurentiu Tudor - msi-parent 140*5bda70c6SLaurentiu Tudor Value type: <phandle> 141*5bda70c6SLaurentiu Tudor Definition: Describes the MSI controller node handling message 142*5bda70c6SLaurentiu Tudor interrupts for the MC. When there is no translation 143*5bda70c6SLaurentiu Tudor between the ICID and deviceID this property can be used 144*5bda70c6SLaurentiu Tudor to describe the MSI controller used by the devices on the 145*5bda70c6SLaurentiu Tudor mc-bus. 146*5bda70c6SLaurentiu Tudor The use of this property for mc-bus is deprecated. Please 147*5bda70c6SLaurentiu Tudor use msi-map. 148*5bda70c6SLaurentiu Tudor 149a5565a21SBhupesh SharmaExample: 150a5565a21SBhupesh Sharma 151c9d8d661SNipun Gupta smmu: iommu@5000000 { 152c9d8d661SNipun Gupta compatible = "arm,mmu-500"; 153c9d8d661SNipun Gupta #iommu-cells = <1>; 154c9d8d661SNipun Gupta stream-match-mask = <0x7C00>; 155c9d8d661SNipun Gupta ... 156c9d8d661SNipun Gupta }; 157c9d8d661SNipun Gupta 158*5bda70c6SLaurentiu Tudor gic: interrupt-controller@6000000 { 159*5bda70c6SLaurentiu Tudor compatible = "arm,gic-v3"; 160*5bda70c6SLaurentiu Tudor ... 161*5bda70c6SLaurentiu Tudor } 162*5bda70c6SLaurentiu Tudor its: gic-its@6020000 { 163*5bda70c6SLaurentiu Tudor compatible = "arm,gic-v3-its"; 164*5bda70c6SLaurentiu Tudor msi-controller; 165*5bda70c6SLaurentiu Tudor ... 166*5bda70c6SLaurentiu Tudor }; 167*5bda70c6SLaurentiu Tudor 168a5565a21SBhupesh Sharma fsl_mc: fsl-mc@80c000000 { 169a5565a21SBhupesh Sharma compatible = "fsl,qoriq-mc"; 170a5565a21SBhupesh Sharma reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */ 171a5565a21SBhupesh Sharma <0x00000000 0x08340000 0 0x40000>; /* MC control reg */ 172c9d8d661SNipun Gupta /* define map for ICIDs 23-64 */ 173c9d8d661SNipun Gupta iommu-map = <23 &smmu 23 41>; 174*5bda70c6SLaurentiu Tudor /* define msi map for ICIDs 23-64 */ 175*5bda70c6SLaurentiu Tudor msi-map = <23 &its 23 41>; 17685222403SStuart Yoder #address-cells = <3>; 17785222403SStuart Yoder #size-cells = <1>; 178a5565a21SBhupesh Sharma 17985222403SStuart Yoder /* 18085222403SStuart Yoder * Region type 0x0 - MC portals 18185222403SStuart Yoder * Region type 0x1 - QBMAN portals 18285222403SStuart Yoder */ 18385222403SStuart Yoder ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000 18485222403SStuart Yoder 0x1 0x0 0x0 0x8 0x18000000 0x8000000>; 18585222403SStuart Yoder 18685222403SStuart Yoder dpmacs { 18785222403SStuart Yoder #address-cells = <1>; 18885222403SStuart Yoder #size-cells = <0>; 18985222403SStuart Yoder 19085222403SStuart Yoder dpmac@1 { 19185222403SStuart Yoder compatible = "fsl,qoriq-mc-dpmac"; 19285222403SStuart Yoder reg = <1>; 19385222403SStuart Yoder phy-handle = <&mdio0_phy0>; 19485222403SStuart Yoder } 19585222403SStuart Yoder } 19685222403SStuart Yoder }; 197