* [PATCH 3/9] Docs: dt: document qcom iommu bindings
[not found] ` <20170301174258.14618-1-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-03-01 17:42 ` Rob Clark
[not found] ` <20170301174258.14618-4-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Rob Clark @ 2017-03-01 17:42 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Will Deacon,
Stanimir Varbanov
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
.../devicetree/bindings/iommu/qcom,iommu.txt | 106 +++++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt
diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
new file mode 100644
index 0000000..2e69b78
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
@@ -0,0 +1,106 @@
+* QCOM IOMMU v1 Implementation
+
+Qualcomm "B" family devices which are not compatible with arm-smmu have
+a similar looking IOMMU but without access to the global register space,
+and optionally requiring additional configuration to route context irqs
+to non-secure vs secure interrupt line.
+
+** Required properties:
+
+- compatible : Should be "qcom,msm-iommu-v1".
+- clocks : The interface clock (iface_clk) and bus clock (bus_clk).
+- #address-cells : must be 1.
+- #size-cells : must be 1.
+- #iommu-cells : Must be 1.
+- ranges : Base address and size of the iommu context banks.
+- qcom,iommu-secure-id : secure-id.
+
+- List of sub-nodes, one per translation context bank. Each sub-node
+ has the following required properties:
+
+ - compatible : Should be one of:
+ - "qcom,msm-iommu-v1-ns" : non-secure context bank
+ - "qcom,msm-iommu-v1-sec" : secure context bank
+ - reg : Base address and size of context bank within the iommu
+ - interrupts : The context fault irq.
+
+** Optional properties:
+
+- reg : Base address and size of the SMMU local base, should
+ be only specified if the iommu requires configuration
+ for routing of context bank irq's to secure vs non-
+ secure lines. (Ie. if the iommu contains secure
+ context banks)
+
+
+** Examples:
+
+ apps_iommu: msm-iommu-v1@1e20000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #iommu-cells = <1>;
+ compatible = "qcom,msm-iommu-v1";
+ ranges = <0 0x1e20000 0x40000>;
+ reg = <0x1ef0000 0x3000>;
+ clocks = <&gcc GCC_SMMU_CFG_CLK>,
+ <&gcc GCC_APSS_TCU_CLK>;
+ clock-names = "iface_clk", "bus_clk";
+ qcom,iommu-secure-id = <17>;
+
+ // mdp_0:
+ msm-iommu-v1-ctx@4000 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x4000 0x1000>;
+ interrupts = <GIC_SPI 70 0>;
+ };
+
+ // venus_ns:
+ msm-iommu-v1-ctx@5000 {
+ compatible = "qcom,msm-iommu-v1-sec";
+ reg = <0x5000 0x1000>;
+ interrupts = <GIC_SPI 70 0>;
+ };
+ };
+
+ gpu_iommu: msm-iommu-v1@1f08000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #iommu-cells = <1>;
+ compatible = "qcom,msm-iommu-v1";
+ ranges = <0 0x1f08000 0x10000>;
+ clocks = <&gcc GCC_SMMU_CFG_CLK>,
+ <&gcc GCC_GFX_TCU_CLK>;
+ clock-names = "iface_clk", "bus_clk";
+ qcom,iommu-secure-id = <18>;
+
+ // gfx3d_user:
+ msm-iommu-v1-ctx@1f09000 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x1000 0x1000>;
+ interrupts = <GIC_SPI 241 0>;
+ };
+
+ // gfx3d_priv:
+ msm-iommu-v1-ctx@1f0a000 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x2000 0x1000>;
+ interrupts = <GIC_SPI 242 0>;
+ };
+ };
+
+ ...
+
+ venus: video-codec@1d00000 {
+ ...
+ iommus = <&apps_iommu 5>;
+ };
+
+ mdp: mdp@1a01000 {
+ ...
+ iommus = <&apps_iommu 4>;
+ };
+
+ gpu@01c00000 {
+ ...
+ iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+ };
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/9] Docs: dt: document qcom iommu bindings
[not found] ` <20170301174258.14618-4-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-03-03 6:21 ` Rob Herring
2017-03-03 16:04 ` Rob Clark
0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2017-03-03 6:21 UTC (permalink / raw)
To: Rob Clark
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Will Deacon,
Stanimir Varbanov,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Wed, Mar 01, 2017 at 12:42:52PM -0500, Rob Clark wrote:
Nit: use "dt-bindings: iommu: ..." for subject. And a commit message
would be nice.
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> .../devicetree/bindings/iommu/qcom,iommu.txt | 106 +++++++++++++++++++++
> 1 file changed, 106 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>
> diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
> new file mode 100644
> index 0000000..2e69b78
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
> @@ -0,0 +1,106 @@
> +* QCOM IOMMU v1 Implementation
> +
> +Qualcomm "B" family devices which are not compatible with arm-smmu have
> +a similar looking IOMMU but without access to the global register space,
> +and optionally requiring additional configuration to route context irqs
> +to non-secure vs secure interrupt line.
> +
> +** Required properties:
> +
> +- compatible : Should be "qcom,msm-iommu-v1".
Fine as a fallback, but this needs chip specific compatibles.
> +- clocks : The interface clock (iface_clk) and bus clock (bus_clk).
The names need to be documented under clock-names prop.
'_clk' is redundant.
> +- #address-cells : must be 1.
> +- #size-cells : must be 1.
> +- #iommu-cells : Must be 1.
> +- ranges : Base address and size of the iommu context banks.
> +- qcom,iommu-secure-id : secure-id.
> +
> +- List of sub-nodes, one per translation context bank. Each sub-node
> + has the following required properties:
> +
> + - compatible : Should be one of:
> + - "qcom,msm-iommu-v1-ns" : non-secure context bank
> + - "qcom,msm-iommu-v1-sec" : secure context bank
These are okay without chip specific strings.
> + - reg : Base address and size of context bank within the iommu
> + - interrupts : The context fault irq.
> +
> +** Optional properties:
> +
> +- reg : Base address and size of the SMMU local base, should
> + be only specified if the iommu requires configuration
> + for routing of context bank irq's to secure vs non-
> + secure lines. (Ie. if the iommu contains secure
> + context banks)
> +
> +
> +** Examples:
> +
> + apps_iommu: msm-iommu-v1@1e20000 {
iommu@...
And this should be the reg address, not the ranges address.
> + #address-cells = <1>;
> + #size-cells = <1>;
> + #iommu-cells = <1>;
> + compatible = "qcom,msm-iommu-v1";
> + ranges = <0 0x1e20000 0x40000>;
> + reg = <0x1ef0000 0x3000>;
> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
> + <&gcc GCC_APSS_TCU_CLK>;
> + clock-names = "iface_clk", "bus_clk";
> + qcom,iommu-secure-id = <17>;
> +
> + // mdp_0:
> + msm-iommu-v1-ctx@4000 {
iommu@...
> + compatible = "qcom,msm-iommu-v1-ns";
> + reg = <0x4000 0x1000>;
> + interrupts = <GIC_SPI 70 0>;
> + };
> +
> + // venus_ns:
> + msm-iommu-v1-ctx@5000 {
> + compatible = "qcom,msm-iommu-v1-sec";
> + reg = <0x5000 0x1000>;
> + interrupts = <GIC_SPI 70 0>;
> + };
> + };
> +
> + gpu_iommu: msm-iommu-v1@1f08000 {
ditto.
> + #address-cells = <1>;
> + #size-cells = <1>;
> + #iommu-cells = <1>;
> + compatible = "qcom,msm-iommu-v1";
> + ranges = <0 0x1f08000 0x10000>;
> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
> + <&gcc GCC_GFX_TCU_CLK>;
> + clock-names = "iface_clk", "bus_clk";
> + qcom,iommu-secure-id = <18>;
> +
> + // gfx3d_user:
> + msm-iommu-v1-ctx@1f09000 {
> + compatible = "qcom,msm-iommu-v1-ns";
> + reg = <0x1000 0x1000>;
> + interrupts = <GIC_SPI 241 0>;
> + };
> +
> + // gfx3d_priv:
> + msm-iommu-v1-ctx@1f0a000 {
> + compatible = "qcom,msm-iommu-v1-ns";
> + reg = <0x2000 0x1000>;
> + interrupts = <GIC_SPI 242 0>;
> + };
> + };
> +
> + ...
> +
> + venus: video-codec@1d00000 {
> + ...
> + iommus = <&apps_iommu 5>;
> + };
> +
> + mdp: mdp@1a01000 {
> + ...
> + iommus = <&apps_iommu 4>;
> + };
> +
> + gpu@01c00000 {
> + ...
> + iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
> + };
> --
> 2.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/9] Docs: dt: document qcom iommu bindings
2017-03-03 6:21 ` Rob Herring
@ 2017-03-03 16:04 ` Rob Clark
0 siblings, 0 replies; 7+ messages in thread
From: Rob Clark @ 2017-03-03 16:04 UTC (permalink / raw)
To: Rob Herring
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-msm, Will Deacon, Stanimir Varbanov,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
On Fri, Mar 3, 2017 at 1:21 AM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Wed, Mar 01, 2017 at 12:42:52PM -0500, Rob Clark wrote:
>
> Nit: use "dt-bindings: iommu: ..." for subject. And a commit message
> would be nice.
>
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Signed-off-by: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>> .../devicetree/bindings/iommu/qcom,iommu.txt | 106 +++++++++++++++++++++
>> 1 file changed, 106 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>>
>> diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>> new file mode 100644
>> index 0000000..2e69b78
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>> @@ -0,0 +1,106 @@
>> +* QCOM IOMMU v1 Implementation
>> +
>> +Qualcomm "B" family devices which are not compatible with arm-smmu have
>> +a similar looking IOMMU but without access to the global register space,
>> +and optionally requiring additional configuration to route context irqs
>> +to non-secure vs secure interrupt line.
>> +
>> +** Required properties:
>> +
>> +- compatible : Should be "qcom,msm-iommu-v1".
>
> Fine as a fallback, but this needs chip specific compatibles.
ok, so maybe:
compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
>> +- clocks : The interface clock (iface_clk) and bus clock (bus_clk).
>
> The names need to be documented under clock-names prop.
>
> '_clk' is redundant.
ok
>> +- #address-cells : must be 1.
>> +- #size-cells : must be 1.
>> +- #iommu-cells : Must be 1.
>> +- ranges : Base address and size of the iommu context banks.
>> +- qcom,iommu-secure-id : secure-id.
>> +
>> +- List of sub-nodes, one per translation context bank. Each sub-node
>> + has the following required properties:
>> +
>> + - compatible : Should be one of:
>> + - "qcom,msm-iommu-v1-ns" : non-secure context bank
>> + - "qcom,msm-iommu-v1-sec" : secure context bank
>
> These are okay without chip specific strings.
>
>> + - reg : Base address and size of context bank within the iommu
>> + - interrupts : The context fault irq.
>> +
>> +** Optional properties:
>> +
>> +- reg : Base address and size of the SMMU local base, should
>> + be only specified if the iommu requires configuration
>> + for routing of context bank irq's to secure vs non-
>> + secure lines. (Ie. if the iommu contains secure
>> + context banks)
>> +
>> +
>> +** Examples:
>> +
>> + apps_iommu: msm-iommu-v1@1e20000 {
>
> iommu@...
>
> And this should be the reg address, not the ranges address.
ok.. but I'm not entirely sure what to do w/ gpu_iommu, which doesn't
have a reg address.
I guess I could have a required reg address (which is the unaccessible
global register space), and make the "SMMU local base" thing a 2nd
optional address. Not sure if that is weird, since we can't actually
do anything with the global register space.
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + #iommu-cells = <1>;
>> + compatible = "qcom,msm-iommu-v1";
>> + ranges = <0 0x1e20000 0x40000>;
>> + reg = <0x1ef0000 0x3000>;
>> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
>> + <&gcc GCC_APSS_TCU_CLK>;
>> + clock-names = "iface_clk", "bus_clk";
>> + qcom,iommu-secure-id = <17>;
>> +
>> + // mdp_0:
>> + msm-iommu-v1-ctx@4000 {
>
> iommu@...
it's not weird to have:
iommu@1e20000 {
...
iommu@4000 {
...
};
};
??
BR,
-R
>> + compatible = "qcom,msm-iommu-v1-ns";
>> + reg = <0x4000 0x1000>;
>> + interrupts = <GIC_SPI 70 0>;
>> + };
>> +
>> + // venus_ns:
>> + msm-iommu-v1-ctx@5000 {
>> + compatible = "qcom,msm-iommu-v1-sec";
>> + reg = <0x5000 0x1000>;
>> + interrupts = <GIC_SPI 70 0>;
>> + };
>> + };
>> +
>> + gpu_iommu: msm-iommu-v1@1f08000 {
>
> ditto.
>
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + #iommu-cells = <1>;
>> + compatible = "qcom,msm-iommu-v1";
>> + ranges = <0 0x1f08000 0x10000>;
>> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
>> + <&gcc GCC_GFX_TCU_CLK>;
>> + clock-names = "iface_clk", "bus_clk";
>> + qcom,iommu-secure-id = <18>;
>> +
>> + // gfx3d_user:
>> + msm-iommu-v1-ctx@1f09000 {
>> + compatible = "qcom,msm-iommu-v1-ns";
>> + reg = <0x1000 0x1000>;
>> + interrupts = <GIC_SPI 241 0>;
>> + };
>> +
>> + // gfx3d_priv:
>> + msm-iommu-v1-ctx@1f0a000 {
>> + compatible = "qcom,msm-iommu-v1-ns";
>> + reg = <0x2000 0x1000>;
>> + interrupts = <GIC_SPI 242 0>;
>> + };
>> + };
>> +
>> + ...
>> +
>> + venus: video-codec@1d00000 {
>> + ...
>> + iommus = <&apps_iommu 5>;
>> + };
>> +
>> + mdp: mdp@1a01000 {
>> + ...
>> + iommus = <&apps_iommu 4>;
>> + };
>> +
>> + gpu@01c00000 {
>> + ...
>> + iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
>> + };
>> --
>> 2.9.3
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/9] Docs: dt: document qcom iommu bindings
[not found] ` <20170314151811.17234-1-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-03-14 15:18 ` Rob Clark
[not found] ` <20170314151811.17234-4-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Rob Clark @ 2017-03-14 15:18 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Will Deacon,
Stanimir Varbanov
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
.../devicetree/bindings/iommu/qcom,iommu.txt | 113 +++++++++++++++++++++
1 file changed, 113 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt
diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
new file mode 100644
index 0000000..fd5b7fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
@@ -0,0 +1,113 @@
+* QCOM IOMMU v1 Implementation
+
+Qualcomm "B" family devices which are not compatible with arm-smmu have
+a similar looking IOMMU but without access to the global register space,
+and optionally requiring additional configuration to route context irqs
+to non-secure vs secure interrupt line.
+
+** Required properties:
+
+- compatible : Should be one of:
+
+ "qcom,msm8916-iommu"
+
+- clock-names : Should be a pair of "iface" (required for IOMMUs
+ register group access) and "bus" (required for
+ the IOMMUs underlying bus access).
+- clocks : Phandles for respective clocks described by
+ clock-names.
+- #address-cells : must be 1.
+- #size-cells : must be 1.
+- #iommu-cells : Must be 1.
+- ranges : Base address and size of the iommu context banks.
+- qcom,iommu-secure-id : secure-id.
+
+- List of sub-nodes, one per translation context bank. Each sub-node
+ has the following required properties:
+
+ - compatible : Should be one of:
+ - "qcom,msm-iommu-v1-ns" : non-secure context bank
+ - "qcom,msm-iommu-v1-sec" : secure context bank
+ - reg : Base address and size of context bank within the iommu
+ - interrupts : The context fault irq.
+
+** Optional properties:
+
+- reg : Base address and size of the SMMU local base, should
+ be only specified if the iommu requires configuration
+ for routing of context bank irq's to secure vs non-
+ secure lines. (Ie. if the iommu contains secure
+ context banks)
+
+
+** Examples:
+
+ apps_iommu: iommu@1e20000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #iommu-cells = <1>;
+ compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
+ ranges = <0 0x1e20000 0x40000>;
+ reg = <0x1ef0000 0x3000>;
+ clocks = <&gcc GCC_SMMU_CFG_CLK>,
+ <&gcc GCC_APSS_TCU_CLK>;
+ clock-names = "iface", "bus";
+ qcom,iommu-secure-id = <17>;
+
+ // mdp_0:
+ iommu-ctx@4000 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x4000 0x1000>;
+ interrupts = <GIC_SPI 70 0>;
+ };
+
+ // venus_ns:
+ iommu-ctx@5000 {
+ compatible = "qcom,msm-iommu-v1-sec";
+ reg = <0x5000 0x1000>;
+ interrupts = <GIC_SPI 70 0>;
+ };
+ };
+
+ gpu_iommu: iommu@1f08000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #iommu-cells = <1>;
+ compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
+ ranges = <0 0x1f08000 0x10000>;
+ clocks = <&gcc GCC_SMMU_CFG_CLK>,
+ <&gcc GCC_GFX_TCU_CLK>;
+ clock-names = "iface", "bus";
+ qcom,iommu-secure-id = <18>;
+
+ // gfx3d_user:
+ iommu-ctx@1f09000 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x1000 0x1000>;
+ interrupts = <GIC_SPI 241 0>;
+ };
+
+ // gfx3d_priv:
+ iommu-ctx@1f0a000 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x2000 0x1000>;
+ interrupts = <GIC_SPI 242 0>;
+ };
+ };
+
+ ...
+
+ venus: video-codec@1d00000 {
+ ...
+ iommus = <&apps_iommu 5>;
+ };
+
+ mdp: mdp@1a01000 {
+ ...
+ iommus = <&apps_iommu 4>;
+ };
+
+ gpu@01c00000 {
+ ...
+ iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+ };
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/9] Docs: dt: document qcom iommu bindings
[not found] ` <20170314151811.17234-4-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-03-23 22:21 ` Rob Herring
2017-03-24 2:45 ` Rob Clark
0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2017-03-23 22:21 UTC (permalink / raw)
To: Rob Clark
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Robin Murphy, Will Deacon,
Sricharan, Mark Rutland, Stanimir Varbanov,
devicetree-u79uwXL29TY76Z2rM5mHXA
On Tue, Mar 14, 2017 at 11:18:05AM -0400, Rob Clark wrote:
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> .../devicetree/bindings/iommu/qcom,iommu.txt | 113 +++++++++++++++++++++
> 1 file changed, 113 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>
> diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
> new file mode 100644
> index 0000000..fd5b7fa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
> @@ -0,0 +1,113 @@
> +* QCOM IOMMU v1 Implementation
> +
> +Qualcomm "B" family devices which are not compatible with arm-smmu have
> +a similar looking IOMMU but without access to the global register space,
> +and optionally requiring additional configuration to route context irqs
> +to non-secure vs secure interrupt line.
> +
> +** Required properties:
> +
> +- compatible : Should be one of:
> +
> + "qcom,msm8916-iommu"
> +
> +- clock-names : Should be a pair of "iface" (required for IOMMUs
> + register group access) and "bus" (required for
> + the IOMMUs underlying bus access).
> +- clocks : Phandles for respective clocks described by
> + clock-names.
> +- #address-cells : must be 1.
> +- #size-cells : must be 1.
> +- #iommu-cells : Must be 1.
> +- ranges : Base address and size of the iommu context banks.
> +- qcom,iommu-secure-id : secure-id.
> +
> +- List of sub-nodes, one per translation context bank. Each sub-node
> + has the following required properties:
> +
> + - compatible : Should be one of:
> + - "qcom,msm-iommu-v1-ns" : non-secure context bank
> + - "qcom,msm-iommu-v1-sec" : secure context bank
> + - reg : Base address and size of context bank within the iommu
> + - interrupts : The context fault irq.
> +
> +** Optional properties:
> +
> +- reg : Base address and size of the SMMU local base, should
> + be only specified if the iommu requires configuration
> + for routing of context bank irq's to secure vs non-
> + secure lines. (Ie. if the iommu contains secure
> + context banks)
> +
> +
> +** Examples:
> +
> + apps_iommu: iommu@1e20000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + #iommu-cells = <1>;
> + compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
You didn't document the fallback above. Maybe just drop it if only a few
chips have this iommu.
> + ranges = <0 0x1e20000 0x40000>;
> + reg = <0x1ef0000 0x3000>;
When you have both reg and ranges, use reg value for the unit-address.
> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
> + <&gcc GCC_APSS_TCU_CLK>;
> + clock-names = "iface", "bus";
> + qcom,iommu-secure-id = <17>;
> +
> + // mdp_0:
> + iommu-ctx@4000 {
> + compatible = "qcom,msm-iommu-v1-ns";
> + reg = <0x4000 0x1000>;
> + interrupts = <GIC_SPI 70 0>;
> + };
> +
> + // venus_ns:
> + iommu-ctx@5000 {
> + compatible = "qcom,msm-iommu-v1-sec";
> + reg = <0x5000 0x1000>;
> + interrupts = <GIC_SPI 70 0>;
> + };
> + };
> +
> + gpu_iommu: iommu@1f08000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + #iommu-cells = <1>;
> + compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
> + ranges = <0 0x1f08000 0x10000>;
> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
> + <&gcc GCC_GFX_TCU_CLK>;
> + clock-names = "iface", "bus";
> + qcom,iommu-secure-id = <18>;
> +
> + // gfx3d_user:
> + iommu-ctx@1f09000 {
iommu-ctx@1000
> + compatible = "qcom,msm-iommu-v1-ns";
> + reg = <0x1000 0x1000>;
> + interrupts = <GIC_SPI 241 0>;
> + };
> +
> + // gfx3d_priv:
> + iommu-ctx@1f0a000 {
iommu-ctx@2000
> + compatible = "qcom,msm-iommu-v1-ns";
> + reg = <0x2000 0x1000>;
> + interrupts = <GIC_SPI 242 0>;
> + };
> + };
> +
> + ...
> +
> + venus: video-codec@1d00000 {
> + ...
> + iommus = <&apps_iommu 5>;
> + };
> +
> + mdp: mdp@1a01000 {
> + ...
> + iommus = <&apps_iommu 4>;
> + };
> +
> + gpu@01c00000 {
> + ...
> + iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
> + };
> --
> 2.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/9] Docs: dt: document qcom iommu bindings
2017-03-23 22:21 ` Rob Herring
@ 2017-03-24 2:45 ` Rob Clark
2017-03-27 19:10 ` Rob Herring
0 siblings, 1 reply; 7+ messages in thread
From: Rob Clark @ 2017-03-24 2:45 UTC (permalink / raw)
To: Rob Herring
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-msm, Will Deacon, Stanimir Varbanov,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
On Thu, Mar 23, 2017 at 6:21 PM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Tue, Mar 14, 2017 at 11:18:05AM -0400, Rob Clark wrote:
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Signed-off-by: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>> .../devicetree/bindings/iommu/qcom,iommu.txt | 113 +++++++++++++++++++++
>> 1 file changed, 113 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>>
>> diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>> new file mode 100644
>> index 0000000..fd5b7fa
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>> @@ -0,0 +1,113 @@
>> +* QCOM IOMMU v1 Implementation
>> +
>> +Qualcomm "B" family devices which are not compatible with arm-smmu have
>> +a similar looking IOMMU but without access to the global register space,
>> +and optionally requiring additional configuration to route context irqs
>> +to non-secure vs secure interrupt line.
>> +
>> +** Required properties:
>> +
>> +- compatible : Should be one of:
>> +
>> + "qcom,msm8916-iommu"
>> +
>> +- clock-names : Should be a pair of "iface" (required for IOMMUs
>> + register group access) and "bus" (required for
>> + the IOMMUs underlying bus access).
>> +- clocks : Phandles for respective clocks described by
>> + clock-names.
>> +- #address-cells : must be 1.
>> +- #size-cells : must be 1.
>> +- #iommu-cells : Must be 1.
>> +- ranges : Base address and size of the iommu context banks.
>> +- qcom,iommu-secure-id : secure-id.
>> +
>> +- List of sub-nodes, one per translation context bank. Each sub-node
>> + has the following required properties:
>> +
>> + - compatible : Should be one of:
>> + - "qcom,msm-iommu-v1-ns" : non-secure context bank
>> + - "qcom,msm-iommu-v1-sec" : secure context bank
>> + - reg : Base address and size of context bank within the iommu
>> + - interrupts : The context fault irq.
>> +
>> +** Optional properties:
>> +
>> +- reg : Base address and size of the SMMU local base, should
>> + be only specified if the iommu requires configuration
>> + for routing of context bank irq's to secure vs non-
>> + secure lines. (Ie. if the iommu contains secure
>> + context banks)
>> +
>> +
>> +** Examples:
>> +
>> + apps_iommu: iommu@1e20000 {
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + #iommu-cells = <1>;
>> + compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
>
> You didn't document the fallback above. Maybe just drop it if only a few
> chips have this iommu.
not completely sure I understand what you want..
I think more than a few chips.. I suspect it is more like everything
after the last "a" family devices (snapdragon 600?) and before 820..
(well, more or less at least a few years worth of devices, stuff that
seems likely to be able to run an upstream kernel would be 800, 805,
808, 810.. and I guess there are some cut down 6xx and 4xx variants of
those)
I guess qcom_iommu wouldn't care about all the various 32b devices
(since they aren't going to use 64b page tables).. 808/810, I'm not
100% sure about..
>> + ranges = <0 0x1e20000 0x40000>;
>> + reg = <0x1ef0000 0x3000>;
>
> When you have both reg and ranges, use reg value for the unit-address.
whoops, I thought I fixed that
>> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
>> + <&gcc GCC_APSS_TCU_CLK>;
>> + clock-names = "iface", "bus";
>> + qcom,iommu-secure-id = <17>;
>> +
>> + // mdp_0:
>> + iommu-ctx@4000 {
>> + compatible = "qcom,msm-iommu-v1-ns";
>> + reg = <0x4000 0x1000>;
>> + interrupts = <GIC_SPI 70 0>;
>> + };
>> +
>> + // venus_ns:
>> + iommu-ctx@5000 {
>> + compatible = "qcom,msm-iommu-v1-sec";
>> + reg = <0x5000 0x1000>;
>> + interrupts = <GIC_SPI 70 0>;
>> + };
>> + };
>> +
>> + gpu_iommu: iommu@1f08000 {
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + #iommu-cells = <1>;
>> + compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
>> + ranges = <0 0x1f08000 0x10000>;
>> + clocks = <&gcc GCC_SMMU_CFG_CLK>,
>> + <&gcc GCC_GFX_TCU_CLK>;
>> + clock-names = "iface", "bus";
>> + qcom,iommu-secure-id = <18>;
>> +
>> + // gfx3d_user:
>> + iommu-ctx@1f09000 {
>
> iommu-ctx@1000
will fix, thx
BR,
-R
>> + compatible = "qcom,msm-iommu-v1-ns";
>> + reg = <0x1000 0x1000>;
>> + interrupts = <GIC_SPI 241 0>;
>> + };
>> +
>> + // gfx3d_priv:
>> + iommu-ctx@1f0a000 {
>
> iommu-ctx@2000
>
>> + compatible = "qcom,msm-iommu-v1-ns";
>> + reg = <0x2000 0x1000>;
>> + interrupts = <GIC_SPI 242 0>;
>> + };
>> + };
>> +
>> + ...
>> +
>> + venus: video-codec@1d00000 {
>> + ...
>> + iommus = <&apps_iommu 5>;
>> + };
>> +
>> + mdp: mdp@1a01000 {
>> + ...
>> + iommus = <&apps_iommu 4>;
>> + };
>> +
>> + gpu@01c00000 {
>> + ...
>> + iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
>> + };
>> --
>> 2.9.3
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/9] Docs: dt: document qcom iommu bindings
2017-03-24 2:45 ` Rob Clark
@ 2017-03-27 19:10 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2017-03-27 19:10 UTC (permalink / raw)
To: Rob Clark
Cc: iommu@lists.linux-foundation.org, linux-arm-msm, Robin Murphy,
Will Deacon, Sricharan, Mark Rutland, Stanimir Varbanov,
devicetree@vger.kernel.org
On Thu, Mar 23, 2017 at 9:45 PM, Rob Clark <robdclark@gmail.com> wrote:
> On Thu, Mar 23, 2017 at 6:21 PM, Rob Herring <robh@kernel.org> wrote:
>> On Tue, Mar 14, 2017 at 11:18:05AM -0400, Rob Clark wrote:
>>> Cc: devicetree@vger.kernel.org
>>> Signed-off-by: Rob Clark <robdclark@gmail.com>
>>> ---
>>> .../devicetree/bindings/iommu/qcom,iommu.txt | 113 +++++++++++++++++++++
>>> 1 file changed, 113 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>>> new file mode 100644
>>> index 0000000..fd5b7fa
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt
>>> @@ -0,0 +1,113 @@
>>> +* QCOM IOMMU v1 Implementation
>>> +
>>> +Qualcomm "B" family devices which are not compatible with arm-smmu have
>>> +a similar looking IOMMU but without access to the global register space,
>>> +and optionally requiring additional configuration to route context irqs
>>> +to non-secure vs secure interrupt line.
>>> +
>>> +** Required properties:
>>> +
>>> +- compatible : Should be one of:
>>> +
>>> + "qcom,msm8916-iommu"
>>> +
>>> +- clock-names : Should be a pair of "iface" (required for IOMMUs
>>> + register group access) and "bus" (required for
>>> + the IOMMUs underlying bus access).
>>> +- clocks : Phandles for respective clocks described by
>>> + clock-names.
>>> +- #address-cells : must be 1.
>>> +- #size-cells : must be 1.
>>> +- #iommu-cells : Must be 1.
>>> +- ranges : Base address and size of the iommu context banks.
>>> +- qcom,iommu-secure-id : secure-id.
>>> +
>>> +- List of sub-nodes, one per translation context bank. Each sub-node
>>> + has the following required properties:
>>> +
>>> + - compatible : Should be one of:
>>> + - "qcom,msm-iommu-v1-ns" : non-secure context bank
>>> + - "qcom,msm-iommu-v1-sec" : secure context bank
>>> + - reg : Base address and size of context bank within the iommu
>>> + - interrupts : The context fault irq.
>>> +
>>> +** Optional properties:
>>> +
>>> +- reg : Base address and size of the SMMU local base, should
>>> + be only specified if the iommu requires configuration
>>> + for routing of context bank irq's to secure vs non-
>>> + secure lines. (Ie. if the iommu contains secure
>>> + context banks)
>>> +
>>> +
>>> +** Examples:
>>> +
>>> + apps_iommu: iommu@1e20000 {
>>> + #address-cells = <1>;
>>> + #size-cells = <1>;
>>> + #iommu-cells = <1>;
>>> + compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
>>
>> You didn't document the fallback above. Maybe just drop it if only a few
>> chips have this iommu.
>
> not completely sure I understand what you want..
>
> I think more than a few chips.. I suspect it is more like everything
> after the last "a" family devices (snapdragon 600?) and before 820..
> (well, more or less at least a few years worth of devices, stuff that
> seems likely to be able to run an upstream kernel would be 800, 805,
> 808, 810.. and I guess there are some cut down 6xx and 4xx variants of
> those)
Okay, then you just need to list qcom,msm-iommu-v1 above. Something
like 'followed by "qcom,msm-iommu-v1"' at the end of the list of
compatibles.
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-03-27 19:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170314151811.17234-1-robdclark@gmail.com>
[not found] ` <20170314151811.17234-1-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-14 15:18 ` [PATCH 3/9] Docs: dt: document qcom iommu bindings Rob Clark
[not found] ` <20170314151811.17234-4-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-23 22:21 ` Rob Herring
2017-03-24 2:45 ` Rob Clark
2017-03-27 19:10 ` Rob Herring
[not found] <20170301174258.14618-1-robdclark@gmail.com>
[not found] ` <20170301174258.14618-1-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-01 17:42 ` Rob Clark
[not found] ` <20170301174258.14618-4-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-03 6:21 ` Rob Herring
2017-03-03 16:04 ` Rob Clark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).