linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema
@ 2019-09-07  9:19 Krzysztof Kozlowski
  2019-09-07  9:19 ` [PATCH v2 02/11] dt-bindings: power: syscon-poweroff: " Krzysztof Kozlowski
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:19 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert the Syscon reboot bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Remove unneeded maxItems from uint32 fields,
2. Simplify if-else-then.
---
 .../bindings/power/reset/syscon-reboot.txt    | 30 ----------
 .../bindings/power/reset/syscon-reboot.yaml   | 60 +++++++++++++++++++
 2 files changed, 60 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot.txt
 create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml

diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot.txt b/Documentation/devicetree/bindings/power/reset/syscon-reboot.txt
deleted file mode 100644
index e23dea8344f8..000000000000
--- a/Documentation/devicetree/bindings/power/reset/syscon-reboot.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-Generic SYSCON mapped register reset driver
-
-This is a generic reset driver using syscon to map the reset register.
-The reset is generally performed with a write to the reset register
-defined by the register map pointed by syscon reference plus the offset
-with the value and mask defined in the reboot node.
-
-Required properties:
-- compatible: should contain "syscon-reboot"
-- regmap: this is phandle to the register map node
-- offset: offset in the register map for the reboot register (in bytes)
-- value: the reset value written to the reboot register (32 bit access)
-
-Optional properties:
-- mask: update only the register bits defined by the mask (32 bit)
-
-Legacy usage:
-If a node doesn't contain a value property but contains a mask property, the
-mask property is used as the value.
-
-Default will be little endian mode, 32 bit access only.
-
-Examples:
-
-	reboot {
-	   compatible = "syscon-reboot";
-	   regmap = <&regmapnode>;
-	   offset = <0x0>;
-	   mask = <0x1>;
-	};
diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
new file mode 100644
index 000000000000..a7920f5eef79
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/syscon-reboot.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic SYSCON mapped register reset driver
+
+maintainers:
+  - Sebastian Reichel <sre@kernel.org>
+
+description: |+
+  This is a generic reset driver using syscon to map the reset register.
+  The reset is generally performed with a write to the reset register
+  defined by the register map pointed by syscon reference plus the offset
+  with the value and mask defined in the reboot node.
+  Default will be little endian mode, 32 bit access only.
+
+properties:
+  compatible:
+    const: syscon-reboot
+
+  mask:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Update only the register bits defined by the mask (32 bit).
+
+  offset:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Offset in the register map for the reboot register (in bytes).
+
+  regmap:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the register map node.
+
+  value:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: The reset value written to the reboot register (32 bit access).
+
+required:
+  - compatible
+  - regmap
+  - offset
+
+allOf:
+  - if:
+      not:
+        required:
+          - mask
+    then:
+      required:
+        - value
+
+examples:
+  - |
+    reboot {
+      compatible = "syscon-reboot";
+      regmap = <&regmapnode>;
+      offset = <0x0>;
+      mask = <0x1>;
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 02/11] dt-bindings: power: syscon-poweroff: Convert bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
@ 2019-09-07  9:19 ` Krzysztof Kozlowski
  2019-09-18 12:56   ` Rob Herring
  2019-09-07  9:19 ` [PATCH v2 03/11] dt-bindings: arm: samsung: Convert Samsung board/soc " Krzysztof Kozlowski
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:19 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert the Syscon poweroff bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Remove unneeded maxItems from uint32 fields,
2. Simplify if-else-then.
---
 .../bindings/power/reset/syscon-poweroff.txt  | 30 ----------
 .../bindings/power/reset/syscon-poweroff.yaml | 60 +++++++++++++++++++
 2 files changed, 60 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
 create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-poweroff.yaml

diff --git a/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt b/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
deleted file mode 100644
index 022ed1f3bc80..000000000000
--- a/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-Generic SYSCON mapped register poweroff driver
-
-This is a generic poweroff driver using syscon to map the poweroff register.
-The poweroff is generally performed with a write to the poweroff register
-defined by the register map pointed by syscon reference plus the offset
-with the value and mask defined in the poweroff node.
-
-Required properties:
-- compatible: should contain "syscon-poweroff"
-- regmap: this is phandle to the register map node
-- offset: offset in the register map for the poweroff register (in bytes)
-- value: the poweroff value written to the poweroff register (32 bit access)
-
-Optional properties:
-- mask: update only the register bits defined by the mask (32 bit)
-
-Legacy usage:
-If a node doesn't contain a value property but contains a mask property, the
-mask property is used as the value.
-
-Default will be little endian mode, 32 bit access only.
-
-Examples:
-
-	poweroff {
-	   compatible = "syscon-poweroff";
-	   regmap = <&regmapnode>;
-	   offset = <0x0>;
-	   mask = <0x7a>;
-	};
diff --git a/Documentation/devicetree/bindings/power/reset/syscon-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/syscon-poweroff.yaml
new file mode 100644
index 000000000000..fb812937b534
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/syscon-poweroff.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/syscon-poweroff.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic SYSCON mapped register poweroff driver
+
+maintainers:
+  - Sebastian Reichel <sre@kernel.org>
+
+description: |+
+  This is a generic poweroff driver using syscon to map the poweroff register.
+  The poweroff is generally performed with a write to the poweroff register
+  defined by the register map pointed by syscon reference plus the offset
+  with the value and mask defined in the poweroff node.
+  Default will be little endian mode, 32 bit access only.
+
+properties:
+  compatible:
+    const: syscon-poweroff
+
+  mask:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Update only the register bits defined by the mask (32 bit).
+
+  offset:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Offset in the register map for the poweroff register (in bytes).
+
+  regmap:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the register map node.
+
+  value:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: The poweroff value written to the poweroff register (32 bit access).
+
+required:
+  - compatible
+  - regmap
+  - offset
+
+allOf:
+  - if:
+      not:
+        required:
+          - mask
+    then:
+      required:
+        - value
+
+examples:
+  - |
+    poweroff {
+      compatible = "syscon-poweroff";
+      regmap = <&regmapnode>;
+      offset = <0x0>;
+      mask = <0x7a>;
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 03/11] dt-bindings: arm: samsung: Convert Samsung board/soc bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
  2019-09-07  9:19 ` [PATCH v2 02/11] dt-bindings: power: syscon-poweroff: " Krzysztof Kozlowski
@ 2019-09-07  9:19 ` Krzysztof Kozlowski
  2019-09-18 12:56   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 04/11] dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings Krzysztof Kozlowski
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:19 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert Samsung S5P and Exynos SoC bindings to DT schema format using
json-schema.  This is purely conversion of already documented bindings
so it does not cover all of DTS in the Linux kernel (few S5P/Exynos and
all S3C are missing).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Make Google boards latest revision as const.
2. Split secure firmware into separate schema.
---
 .../bindings/arm/samsung/samsung-boards.txt   |  83 ---------
 .../bindings/arm/samsung/samsung-boards.yaml  | 165 ++++++++++++++++++
 .../arm/samsung/samsung-secure-firmware.yaml  |  31 ++++
 3 files changed, 196 insertions(+), 83 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
 create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-secure-firmware.yaml

diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
deleted file mode 100644
index 56021bf2a916..000000000000
--- a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-* Samsung's Exynos and S5P SoC based boards
-
-Required root node properties:
-    - compatible = should be one or more of the following.
-	- "samsung,aries"	- for S5PV210-based Samsung Aries board.
-	- "samsung,fascinate4g"	- for S5PV210-based Samsung Galaxy S Fascinate 4G (SGH-T959P) board.
-	- "samsung,galaxys"	- for S5PV210-based Samsung Galaxy S (i9000)  board.
-	- "samsung,artik5"	- for Exynos3250-based Samsung ARTIK5 module.
-	- "samsung,artik5-eval" - for Exynos3250-based Samsung ARTIK5 eval board.
-	- "samsung,monk"	- for Exynos3250-based Samsung Simband board.
-	- "samsung,rinato"	- for Exynos3250-based Samsung Gear2 board.
-	- "samsung,smdkv310"	- for Exynos4210-based Samsung SMDKV310 eval board.
-	- "samsung,trats"	- for Exynos4210-based Tizen Reference board.
-	- "samsung,universal_c210" - for Exynos4210-based Samsung board.
-	- "samsung,i9300"          - for Exynos4412-based Samsung GT-I9300 board.
-	- "samsung,i9305"          - for Exynos4412-based Samsung GT-I9305 board.
-	- "samsung,midas"       - for Exynos4412-based Samsung Midas board.
-	- "samsung,smdk4412",	- for Exynos4412-based Samsung SMDK4412 eval board.
-	- "samsung,n710x"          - for Exynos4412-based Samsung GT-N7100/GT-N7105 board.
-	- "samsung,trats2"	- for Exynos4412-based Tizen Reference board.
-	- "samsung,smdk5250"	- for Exynos5250-based Samsung SMDK5250 eval board.
-	- "samsung,xyref5260"	- for Exynos5260-based Samsung board.
-	- "samsung,smdk5410"	- for Exynos5410-based Samsung SMDK5410 eval board.
-	- "samsung,smdk5420"	- for Exynos5420-based Samsung SMDK5420 eval board.
-	- "samsung,tm2"		- for Exynos5433-based Samsung TM2 board.
-	- "samsung,tm2e"	- for Exynos5433-based Samsung TM2E board.
-
-* Other companies Exynos SoC based
-  * FriendlyARM
-	- "friendlyarm,tiny4412"  - for Exynos4412-based FriendlyARM
-				    TINY4412 board.
-  * TOPEET
-	- "topeet,itop4412-elite" - for Exynos4412-based TOPEET
-                                    Elite base board.
-
-  * Google
-	- "google,pi"		- for Exynos5800-based Google Peach Pi
-				  Rev 10+ board,
-	  also: "google,pi-rev16", "google,pi-rev15", "google,pi-rev14",
-		"google,pi-rev13", "google,pi-rev12", "google,pi-rev11",
-		"google,pi-rev10", "google,peach".
-
-	- "google,pit"		- for Exynos5420-based Google Peach Pit
-				  Rev 6+ (Exynos5420),
-	  also: "google,pit-rev16", "google,pit-rev15", "google,pit-rev14",
-		"google,pit-rev13", "google,pit-rev12", "google,pit-rev11",
-		"google,pit-rev10", "google,pit-rev9", "google,pit-rev8",
-		"google,pit-rev7", "google,pit-rev6", "google,peach".
-
-	- "google,snow-rev4"	- for Exynos5250-based Google Snow board,
-	  also: "google,snow"
-	- "google,snow-rev5"	- for Exynos5250-based Google Snow
-				  Rev 5+ board.
-	- "google,spring"	- for Exynos5250-based Google Spring board.
-
-  * Hardkernel
-	- "hardkernel,odroid-u3"  - for Exynos4412-based Hardkernel Odroid U3.
-	- "hardkernel,odroid-x"   - for Exynos4412-based Hardkernel Odroid X.
-	- "hardkernel,odroid-x2"  - for Exynos4412-based Hardkernel Odroid X2.
-	- "hardkernel,odroid-xu"  - for Exynos5410-based Hardkernel Odroid XU.
-	- "hardkernel,odroid-xu3" - for Exynos5422-based Hardkernel Odroid XU3.
-	- "hardkernel,odroid-xu3-lite" - for Exynos5422-based Hardkernel
-					 Odroid XU3 Lite board.
-	- "hardkernel,odroid-xu4" - for Exynos5422-based Hardkernel Odroid XU4.
-	- "hardkernel,odroid-hc1" - for Exynos5422-based Hardkernel Odroid HC1.
-
-  * Insignal
-	- "insignal,arndale"      - for Exynos5250-based Insignal Arndale board.
-	- "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
-				    Octa board.
-	- "insignal,origen"       - for Exynos4210-based Insignal Origen board.
-	- "insignal,origen4412"   - for Exynos4412-based Insignal Origen board.
-
-
-Optional nodes:
-    - firmware node, specifying presence and type of secure firmware:
-        - compatible: only "samsung,secure-firmware" is currently supported
-        - reg: address of non-secure SYSRAM used for communication with firmware
-
-	firmware@203f000 {
-		compatible = "samsung,secure-firmware";
-		reg = <0x0203F000 0x1000>;
-	};
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
new file mode 100644
index 000000000000..d8811edf7b7a
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
@@ -0,0 +1,165 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/samsung/samsung-boards.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos and S5P SoC based boards
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - description: S5PV210 based Aries boards
+        items:
+          - enum:
+              - samsung,fascinate4g             # Samsung Galaxy S Fascinate 4G (SGH-T959P)
+              - samsung,galaxys                 # Samsung Galaxy S (i9000)
+          - const: samsung,aries
+          - const: samsung,s5pv210
+
+      - description: Exynos3250 based boards
+        items:
+          - enum:
+              - samsung,monk                    # Samsung Simband
+              - samsung,rinato                  # Samsung Gear2
+          - const: samsung,exynos3250
+          - const: samsung,exynos3
+
+      - description: Samsung ARTIK5 boards
+        items:
+          - enum:
+              - samsung,artik5-eval             # Samsung ARTIK5 eval board
+          - const: samsung,artik5               # Samsung ARTIK5 module
+          - const: samsung,exynos3250
+          - const: samsung,exynos3
+
+      - description: Exynos4210 based boards
+        items:
+          - enum:
+              - insignal,origen                 # Insignal Origen
+              - samsung,smdkv310                # Samsung SMDKV310 eval
+              - samsung,trats                   # Samsung Tizen Reference
+              - samsung,universal_c210          # Samsung C210
+          - const: samsung,exynos4210
+          - const: samsung,exynos4
+
+      - description: Exynos4412 based boards
+        items:
+          - enum:
+              - friendlyarm,tiny4412            # FriendlyARM TINY4412
+              - hardkernel,odroid-u3            # Hardkernel Odroid U3
+              - hardkernel,odroid-x             # Hardkernel Odroid X
+              - hardkernel,odroid-x2            # Hardkernel Odroid X2
+              - insignal,origen4412             # Insignal Origen
+              - samsung,smdk4412                # Samsung SMDK4412 eval
+              - topeet,itop4412-elite           # TOPEET Elite base
+          - const: samsung,exynos4412
+          - const: samsung,exynos4
+
+      - description: Samsung Midas family boards
+        items:
+          - enum:
+              - samsung,i9300                   # Samsung GT-I9300
+              - samsung,i9305                   # Samsung GT-I9305
+              - samsung,n710x                   # Samsung GT-N7100/GT-N7105
+              - samsung,trats2                  # Samsung Tizen Reference
+          - const: samsung,midas
+          - const: samsung,exynos4412
+          - const: samsung,exynos4
+
+      - description: Exynos5250 based boards
+        items:
+          - enum:
+              - google,snow-rev5                # Google Snow Rev 5+
+              - google,spring                   # Google Spring
+              - insignal,arndale                # Insignal Arndale
+              - samsung,smdk5250                # Samsung SMDK5250 eval
+          - const: samsung,exynos5250
+          - const: samsung,exynos5
+
+      - description: Google Snow Boards (Rev 4+)
+        items:
+          - const: google,snow-rev4
+          - const: google,snow
+          - const: samsung,exynos5250
+          - const: samsung,exynos5
+
+      - description: Exynos5260 based boards
+        items:
+          - enum:
+              - samsung,xyref5260               # Samsung Xyref5260 eval
+          - const: samsung,exynos5260
+          - const: samsung,exynos5
+
+      - description: Exynos5410 based boards
+        items:
+          - enum:
+              - hardkernel,odroid-xu            # Hardkernel Odroid XU
+              - samsung,smdk5410                # Samsung SMDK5410 eval
+          - const: samsung,exynos5410
+          - const: samsung,exynos5
+
+      - description: Exynos5420 based boards
+        items:
+          - enum:
+              - insignal,arndale-octa           # Insignal Arndale Octa
+              - samsung,smdk5420                # Samsung SMDK5420 eval
+          - const: samsung,exynos5420
+          - const: samsung,exynos5
+
+      - description: Google Peach Pit Boards (Rev 6+)
+        items:
+          - const: google,pit-rev16
+          - const: google,pit-rev15
+          - const: google,pit-rev14
+          - const: google,pit-rev13
+          - const: google,pit-rev12
+          - const: google,pit-rev11
+          - const: google,pit-rev10
+          - const: google,pit-rev9
+          - const: google,pit-rev8
+          - const: google,pit-rev7
+          - const: google,pit-rev6
+          - const: google,pit
+          - const: google,peach
+          - const: samsung,exynos5420
+          - const: samsung,exynos5
+
+      - description: Exynos5800 based boards
+        items:
+          - enum:
+              - hardkernel,odroid-xu3           # Hardkernel Odroid XU3
+              - hardkernel,odroid-xu3-lite      # Hardkernel Odroid XU3 Lite
+              - hardkernel,odroid-xu4           # Hardkernel Odroid XU4
+              - hardkernel,odroid-hc1           # Hardkernel Odroid HC1
+          - const: samsung,exynos5800
+          - const: samsung,exynos5
+
+      - description: Google Peach Pi Boards (Rev 10+)
+        items:
+          - const: google,pi-rev16
+          - const: google,pi-rev15
+          - const: google,pi-rev14
+          - const: google,pi-rev13
+          - const: google,pi-rev12
+          - const: google,pi-rev11
+          - const: google,pi-rev10
+          - const: google,pi
+          - const: google,peach
+          - const: samsung,exynos5800
+          - const: samsung,exynos5
+
+      - description: Exynos5433 based boards
+        items:
+          - enum:
+              - samsung,tm2                     # Samsung TM2
+              - samsung,tm2e                    # Samsung TM2E
+          - const: samsung,exynos5433
+
+required:
+  - compatible
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-secure-firmware.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-secure-firmware.yaml
new file mode 100644
index 000000000000..51d23b6f8a94
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-secure-firmware.yaml
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/samsung/samsung-secure-firmware.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos Secure Firmware
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  compatible:
+    items:
+      - const: samsung,secure-firmware
+
+  reg:
+    description:
+      Address of non-secure SYSRAM used for communication with firmware.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    firmware@203f000 {
+      compatible = "samsung,secure-firmware";
+      reg = <0x0203f000 0x1000>;
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 04/11] dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
  2019-09-07  9:19 ` [PATCH v2 02/11] dt-bindings: power: syscon-poweroff: " Krzysztof Kozlowski
  2019-09-07  9:19 ` [PATCH v2 03/11] dt-bindings: arm: samsung: Convert Samsung board/soc " Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-18 12:56   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 05/11] dt-bindings: arm: samsung: Document missing Exynos7 " Krzysztof Kozlowski
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Add missing documentation of Samsung S5Pv210 SoC based boards bindings.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../bindings/arm/samsung/samsung-boards.yaml           | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
index d8811edf7b7a..98401a6db2a0 100644
--- a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
@@ -14,6 +14,16 @@ properties:
     const: '/'
   compatible:
     oneOf:
+      - description: S5PV210 based boards
+        items:
+          - enum:
+              - aesop,torbreck                  # aESOP Torbreck based on S5PV210
+              - samsung,aquila                  # Samsung Aquila based on S5PC110
+              - samsung,goni                    # Samsung Goni based on S5PC110
+              - yic,smdkc110                    # YIC System SMDKC110 based on S5PC110
+              - yic,smdkv210                    # YIC System SMDKV210 based on S5PV210
+          - const: samsung,s5pv210
+
       - description: S5PV210 based Aries boards
         items:
           - enum:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 05/11] dt-bindings: arm: samsung: Document missing Exynos7 boards bindings
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 04/11] dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-18 12:56   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 06/11] dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Add missing documentation of ARMv8 Samsung Exynos7 SoC based boards
bindings.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/arm/samsung/samsung-boards.yaml     | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
index 98401a6db2a0..63acd57c4799 100644
--- a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
@@ -171,5 +171,11 @@ properties:
               - samsung,tm2e                    # Samsung TM2E
           - const: samsung,exynos5433
 
+      - description: Exynos7 based boards
+        items:
+          - enum:
+              - samsung,exynos7-espresso        # Samsung Exynos7 Espresso
+          - const: samsung,exynos7
+
 required:
   - compatible
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 06/11] dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 05/11] dt-bindings: arm: samsung: Document missing Exynos7 " Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-18 12:57   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 07/11] dt-bindings: arm: samsung: Convert Exynos PMU " Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert Samsung Exynos Chipid bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../bindings/arm/samsung/exynos-chipid.txt    | 12 ---------
 .../bindings/arm/samsung/exynos-chipid.yaml   | 25 +++++++++++++++++++
 2 files changed, 25 insertions(+), 12 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-chipid.txt
 create mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml

diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.txt
deleted file mode 100644
index 85c5dfd4a720..000000000000
--- a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-SAMSUNG Exynos SoCs Chipid driver.
-
-Required properties:
-- compatible : Should at least contain "samsung,exynos4210-chipid".
-
-- reg: offset and length of the register set
-
-Example:
-	chipid@10000000 {
-		compatible = "samsung,exynos4210-chipid";
-		reg = <0x10000000 0x100>;
-	};
diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
new file mode 100644
index 000000000000..9c573ad7dc7d
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/samsung/exynos-chipid.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos SoC series Chipid driver
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  compatible:
+    items:
+      - const: samsung,exynos4210-chipid
+
+  reg:
+    maxItems: 1
+
+examples:
+  - |
+    chipid@10000000 {
+      compatible = "samsung,exynos4210-chipid";
+      reg = <0x10000000 0x100>;
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 07/11] dt-bindings: arm: samsung: Convert Exynos PMU bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 06/11] dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-18 12:43   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 08/11] dt-bindings: arm: samsung: Convert Exynos System Registers " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert Samsung Exynos Power Management Unit (PMU) bindings to DT schema
format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Fix clock-names to match all elements against schema (any number of
   any clkoutN values).
   This currently fails:
       properties:clock-names:items: {'enum': ['clkout0', 'clkout1', 'clkout2',
       'clkout3', 'clkout4', 'clkout5', 'clkout6', 'clkout7', 'clkout8',
       'clkout9', 'clkout10', 'clkout11', 'clkout12', 'clkout13', 'clkout14',
       'clkout15', 'clkout16']} is not of type 'array

2. Add syscon reboot and poweroff nodes.
---
 .../devicetree/bindings/arm/samsung/pmu.txt   |  72 -----------
 .../devicetree/bindings/arm/samsung/pmu.yaml  | 117 ++++++++++++++++++
 2 files changed, 117 insertions(+), 72 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/samsung/pmu.txt
 create mode 100644 Documentation/devicetree/bindings/arm/samsung/pmu.yaml

diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
deleted file mode 100644
index 433bfd7593ac..000000000000
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-SAMSUNG Exynos SoC series PMU Registers
-
-Properties:
- - compatible : should contain two values. First value must be one from following list:
-		   - "samsung,exynos3250-pmu" - for Exynos3250 SoC,
-		   - "samsung,exynos4210-pmu" - for Exynos4210 SoC,
-		   - "samsung,exynos4412-pmu" - for Exynos4412 SoC,
-		   - "samsung,exynos5250-pmu" - for Exynos5250 SoC,
-		   - "samsung,exynos5260-pmu" - for Exynos5260 SoC.
-		   - "samsung,exynos5410-pmu" - for Exynos5410 SoC,
-		   - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
-		   - "samsung,exynos5433-pmu" - for Exynos5433 SoC.
-		   - "samsung,exynos7-pmu" - for Exynos7 SoC.
-		second value must be always "syscon".
-
- - reg : offset and length of the register set.
-
- - #clock-cells : must be <1>, since PMU requires once cell as clock specifier.
-		The single specifier cell is used as index to list of clocks
-		provided by PMU, which is currently:
-			0 : SoC clock output (CLKOUT pin)
-
- - clock-names : list of clock names for particular CLKOUT mux inputs in
-		following format:
-			"clkoutN", where N is a decimal number corresponding to
-			CLKOUT mux control bits value for given input, e.g.
-				"clkout0", "clkout7", "clkout15".
-
- - clocks : list of phandles and specifiers to all input clocks listed in
-		clock-names property.
-
-Optional properties:
-
-Some PMUs are capable of behaving as an interrupt controller (mostly
-to wake up a suspended PMU). In which case, they can have the
-following properties:
-
-- interrupt-controller: indicate that said PMU is an interrupt controller
-
-- #interrupt-cells: must be identical to the that of the parent interrupt
-  controller.
-
-
-Optional nodes:
-
-- nodes defining the restart and poweroff syscon children
-
-
-Example :
-pmu_system_controller: system-controller@10040000 {
-	compatible = "samsung,exynos5250-pmu", "syscon";
-	reg = <0x10040000 0x5000>;
-	interrupt-controller;
-	#interrupt-cells = <3>;
-	interrupt-parent = <&gic>;
-	#clock-cells = <1>;
-	clock-names = "clkout0", "clkout1", "clkout2", "clkout3",
-			"clkout4", "clkout8", "clkout9";
-	clocks = <&clock CLK_OUT_DMC>, <&clock CLK_OUT_TOP>,
-		<&clock CLK_OUT_LEFTBUS>, <&clock CLK_OUT_RIGHTBUS>,
-		<&clock CLK_OUT_CPU>, <&clock CLK_XXTI>,
-		<&clock CLK_XUSBXTI>;
-};
-
-Example of clock consumer :
-
-usb3503: usb3503@8 {
-	/* ... */
-	clock-names = "refclk";
-	clocks = <&pmu_system_controller 0>;
-	/* ... */
-};
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.yaml b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
new file mode 100644
index 000000000000..a5a02f8237fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
@@ -0,0 +1,117 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/samsung/pmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos SoC series Power Management Unit (PMU)
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - samsung,exynos3250-pmu
+          - samsung,exynos4210-pmu
+          - samsung,exynos4412-pmu
+          - samsung,exynos5250-pmu
+          - samsung,exynos5260-pmu
+          - samsung,exynos5410-pmu
+          - samsung,exynos5420-pmu
+          - samsung,exynos5433-pmu
+          - samsung,exynos7-pmu
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+
+  clock-names:
+    description:
+      List of clock names for particular CLKOUT mux inputs
+    minItems: 1
+    maxItems: 32
+    items:
+      enum:
+        - clkout0
+        - clkout1
+        - clkout2
+        - clkout3
+        - clkout4
+        - clkout5
+        - clkout6
+        - clkout7
+        - clkout8
+        - clkout9
+        - clkout10
+        - clkout11
+        - clkout12
+        - clkout13
+        - clkout14
+        - clkout15
+        - clkout16
+        - clkout17
+        - clkout18
+        - clkout19
+        - clkout20
+        - clkout21
+        - clkout22
+        - clkout23
+        - clkout24
+        - clkout25
+        - clkout26
+        - clkout27
+        - clkout28
+        - clkout29
+        - clkout30
+        - clkout31
+
+  clocks:
+    minItems: 1
+    maxItems: 32
+
+  interrupt-controller:
+    description:
+      Some PMUs are capable of behaving as an interrupt controller (mostly
+      to wake up a suspended PMU).
+
+  '#interrupt-cells':
+    description:
+      Must be identical to the that of the parent interrupt controller.
+    const: 3
+
+  syscon-poweroff:
+    $ref: "../../power/reset/syscon-poweroff.yaml#"
+    type: object
+    description:
+      Node for power off method
+
+  syscon-reboot:
+    $ref: "../../power/reset/syscon-reboot.yaml#"
+    type: object
+    description:
+      Node for reboot method
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+  - clock-names
+  - clocks
+
+examples:
+  - |
+    pmu_system_controller: system-controller@10040000 {
+      compatible = "samsung,exynos5250-pmu", "syscon";
+      reg = <0x10040000 0x5000>;
+      interrupt-controller;
+      #interrupt-cells = <3>;
+      interrupt-parent = <&gic>;
+      #clock-cells = <1>;
+      clock-names = "clkout16";
+      clocks = <&clock 0>; // CLK_FIN_PLL
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 08/11] dt-bindings: arm: samsung: Convert Exynos System Registers bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 07/11] dt-bindings: arm: samsung: Convert Exynos PMU " Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-18 12:36   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 09/11] dt-bindings: rtc: s3c: Convert S3C/Exynos RTC " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert Samsung Exynos System Registers (SYSREG) bindings to DT schema
format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Example somehow fails:
Documentation/devicetree/bindings/arm/samsung/pmu.example.dt.yaml:
system-controller@10040000: compatible:0: 'samsung,exynos5250-pmu' is
not one of ['samsung,exynos4-sysreg', 'samsung,exynos5-sysreg']

It seems that PMU schema is applied to sysreq nodes (and vice-versa).
---
 .../bindings/arm/samsung/sysreg.txt           | 19 -----------
 .../bindings/arm/samsung/sysreg.yaml          | 33 +++++++++++++++++++
 2 files changed, 33 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/samsung/sysreg.txt
 create mode 100644 Documentation/devicetree/bindings/arm/samsung/sysreg.yaml

diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
deleted file mode 100644
index 4fced6e9d5e4..000000000000
--- a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-SAMSUNG S5P/Exynos SoC series System Registers (SYSREG)
-
-Properties:
- - compatible : should contain two values. First value must be one from following list:
-		- "samsung,exynos4-sysreg" - for Exynos4 based SoCs,
-		- "samsung,exynos5-sysreg" - for Exynos5 based SoCs.
-		second value must be always "syscon".
- - reg : offset and length of the register set.
-
-Example:
-	syscon@10010000 {
-		compatible = "samsung,exynos4-sysreg", "syscon";
-		reg = <0x10010000 0x400>;
-	};
-
-	syscon@10050000 {
-		compatible = "samsung,exynos5-sysreg", "syscon";
-		reg = <0x10050000 0x5000>;
-	};
diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml b/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
new file mode 100644
index 000000000000..a3d44646e441
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/samsung/sysreg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S5P/Exynos SoC series System Registers (SYSREG)
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - samsung,exynos4-sysreg
+          - samsung,exynos5-sysreg
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+examples:
+  - |
+    syscon@10010000 {
+      compatible = "samsung,exynos4-sysreg", "syscon";
+      reg = <0x10010000 0x400>;
+    };
+
+    syscon@10050000 {
+      compatible = "samsung,exynos5-sysreg", "syscon";
+      reg = <0x10050000 0x5000>;
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 09/11] dt-bindings: rtc: s3c: Convert S3C/Exynos RTC bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (6 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 08/11] dt-bindings: arm: samsung: Convert Exynos System Registers " Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-18 12:57   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert Samsung S3C/Exynos Real Time Clock bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Use deprecated property instead of custom select,
2. Rework clocks and clock-names matching for specific compatibles.
---
 .../devicetree/bindings/rtc/s3c-rtc.txt       | 31 -------
 .../devicetree/bindings/rtc/s3c-rtc.yaml      | 85 +++++++++++++++++++
 2 files changed, 85 insertions(+), 31 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/s3c-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/s3c-rtc.yaml

diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.txt b/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
deleted file mode 100644
index fdde63a5419c..000000000000
--- a/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-* Samsung's S3C Real Time Clock controller
-
-Required properties:
-- compatible: should be one of the following.
-    * "samsung,s3c2410-rtc" - for controllers compatible with s3c2410 rtc.
-    * "samsung,s3c2416-rtc" - for controllers compatible with s3c2416 rtc.
-    * "samsung,s3c2443-rtc" - for controllers compatible with s3c2443 rtc.
-    * "samsung,s3c6410-rtc" - for controllers compatible with s3c6410 rtc.
-    * "samsung,exynos3250-rtc" - (deprecated) for controllers compatible with
-                                 exynos3250 rtc (use "samsung,s3c6410-rtc").
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- interrupts: Two interrupt numbers to the cpu should be specified. First
-  interrupt number is the rtc alarm interrupt and second interrupt number
-  is the rtc tick interrupt. The number of cells representing a interrupt
-  depends on the parent interrupt controller.
-- clocks: Must contain a list of phandle and clock specifier for the rtc
-          clock and in the case of a s3c6410 compatible controller, also
-          a source clock.
-- clock-names: Must contain "rtc" and for a s3c6410 compatible controller,
-               a "rtc_src" sorted in the same order as the clocks property.
-
-Example:
-
-	rtc@10070000 {
-		compatible = "samsung,s3c6410-rtc";
-		reg = <0x10070000 0x100>;
-		interrupts = <44 0 45 0>;
-		clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
-		clock-names = "rtc", "rtc_src";
-	};
diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
new file mode 100644
index 000000000000..951a6a485709
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/s3c-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S3C, S5P and Exynos Real Time Clock controller
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - samsung,s3c2410-rtc
+          - samsung,s3c2416-rtc
+          - samsung,s3c2443-rtc
+          - samsung,s3c6410-rtc
+      - const: samsung,exynos3250-rtc
+        deprecated: true
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description:
+      Must contain a list of phandle and clock specifier for the rtc
+      clock and in the case of a s3c6410 compatible controller, also
+      a source clock.
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    description:
+      Must contain "rtc" and for a s3c6410 compatible controller
+      also "rtc_src".
+    minItems: 1
+    maxItems: 2
+
+  interrupts:
+    description:
+      Two interrupt numbers to the cpu should be specified. First
+      interrupt number is the rtc alarm interrupt and second interrupt number
+      is the rtc tick interrupt. The number of cells representing a interrupt
+      depends on the parent interrupt controller.
+    minItems: 2
+    maxItems: 2
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - samsung,s3c6410-rtc
+              - samsung,exynos3250-rtc
+    then:
+      properties:
+        clocks:
+          minItems: 2
+          maxItems: 2
+        clock-names:
+          items:
+            - const: rtc
+            - const: rtc_src
+    else:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 1
+        clock-names:
+          items:
+            - const: rtc
+
+examples:
+  - |
+    rtc@10070000 {
+      compatible = "samsung,s3c6410-rtc";
+      reg = <0x10070000 0x100>;
+      interrupts = <0 44 4>, <0 45 4>;
+      clocks = <&clock 0>, // CLK_RTC
+               <&s2mps11_osc 0>; // S2MPS11_CLK_AP
+      clock-names = "rtc", "rtc_src";
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (7 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 09/11] dt-bindings: rtc: s3c: Convert S3C/Exynos RTC " Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-08 12:29   ` Jonathan Cameron
  2019-09-18 12:58   ` Rob Herring
  2019-09-07  9:20 ` [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges Krzysztof Kozlowski
  2019-09-18 12:55 ` [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Rob Herring
  10 siblings, 2 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Convert Samsung Exynos Analog to Digital Converter bindings to DT schema
format using json-schema.

This is a direct conversion of existing bindings so it also copies the
existing error in the bindings regarding the requirement of two register
address ranges for certain compatibles.  The inconsistency in binding
was caused by commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
register access").

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Rework reg, clocks and clock-names matching for specific compatibles,
2. Make samsung,syscon-phandle required only on certain compatibles,
3. Fix indentation.
---
 .../bindings/iio/adc/samsung,exynos-adc.txt   | 107 ------------
 .../bindings/iio/adc/samsung,exynos-adc.yaml  | 163 ++++++++++++++++++
 2 files changed, 163 insertions(+), 107 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml

diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
deleted file mode 100644
index e1fe02f3e3e9..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-Samsung Exynos Analog to Digital Converter bindings
-
-The devicetree bindings are for the new ADC driver written for
-Exynos4 and upward SoCs from Samsung.
-
-New driver handles the following
-1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
-   and future SoCs from Samsung
-2. Add ADC driver under iio/adc framework
-3. Also adds the Documentation for device tree bindings
-
-Required properties:
-- compatible:		Must be "samsung,exynos-adc-v1"
-				for Exynos5250 controllers.
-			Must be "samsung,exynos-adc-v2" for
-				future controllers.
-			Must be "samsung,exynos3250-adc" for
-				controllers compatible with ADC of Exynos3250.
-			Must be "samsung,exynos4212-adc" for
-				controllers compatible with ADC of Exynos4212 and Exynos4412.
-			Must be "samsung,exynos7-adc" for
-				the ADC in Exynos7 and compatibles
-			Must be "samsung,s3c2410-adc" for
-				the ADC in s3c2410 and compatibles
-			Must be "samsung,s3c2416-adc" for
-				the ADC in s3c2416 and compatibles
-			Must be "samsung,s3c2440-adc" for
-				the ADC in s3c2440 and compatibles
-			Must be "samsung,s3c2443-adc" for
-				the ADC in s3c2443 and compatibles
-			Must be "samsung,s3c6410-adc" for
-				the ADC in s3c6410 and compatibles
-			Must be "samsung,s5pv210-adc" for
-				the ADC in s5pv210 and compatibles
-- reg:			List of ADC register address range
-			- The base address and range of ADC register
-			- The base address and range of ADC_PHY register (every
-			  SoC except for s3c24xx/s3c64xx ADC)
-- interrupts: 		Contains the interrupt information for the timer. The
-			format is being dependent on which interrupt controller
-			the Samsung device uses.
-- #io-channel-cells = <1>; As ADC has multiple outputs
-- clocks		From common clock bindings: handles to clocks specified
-			in "clock-names" property, in the same order.
-- clock-names		From common clock bindings: list of clock input names
-			used by ADC block:
-			- "adc" : ADC bus clock
-			- "sclk" : ADC special clock (only for Exynos3250 and
-				   compatible ADC block)
-- vdd-supply		VDD input supply.
-
-- samsung,syscon-phandle Contains the PMU system controller node
-			(To access the ADC_PHY register on Exynos5250/5420/5800/3250)
-Optional properties:
-- has-touchscreen:	If present, indicates that a touchscreen is
-			connected an usable.
-
-Note: child nodes can be added for auto probing from device tree.
-
-Example: adding device info in dtsi file
-
-adc: adc@12d10000 {
-	compatible = "samsung,exynos-adc-v1";
-	reg = <0x12D10000 0x100>;
-	interrupts = <0 106 0>;
-	#io-channel-cells = <1>;
-	io-channel-ranges;
-
-	clocks = <&clock 303>;
-	clock-names = "adc";
-
-	vdd-supply = <&buck5_reg>;
-	samsung,syscon-phandle = <&pmu_system_controller>;
-};
-
-Example: adding device info in dtsi file for Exynos3250 with additional sclk
-
-adc: adc@126c0000 {
-	compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2;
-	reg = <0x126C0000 0x100>;
-	interrupts = <0 137 0>;
-	#io-channel-cells = <1>;
-	io-channel-ranges;
-
-	clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
-	clock-names = "adc", "sclk";
-
-	vdd-supply = <&buck5_reg>;
-	samsung,syscon-phandle = <&pmu_system_controller>;
-};
-
-Example: Adding child nodes in dts file
-
-adc@12d10000 {
-
-	/* NTC thermistor is a hwmon device */
-	ncp15wb473@0 {
-		compatible = "murata,ncp15wb473";
-		pullup-uv = <1800000>;
-		pullup-ohm = <47000>;
-		pulldown-ohm = <0>;
-		io-channels = <&adc 4>;
-	};
-};
-
-Note: Does not apply to ADC driver under arch/arm/plat-samsung/
-Note: The child node can be added under the adc node or separately.
diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
new file mode 100644
index 000000000000..dd58121f25b1
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -0,0 +1,163 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/samsung,exynos-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos Analog to Digital Converter (ADC)
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  compatible:
+    enum:
+      - samsung,exynos-adc-v1                 # Exynos5250
+      - samsung,exynos-adc-v2
+      - samsung,exynos3250-adc
+      - samsung,exynos4212-adc                # Exynos4212 and Exynos4412
+      - samsung,exynos7-adc
+      - samsung,s3c2410-adc
+      - samsung,s3c2416-adc
+      - samsung,s3c2440-adc
+      - samsung,s3c2443-adc
+      - samsung,s3c6410-adc
+      - samsung,s5pv210-adc
+
+  reg:
+    minItems: 1
+    maxItems: 2
+
+  clocks:
+    description:
+      Phandle to ADC bus clock. For Exynos3250 additional clock is needed.
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    description:
+      Must contain clock names (adc, sclk) matching phandles in clocks
+      property.
+    minItems: 1
+    maxItems: 2
+
+  interrupts:
+    maxItems: 1
+
+  "#io-channel-cells":
+    const: 1
+
+  vdd-supply:
+    description: VDD input supply
+    maxItems: 1
+
+  samsung,syscon-phandle:
+    $ref: '/schemas/types.yaml#/definitions/phandle'
+    description:
+      Phandle to the PMU system controller node (to access the ADC_PHY
+      register on Exynos5250/5420/5800/3250).
+
+  has-touchscreen:
+    description:
+      If present, indicates that a touchscreen is connected and usable.
+    type: boolean
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+  - "#io-channel-cells"
+  - vdd-supply
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - samsung,exynos-adc-v1
+              - samsung,exynos-adc-v2
+              - samsung,exynos3250-adc
+              - samsung,exynos4212-adc
+              - samsung,s5pv210-adc
+    then:
+      properties:
+        reg:
+          items:
+            # For S5P and Exynos
+            - description: base registers
+            - description: phy registers
+      required:
+        - samsung,syscon-phandle
+    else:
+      properties:
+        reg:
+          items:
+            - description: base registers
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - samsung,exynos3250-adc
+    then:
+      properties:
+        clocks:
+          minItems: 2
+          maxItems: 2
+        clock-names:
+          items:
+            - const: adc
+            - const: sclk
+    else:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 1
+        clock-names:
+          items:
+            - const: adc
+
+examples:
+  - |
+    adc: adc@12d10000 {
+      compatible = "samsung,exynos-adc-v1";
+      reg = <0x12d10000 0x100>;
+      interrupts = <0 106 0>;
+      #io-channel-cells = <1>;
+      io-channel-ranges;
+
+      clocks = <&clock 303>;
+      clock-names = "adc";
+
+      vdd-supply = <&buck5_reg>;
+      samsung,syscon-phandle = <&pmu_system_controller>;
+
+      /* NTC thermistor is a hwmon device */
+      ncp15wb473@0 {
+        compatible = "murata,ncp15wb473";
+        pullup-uv = <1800000>;
+        pullup-ohm = <47000>;
+        pulldown-ohm = <0>;
+        io-channels = <&adc 4>;
+      };
+    };
+
+  - |
+    adc@126c0000 {
+      compatible = "samsung,exynos3250-adc";
+      reg = <0x126C0000 0x100>;
+      interrupts = <0 137 0>;
+      #io-channel-cells = <1>;
+      io-channel-ranges;
+
+      clocks = <&cmu 0>, // CLK_TSADC
+               <&cmu 1>; // CLK_SCLK_TSADC
+      clock-names = "adc", "sclk";
+
+      vdd-supply = <&buck5_reg>;
+      samsung,syscon-phandle = <&pmu_system_controller>;
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (8 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC " Krzysztof Kozlowski
@ 2019-09-07  9:20 ` Krzysztof Kozlowski
  2019-09-08 12:31   ` Jonathan Cameron
  2019-09-18 12:58   ` Rob Herring
  2019-09-18 12:55 ` [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Rob Herring
  10 siblings, 2 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-07  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski,
	Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Sebastian Reichel, Alessandro Zummo,
	Alexandre Belloni, Paweł Chmiel, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-iio,
	linux-pm, linux-rtc

Commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
register access") changed the Exynos ADC driver so the PMU syscon
phandle is required instead of second register address space.  The
bindings were not updated so fix them now.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. New patch.
---
 .../bindings/iio/adc/samsung,exynos-adc.yaml     | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
index dd58121f25b1..b4c6c26681d9 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -25,8 +25,7 @@ properties:
       - samsung,s5pv210-adc
 
   reg:
-    minItems: 1
-    maxItems: 2
+    maxItems: 1
 
   clocks:
     description:
@@ -55,7 +54,7 @@ properties:
     $ref: '/schemas/types.yaml#/definitions/phandle'
     description:
       Phandle to the PMU system controller node (to access the ADC_PHY
-      register on Exynos5250/5420/5800/3250).
+      register on Exynos3250/4x12/5250/5420/5800).
 
   has-touchscreen:
     description:
@@ -83,19 +82,8 @@ allOf:
               - samsung,exynos4212-adc
               - samsung,s5pv210-adc
     then:
-      properties:
-        reg:
-          items:
-            # For S5P and Exynos
-            - description: base registers
-            - description: phy registers
       required:
         - samsung,syscon-phandle
-    else:
-      properties:
-        reg:
-          items:
-            - description: base registers
 
   - if:
       properties:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC bindings to json-schema
  2019-09-07  9:20 ` [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC " Krzysztof Kozlowski
@ 2019-09-08 12:29   ` Jonathan Cameron
  2019-09-18 12:58   ` Rob Herring
  1 sibling, 0 replies; 26+ messages in thread
From: Jonathan Cameron @ 2019-09-08 12:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Mark Rutland, Kukjin Kim, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Sebastian Reichel,
	Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:06 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> Convert Samsung Exynos Analog to Digital Converter bindings to DT schema
> format using json-schema.
> 
> This is a direct conversion of existing bindings so it also copies the
> existing error in the bindings regarding the requirement of two register
> address ranges for certain compatibles.  The inconsistency in binding
> was caused by commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
> register access").
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

To my less than experienced eye when it comes to yaml, this looks fine.
I'll wait on more experienced review before I apply it however!

Thanks,

Jonathan

> 
> ---
> 
> Changes since v1:
> 1. Rework reg, clocks and clock-names matching for specific compatibles,
> 2. Make samsung,syscon-phandle required only on certain compatibles,
> 3. Fix indentation.
> ---
>  .../bindings/iio/adc/samsung,exynos-adc.txt   | 107 ------------
>  .../bindings/iio/adc/samsung,exynos-adc.yaml  | 163 ++++++++++++++++++
>  2 files changed, 163 insertions(+), 107 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
> deleted file mode 100644
> index e1fe02f3e3e9..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
> +++ /dev/null
> @@ -1,107 +0,0 @@
> -Samsung Exynos Analog to Digital Converter bindings
> -
> -The devicetree bindings are for the new ADC driver written for
> -Exynos4 and upward SoCs from Samsung.
> -
> -New driver handles the following
> -1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
> -   and future SoCs from Samsung
> -2. Add ADC driver under iio/adc framework
> -3. Also adds the Documentation for device tree bindings
> -
> -Required properties:
> -- compatible:		Must be "samsung,exynos-adc-v1"
> -				for Exynos5250 controllers.
> -			Must be "samsung,exynos-adc-v2" for
> -				future controllers.
> -			Must be "samsung,exynos3250-adc" for
> -				controllers compatible with ADC of Exynos3250.
> -			Must be "samsung,exynos4212-adc" for
> -				controllers compatible with ADC of Exynos4212 and Exynos4412.
> -			Must be "samsung,exynos7-adc" for
> -				the ADC in Exynos7 and compatibles
> -			Must be "samsung,s3c2410-adc" for
> -				the ADC in s3c2410 and compatibles
> -			Must be "samsung,s3c2416-adc" for
> -				the ADC in s3c2416 and compatibles
> -			Must be "samsung,s3c2440-adc" for
> -				the ADC in s3c2440 and compatibles
> -			Must be "samsung,s3c2443-adc" for
> -				the ADC in s3c2443 and compatibles
> -			Must be "samsung,s3c6410-adc" for
> -				the ADC in s3c6410 and compatibles
> -			Must be "samsung,s5pv210-adc" for
> -				the ADC in s5pv210 and compatibles
> -- reg:			List of ADC register address range
> -			- The base address and range of ADC register
> -			- The base address and range of ADC_PHY register (every
> -			  SoC except for s3c24xx/s3c64xx ADC)
> -- interrupts: 		Contains the interrupt information for the timer. The
> -			format is being dependent on which interrupt controller
> -			the Samsung device uses.
> -- #io-channel-cells = <1>; As ADC has multiple outputs
> -- clocks		From common clock bindings: handles to clocks specified
> -			in "clock-names" property, in the same order.
> -- clock-names		From common clock bindings: list of clock input names
> -			used by ADC block:
> -			- "adc" : ADC bus clock
> -			- "sclk" : ADC special clock (only for Exynos3250 and
> -				   compatible ADC block)
> -- vdd-supply		VDD input supply.
> -
> -- samsung,syscon-phandle Contains the PMU system controller node
> -			(To access the ADC_PHY register on Exynos5250/5420/5800/3250)
> -Optional properties:
> -- has-touchscreen:	If present, indicates that a touchscreen is
> -			connected an usable.
> -
> -Note: child nodes can be added for auto probing from device tree.
> -
> -Example: adding device info in dtsi file
> -
> -adc: adc@12d10000 {
> -	compatible = "samsung,exynos-adc-v1";
> -	reg = <0x12D10000 0x100>;
> -	interrupts = <0 106 0>;
> -	#io-channel-cells = <1>;
> -	io-channel-ranges;
> -
> -	clocks = <&clock 303>;
> -	clock-names = "adc";
> -
> -	vdd-supply = <&buck5_reg>;
> -	samsung,syscon-phandle = <&pmu_system_controller>;
> -};
> -
> -Example: adding device info in dtsi file for Exynos3250 with additional sclk
> -
> -adc: adc@126c0000 {
> -	compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2;
> -	reg = <0x126C0000 0x100>;
> -	interrupts = <0 137 0>;
> -	#io-channel-cells = <1>;
> -	io-channel-ranges;
> -
> -	clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
> -	clock-names = "adc", "sclk";
> -
> -	vdd-supply = <&buck5_reg>;
> -	samsung,syscon-phandle = <&pmu_system_controller>;
> -};
> -
> -Example: Adding child nodes in dts file
> -
> -adc@12d10000 {
> -
> -	/* NTC thermistor is a hwmon device */
> -	ncp15wb473@0 {
> -		compatible = "murata,ncp15wb473";
> -		pullup-uv = <1800000>;
> -		pullup-ohm = <47000>;
> -		pulldown-ohm = <0>;
> -		io-channels = <&adc 4>;
> -	};
> -};
> -
> -Note: Does not apply to ADC driver under arch/arm/plat-samsung/
> -Note: The child node can be added under the adc node or separately.
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> new file mode 100644
> index 000000000000..dd58121f25b1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> @@ -0,0 +1,163 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/samsung,exynos-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung Exynos Analog to Digital Converter (ADC)
> +
> +maintainers:
> +  - Krzysztof Kozlowski <krzk@kernel.org>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - samsung,exynos-adc-v1                 # Exynos5250
> +      - samsung,exynos-adc-v2
> +      - samsung,exynos3250-adc
> +      - samsung,exynos4212-adc                # Exynos4212 and Exynos4412
> +      - samsung,exynos7-adc
> +      - samsung,s3c2410-adc
> +      - samsung,s3c2416-adc
> +      - samsung,s3c2440-adc
> +      - samsung,s3c2443-adc
> +      - samsung,s3c6410-adc
> +      - samsung,s5pv210-adc
> +
> +  reg:
> +    minItems: 1
> +    maxItems: 2
> +
> +  clocks:
> +    description:
> +      Phandle to ADC bus clock. For Exynos3250 additional clock is needed.
> +    minItems: 1
> +    maxItems: 2
> +
> +  clock-names:
> +    description:
> +      Must contain clock names (adc, sclk) matching phandles in clocks
> +      property.
> +    minItems: 1
> +    maxItems: 2
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +  vdd-supply:
> +    description: VDD input supply
> +    maxItems: 1
> +
> +  samsung,syscon-phandle:
> +    $ref: '/schemas/types.yaml#/definitions/phandle'
> +    description:
> +      Phandle to the PMU system controller node (to access the ADC_PHY
> +      register on Exynos5250/5420/5800/3250).
> +
> +  has-touchscreen:
> +    description:
> +      If present, indicates that a touchscreen is connected and usable.
> +    type: boolean
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - interrupts
> +  - "#io-channel-cells"
> +  - vdd-supply
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - samsung,exynos-adc-v1
> +              - samsung,exynos-adc-v2
> +              - samsung,exynos3250-adc
> +              - samsung,exynos4212-adc
> +              - samsung,s5pv210-adc
> +    then:
> +      properties:
> +        reg:
> +          items:
> +            # For S5P and Exynos
> +            - description: base registers
> +            - description: phy registers
> +      required:
> +        - samsung,syscon-phandle
> +    else:
> +      properties:
> +        reg:
> +          items:
> +            - description: base registers
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - samsung,exynos3250-adc
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 2
> +          maxItems: 2
> +        clock-names:
> +          items:
> +            - const: adc
> +            - const: sclk
> +    else:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          maxItems: 1
> +        clock-names:
> +          items:
> +            - const: adc
> +
> +examples:
> +  - |
> +    adc: adc@12d10000 {
> +      compatible = "samsung,exynos-adc-v1";
> +      reg = <0x12d10000 0x100>;
> +      interrupts = <0 106 0>;
> +      #io-channel-cells = <1>;
> +      io-channel-ranges;
> +
> +      clocks = <&clock 303>;
> +      clock-names = "adc";
> +
> +      vdd-supply = <&buck5_reg>;
> +      samsung,syscon-phandle = <&pmu_system_controller>;
> +
> +      /* NTC thermistor is a hwmon device */
> +      ncp15wb473@0 {
> +        compatible = "murata,ncp15wb473";
> +        pullup-uv = <1800000>;
> +        pullup-ohm = <47000>;
> +        pulldown-ohm = <0>;
> +        io-channels = <&adc 4>;
> +      };
> +    };
> +
> +  - |
> +    adc@126c0000 {
> +      compatible = "samsung,exynos3250-adc";
> +      reg = <0x126C0000 0x100>;
> +      interrupts = <0 137 0>;
> +      #io-channel-cells = <1>;
> +      io-channel-ranges;
> +
> +      clocks = <&cmu 0>, // CLK_TSADC
> +               <&cmu 1>; // CLK_SCLK_TSADC
> +      clock-names = "adc", "sclk";
> +
> +      vdd-supply = <&buck5_reg>;
> +      samsung,syscon-phandle = <&pmu_system_controller>;
> +    };


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges
  2019-09-07  9:20 ` [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges Krzysztof Kozlowski
@ 2019-09-08 12:31   ` Jonathan Cameron
  2019-09-18 12:58   ` Rob Herring
  1 sibling, 0 replies; 26+ messages in thread
From: Jonathan Cameron @ 2019-09-08 12:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Mark Rutland, Kukjin Kim, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Sebastian Reichel,
	Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:07 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> Commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
> register access") changed the Exynos ADC driver so the PMU syscon
> phandle is required instead of second register address space.  The
> bindings were not updated so fix them now.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Seems sensible. Thanks for cleaning this up.

As before I'll wait on review from Rob or similar. If they
are going via another path (fine by me as well).

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> for
both IIO related binding patches.

Thanks,

Jonathan

> 
> ---
> 
> Changes since v1:
> 1. New patch.
> ---
>  .../bindings/iio/adc/samsung,exynos-adc.yaml     | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> index dd58121f25b1..b4c6c26681d9 100644
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> @@ -25,8 +25,7 @@ properties:
>        - samsung,s5pv210-adc
>  
>    reg:
> -    minItems: 1
> -    maxItems: 2
> +    maxItems: 1
>  
>    clocks:
>      description:
> @@ -55,7 +54,7 @@ properties:
>      $ref: '/schemas/types.yaml#/definitions/phandle'
>      description:
>        Phandle to the PMU system controller node (to access the ADC_PHY
> -      register on Exynos5250/5420/5800/3250).
> +      register on Exynos3250/4x12/5250/5420/5800).
>  
>    has-touchscreen:
>      description:
> @@ -83,19 +82,8 @@ allOf:
>                - samsung,exynos4212-adc
>                - samsung,s5pv210-adc
>      then:
> -      properties:
> -        reg:
> -          items:
> -            # For S5P and Exynos
> -            - description: base registers
> -            - description: phy registers
>        required:
>          - samsung,syscon-phandle
> -    else:
> -      properties:
> -        reg:
> -          items:
> -            - description: base registers
>  
>    - if:
>        properties:


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/11] dt-bindings: arm: samsung: Convert Exynos System Registers bindings to json-schema
  2019-09-07  9:20 ` [PATCH v2 08/11] dt-bindings: arm: samsung: Convert Exynos System Registers " Krzysztof Kozlowski
@ 2019-09-18 12:36   ` Rob Herring
  2019-09-18 13:07     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:36 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Mark Rutland, Kukjin Kim, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Sebastian Reichel,
	Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat, Sep 07, 2019 at 11:20:04AM +0200, Krzysztof Kozlowski wrote:
> Convert Samsung Exynos System Registers (SYSREG) bindings to DT schema
> format using json-schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Example somehow fails:
> Documentation/devicetree/bindings/arm/samsung/pmu.example.dt.yaml:
> system-controller@10040000: compatible:0: 'samsung,exynos5250-pmu' is
> not one of ['samsung,exynos4-sysreg', 'samsung,exynos5-sysreg']
> 
> It seems that PMU schema is applied to sysreq nodes (and vice-versa).
> ---
>  .../bindings/arm/samsung/sysreg.txt           | 19 -----------
>  .../bindings/arm/samsung/sysreg.yaml          | 33 +++++++++++++++++++
>  2 files changed, 33 insertions(+), 19 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/samsung/sysreg.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
> deleted file mode 100644
> index 4fced6e9d5e4..000000000000
> --- a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -SAMSUNG S5P/Exynos SoC series System Registers (SYSREG)
> -
> -Properties:
> - - compatible : should contain two values. First value must be one from following list:
> -		- "samsung,exynos4-sysreg" - for Exynos4 based SoCs,
> -		- "samsung,exynos5-sysreg" - for Exynos5 based SoCs.
> -		second value must be always "syscon".
> - - reg : offset and length of the register set.
> -
> -Example:
> -	syscon@10010000 {
> -		compatible = "samsung,exynos4-sysreg", "syscon";
> -		reg = <0x10010000 0x400>;
> -	};
> -
> -	syscon@10050000 {
> -		compatible = "samsung,exynos5-sysreg", "syscon";
> -		reg = <0x10050000 0x5000>;
> -	};
> diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml b/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
> new file mode 100644
> index 000000000000..a3d44646e441
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
> @@ -0,0 +1,33 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/samsung/sysreg.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung S5P/Exynos SoC series System Registers (SYSREG)
> +
> +maintainers:
> +  - Krzysztof Kozlowski <krzk@kernel.org>
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - samsung,exynos4-sysreg
> +          - samsung,exynos5-sysreg
> +      - const: syscon

The problem is this will by default match any node with 'syscon'. You 
have to add a custom 'select' entry. See the LVDS panel bindings for an 
example.

I'd like to kill off 'syscon'...

> +
> +  reg:
> +    maxItems: 1
> +
> +examples:
> +  - |
> +    syscon@10010000 {
> +      compatible = "samsung,exynos4-sysreg", "syscon";
> +      reg = <0x10010000 0x400>;
> +    };
> +
> +    syscon@10050000 {
> +      compatible = "samsung,exynos5-sysreg", "syscon";
> +      reg = <0x10050000 0x5000>;
> +    };
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 07/11] dt-bindings: arm: samsung: Convert Exynos PMU bindings to json-schema
  2019-09-07  9:20 ` [PATCH v2 07/11] dt-bindings: arm: samsung: Convert Exynos PMU " Krzysztof Kozlowski
@ 2019-09-18 12:43   ` Rob Herring
  2019-09-18 13:17     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Mark Rutland, Kukjin Kim, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Sebastian Reichel,
	Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat, Sep 07, 2019 at 11:20:03AM +0200, Krzysztof Kozlowski wrote:
> Convert Samsung Exynos Power Management Unit (PMU) bindings to DT schema
> format using json-schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. Fix clock-names to match all elements against schema (any number of
>    any clkoutN values).
>    This currently fails:
>        properties:clock-names:items: {'enum': ['clkout0', 'clkout1', 'clkout2',
>        'clkout3', 'clkout4', 'clkout5', 'clkout6', 'clkout7', 'clkout8',
>        'clkout9', 'clkout10', 'clkout11', 'clkout12', 'clkout13', 'clkout14',
>        'clkout15', 'clkout16']} is not of type 'array
> 
> 2. Add syscon reboot and poweroff nodes.
> ---
>  .../devicetree/bindings/arm/samsung/pmu.txt   |  72 -----------
>  .../devicetree/bindings/arm/samsung/pmu.yaml  | 117 ++++++++++++++++++
>  2 files changed, 117 insertions(+), 72 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/samsung/pmu.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/samsung/pmu.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
> deleted file mode 100644
> index 433bfd7593ac..000000000000
> --- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
> +++ /dev/null
> @@ -1,72 +0,0 @@
> -SAMSUNG Exynos SoC series PMU Registers
> -
> -Properties:
> - - compatible : should contain two values. First value must be one from following list:
> -		   - "samsung,exynos3250-pmu" - for Exynos3250 SoC,
> -		   - "samsung,exynos4210-pmu" - for Exynos4210 SoC,
> -		   - "samsung,exynos4412-pmu" - for Exynos4412 SoC,
> -		   - "samsung,exynos5250-pmu" - for Exynos5250 SoC,
> -		   - "samsung,exynos5260-pmu" - for Exynos5260 SoC.
> -		   - "samsung,exynos5410-pmu" - for Exynos5410 SoC,
> -		   - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
> -		   - "samsung,exynos5433-pmu" - for Exynos5433 SoC.
> -		   - "samsung,exynos7-pmu" - for Exynos7 SoC.
> -		second value must be always "syscon".
> -
> - - reg : offset and length of the register set.
> -
> - - #clock-cells : must be <1>, since PMU requires once cell as clock specifier.
> -		The single specifier cell is used as index to list of clocks
> -		provided by PMU, which is currently:
> -			0 : SoC clock output (CLKOUT pin)
> -
> - - clock-names : list of clock names for particular CLKOUT mux inputs in
> -		following format:
> -			"clkoutN", where N is a decimal number corresponding to
> -			CLKOUT mux control bits value for given input, e.g.
> -				"clkout0", "clkout7", "clkout15".
> -
> - - clocks : list of phandles and specifiers to all input clocks listed in
> -		clock-names property.
> -
> -Optional properties:
> -
> -Some PMUs are capable of behaving as an interrupt controller (mostly
> -to wake up a suspended PMU). In which case, they can have the
> -following properties:
> -
> -- interrupt-controller: indicate that said PMU is an interrupt controller
> -
> -- #interrupt-cells: must be identical to the that of the parent interrupt
> -  controller.
> -
> -
> -Optional nodes:
> -
> -- nodes defining the restart and poweroff syscon children
> -
> -
> -Example :
> -pmu_system_controller: system-controller@10040000 {
> -	compatible = "samsung,exynos5250-pmu", "syscon";
> -	reg = <0x10040000 0x5000>;
> -	interrupt-controller;
> -	#interrupt-cells = <3>;
> -	interrupt-parent = <&gic>;
> -	#clock-cells = <1>;
> -	clock-names = "clkout0", "clkout1", "clkout2", "clkout3",
> -			"clkout4", "clkout8", "clkout9";
> -	clocks = <&clock CLK_OUT_DMC>, <&clock CLK_OUT_TOP>,
> -		<&clock CLK_OUT_LEFTBUS>, <&clock CLK_OUT_RIGHTBUS>,
> -		<&clock CLK_OUT_CPU>, <&clock CLK_XXTI>,
> -		<&clock CLK_XUSBXTI>;
> -};
> -
> -Example of clock consumer :
> -
> -usb3503: usb3503@8 {
> -	/* ... */
> -	clock-names = "refclk";
> -	clocks = <&pmu_system_controller 0>;
> -	/* ... */
> -};
> diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.yaml b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
> new file mode 100644
> index 000000000000..a5a02f8237fb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
> @@ -0,0 +1,117 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/samsung/pmu.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung Exynos SoC series Power Management Unit (PMU)
> +
> +maintainers:
> +  - Krzysztof Kozlowski <krzk@kernel.org>
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - samsung,exynos3250-pmu
> +          - samsung,exynos4210-pmu
> +          - samsung,exynos4412-pmu
> +          - samsung,exynos5250-pmu
> +          - samsung,exynos5260-pmu
> +          - samsung,exynos5410-pmu
> +          - samsung,exynos5420-pmu
> +          - samsung,exynos5433-pmu
> +          - samsung,exynos7-pmu
> +      - const: syscon
> +
> +  reg:
> +    maxItems: 1
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  clock-names:
> +    description:
> +      List of clock names for particular CLKOUT mux inputs
> +    minItems: 1
> +    maxItems: 32
> +    items:
> +      enum:
> +        - clkout0
> +        - clkout1

Looking at this again, instead of enum, we can just do:

pattern: '^clkout([0-9]|[12][0-9]|3[0-1])$'

> +        - clkout2
> +        - clkout3
> +        - clkout4
> +        - clkout5
> +        - clkout6
> +        - clkout7
> +        - clkout8
> +        - clkout9
> +        - clkout10
> +        - clkout11
> +        - clkout12
> +        - clkout13
> +        - clkout14
> +        - clkout15
> +        - clkout16
> +        - clkout17
> +        - clkout18
> +        - clkout19
> +        - clkout20
> +        - clkout21
> +        - clkout22
> +        - clkout23
> +        - clkout24
> +        - clkout25
> +        - clkout26
> +        - clkout27
> +        - clkout28
> +        - clkout29
> +        - clkout30
> +        - clkout31

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema
  2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
                   ` (9 preceding siblings ...)
  2019-09-07  9:20 ` [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges Krzysztof Kozlowski
@ 2019-09-18 12:55 ` Rob Herring
  10 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:19:57 +0200, Krzysztof Kozlowski wrote:
> Convert the Syscon reboot bindings to DT schema format using
> json-schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. Remove unneeded maxItems from uint32 fields,
> 2. Simplify if-else-then.
> ---
>  .../bindings/power/reset/syscon-reboot.txt    | 30 ----------
>  .../bindings/power/reset/syscon-reboot.yaml   | 60 +++++++++++++++++++
>  2 files changed, 60 insertions(+), 30 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot.txt
>  create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 02/11] dt-bindings: power: syscon-poweroff: Convert bindings to json-schema
  2019-09-07  9:19 ` [PATCH v2 02/11] dt-bindings: power: syscon-poweroff: " Krzysztof Kozlowski
@ 2019-09-18 12:56   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:19:58 +0200, Krzysztof Kozlowski wrote:
> Convert the Syscon poweroff bindings to DT schema format using
> json-schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. Remove unneeded maxItems from uint32 fields,
> 2. Simplify if-else-then.
> ---
>  .../bindings/power/reset/syscon-poweroff.txt  | 30 ----------
>  .../bindings/power/reset/syscon-poweroff.yaml | 60 +++++++++++++++++++
>  2 files changed, 60 insertions(+), 30 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
>  create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-poweroff.yaml
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 03/11] dt-bindings: arm: samsung: Convert Samsung board/soc bindings to json-schema
  2019-09-07  9:19 ` [PATCH v2 03/11] dt-bindings: arm: samsung: Convert Samsung board/soc " Krzysztof Kozlowski
@ 2019-09-18 12:56   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:19:59 +0200, Krzysztof Kozlowski wrote:
> Convert Samsung S5P and Exynos SoC bindings to DT schema format using
> json-schema.  This is purely conversion of already documented bindings
> so it does not cover all of DTS in the Linux kernel (few S5P/Exynos and
> all S3C are missing).
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. Make Google boards latest revision as const.
> 2. Split secure firmware into separate schema.
> ---
>  .../bindings/arm/samsung/samsung-boards.txt   |  83 ---------
>  .../bindings/arm/samsung/samsung-boards.yaml  | 165 ++++++++++++++++++
>  .../arm/samsung/samsung-secure-firmware.yaml  |  31 ++++
>  3 files changed, 196 insertions(+), 83 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
>  create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-secure-firmware.yaml
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 04/11] dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings
  2019-09-07  9:20 ` [PATCH v2 04/11] dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings Krzysztof Kozlowski
@ 2019-09-18 12:56   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:00 +0200, Krzysztof Kozlowski wrote:
> Add missing documentation of Samsung S5Pv210 SoC based boards bindings.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  .../bindings/arm/samsung/samsung-boards.yaml           | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 05/11] dt-bindings: arm: samsung: Document missing Exynos7 boards bindings
  2019-09-07  9:20 ` [PATCH v2 05/11] dt-bindings: arm: samsung: Document missing Exynos7 " Krzysztof Kozlowski
@ 2019-09-18 12:56   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:01 +0200, Krzysztof Kozlowski wrote:
> Add missing documentation of ARMv8 Samsung Exynos7 SoC based boards
> bindings.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  .../devicetree/bindings/arm/samsung/samsung-boards.yaml     | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 06/11] dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema
  2019-09-07  9:20 ` [PATCH v2 06/11] dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema Krzysztof Kozlowski
@ 2019-09-18 12:57   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:02 +0200, Krzysztof Kozlowski wrote:
> Convert Samsung Exynos Chipid bindings to DT schema format using
> json-schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  .../bindings/arm/samsung/exynos-chipid.txt    | 12 ---------
>  .../bindings/arm/samsung/exynos-chipid.yaml   | 25 +++++++++++++++++++
>  2 files changed, 25 insertions(+), 12 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-chipid.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 09/11] dt-bindings: rtc: s3c: Convert S3C/Exynos RTC bindings to json-schema
  2019-09-07  9:20 ` [PATCH v2 09/11] dt-bindings: rtc: s3c: Convert S3C/Exynos RTC " Krzysztof Kozlowski
