Skip to contentSkip to conversation

dt-bindings: arm: samsung: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema

PATCH Superseded Maciej Falkowski 4 participants 18 messages Sep 9, 2019 – Oct 2, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20190909124206eucas1p13e4ffd50a3bbc6f390cb63f11034c34c@eucas1p1.samsung.com

#1 lore raw

PATCH 1/1 dt-bindings: arm: samsung: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 ------------
 .../bindings/iommu/samsung,sysmmu.yaml        | 102 ++++++++++++++++++
 2 files changed, 102 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml
Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt deleted +0 -67
deleted file mode 100644
index 525ec82615a6..000000000000
@@ -1,67 +0,0 @@
-Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
-
-Samsung's Exynos architecture contains System MMUs that enables scattered
-physical memory chunks visible as a contiguous region to DMA-capable peripheral
-devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
-
-System MMU is an IOMMU and supports identical translation table format to
-ARMv7 translation tables with minimum set of page properties including access
-permissions, shareability and security protection. In addition, System MMU has
-another capabilities like L2 TLB or block-fetch buffers to minimize translation
-latency.
-
-System MMUs are in many to one relation with peripheral devices, i.e. single
-peripheral device might have multiple System MMUs (usually one for each bus
-master), but one System MMU can handle transactions from only one peripheral
-device. The relation between a System MMU and the peripheral device needs to be
-defined in device node of the peripheral device.
-
-MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
-MMUs.
-* MFC has one System MMU on its left and right bus.
-* FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
-  for window 1, 2 and 3.
-* M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
-  the other System MMU on the write channel.
-
-For information on assigning System MMU controller to its peripheral devices,
-see generic IOMMU bindings.
-
-Required properties:
-- compatible: Should be "samsung,exynos-sysmmu"
-- reg: A tuple of base address and size of System MMU registers.
-- #iommu-cells: Should be <0>.
-- interrupts: An interrupt specifier for interrupt signal of System MMU,
-	      according to the format defined by a particular interrupt
-	      controller.
-- clock-names: Should be "sysmmu" or a pair of "aclk" and "pclk" to gate
-	       SYSMMU core clocks.
-	       Optional "master" if the clock to the System MMU is gated by
-	       another gate clock other core  (usually main gate clock
-	       of peripheral device this SYSMMU belongs to).
-- clocks: Phandles for respective clocks described by clock-names.
-- power-domains: Required if the System MMU is needed to gate its power.
-	  Please refer to the following document:
-	  Documentation/devicetree/bindings/power/pd-samsung.txt
-
-Examples:
-	gsc_0: gsc@13e00000 {
-		compatible = "samsung,exynos5-gsc";
-		reg = <0x13e00000 0x1000>;
-		interrupts = <0 85 0>;
-		power-domains = <&pd_gsc>;
-		clocks = <&clock CLK_GSCL0>;
-		clock-names = "gscl";
-		iommus = <&sysmmu_gsc0>;
-	};
-
-	sysmmu_gsc0: sysmmu@13e80000 {
-		compatible = "samsung,exynos-sysmmu";
-		reg = <0x13E80000 0x1000>;
-		interrupt-parent = <&combiner>;
-		interrupts = <2 0>;
-		clock-names = "sysmmu", "master";
-		clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>;
-		power-domains = <&pd_gsc>;
-		#iommu-cells = <0>;
-	};
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +102 -0

102 lines not on this page · raw message

Signature · 1 line
2.17.1
#2 lore raw
Quoted 6 lines · Maciej Falkowski

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Hi Maciej,

Thanks for the patch. Few comments below.

Quoted 118 lines
---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 ------------
 .../bindings/iommu/samsung,sysmmu.yaml        | 102 ++++++++++++++++++
 2 files changed, 102 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml
Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt deleted +0 -67
deleted file mode 100644
index 525ec82615a6..000000000000
@@ -1,67 +0,0 @@
-Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
-
-Samsung's Exynos architecture contains System MMUs that enables scattered
-physical memory chunks visible as a contiguous region to DMA-capable peripheral
-devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
-
-System MMU is an IOMMU and supports identical translation table format to
-ARMv7 translation tables with minimum set of page properties including access
-permissions, shareability and security protection. In addition, System MMU has
-another capabilities like L2 TLB or block-fetch buffers to minimize translation
-latency.
-
-System MMUs are in many to one relation with peripheral devices, i.e. single
-peripheral device might have multiple System MMUs (usually one for each bus
-master), but one System MMU can handle transactions from only one peripheral
-device. The relation between a System MMU and the peripheral device needs to be
-defined in device node of the peripheral device.
-
-MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
-MMUs.
-* MFC has one System MMU on its left and right bus.
-* FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
-  for window 1, 2 and 3.
-* M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
-  the other System MMU on the write channel.
-
-For information on assigning System MMU controller to its peripheral devices,
-see generic IOMMU bindings.
-
-Required properties:
-- compatible: Should be "samsung,exynos-sysmmu"
-- reg: A tuple of base address and size of System MMU registers.
-- #iommu-cells: Should be <0>.
-- interrupts: An interrupt specifier for interrupt signal of System MMU,
-             according to the format defined by a particular interrupt
-             controller.
-- clock-names: Should be "sysmmu" or a pair of "aclk" and "pclk" to gate
-              SYSMMU core clocks.
-              Optional "master" if the clock to the System MMU is gated by
-              another gate clock other core  (usually main gate clock
-              of peripheral device this SYSMMU belongs to).
-- clocks: Phandles for respective clocks described by clock-names.
-- power-domains: Required if the System MMU is needed to gate its power.
-         Please refer to the following document:
-         Documentation/devicetree/bindings/power/pd-samsung.txt
-
-Examples:
-       gsc_0: gsc@13e00000 {
-               compatible = "samsung,exynos5-gsc";
-               reg = <0x13e00000 0x1000>;
-               interrupts = <0 85 0>;
-               power-domains = <&pd_gsc>;
-               clocks = <&clock CLK_GSCL0>;
-               clock-names = "gscl";
-               iommus = <&sysmmu_gsc0>;
-       };
-
-       sysmmu_gsc0: sysmmu@13e80000 {
-               compatible = "samsung,exynos-sysmmu";
-               reg = <0x13E80000 0x1000>;
-               interrupt-parent = <&combiner>;
-               interrupts = <2 0>;
-               clock-names = "sysmmu", "master";
-               clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>;
-               power-domains = <&pd_gsc>;
-               #iommu-cells = <0>;
-       };
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +32 -0
new file mode 100644
index 000000000000..6c40dfb86899
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iommu/samsung,sysmmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
+
+maintainers:
+  - Marek Szyprowski <[email protected]>
+
+description: |+
+  Samsung's Exynos architecture contains System MMUs that enables scattered
+  physical memory chunks visible as a contiguous region to DMA-capable peripheral
+  devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
+
+  System MMU is an IOMMU and supports identical translation table format to
+  ARMv7 translation tables with minimum set of page properties including access
+  permissions, shareability and security protection. In addition, System MMU has
+  another capabilities like L2 TLB or block-fetch buffers to minimize translation
+  latency.
+
+  System MMUs are in many to one relation with peripheral devices, i.e. single
+  peripheral device might have multiple System MMUs (usually one for each bus
+  master), but one System MMU can handle transactions from only one peripheral
+  device. The relation between a System MMU and the peripheral device needs to be
+  defined in device node of the peripheral device.
+
+  MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
+  MMUs.
+  * MFC has one System MMU on its left and right bus.
+  * FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 42

