Skip to contentSkip to conversation

dt-bindings: arm-smmu: Add a new compatible string and a clock

PATCH Superseded Sharat Masetty 2 participants 3 messages Apr 28, 2020 – Apr 29, 2020

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: arm-smmu: Add a new compatible string and a clock

This patch adds a new compatible string for sc7180 and also an additional clock listing needed to power the TBUs and the TCU.

---
 Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +7 -0
index 6515dbe..15946ac 100644
@@ -28,6 +28,7 @@ properties:
           - enum:
               - qcom,msm8996-smmu-v2
               - qcom,msm8998-smmu-v2
+              - qcom,sc7180-smmu-v2
               - qcom,sdm845-smmu-v2
           - const: qcom,smmu-v2
 
@@ -113,16 +114,22 @@ properties:
       present in such cases.
 
   clock-names:
+    minItems: 2
+    maxItems: 3
     items:
       - const: bus
       - const: iface
+      - const: mem_iface_clk
 
   clocks:
+    minItems: 2
+    maxItems: 3
     items:
       - description: bus clock required for downstream bus access and for the
           smmu ptw
       - description: interface clock required to access smmu's registers
           through the TCU's programming interface.
+      - description: clock required for the SMMU TBUs and the TCU
 
   power-domains:
     maxItems: 1
Signature · 5 lines
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi,

Quoted 8 lines · Sharat Masetty

This patch adds a new compatible string for sc7180 and also an additional clock listing needed to power the TBUs and the TCU.

---
 Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

nit: mention sc7180 in subject, like:

dt-bindings: arm-smmu: Add sc7180 compatible string and mem_iface clock

Quoted 13 lines
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +1 -0
index 6515dbe..15946ac 100644
@@ -28,6 +28,7 @@ properties:
           - enum:
               - qcom,msm8996-smmu-v2
               - qcom,msm8998-smmu-v2
+              - qcom,sc7180-smmu-v2
               - qcom,sdm845-smmu-v2
           - const: qcom,smmu-v2
 

Documentation/devicetree/bindings/iommu/arm,smmu.yaml properties: · line 122

Quoted 9 lines
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +3 -0
@@ -113,16 +114,22 @@ properties:
       present in such cases.
 
   clock-names:
+    minItems: 2
+    maxItems: 3
     items:
       - const: bus
       - const: iface
+      - const: mem_iface_clk

People usually frown on clock-names ending in "_clk". Just name it "mem_iface".

Documentation/devicetree/bindings/iommu/arm,smmu.yaml properties: · line 132

Quoted 9 lines
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +3 -0
   clocks:
+    minItems: 2
+    maxItems: 3
     items:
       - description: bus clock required for downstream bus access and for the
           smmu ptw
       - description: interface clock required to access smmu's registers
           through the TCU's programming interface.
+      - description: clock required for the SMMU TBUs and the TCU

Is this clock only needed for sc7180, or would it be useful if we enabled certain features on existing devices? Please document exactly when someone would provide this clock and when they'd leave it off.

...also: maybe it's obvious to those that understand IOMMUs in depth, but to me I have no idea what your description means and why it's different from the other two clocks. Any way you could punch up your description a little bit?

Looking at sdm845 I see that this clock seems to exist but wasn't listed in the IOMMU device tree node. Is that a mistake on sdm845? ...or is it just fine because the GPU holds the clock? Is there a reason the sdm845 solution and the sc7180 solution shouldn't be the same (AKA we should either add this clock to the sdm845 device tree file or remove it from sc7180)?

Thanks!

-Doug
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 58 lines · Doug Anderson

Hi,

Quoted 7 lines · Sharat Masetty

This patch adds a new compatible string for sc7180 and also an additional clock listing needed to power the TBUs and the TCU.

---
  Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 7 +++++++
  1 file changed, 7 insertions(+)

nit: mention sc7180 in subject, like:

dt-bindings: arm-smmu: Add sc7180 compatible string and mem_iface clock

Quoted 13 lines
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +1 -0
index 6515dbe..15946ac 100644
@@ -28,6 +28,7 @@ properties:
            - enum:
                - qcom,msm8996-smmu-v2
                - qcom,msm8998-smmu-v2
+              - qcom,sc7180-smmu-v2
                - qcom,sdm845-smmu-v2
            - const: qcom,smmu-v2
 

Documentation/devicetree/bindings/iommu/arm,smmu.yaml properties: · line 122

Quoted 9 lines
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +3 -0
@@ -113,16 +114,22 @@ properties:
        present in such cases.
 
    clock-names:
+    minItems: 2
+    maxItems: 3
      items:
        - const: bus
        - const: iface
+      - const: mem_iface_clk

People usually frown on clock-names ending in "_clk". Just name it "mem_iface".

Documentation/devicetree/bindings/iommu/arm,smmu.yaml properties: · line 132

Quoted 9 lines
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +3 -0
    clocks:
+    minItems: 2
+    maxItems: 3
      items:
        - description: bus clock required for downstream bus access and for the
            smmu ptw
        - description: interface clock required to access smmu's registers
            through the TCU's programming interface.
+      - description: clock required for the SMMU TBUs and the TCU

Is this clock only needed for sc7180, or would it be useful if we enabled certain features on existing devices? Please document exactly when someone would provide this clock and when they'd leave it off.

...also: maybe it's obvious to those that understand IOMMUs in depth, but to me I have no idea what your description means and why it's different from the other two clocks. Any way you could punch up your description a little bit?

Quoted 6 lines

Looking at sdm845 I see that this clock seems to exist but wasn't listed in the IOMMU device tree node. Is that a mistake on sdm845? ...or is it just fine because the GPU holds the clock? Is there a reason the sdm845 solution and the sc7180 solution shouldn't be the same (AKA we should either add this clock to the sdm845 device tree file or remove it from sc7180)?

I went and checked the downstream SDM845 device tree for GPU SMMU and I do see this clock listed on there. I am no expert in SMMU either but my understanding is that this clock is needed for core working of the SMMU like the pagetable walks, TLB invalidations etc, whereas the other two clocks are required to access SMMU register space from the host.My proposal is to add this clock to SDM845 as well as a follow up effort so that we can remove the Min/MaxItems properties which I do not like.

@Jordan, do you remember why this clock was added to SDM845?

Quoted 3 lines

Thanks!

-Doug