@ 2019-09-18 12:57   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:05 +0200, Krzysztof Kozlowski wrote:
> Convert Samsung S3C/Exynos Real Time Clock bindings to DT schema format
> using json-schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. Use deprecated property instead of custom select,
> 2. Rework clocks and clock-names matching for specific compatibles.
> ---
>  .../devicetree/bindings/rtc/s3c-rtc.txt       | 31 -------
>  .../devicetree/bindings/rtc/s3c-rtc.yaml      | 85 +++++++++++++++++++
>  2 files changed, 85 insertions(+), 31 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/rtc/s3c-rtc.txt
>  create mode 100644 Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC bindings to json-schema
  2019-09-07  9:20 ` [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC " Krzysztof Kozlowski
  2019-09-08 12:29   ` Jonathan Cameron
@ 2019-09-18 12:58   ` Rob Herring
  1 sibling, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:06 +0200, Krzysztof Kozlowski wrote:
> Convert Samsung Exynos Analog to Digital Converter bindings to DT schema
> format using json-schema.
> 
> This is a direct conversion of existing bindings so it also copies the
> existing error in the bindings regarding the requirement of two register
> address ranges for certain compatibles.  The inconsistency in binding
> was caused by commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
> register access").
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. Rework reg, clocks and clock-names matching for specific compatibles,
> 2. Make samsung,syscon-phandle required only on certain compatibles,
> 3. Fix indentation.
> ---
>  .../bindings/iio/adc/samsung,exynos-adc.txt   | 107 ------------
>  .../bindings/iio/adc/samsung,exynos-adc.yaml  | 163 ++++++++++++++++++
>  2 files changed, 163 insertions(+), 107 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges
  2019-09-07  9:20 ` [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges Krzysztof Kozlowski
  2019-09-08 12:31   ` Jonathan Cameron
@ 2019-09-18 12:58   ` Rob Herring
  1 sibling, 0 replies; 26+ messages in thread
From: Rob Herring @ 2019-09-18 12:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Sat,  7 Sep 2019 11:20:07 +0200, Krzysztof Kozlowski wrote:
> Commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
> register access") changed the Exynos ADC driver so the PMU syscon
> phandle is required instead of second register address space.  The
> bindings were not updated so fix them now.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. New patch.
> ---
>  .../bindings/iio/adc/samsung,exynos-adc.yaml     | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/11] dt-bindings: arm: samsung: Convert Exynos System Registers bindings to json-schema
  2019-09-18 12:36   ` Rob Herring
@ 2019-09-18 13:07     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-18 13:07 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Kukjin Kim, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Sebastian Reichel,
	Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Wed, 18 Sep 2019 at 14:36, Rob Herring <robh@kernel.org> wrote:
>
> On Sat, Sep 07, 2019 at 11:20:04AM +0200, Krzysztof Kozlowski wrote:
> > Convert Samsung Exynos System Registers (SYSREG) bindings to DT schema
> > format using json-schema.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> >
> > ---
> >
> > Example somehow fails:
> > Documentation/devicetree/bindings/arm/samsung/pmu.example.dt.yaml:
> > system-controller@10040000: compatible:0: 'samsung,exynos5250-pmu' is
> > not one of ['samsung,exynos4-sysreg', 'samsung,exynos5-sysreg']
> >
> > It seems that PMU schema is applied to sysreq nodes (and vice-versa).
> > ---
> >  .../bindings/arm/samsung/sysreg.txt           | 19 -----------
> >  .../bindings/arm/samsung/sysreg.yaml          | 33 +++++++++++++++++++
> >  2 files changed, 33 insertions(+), 19 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/arm/samsung/sysreg.txt
> >  create mode 100644 Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
> > deleted file mode 100644
> > index 4fced6e9d5e4..000000000000
> > --- a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
> > +++ /dev/null
> > @@ -1,19 +0,0 @@
> > -SAMSUNG S5P/Exynos SoC series System Registers (SYSREG)
> > -
> > -Properties:
> > - - compatible : should contain two values. First value must be one from following list:
> > -             - "samsung,exynos4-sysreg" - for Exynos4 based SoCs,
> > -             - "samsung,exynos5-sysreg" - for Exynos5 based SoCs.
> > -             second value must be always "syscon".
> > - - reg : offset and length of the register set.
> > -
> > -Example:
> > -     syscon@10010000 {
> > -             compatible = "samsung,exynos4-sysreg", "syscon";
> > -             reg = <0x10010000 0x400>;
> > -     };
> > -
> > -     syscon@10050000 {
> > -             compatible = "samsung,exynos5-sysreg", "syscon";
> > -             reg = <0x10050000 0x5000>;
> > -     };
> > diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml b/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
> > new file mode 100644
> > index 000000000000..a3d44646e441
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/samsung/sysreg.yaml
> > @@ -0,0 +1,33 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/samsung/sysreg.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Samsung S5P/Exynos SoC series System Registers (SYSREG)
> > +
> > +maintainers:
> > +  - Krzysztof Kozlowski <krzk@kernel.org>
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - samsung,exynos4-sysreg
> > +          - samsung,exynos5-sysreg
> > +      - const: syscon
>
> The problem is this will by default match any node with 'syscon'. You
> have to add a custom 'select' entry. See the LVDS panel bindings for an
> example.
>
> I'd like to kill off 'syscon'...

I see that panels use empty {} match but some other examples use
custom select. The panel approach in my case does not actually check
whether last compatible is syscon. I'll go then with a separate select
approach.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 07/11] dt-bindings: arm: samsung: Convert Exynos PMU bindings to json-schema
  2019-09-18 12:43   ` Rob Herring