Quoted 10 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +10 -0
+    for window 1, 2 and 3.
+  * M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
+    the other System MMU on the write channel.
+
+  For information on assigning System MMU controller to its peripheral devices,
+  see generic IOMMU bindings.
+
+properties:
+  compatible:
+    const: samsung,exynos-sysmmu

Add empty line between properties. Makes it easier to read.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 44

Quoted 2 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +2 -0
+  reg:
+    description: A tuple of base address and size of System MMU registers.

Description not needed.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 50

Quoted 6 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +6 -0
+    maxItems: 1
+  interrupts:
+    description: |
+      An interrupt specifier for interrupt signal of System MMU,
+      according to the format defined by a particular interrupt
+      controller.

Description not needed.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 52

Quoted 2 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +2 -0
+  clocks:
+    description: Phandles for respective clocks described by clock-names.

Description not needed but I think number of elements is.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 61

Quoted 9 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +9 -0
+  clock-names:
+    description: |
+      Should be "sysmmu" or a pair of "aclk" and "pclk" to gate
+      SYSMMU core clocks.
+      Optional "master" if the clock to the System MMU is gated by
+      another gate clock other core  (usually main gate clock
+      of peripheral device this SYSMMU belongs to).
+    minItems: 1
+    maxItems: 2

Based on the description this can be up to three clocks.

Please declare the exact items within each combination (so either sysmmu or aclk+pclk, plus optional master?). If this does not depend on compatible, then oneOf could work. Then number of items could be removed.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 64

Quoted 3 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +3 -0
+  "#iommu-cells":
+    const: 0
+    description: Should be <0>.

Description not needed.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 65

Quoted 1 line
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +1 -0
+  power-domains:

$ref: /schemas/types.yaml#/definitions/phandle

Quoted 11 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +11 -0
+    description: |
+      Required if the System MMU is needed to gate its power.
+      Please refer to the following document:
+      Documentation/devicetree/bindings/power/pd-samsung.txt
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 86

Quoted 10 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +10 -0
+  - "#iommu-cells"
+
+examples:
+  - |
+    gsc_0: gsc@13e00000 {
+      compatible = "samsung,exynos5-gsc";
+      reg = <0x13e00000 0x1000>;
+      interrupts = <0 85 0>;
+      power-domains = <&pd_gsc>;
+      clocks = <&clock 0>; //CLK_GSCL0

Missing space after //

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 90

Quoted 4 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +4 -0
+      clock-names = "gscl";
+      iommus = <&sysmmu_gsc0>;
+    };
+  - |

This is one example, not two.

Best regards,
Krzysztof

Quoted 15 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +12 -1
+    sysmmu_gsc0: sysmmu@13e80000 {
+      compatible = "samsung,exynos-sysmmu";
+      reg = <0x13E80000 0x1000>;
+      interrupt-parent = <&combiner>;
+      interrupts = <2 0>;
+      clock-names = "sysmmu", "master";
+      clocks = <&clock 0>, // CLK_SMMU_GSCL0
+               <&clock 0>; // CLK_GSCL0
+      power-domains = <&pd_gsc>;
+      #iommu-cells = <0>;
+    };
+
--

2.17.1

#3 lore raw

PATCH v2 1/1 dt-bindings: arm: samsung: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Update clock description.

---
Hi Krzysztof,

Thank you for feedback.

New changes:
- style fixes including missing empty lines,
deletion of unneeded descriptions

- fix mistake where one example was split
into two separete ones.

There are some updates with clock description. I have spoken with Marek Szyprowski and the right setup for clocks seems to be two pairs:
"sysmmu" with optional "master" or a pair of "aclk" + "pclk".

The option: "aclk" + "pclk" + "master" was never used in any of device bindings and there are none compilation problems with that.

In so, clock-names are rewritten to handle this version and maximal clock number is set to two.

Best regards,
Maciej Falkowski

