forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
....@@ -9,6 +9,35 @@
99 such as network interfaces, crypto accelerator instances, L2 switches,
1010 etc.
1111
12
+For an overview of the DPAA2 architecture and fsl-mc bus see:
13
+Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst
14
+
15
+As described in the above overview, all DPAA2 objects in a DPRC share the
16
+same hardware "isolation context" and a 10-bit value called an ICID
17
+(isolation context id) is expressed by the hardware to identify
18
+the requester.
19
+
20
+The generic 'iommus' property is insufficient to describe the relationship
21
+between ICIDs and IOMMUs, so an iommu-map property is used to define
22
+the set of possible ICIDs under a root DPRC and how they map to
23
+an IOMMU.
24
+
25
+For generic IOMMU bindings, see
26
+Documentation/devicetree/bindings/iommu/iommu.txt.
27
+
28
+For arm-smmu binding, see:
29
+Documentation/devicetree/bindings/iommu/arm,smmu.yaml.
30
+
31
+The MSI writes are accompanied by sideband data which is derived from the ICID.
32
+The msi-map property is used to associate the devices with both the ITS
33
+controller and the sideband data which accompanies the writes.
34
+
35
+For generic MSI bindings, see
36
+Documentation/devicetree/bindings/interrupt-controller/msi.txt.
37
+
38
+For GICv3 and GIC ITS bindings, see:
39
+Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml.
40
+
1241 Required properties:
1342
1443 - compatible
....@@ -29,11 +58,6 @@
2958 -the second region is the MC control registers. This
3059 region may not be present in some scenarios, such
3160 as in the device tree presented to a virtual machine.
32
-
33
- - msi-parent
34
- Value type: <phandle>
35
- Definition: Must be present and point to the MSI controller node
36
- handling message interrupts for the MC.
3761
3862 - ranges
3963 Value type: <prop-encoded-array>
....@@ -88,14 +112,67 @@
88112 Value type: <phandle>
89113 Definition: Specifies the phandle to the PHY device node associated
90114 with the this dpmac.
115
+Optional properties:
116
+
117
+- iommu-map: Maps an ICID to an IOMMU and associated iommu-specifier
118
+ data.
119
+
120
+ The property is an arbitrary number of tuples of
121
+ (icid-base,iommu,iommu-base,length).
122
+
123
+ Any ICID i in the interval [icid-base, icid-base + length) is
124
+ associated with the listed IOMMU, with the iommu-specifier
125
+ (i - icid-base + iommu-base).
126
+
127
+- msi-map: Maps an ICID to a GIC ITS and associated msi-specifier
128
+ data.
129
+
130
+ The property is an arbitrary number of tuples of
131
+ (icid-base,gic-its,msi-base,length).
132
+
133
+ Any ICID in the interval [icid-base, icid-base + length) is
134
+ associated with the listed GIC ITS, with the msi-specifier
135
+ (i - icid-base + msi-base).
136
+
137
+Deprecated properties:
138
+
139
+ - msi-parent
140
+ Value type: <phandle>
141
+ Definition: Describes the MSI controller node handling message
142
+ interrupts for the MC. When there is no translation
143
+ between the ICID and deviceID this property can be used
144
+ to describe the MSI controller used by the devices on the
145
+ mc-bus.
146
+ The use of this property for mc-bus is deprecated. Please
147
+ use msi-map.
91148
92149 Example:
150
+
151
+ smmu: iommu@5000000 {
152
+ compatible = "arm,mmu-500";
153
+ #iommu-cells = <1>;
154
+ stream-match-mask = <0x7C00>;
155
+ ...
156
+ };
157
+
158
+ gic: interrupt-controller@6000000 {
159
+ compatible = "arm,gic-v3";
160
+ ...
161
+ }
162
+ its: gic-its@6020000 {
163
+ compatible = "arm,gic-v3-its";
164
+ msi-controller;
165
+ ...
166
+ };
93167
94168 fsl_mc: fsl-mc@80c000000 {
95169 compatible = "fsl,qoriq-mc";
96170 reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
97171 <0x00000000 0x08340000 0 0x40000>; /* MC control reg */
98
- msi-parent = <&its>;
172
+ /* define map for ICIDs 23-64 */
173
+ iommu-map = <23 &smmu 23 41>;
174
+ /* define msi map for ICIDs 23-64 */
175
+ msi-map = <23 &its 23 41>;
99176 #address-cells = <3>;
100177 #size-cells = <1>;
101178