@ 2019-09-18 13:17     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-18 13:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Kukjin Kim, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Sebastian Reichel,
	Alessandro Zummo, Alexandre Belloni, Paweł Chmiel,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-iio, linux-pm, linux-rtc

On Wed, Sep 18, 2019 at 07:43:06AM -0500, Rob Herring wrote:
> On Sat, Sep 07, 2019 at 11:20:03AM +0200, Krzysztof Kozlowski wrote:
> > Convert Samsung Exynos Power Management Unit (PMU) bindings to DT schema
> > format using json-schema.
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > 
> > ---
> > 
> > Changes since v1:
> > 1. Fix clock-names to match all elements against schema (any number of
> >    any clkoutN values).
> >    This currently fails:
> >        properties:clock-names:items: {'enum': ['clkout0', 'clkout1', 'clkout2',
> >        'clkout3', 'clkout4', 'clkout5', 'clkout6', 'clkout7', 'clkout8',
> >        'clkout9', 'clkout10', 'clkout11', 'clkout12', 'clkout13', 'clkout14',
> >        'clkout15', 'clkout16']} is not of type 'array
> > 
> > 2. Add syscon reboot and poweroff nodes.
> > ---
> >  .../devicetree/bindings/arm/samsung/pmu.txt   |  72 -----------
> >  .../devicetree/bindings/arm/samsung/pmu.yaml  | 117 ++++++++++++++++++
> >  2 files changed, 117 insertions(+), 72 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/arm/samsung/pmu.txt
> >  create mode 100644 Documentation/devicetree/bindings/arm/samsung/pmu.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
> > deleted file mode 100644
> > index 433bfd7593ac..000000000000
> > --- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
> > +++ /dev/null
> > @@ -1,72 +0,0 @@
> > -SAMSUNG Exynos SoC series PMU Registers
> > -
> > -Properties:
> > - - compatible : should contain two values. First value must be one from following list:
> > -		   - "samsung,exynos3250-pmu" - for Exynos3250 SoC,
> > -		   - "samsung,exynos4210-pmu" - for Exynos4210 SoC,
> > -		   - "samsung,exynos4412-pmu" - for Exynos4412 SoC,
> > -		   - "samsung,exynos5250-pmu" - for Exynos5250 SoC,
> > -		   - "samsung,exynos5260-pmu" - for Exynos5260 SoC.
> > -		   - "samsung,exynos5410-pmu" - for Exynos5410 SoC,
> > -		   - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
> > -		   - "samsung,exynos5433-pmu" - for Exynos5433 SoC.
> > -		   - "samsung,exynos7-pmu" - for Exynos7 SoC.
> > -		second value must be always "syscon".
> > -
> > - - reg : offset and length of the register set.
> > -
> > - - #clock-cells : must be <1>, since PMU requires once cell as clock specifier.
> > -		The single specifier cell is used as index to list of clocks
> > -		provided by PMU, which is currently:
> > -			0 : SoC clock output (CLKOUT pin)
> > -
> > - - clock-names : list of clock names for particular CLKOUT mux inputs in
> > -		following format:
> > -			"clkoutN", where N is a decimal number corresponding to
> > -			CLKOUT mux control bits value for given input, e.g.
> > -				"clkout0", "clkout7", "clkout15".
> > -
> > - - clocks : list of phandles and specifiers to all input clocks listed in
> > -		clock-names property.
> > -
> > -Optional properties:
> > -
> > -Some PMUs are capable of behaving as an interrupt controller (mostly
> > -to wake up a suspended PMU). In which case, they can have the
> > -following properties:
> > -
> > -- interrupt-controller: indicate that said PMU is an interrupt controller
> > -
> > -- #interrupt-cells: must be identical to the that of the parent interrupt
> > -  controller.
> > -
> > -
> > -Optional nodes:
> > -
> > -- nodes defining the restart and poweroff syscon children
> > -
> > -
> > -Example :
> > -pmu_system_controller: system-controller@10040000 {
> > -	compatible = "samsung,exynos5250-pmu", "syscon";
> > -	reg = <0x10040000 0x5000>;
> > -	interrupt-controller;
> > -	#interrupt-cells = <3>;
> > -	interrupt-parent = <&gic>;
> > -	#clock-cells = <1>;
> > -	clock-names = "clkout0", "clkout1", "clkout2", "clkout3",
> > -			"clkout4", "clkout8", "clkout9";
> > -	clocks = <&clock CLK_OUT_DMC>, <&clock CLK_OUT_TOP>,
> > -		<&clock CLK_OUT_LEFTBUS>, <&clock CLK_OUT_RIGHTBUS>,
> > -		<&clock CLK_OUT_CPU>, <&clock CLK_XXTI>,
> > -		<&clock CLK_XUSBXTI>;
> > -};
> > -
> > -Example of clock consumer :
> > -
> > -usb3503: usb3503@8 {
> > -	/* ... */
> > -	clock-names = "refclk";
> > -	clocks = <&pmu_system_controller 0>;
> > -	/* ... */
> > -};
> > diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.yaml b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
> > new file mode 100644
> > index 000000000000..a5a02f8237fb
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
> > @@ -0,0 +1,117 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/samsung/pmu.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Samsung Exynos SoC series Power Management Unit (PMU)
> > +
> > +maintainers:
> > +  - Krzysztof Kozlowski <krzk@kernel.org>
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - samsung,exynos3250-pmu
> > +          - samsung,exynos4210-pmu
> > +          - samsung,exynos4412-pmu
> > +          - samsung,exynos5250-pmu
> > +          - samsung,exynos5260-pmu
> > +          - samsung,exynos5410-pmu
> > +          - samsung,exynos5420-pmu
> > +          - samsung,exynos5433-pmu
> > +          - samsung,exynos7-pmu
> > +      - const: syscon
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  '#clock-cells':
> > +    const: 1
> > +
> > +  clock-names:
> > +    description:
> > +      List of clock names for particular CLKOUT mux inputs
> > +    minItems: 1
> > +    maxItems: 32
> > +    items:
> > +      enum:
> > +        - clkout0
> > +        - clkout1
> 
> Looking at this again, instead of enum, we can just do:
> 
> pattern: '^clkout([0-9]|[12][0-9]|3[0-1])$'