---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 -----------
 .../bindings/iommu/samsung,sysmmu.yaml        | 112 ++++++++++++++++++
 2 files changed, 112 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml
Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt deleted +0 -67
deleted file mode 100644
index 525ec82615a6..000000000000
@@ -1,67 +0,0 @@
-Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
-
-Samsung's Exynos architecture contains System MMUs that enables scattered
-physical memory chunks visible as a contiguous region to DMA-capable peripheral
-devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
-
-System MMU is an IOMMU and supports identical translation table format to
-ARMv7 translation tables with minimum set of page properties including access
-permissions, shareability and security protection. In addition, System MMU has
-another capabilities like L2 TLB or block-fetch buffers to minimize translation
-latency.
-
-System MMUs are in many to one relation with peripheral devices, i.e. single
-peripheral device might have multiple System MMUs (usually one for each bus
-master), but one System MMU can handle transactions from only one peripheral
-device. The relation between a System MMU and the peripheral device needs to be
-defined in device node of the peripheral device.
-
-MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
-MMUs.
-* MFC has one System MMU on its left and right bus.
-* FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
-  for window 1, 2 and 3.
-* M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
-  the other System MMU on the write channel.
-
-For information on assigning System MMU controller to its peripheral devices,
-see generic IOMMU bindings.
-
-Required properties:
-- compatible: Should be "samsung,exynos-sysmmu"
-- reg: A tuple of base address and size of System MMU registers.
-- #iommu-cells: Should be <0>.
-- interrupts: An interrupt specifier for interrupt signal of System MMU,
-	      according to the format defined by a particular interrupt
-	      controller.
-- clock-names: Should be "sysmmu" or a pair of "aclk" and "pclk" to gate
-	       SYSMMU core clocks.
-	       Optional "master" if the clock to the System MMU is gated by
-	       another gate clock other core  (usually main gate clock
-	       of peripheral device this SYSMMU belongs to).
-- clocks: Phandles for respective clocks described by clock-names.
-- power-domains: Required if the System MMU is needed to gate its power.
-	  Please refer to the following document:
-	  Documentation/devicetree/bindings/power/pd-samsung.txt
-
-Examples:
-	gsc_0: gsc@13e00000 {
-		compatible = "samsung,exynos5-gsc";
-		reg = <0x13e00000 0x1000>;
-		interrupts = <0 85 0>;
-		power-domains = <&pd_gsc>;
-		clocks = <&clock CLK_GSCL0>;
-		clock-names = "gscl";
-		iommus = <&sysmmu_gsc0>;
-	};
-
-	sysmmu_gsc0: sysmmu@13e80000 {
-		compatible = "samsung,exynos-sysmmu";
-		reg = <0x13E80000 0x1000>;
-		interrupt-parent = <&combiner>;
-		interrupts = <2 0>;
-		clock-names = "sysmmu", "master";
-		clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>;
-		power-domains = <&pd_gsc>;
-		#iommu-cells = <0>;
-	};
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
2.17.1
#4 lore raw
Quoted 159 lines · Maciej Falkowski

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Update clock description.

---
Hi Krzysztof,

Thank you for feedback.

New changes:
- style fixes including missing empty lines,
deletion of unneeded descriptions

- fix mistake where one example was split
into two separete ones.

There are some updates with clock description. I have spoken with Marek Szyprowski and the right setup for clocks seems to be two pairs:
"sysmmu" with optional "master" or a pair of "aclk" + "pclk".

The option: "aclk" + "pclk" + "master" was never used in any of device bindings and there are none compilation problems with that.

In so, clock-names are rewritten to handle this version and maximal clock number is set to two.

Best regards,
Maciej Falkowski

---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 -----------
 .../bindings/iommu/samsung,sysmmu.yaml        | 112 ++++++++++++++++++
 2 files changed, 112 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml
Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt deleted +0 -67
deleted file mode 100644
index 525ec82615a6..000000000000
@@ -1,67 +0,0 @@
-Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
-
-Samsung's Exynos architecture contains System MMUs that enables scattered
-physical memory chunks visible as a contiguous region to DMA-capable peripheral
-devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
-
-System MMU is an IOMMU and supports identical translation table format to
-ARMv7 translation tables with minimum set of page properties including access
-permissions, shareability and security protection. In addition, System MMU has
-another capabilities like L2 TLB or block-fetch buffers to minimize translation
-latency.
-
-System MMUs are in many to one relation with peripheral devices, i.e. single
-peripheral device might have multiple System MMUs (usually one for each bus
-master), but one System MMU can handle transactions from only one peripheral
-device. The relation between a System MMU and the peripheral device needs to be
-defined in device node of the peripheral device.
-
-MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
-MMUs.
-* MFC has one System MMU on its left and right bus.
-* FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
-  for window 1, 2 and 3.
-* M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
-  the other System MMU on the write channel.
-
-For information on assigning System MMU controller to its peripheral devices,
-see generic IOMMU bindings.
-
-Required properties:
-- compatible: Should be "samsung,exynos-sysmmu"
-- reg: A tuple of base address and size of System MMU registers.
-- #iommu-cells: Should be <0>.
-- interrupts: An interrupt specifier for interrupt signal of System MMU,
-             according to the format defined by a particular interrupt
-             controller.
-- clock-names: Should be "sysmmu" or a pair of "aclk" and "pclk" to gate
-              SYSMMU core clocks.
-              Optional "master" if the clock to the System MMU is gated by
-              another gate clock other core  (usually main gate clock
-              of peripheral device this SYSMMU belongs to).
-- clocks: Phandles for respective clocks described by clock-names.
-- power-domains: Required if the System MMU is needed to gate its power.
-         Please refer to the following document:
-         Documentation/devicetree/bindings/power/pd-samsung.txt
-
-Examples:
-       gsc_0: gsc@13e00000 {
-               compatible = "samsung,exynos5-gsc";
-               reg = <0x13e00000 0x1000>;
-               interrupts = <0 85 0>;
-               power-domains = <&pd_gsc>;
-               clocks = <&clock CLK_GSCL0>;
-               clock-names = "gscl";
-               iommus = <&sysmmu_gsc0>;
-       };
-
-       sysmmu_gsc0: sysmmu@13e80000 {
-               compatible = "samsung,exynos-sysmmu";
-               reg = <0x13E80000 0x1000>;
-               interrupt-parent = <&combiner>;
-               interrupts = <2 0>;
-               clock-names = "sysmmu", "master";
-               clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>;
-               power-domains = <&pd_gsc>;
-               #iommu-cells = <0>;
-       };
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +41 -0
new file mode 100644
index 000000000000..85d1a251f2ff
@@ -0,0 +1,112 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iommu/samsung,sysmmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
+
+maintainers:
+  - Marek Szyprowski <[email protected]>
+
+description: |+
+  Samsung's Exynos architecture contains System MMUs that enables scattered
+  physical memory chunks visible as a contiguous region to DMA-capable peripheral
+  devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
+
+  System MMU is an IOMMU and supports identical translation table format to
+  ARMv7 translation tables with minimum set of page properties including access
+  permissions, shareability and security protection. In addition, System MMU has
+  another capabilities like L2 TLB or block-fetch buffers to minimize translation
+  latency.
+
+  System MMUs are in many to one relation with peripheral devices, i.e. single
+  peripheral device might have multiple System MMUs (usually one for each bus
+  master), but one System MMU can handle transactions from only one peripheral
+  device. The relation between a System MMU and the peripheral device needs to be
+  defined in device node of the peripheral device.
+
+  MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
+  MMUs.
+  * MFC has one System MMU on its left and right bus.
+  * FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
+    for window 1, 2 and 3.
+  * M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
+    the other System MMU on the write channel.
+
+  For information on assigning System MMU controller to its peripheral devices,
+  see generic IOMMU bindings.
+
+properties:
+  compatible:

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 51