Indeed looks better.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2019-09-18 13:17 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-07  9:19 [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Krzysztof Kozlowski
2019-09-07  9:19 ` [PATCH v2 02/11] dt-bindings: power: syscon-poweroff: " Krzysztof Kozlowski
2019-09-18 12:56   ` Rob Herring
2019-09-07  9:19 ` [PATCH v2 03/11] dt-bindings: arm: samsung: Convert Samsung board/soc " Krzysztof Kozlowski
2019-09-18 12:56   ` Rob Herring
2019-09-07  9:20 ` [PATCH v2 04/11] dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings Krzysztof Kozlowski
2019-09-18 12:56   ` Rob Herring
2019-09-07  9:20 ` [PATCH v2 05/11] dt-bindings: arm: samsung: Document missing Exynos7 " Krzysztof Kozlowski
2019-09-18 12:56   ` Rob Herring
2019-09-07  9:20 ` [PATCH v2 06/11] dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema Krzysztof Kozlowski
2019-09-18 12:57   ` Rob Herring
2019-09-07  9:20 ` [PATCH v2 07/11] dt-bindings: arm: samsung: Convert Exynos PMU " Krzysztof Kozlowski
2019-09-18 12:43   ` Rob Herring
2019-09-18 13:17     ` Krzysztof Kozlowski
2019-09-07  9:20 ` [PATCH v2 08/11] dt-bindings: arm: samsung: Convert Exynos System Registers " Krzysztof Kozlowski
2019-09-18 12:36   ` Rob Herring
2019-09-18 13:07     ` Krzysztof Kozlowski
2019-09-07  9:20 ` [PATCH v2 09/11] dt-bindings: rtc: s3c: Convert S3C/Exynos RTC " Krzysztof Kozlowski
2019-09-18 12:57   ` Rob Herring
2019-09-07  9:20 ` [PATCH v2 10/11] dt-bindings: iio: adc: exynos: Convert Exynos ADC " Krzysztof Kozlowski
2019-09-08 12:29   ` Jonathan Cameron
2019-09-18 12:58   ` Rob Herring
2019-09-07  9:20 ` [PATCH v2 11/11] dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges Krzysztof Kozlowski
2019-09-08 12:31   ` Jonathan Cameron
2019-09-18 12:58   ` Rob Herring
2019-09-18 12:55 ` [PATCH v2 01/11] dt-bindings: power: syscon-reboot: Convert bindings to json-schema Rob Herring

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).