Quoted 10 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +10 -0
+    const: samsung,exynos-sysmmu
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description: |
+      An interrupt specifier for interrupt signal of System MMU,
+      according to the format defined by a particular interrupt
+      controller.

You left this description and it is not needed - does not bring any information. Add also maxItems as I believe there should be only one interrupt.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 62

Quoted 11 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +11 -0
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    oneOf:
+      - contains:
+          enum:
+            - sysmmu
+            - master

This is not specific enough, because it accepts:
clock-names = "master";
clock-names = "aclk";

Instead I think this could work:
oneOf:
- items:
- const: sysmmu
- items:
- const: sysmmu
- const: master
- items:
- const: aclk
- const: pclk

Best regards,
Krzysztof

#5 lore raw

PATCH v3 1/1 dt-bindings: arm: samsung: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Update clock description.

---
Hi Krzysztof,

Thank you for feedback.

v3:

- remove obsolete interrupts description and set its maxItems to one. There are some incompatible files which will be fixed with another patch.

- clock-names pattern is changed to your more precise version. I also added option "pclk" + "aclk" as some bindings are also using it.

Best regards,
Maciej Falkowski

---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 -----------
 .../bindings/iommu/samsung,sysmmu.yaml        | 112 ++++++++++++++++++
 2 files changed, 112 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml
Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt deleted +0 -67
deleted file mode 100644
index 525ec82615a6..000000000000
@@ -1,67 +0,0 @@
-Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
-
-Samsung's Exynos architecture contains System MMUs that enables scattered
-physical memory chunks visible as a contiguous region to DMA-capable peripheral
-devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
-
-System MMU is an IOMMU and supports identical translation table format to
-ARMv7 translation tables with minimum set of page properties including access
-permissions, shareability and security protection. In addition, System MMU has
-another capabilities like L2 TLB or block-fetch buffers to minimize translation
-latency.
-
-System MMUs are in many to one relation with peripheral devices, i.e. single
-peripheral device might have multiple System MMUs (usually one for each bus
-master), but one System MMU can handle transactions from only one peripheral
-device. The relation between a System MMU and the peripheral device needs to be
-defined in device node of the peripheral device.
-
-MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
-MMUs.
-* MFC has one System MMU on its left and right bus.
-* FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
-  for window 1, 2 and 3.
-* M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
-  the other System MMU on the write channel.
-
-For information on assigning System MMU controller to its peripheral devices,
-see generic IOMMU bindings.
-
-Required properties:
-- compatible: Should be "samsung,exynos-sysmmu"
-- reg: A tuple of base address and size of System MMU registers.
-- #iommu-cells: Should be <0>.
-- interrupts: An interrupt specifier for interrupt signal of System MMU,
-	      according to the format defined by a particular interrupt
-	      controller.
-- clock-names: Should be "sysmmu" or a pair of "aclk" and "pclk" to gate
-	       SYSMMU core clocks.
-	       Optional "master" if the clock to the System MMU is gated by
-	       another gate clock other core  (usually main gate clock
-	       of peripheral device this SYSMMU belongs to).
-- clocks: Phandles for respective clocks described by clock-names.
-- power-domains: Required if the System MMU is needed to gate its power.
-	  Please refer to the following document:
-	  Documentation/devicetree/bindings/power/pd-samsung.txt
-
-Examples:
-	gsc_0: gsc@13e00000 {
-		compatible = "samsung,exynos5-gsc";
-		reg = <0x13e00000 0x1000>;
-		interrupts = <0 85 0>;
-		power-domains = <&pd_gsc>;
-		clocks = <&clock CLK_GSCL0>;
-		clock-names = "gscl";
-		iommus = <&sysmmu_gsc0>;
-	};
-
-	sysmmu_gsc0: sysmmu@13e80000 {
-		compatible = "samsung,exynos-sysmmu";
-		reg = <0x13E80000 0x1000>;
-		interrupt-parent = <&combiner>;
-		interrupts = <2 0>;
-		clock-names = "sysmmu", "master";
-		clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>;
-		power-domains = <&pd_gsc>;
-		#iommu-cells = <0>;
-	};
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer Reviewed-by on v3 1/1
#6 lore raw
Quoted 11 lines · Maciej Falkowski

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Update clock description.

---
Hi Krzysztof,

Quoted 7 lines

Thank you for feedback.

v3:

- remove obsolete interrupts description and set its maxItems to one. There are some incompatible files which will be fixed with another patch.

Driver stopped supporting two IRQ lines in commit 7222e8db2d506197ee183de0f9b76b3ad97e8c18 (iommu/exynos: Fix build errors). The second IRQ line in Exynos3250 DTS seems to be ignored.

The patch now looks good to me:

However for some reasons you did not CC the IOMMU maintainers. Please use scripts/get_maintainer.pl to get the list of folks to CC.

Best regards,
Krzysztof

#7 lore raw

Hi Krzyszotf,

Quoted 22 lines · Krzysztof Kozlowski
Quoted 10 lines · Maciej Falkowski

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Update clock description.

---
Hi Krzysztof,

Quoted 7 lines

Thank you for feedback.

v3:

- remove obsolete interrupts description and set its maxItems to one. There are some incompatible files which will be fixed with another patch.

Driver stopped supporting two IRQ lines in commit 7222e8db2d506197ee183de0f9b76b3ad97e8c18 (iommu/exynos: Fix build errors). The second IRQ line in Exynos3250 DTS seems to be ignored.

Quoted 5 lines

The patch now looks good to me:

However for some reasons you did not CC the IOMMU maintainers. Please use scripts/get_maintainer.pl to get the list of folks to CC.

Frankly I don't see any reason to spam IOMMU ml or maintainer with this discussion about dt-binding conversion. This patch will be merged via dt tree if I got it right.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#8 lore raw
Quoted 29 lines · Marek Szyprowski

Hi Krzyszotf,

Quoted 25 lines · Krzysztof Kozlowski
Quoted 10 lines · Maciej Falkowski

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Update clock description.

---
Hi Krzysztof,

Quoted 7 lines

Thank you for feedback.

v3:

- remove obsolete interrupts description and set its maxItems to one. There are some incompatible files which will be fixed with another patch.

Driver stopped supporting two IRQ lines in commit 7222e8db2d506197ee183de0f9b76b3ad97e8c18 (iommu/exynos: Fix build errors). The second IRQ line in Exynos3250 DTS seems to be ignored.

The patch now looks good to me:

Quoted 6 lines
Quoted 2 lines

However for some reasons you did not CC the IOMMU maintainers. Please use scripts/get_maintainer.pl to get the list of folks to CC.

Frankly I don't see any reason to spam IOMMU ml or maintainer with this discussion about dt-binding conversion. This patch will be merged via dt tree if I got it right.

Indeed usually subsystem maintainers are not interested in DT schema conversion although they are mentioned as maintainers for this file so it is nice to CC them... I would not call spamming when there is explicit pattern for CCing.

Best regards,
Krzysztof

maintainer
#9 lore raw
In reply to Maciej Falkowski
Quoted 94 lines · Maciej Falkowski

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

Update clock description.

---
Hi Krzysztof,

Thank you for feedback.

v3:

- remove obsolete interrupts description and set its maxItems to one. There are some incompatible files which will be fixed with another patch.

- clock-names pattern is changed to your more precise version. I also added option "pclk" + "aclk" as some bindings are also using it.

Best regards,
Maciej Falkowski

---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 -----------
 .../bindings/iommu/samsung,sysmmu.yaml        | 112 ++++++++++++++++++
 2 files changed, 112 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +56 -0
new file mode 100644
index 000000000000..a8141d6c326a
@@ -0,0 +1,112 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iommu/samsung,sysmmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
+
+maintainers:
+  - Marek Szyprowski <[email protected]>
+
+description: |+
+  Samsung's Exynos architecture contains System MMUs that enables scattered
+  physical memory chunks visible as a contiguous region to DMA-capable peripheral
+  devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
+
+  System MMU is an IOMMU and supports identical translation table format to
+  ARMv7 translation tables with minimum set of page properties including access
+  permissions, shareability and security protection. In addition, System MMU has
+  another capabilities like L2 TLB or block-fetch buffers to minimize translation
+  latency.
+
+  System MMUs are in many to one relation with peripheral devices, i.e. single
+  peripheral device might have multiple System MMUs (usually one for each bus
+  master), but one System MMU can handle transactions from only one peripheral
+  device. The relation between a System MMU and the peripheral device needs to be
+  defined in device node of the peripheral device.
+
+  MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
+  MMUs.
+  * MFC has one System MMU on its left and right bus.
+  * FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
+    for window 1, 2 and 3.
+  * M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
+    the other System MMU on the write channel.
+
+  For information on assigning System MMU controller to its peripheral devices,
+  see generic IOMMU bindings.
+
+properties:
+  compatible:
+    const: samsung,exynos-sysmmu
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    oneOf:
+      - items:

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 66

Quoted 10 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +10 -0
+        - const: sysmmu
+      - items:
+        - const: sysmmu
+        - const: master
+      - items:
+        - const: aclk
+        - const: pclk
+      - items:
+        - const: pclk
+        - const: aclk

Sigh. I'd prefer you fix the order in whichever case is less common.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 69

Quoted 3 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +3 -0
+    description: |
+      Should be "sysmmu" with optional "master"
+      or a pair "aclk" with "pclk".

No need to describe what the schema already says.

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 75

Quoted 6 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +6 -0
+
+  "#iommu-cells":
+    const: 0
+
+  power-domains:
+    $ref: /schemas/types.yaml#/definitions/phandle

No need to define common property types.

Just 'maxItems: 1' is enough.

Quoted 16 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +16 -0
+    description: |
+      Required if the System MMU is needed to gate its power.
+      Please refer to the following document:
+      Documentation/devicetree/bindings/power/pd-samsung.txt
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - "#iommu-cells"
+
+examples:
+  - |
+    gsc_0: gsc@13e00000 {

Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml line 101

Quoted 10 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +10 -0
+      compatible = "samsung,exynos5-gsc";
+      reg = <0x13e00000 0x1000>;
+      interrupts = <0 85 0>;
+      power-domains = <&pd_gsc>;
+      clocks = <&clock 0>; // CLK_GSCL0
+      clock-names = "gscl";
+      iommus = <&sysmmu_gsc0>;
+    };
+
+    sysmmu_gsc0: sysmmu@13e80000 {

This should be:

iommu@...

Quoted 14 lines
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +11 -0
+      compatible = "samsung,exynos-sysmmu";
+      reg = <0x13E80000 0x1000>;
+      interrupt-parent = <&combiner>;
+      interrupts = <2 0>;
+      clock-names = "sysmmu", "master";
+      clocks = <&clock 0>, // CLK_SMMU_GSCL0
+               <&clock 0>; // CLK_GSCL0
+      power-domains = <&pd_gsc>;
+      #iommu-cells = <0>;
+    };
+
Signature · 1 line
2.17.1
#10 lore raw

PATCH v4 1/1 dt-bindings: iommu: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema

From: Maciej Falkowski <[email protected]>

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

---
v4:
- Rename commit message to match common style
- Remove '"pclk", "aclk"' option from clock-names property. Some of bindings are incompatible with that and they will be fixed with another patch.
- Remove unneeded description of clock-names property.
- Remove type description from power-domains property as it is already a common property.
- Rename node names to match generic names,
specifically: sysmmu -> iommu, gsc -> scaler

- Add include directive in examples to include
clock macros. This increases readability of the example as clock macros do not have to be substituted with numerical values which makes examples more self-explanatory and natural.

Best regards,
Maciej Falkowski

---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 -----------
 .../bindings/iommu/samsung,sysmmu.yaml        | 108 ++++++++++++++++++
 2 files changed, 108 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml
Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt deleted +0 -67
deleted file mode 100644
index 525ec82615a6..000000000000
@@ -1,67 +0,0 @@
-Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
-
-Samsung's Exynos architecture contains System MMUs that enables scattered
-physical memory chunks visible as a contiguous region to DMA-capable peripheral
-devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
-
-System MMU is an IOMMU and supports identical translation table format to
-ARMv7 translation tables with minimum set of page properties including access
-permissions, shareability and security protection. In addition, System MMU has
-another capabilities like L2 TLB or block-fetch buffers to minimize translation
-latency.
-
-System MMUs are in many to one relation with peripheral devices, i.e. single
-peripheral device might have multiple System MMUs (usually one for each bus
-master), but one System MMU can handle transactions from only one peripheral
-device. The relation between a System MMU and the peripheral device needs to be
-defined in device node of the peripheral device.
-
-MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
-MMUs.
-* MFC has one System MMU on its left and right bus.
-* FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
-  for window 1, 2 and 3.
-* M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
-  the other System MMU on the write channel.
-
-For information on assigning System MMU controller to its peripheral devices,
-see generic IOMMU bindings.
-
-Required properties:
-- compatible: Should be "samsung,exynos-sysmmu"
-- reg: A tuple of base address and size of System MMU registers.
-- #iommu-cells: Should be <0>.
-- interrupts: An interrupt specifier for interrupt signal of System MMU,
-	      according to the format defined by a particular interrupt
-	      controller.
-- clock-names: Should be "sysmmu" or a pair of "aclk" and "pclk" to gate
-	       SYSMMU core clocks.
-	       Optional "master" if the clock to the System MMU is gated by
-	       another gate clock other core  (usually main gate clock
-	       of peripheral device this SYSMMU belongs to).
-- clocks: Phandles for respective clocks described by clock-names.
-- power-domains: Required if the System MMU is needed to gate its power.
-	  Please refer to the following document:
-	  Documentation/devicetree/bindings/power/pd-samsung.txt
-
-Examples:
-	gsc_0: gsc@13e00000 {
-		compatible = "samsung,exynos5-gsc";
-		reg = <0x13e00000 0x1000>;
-		interrupts = <0 85 0>;
-		power-domains = <&pd_gsc>;
-		clocks = <&clock CLK_GSCL0>;
-		clock-names = "gscl";
-		iommus = <&sysmmu_gsc0>;
-	};
-
-	sysmmu_gsc0: sysmmu@13e80000 {
-		compatible = "samsung,exynos-sysmmu";
-		reg = <0x13E80000 0x1000>;
-		interrupt-parent = <&combiner>;
-		interrupts = <2 0>;
-		clock-names = "sysmmu", "master";
-		clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>;
-		power-domains = <&pd_gsc>;
-		#iommu-cells = <0>;
-	};
Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml new file +108 -0

108 lines not on this page · raw message

Signature · 1 line
2.17.1
#11 lore raw

PATCH 1/1 arm64: dts: exynos: Exynos5433: swap clock order of sysmmu

From: Maciej Falkowski <[email protected]>

dt-schema supports only order of names "aclk", "pclk". Swap some sysmmu definitions to make them compatible with schema.

---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 54 +++++++++++-----------
 1 file changed, 27 insertions(+), 27 deletions(-)
arch/arm64/boot/dts/exynos/exynos5433.dtsi +27 -27
index a76f620f7f35..ba66ea906f60 100644
@@ -1179,9 +1179,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x13a00000 0x1000>;
 			interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_disp CLK_PCLK_SMMU_DECON0X>,
-				<&cmu_disp CLK_ACLK_SMMU_DECON0X>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_disp CLK_ACLK_SMMU_DECON0X>,
+				<&cmu_disp CLK_PCLK_SMMU_DECON0X>;
 			power-domains = <&pd_disp>;
 			#iommu-cells = <0>;
 		};
@@ -1190,9 +1190,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x13a10000 0x1000>;
 			interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_disp CLK_PCLK_SMMU_DECON1X>,
-				<&cmu_disp CLK_ACLK_SMMU_DECON1X>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_disp CLK_ACLK_SMMU_DECON1X>,
+				<&cmu_disp CLK_PCLK_SMMU_DECON1X>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_disp>;
 		};
@@ -1201,9 +1201,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x13a20000 0x1000>;
 			interrupts = <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_disp CLK_PCLK_SMMU_TV0X>,
-				<&cmu_disp CLK_ACLK_SMMU_TV0X>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_disp CLK_ACLK_SMMU_TV0X>,
+				<&cmu_disp CLK_PCLK_SMMU_TV0X>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_disp>;
 		};
@@ -1212,9 +1212,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x13a30000 0x1000>;
 			interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_disp CLK_PCLK_SMMU_TV1X>,
-				<&cmu_disp CLK_ACLK_SMMU_TV1X>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_disp CLK_ACLK_SMMU_TV1X>,
+				<&cmu_disp CLK_PCLK_SMMU_TV1X>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_disp>;
 		};
@@ -1256,9 +1256,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x15040000 0x1000>;
 			interrupts = <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_mscl CLK_PCLK_SMMU_M2MSCALER0>,
-				 <&cmu_mscl CLK_ACLK_SMMU_M2MSCALER0>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_mscl CLK_ACLK_SMMU_M2MSCALER0>,
+				<&cmu_mscl CLK_PCLK_SMMU_M2MSCALER0>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_mscl>;
 		};
@@ -1267,9 +1267,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x15050000 0x1000>;
 			interrupts = <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_mscl CLK_PCLK_SMMU_M2MSCALER1>,
-				 <&cmu_mscl CLK_ACLK_SMMU_M2MSCALER1>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_mscl CLK_ACLK_SMMU_M2MSCALER1>,
+				<&cmu_mscl CLK_PCLK_SMMU_M2MSCALER1>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_mscl>;
 		};
@@ -1278,9 +1278,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x15060000 0x1000>;
 			interrupts = <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_mscl CLK_PCLK_SMMU_JPEG>,
-				 <&cmu_mscl CLK_ACLK_SMMU_JPEG>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_mscl CLK_ACLK_SMMU_JPEG>,
+				<&cmu_mscl CLK_PCLK_SMMU_JPEG>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_mscl>;
 		};
@@ -1289,9 +1289,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x15200000 0x1000>;
 			interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_mfc CLK_PCLK_SMMU_MFC_0>,
-				 <&cmu_mfc CLK_ACLK_SMMU_MFC_0>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_mfc CLK_ACLK_SMMU_MFC_0>,
+				<&cmu_mfc CLK_PCLK_SMMU_MFC_0>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_mfc>;
 		};
@@ -1300,9 +1300,9 @@
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x15210000 0x1000>;
 			interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "pclk", "aclk";
-			clocks = <&cmu_mfc CLK_PCLK_SMMU_MFC_1>,
-				 <&cmu_mfc CLK_ACLK_SMMU_MFC_1>;
+			clock-names = "aclk", "pclk";
+			clocks = <&cmu_mfc CLK_ACLK_SMMU_MFC_1>,
+				<&cmu_mfc CLK_PCLK_SMMU_MFC_1>;
 			#iommu-cells = <0>;
 			power-domains = <&pd_mfc>;
 		};
Signature · 1 line
2.17.1
maintainer Applied
#12 lore raw

Re: [PATCH] arm64: dts: exynos: Exynos5433: swap clock order of sysmmu

Quoted 9 lines · Marek Szyprowski

From: Maciej Falkowski <[email protected]>

dt-schema supports only order of names "aclk", "pclk". Swap some sysmmu definitions to make them compatible with schema.

---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 54 +++++++++++-----------

Thanks, applied.

Best regards,
Krzysztof

maintainer Applied
#13 lore raw

Re: [PATCH v4] dt-bindings: iommu: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema

In reply to Marek Szyprowski
Quoted 25 lines · Marek Szyprowski

From: Maciej Falkowski <[email protected]>

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format.

---
v4:
- Rename commit message to match common style
- Remove '"pclk", "aclk"' option from clock-names property. Some of bindings are incompatible with that and they will be fixed with another patch.
- Remove unneeded description of clock-names property.
- Remove type description from power-domains property as it is already a common property.
- Rename node names to match generic names,
specifically: sysmmu -> iommu, gsc -> scaler

- Add include directive in examples to include
clock macros. This increases readability of the example as clock macros do not have to be substituted with numerical values which makes examples more self-explanatory and natural.

Quoted 9 lines

Best regards,
Maciej Falkowski

---
 .../bindings/iommu/samsung,sysmmu.txt         |  67 -----------
 .../bindings/iommu/samsung,sysmmu.yaml        | 108 ++++++++++++++++++
 2 files changed, 108 insertions(+), 67 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
 create mode 100644 Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml

Applied, thanks.

Rob

#14 lore raw

PATCH 1/1 dt-bindings: arm: samsung: Exynos 3250: iommu: remove obsolete IRQ lines

In reply to Krzysztof Kozlowski

In commit 7222e8db2d506197ee183de0f9b76b3ad97e8c18 (iommu/exynos: Fix build errors) Exynos3250 iommu driver stopped supporting two IRQ lines. The second IRQ line in DTS is ignored and is not needed.

---
 arch/arm/boot/dts/exynos3250.dtsi | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/dts/exynos3250.dtsi +3 -6
index 784818490376..190d9160a5d1 100644
@@ -314,8 +314,7 @@
 		sysmmu_jpeg: sysmmu@11a60000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x11a60000 0x1000>;
-			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUJPEG>, <&cmu CLK_JPEG>;
 			power-domains = <&pd_cam>;
@@ -355,8 +354,7 @@
 		sysmmu_fimd0: sysmmu@11e20000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x11e20000 0x1000>;
-			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUFIMD0>, <&cmu CLK_FIMD0>;
 			power-domains = <&pd_lcd0>;
@@ -507,8 +505,7 @@
 		sysmmu_mfc: sysmmu@13620000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x13620000 0x1000>;
-			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUMFC_L>, <&cmu CLK_MFC>;
 			power-domains = <&pd_mfc>;
Signature · 1 line
2.17.1
#15 lore raw

PATCH v2 1/1 ARM: dts: exynos: remove obsolete IRQ lines

In commit 7222e8db2d506197ee183de0f9b76b3ad97e8c18 (iommu/exynos: Fix build errors) Exynos3250 iommu driver stopped supporting two IRQ lines. The second IRQ line in DTS is ignored and is not needed.

---
v2:
- change commit message to proper version
- add proper recipients

---
 arch/arm/boot/dts/exynos3250.dtsi | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/dts/exynos3250.dtsi +3 -6
index 784818490376..190d9160a5d1 100644
@@ -314,8 +314,7 @@
 		sysmmu_jpeg: sysmmu@11a60000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x11a60000 0x1000>;
-			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUJPEG>, <&cmu CLK_JPEG>;
 			power-domains = <&pd_cam>;
@@ -355,8 +354,7 @@
 		sysmmu_fimd0: sysmmu@11e20000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x11e20000 0x1000>;
-			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUFIMD0>, <&cmu CLK_FIMD0>;
 			power-domains = <&pd_lcd0>;
@@ -507,8 +505,7 @@
 		sysmmu_mfc: sysmmu@13620000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x13620000 0x1000>;
-			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUMFC_L>, <&cmu CLK_MFC>;
 			power-domains = <&pd_mfc>;
Signature · 1 line
2.17.1
#16 lore raw

Re: [PATCH v2] ARM: dts: exynos: remove obsolete IRQ lines

Quoted 11 lines · Maciej Falkowski

In commit 7222e8db2d506197ee183de0f9b76b3ad97e8c18 (iommu/exynos: Fix build errors) Exynos3250 iommu driver stopped supporting two IRQ lines. The second IRQ line in DTS is ignored and is not needed.

---
v2:
- change commit message to proper version
- add proper recipients

Thanks, you fixed it before I replied with comments. Except the subject also the commit SHA should be shorter. The guide is here:
https://elixir.bootlin.com/linux/v5.3-rc8/source/Documentation/process/submitting-patches.rst#L183

No need to resend, I'll fix it while applying. However this will be after merge window.

Best regards,
Krzysztof

Quoted 41 lines
---
 arch/arm/boot/dts/exynos3250.dtsi | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/dts/exynos3250.dtsi +3 -7
index 784818490376..190d9160a5d1 100644
@@ -314,8 +314,7 @@
                sysmmu_jpeg: sysmmu@11a60000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x11a60000 0x1000>;
-                       interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&cmu CLK_SMMUJPEG>, <&cmu CLK_JPEG>;
                        power-domains = <&pd_cam>;
@@ -355,8 +354,7 @@
                sysmmu_fimd0: sysmmu@11e20000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x11e20000 0x1000>;
-                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&cmu CLK_SMMUFIMD0>, <&cmu CLK_FIMD0>;
                        power-domains = <&pd_lcd0>;
@@ -507,8 +505,7 @@
                sysmmu_mfc: sysmmu@13620000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x13620000 0x1000>;
-                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&cmu CLK_SMMUMFC_L>, <&cmu CLK_MFC>;
                        power-domains = <&pd_mfc>;
--

2.17.1

#17 lore raw

PATCH RESEND v2 1/1 ARM: dts: exynos: remove obsolete IRQ lines

From: Maciej Falkowski <[email protected]>

In commit 7222e8db2d50 ("iommu/exynos: Fix build errors") Exynos3250 iommu driver stopped supporting two IRQ lines. The second IRQ line in DTS is ignored and is not needed.

---
 arch/arm/boot/dts/exynos3250.dtsi | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/dts/exynos3250.dtsi +3 -6
index 784818490376..190d9160a5d1 100644
@@ -314,8 +314,7 @@
 		sysmmu_jpeg: sysmmu@11a60000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x11a60000 0x1000>;
-			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUJPEG>, <&cmu CLK_JPEG>;
 			power-domains = <&pd_cam>;
@@ -355,8 +354,7 @@
 		sysmmu_fimd0: sysmmu@11e20000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x11e20000 0x1000>;
-			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUFIMD0>, <&cmu CLK_FIMD0>;
 			power-domains = <&pd_lcd0>;
@@ -507,8 +505,7 @@
 		sysmmu_mfc: sysmmu@13620000 {
 			compatible = "samsung,exynos-sysmmu";
 			reg = <0x13620000 0x1000>;
-			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "sysmmu", "master";
 			clocks = <&cmu CLK_SMMUMFC_L>, <&cmu CLK_MFC>;
 			power-domains = <&pd_mfc>;
Signature · 1 line
2.17.1
maintainer Applied
#18 lore raw

Re: [PATCH v2 resend] ARM: dts: exynos: remove obsolete IRQ lines

Quoted 10 lines · Marek Szyprowski

From: Maciej Falkowski <[email protected]>

In commit 7222e8db2d50 ("iommu/exynos: Fix build errors") Exynos3250 iommu driver stopped supporting two IRQ lines. The second IRQ line in DTS is ignored and is not needed.

---
 arch/arm/boot/dts/exynos3250.dtsi | 9 +++------

Thanks, applied.

Best regards,
Krzysztof