linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas
@ 2020-08-29 11:17 Krzysztof Kozlowski
  2020-08-29 11:17 ` [PATCH 2/7] dt-bindings: mailbox: fsl,mu: Fix i.MX 8QXP compatible matching Krzysztof Kozlowski
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-29 11:17 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Krzysztof Kozlowski, Anson Huang, Wolfram Sang,
	Dong Aisheng, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, linux-i2c

The clock controller schemas for i.MX 8M Mini, 8M Nano, 8M Plus and 8M
Quad are basically the same.  The only minor difference appears on 8M
Quad which needs one more clock.

There is no point to have four schemas for almost the same binding.  Any
fixes or changes would have to be duplicated four times.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../bindings/clock/imx8m-clock.yaml           | 125 ++++++++++++++++++
 .../bindings/clock/imx8mm-clock.yaml          |  68 ----------
 .../bindings/clock/imx8mn-clock.yaml          |  70 ----------
 .../bindings/clock/imx8mp-clock.yaml          |  70 ----------
 .../bindings/clock/imx8mq-clock.yaml          |  72 ----------
 5 files changed, 125 insertions(+), 280 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/imx8m-clock.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/imx8mm-clock.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/imx8mn-clock.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/imx8mp-clock.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/imx8mq-clock.yaml

diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml
new file mode 100644
index 000000000000..31e7cc9693c3
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml
@@ -0,0 +1,125 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx8m-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX8M Family Clock Control Module Binding
+
+maintainers:
+  - Anson Huang <Anson.Huang@nxp.com>
+
+description: |
+  NXP i.MX8M Mini/Nano/Plus/Quad clock control module is an integrated clock
+  controller, which generates and supplies to all modules.
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx8mm-ccm
+      - fsl,imx8mn-ccm
+      - fsl,imx8mp-ccm
+      - fsl,imx8mq-ccm
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    minItems: 6
+    maxItems: 7
+
+  clock-names:
+    minItems: 6
+    maxItems: 7
+
+  '#clock-cells':
+    const: 1
+    description:
+      The clock consumer should specify the desired clock by having the clock
+      ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8m-clock.h
+      for the full list of i.MX8M clock IDs.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - '#clock-cells'
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx8mq-ccm
+    then:
+      properties:
+        clocks:
+          minItems: 7
+          maxItems: 7
+          items:
+            - description: 32k osc
+            - description: 25m osc
+            - description: 27m osc
+            - description: ext1 clock input
+            - description: ext2 clock input
+            - description: ext3 clock input
+            - description: ext4 clock input
+        clock-names:
+          minItems: 7
+          maxItems: 7
+          items:
+            - const: ckil
+            - const: osc_25m
+            - const: osc_27m
+            - const: clk_ext1
+            - const: clk_ext2
+            - const: clk_ext3
+            - const: clk_ext4
+    else:
+      properties:
+        clocks:
+          items:
+            - description: 32k osc
+            - description: 24m osc
+            - description: ext1 clock input
+            - description: ext2 clock input
+            - description: ext3 clock input
+            - description: ext4 clock input
+
+        clock-names:
+          items:
+            - const: osc_32k
+            - const: osc_24m
+            - const: clk_ext1
+            - const: clk_ext2
+            - const: clk_ext3
+            - const: clk_ext4
+
+unevaluatedProperties: false
+
+examples:
+  # Clock Control Module node:
+  - |
+    clock-controller@30380000 {
+        compatible = "fsl,imx8mm-ccm";
+        reg = <0x30380000 0x10000>;
+        #clock-cells = <1>;
+        clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>,
+                 <&clk_ext3>, <&clk_ext4>;
+        clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2",
+                      "clk_ext3", "clk_ext4";
+    };
+
+  - |
+    clock-controller@30390000 {
+        compatible = "fsl,imx8mq-ccm";
+        reg = <0x30380000 0x10000>;
+        #clock-cells = <1>;
+        clocks = <&ckil>, <&osc_25m>, <&osc_27m>, <&clk_ext1>,
+                 <&clk_ext2>, <&clk_ext3>, <&clk_ext4>;
+        clock-names = "ckil", "osc_25m", "osc_27m", "clk_ext1",
+                      "clk_ext2", "clk_ext3", "clk_ext4";
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/clock/imx8mm-clock.yaml b/Documentation/devicetree/bindings/clock/imx8mm-clock.yaml
deleted file mode 100644
index ec830db1367b..000000000000
--- a/Documentation/devicetree/bindings/clock/imx8mm-clock.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/clock/imx8mm-clock.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: NXP i.MX8M Mini Clock Control Module Binding
-
-maintainers:
-  - Anson Huang <Anson.Huang@nxp.com>
-
-description: |
-  NXP i.MX8M Mini clock control module is an integrated clock controller, which
-  generates and supplies to all modules.
-
-properties:
-  compatible:
-    const: fsl,imx8mm-ccm
-
-  reg:
-    maxItems: 1
-
-  clocks:
-    items:
-      - description: 32k osc
-      - description: 24m osc
-      - description: ext1 clock input
-      - description: ext2 clock input
-      - description: ext3 clock input
-      - description: ext4 clock input
-
-  clock-names:
-    items:
-      - const: osc_32k
-      - const: osc_24m
-      - const: clk_ext1
-      - const: clk_ext2
-      - const: clk_ext3
-      - const: clk_ext4
-
-  '#clock-cells':
-    const: 1
-    description:
-      The clock consumer should specify the desired clock by having the clock
-      ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8mm-clock.h
-      for the full list of i.MX8M Mini clock IDs.
-
-required:
-  - compatible
-  - reg
-  - clocks
-  - clock-names
-  - '#clock-cells'
-
-examples:
-  # Clock Control Module node:
-  - |
-    clk: clock-controller@30380000 {
-        compatible = "fsl,imx8mm-ccm";
-        reg = <0x30380000 0x10000>;
-        #clock-cells = <1>;
-        clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>,
-                 <&clk_ext3>, <&clk_ext4>;
-        clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2",
-                      "clk_ext3", "clk_ext4";
-    };
-
-...
diff --git a/Documentation/devicetree/bindings/clock/imx8mn-clock.yaml b/Documentation/devicetree/bindings/clock/imx8mn-clock.yaml
deleted file mode 100644
index bdaa29616ab1..000000000000
--- a/Documentation/devicetree/bindings/clock/imx8mn-clock.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/clock/imx8mn-clock.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: NXP i.MX8M Nano Clock Control Module Binding
-
-maintainers:
-  - Anson Huang <Anson.Huang@nxp.com>
-
-description: |
-  NXP i.MX8M Nano clock control module is an integrated clock controller, which
-  generates and supplies to all modules.
-
-properties:
-  compatible:
-    const: fsl,imx8mn-ccm
-
-  reg:
-    maxItems: 1
-
-  clocks:
-    items:
-      - description: 32k osc
-      - description: 24m osc
-      - description: ext1 clock input
-      - description: ext2 clock input
-      - description: ext3 clock input
-      - description: ext4 clock input
-
-  clock-names:
-    items:
-      - const: osc_32k
-      - const: osc_24m
-      - const: clk_ext1
-      - const: clk_ext2
-      - const: clk_ext3
-      - const: clk_ext4
-
-  '#clock-cells':
-    const: 1
-    description:
-      The clock consumer should specify the desired clock by having the clock
-      ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8mn-clock.h
-      for the full list of i.MX8M Nano clock IDs.
-
-required:
-  - compatible
-  - reg
-  - clocks
-  - clock-names
-  - '#clock-cells'
-
-additionalProperties: false
-
-examples:
-  # Clock Control Module node:
-  - |
-    clk: clock-controller@30380000 {
-        compatible = "fsl,imx8mn-ccm";
-        reg = <0x30380000 0x10000>;
-        #clock-cells = <1>;
-        clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>,
-                 <&clk_ext2>, <&clk_ext3>, <&clk_ext4>;
-        clock-names = "osc_32k", "osc_24m", "clk_ext1",
-                      "clk_ext2", "clk_ext3", "clk_ext4";
-    };
-
-...
diff --git a/Documentation/devicetree/bindings/clock/imx8mp-clock.yaml b/Documentation/devicetree/bindings/clock/imx8mp-clock.yaml
deleted file mode 100644
index 4351a1dbb4f7..000000000000
--- a/Documentation/devicetree/bindings/clock/imx8mp-clock.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/clock/imx8mp-clock.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: NXP i.MX8M Plus Clock Control Module Binding
-
-maintainers:
-  - Anson Huang <Anson.Huang@nxp.com>
-
-description:
-  NXP i.MX8M Plus clock control module is an integrated clock controller, which
-  generates and supplies to all modules.
-
-properties:
-  compatible:
-    const: fsl,imx8mp-ccm
-
-  reg:
-    maxItems: 1
-
-  clocks:
-    items:
-      - description: 32k osc
-      - description: 24m osc
-      - description: ext1 clock input
-      - description: ext2 clock input
-      - description: ext3 clock input
-      - description: ext4 clock input
-
-  clock-names:
-    items:
-      - const: osc_32k
-      - const: osc_24m
-      - const: clk_ext1
-      - const: clk_ext2
-      - const: clk_ext3
-      - const: clk_ext4
-
-  '#clock-cells':
-    const: 1
-    description:
-      The clock consumer should specify the desired clock by having the clock
-      ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8mp-clock.h
-      for the full list of i.MX8M Plus clock IDs.
-
-required:
-  - compatible
-  - reg
-  - clocks
-  - clock-names
-  - '#clock-cells'
-
-additionalProperties: false
-
-examples:
-  # Clock Control Module node:
-  - |
-    clk: clock-controller@30380000 {
-        compatible = "fsl,imx8mp-ccm";
-        reg = <0x30380000 0x10000>;
-        #clock-cells = <1>;
-        clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>,
-                 <&clk_ext2>, <&clk_ext3>, <&clk_ext4>;
-        clock-names = "osc_32k", "osc_24m", "clk_ext1",
-                      "clk_ext2", "clk_ext3", "clk_ext4";
-    };
-
-...
diff --git a/Documentation/devicetree/bindings/clock/imx8mq-clock.yaml b/Documentation/devicetree/bindings/clock/imx8mq-clock.yaml
deleted file mode 100644
index 05d7d1471e0c..000000000000
--- a/Documentation/devicetree/bindings/clock/imx8mq-clock.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/clock/imx8mq-clock.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: NXP i.MX8M Quad Clock Control Module Binding
-
-maintainers:
-  - Anson Huang <Anson.Huang@nxp.com>
-
-description: |
-  NXP i.MX8M Quad clock control module is an integrated clock controller, which
-  generates and supplies to all modules.
-
-properties:
-  compatible:
-    const: fsl,imx8mq-ccm
-
-  reg:
-    maxItems: 1
-
-  clocks:
-    items:
-      - description: 32k osc
-      - description: 25m osc
-      - description: 27m osc
-      - description: ext1 clock input
-      - description: ext2 clock input
-      - description: ext3 clock input
-      - description: ext4 clock input
-
-  clock-names:
-    items:
-      - const: ckil
-      - const: osc_25m
-      - const: osc_27m
-      - const: clk_ext1
-      - const: clk_ext2
-      - const: clk_ext3
-      - const: clk_ext4
-
-  '#clock-cells':
-    const: 1
-    description:
-      The clock consumer should specify the desired clock by having the clock
-      ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8mq-clock.h
-      for the full list of i.MX8M Quad clock IDs.
-
-required:
-  - compatible
-  - reg
-  - clocks
-  - clock-names
-  - '#clock-cells'
-
-examples:
-  # Clock Control Module node:
-  - |
-    clk: clock-controller@30380000 {
-        compatible = "fsl,imx8mq-ccm";
-        reg = <0x30380000 0x10000>;
-        #clock-cells = <1>;
-        clocks = <&ckil>, <&osc_25m>, <&osc_27m>,
-                 <&clk_ext1>, <&clk_ext2>,
-                 <&clk_ext3>, <&clk_ext4>;
-        clock-names = "ckil", "osc_25m", "osc_27m",
-                      "clk_ext1", "clk_ext2",
-                      "clk_ext3", "clk_ext4";
-    };
-
-...
-- 
2.17.1


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

* [PATCH 2/7] dt-bindings: mailbox: fsl,mu: Fix i.MX 8QXP compatible matching
  2020-08-29 11:17 [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas Krzysztof Kozlowski
@ 2020-08-29 11:17 ` Krzysztof Kozlowski
  2020-08-29 11:17 ` [PATCH 3/7] dt-bindings: mailbox: fsl,mu: Use unevaluatedProperties Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-29 11:17 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Krzysztof Kozlowski, Anson Huang, Wolfram Sang,
	Dong Aisheng, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, linux-i2c

The Mailbox on i.MX 8QXP (fsl,imx8qxp-mu) can also be compatible with
fsl,imx8-mu-scu (for fast IPC) so adjust the compatibles to fix
dtbs_check warnings like:

  arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: mailbox@5d1f0000:
    compatible: ['fsl,imx8-mu-scu', 'fsl,imx8qxp-mu', 'fsl,imx6sx-mu']
    is not valid under any of the given schemas (Possible causes of the failure):

  arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: mailbox@5d1f0000:
    compatible: ['fsl,imx8-mu-scu', 'fsl,imx8qxp-mu', 'fsl,imx6sx-mu'] is too long

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/mailbox/fsl,mu.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
index 8a3470b64d06..7ed096360be2 100644
--- a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
+++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
@@ -38,8 +38,9 @@ properties:
           - const: fsl,imx6sx-mu
       - description: To communicate with i.MX8 SCU with fast IPC
         items:
-          - const: fsl,imx8qxp-mu
           - const: fsl,imx8-mu-scu
+          - const: fsl,imx8qxp-mu
+          - const: fsl,imx6sx-mu
 
   reg:
     maxItems: 1
-- 
2.17.1


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

* [PATCH 3/7] dt-bindings: mailbox: fsl,mu: Use unevaluatedProperties
  2020-08-29 11:17 [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas Krzysztof Kozlowski
  2020-08-29 11:17 ` [PATCH 2/7] dt-bindings: mailbox: fsl,mu: Fix i.MX 8QXP compatible matching Krzysztof Kozlowski
@ 2020-08-29 11:17 ` Krzysztof Kozlowski
  2020-09-03 16:40   ` Rob Herring
  2020-08-29 11:17 ` [PATCH 4/7] dt-bindings: i2c: imx-lpi2c: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-29 11:17 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Krzysztof Kozlowski, Anson Huang, Wolfram Sang,
	Dong Aisheng, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, linux-i2c

Additional properties actually might appear (e.g. power-domains) so use
unevaluatedProperties to fix dtbs_check warnings like:

  arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml:
    mailbox@5d280000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/mailbox/fsl,mu.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
index 7ed096360be2..3ce6cd0ea173 100644
--- a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
+++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
@@ -78,7 +78,7 @@ required:
   - interrupts
   - "#mbox-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.17.1


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

* [PATCH 4/7] dt-bindings: i2c: imx-lpi2c: Use unevaluatedProperties
  2020-08-29 11:17 [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas Krzysztof Kozlowski
  2020-08-29 11:17 ` [PATCH 2/7] dt-bindings: mailbox: fsl,mu: Fix i.MX 8QXP compatible matching Krzysztof Kozlowski
  2020-08-29 11:17 ` [PATCH 3/7] dt-bindings: mailbox: fsl,mu: Use unevaluatedProperties Krzysztof Kozlowski
@ 2020-08-29 11:17 ` Krzysztof Kozlowski
  2020-09-03 16:40   ` Rob Herring
  2020-08-29 11:17 ` [PATCH 5/7] dt-bindings: i2c: imx-lpi2c: Fix i.MX 8QXP compatible matching Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-29 11:17 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Krzysztof Kozlowski, Anson Huang, Wolfram Sang,
	Dong Aisheng, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, linux-i2c

Additional properties actually might appear (e.g. power-domains) so use
unevaluatedProperties to fix dtbs_check warnings like:

  arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dt.yaml: i2c@5a800000:
    'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'power-domains' do not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml b/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
index ac0bc5dd64d6..594e174e2cde 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
@@ -31,7 +31,7 @@ required:
   - interrupts
   - clocks
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.17.1


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

* [PATCH 5/7] dt-bindings: i2c: imx-lpi2c: Fix i.MX 8QXP compatible matching
  2020-08-29 11:17 [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2020-08-29 11:17 ` [PATCH 4/7] dt-bindings: i2c: imx-lpi2c: " Krzysztof Kozlowski
@ 2020-08-29 11:17 ` Krzysztof Kozlowski
  2020-08-29 11:17 ` [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties Krzysztof Kozlowski
  2020-08-29 11:18 ` [PATCH 7/7] dt-bindings: i2c: imx: Fix i.MX 7 compatible matching Krzysztof Kozlowski
  5 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-29 11:17 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Krzysztof Kozlowski, Anson Huang, Wolfram Sang,
	Dong Aisheng, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, linux-i2c

The i.MX 8QXP DTSes use two compatibles so update the binding to fix
dtbs_check warnings like:

  arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: i2c@5a820000:
    compatible: ['fsl,imx8qxp-lpi2c', 'fsl,imx7ulp-lpi2c'] is too long

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/i2c/i2c-imx-lpi2c.yaml        | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml b/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
index 594e174e2cde..319147b780cb 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
@@ -11,10 +11,13 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - fsl,imx7ulp-lpi2c
-      - fsl,imx8qxp-lpi2c
-      - fsl,imx8qm-lpi2c
+    oneOf:
+      - enum:
+          - fsl,imx7ulp-lpi2c
+          - fsl,imx8qm-lpi2c
+      - items:
+          - const: fsl,imx8qxp-lpi2c
+          - const: fsl,imx7ulp-lpi2c
 
   reg:
     maxItems: 1
-- 
2.17.1


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

* [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties
  2020-08-29 11:17 [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2020-08-29 11:17 ` [PATCH 5/7] dt-bindings: i2c: imx-lpi2c: Fix i.MX 8QXP compatible matching Krzysztof Kozlowski
@ 2020-08-29 11:17 ` Krzysztof Kozlowski
  2020-09-03 16:41   ` Rob Herring
  2020-08-29 11:18 ` [PATCH 7/7] dt-bindings: i2c: imx: Fix i.MX 7 compatible matching Krzysztof Kozlowski
  5 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-29 11:17 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Krzysztof Kozlowski, Anson Huang, Wolfram Sang,
	Dong Aisheng, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, linux-i2c

Additional properties actually might appear (e.g. power-domains or child
nodes) so use unevaluatedProperties to fix dtbs_check warnings like:

  arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: i2c@30a20000:
    '#address-cells', '#size-cells', 'pmic@25' do not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
index 810536953177..73b4e628802c 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
@@ -75,7 +75,7 @@ required:
   - interrupts
   - clocks
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.17.1


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

* [PATCH 7/7] dt-bindings: i2c: imx: Fix i.MX 7 compatible matching
  2020-08-29 11:17 [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2020-08-29 11:17 ` [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties Krzysztof Kozlowski
@ 2020-08-29 11:18 ` Krzysztof Kozlowski
  5 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-29 11:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Krzysztof Kozlowski, Anson Huang, Wolfram Sang,
	Dong Aisheng, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel, linux-i2c

The i.MX 7 DTSes use two compatibles so update the binding to fix
dtbs_check warnings like:

  arch/arm/boot/dts/imx7d-cl-som-imx7.dt.yaml: i2c@30a20000:
    compatible: ['fsl,imx7d-i2c', 'fsl,imx21-i2c'] is not valid under any of the given schemas (Possible causes of the failure):

  arch/arm/boot/dts/imx7d-cl-som-imx7.dt.yaml: i2c@30a20000:
    compatible: ['fsl,imx7d-i2c', 'fsl,imx21-i2c'] is too long

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
index 73b4e628802c..2d555d5bacc5 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
@@ -18,6 +18,9 @@ properties:
       - items:
           - const: fsl,imx35-i2c
           - const: fsl,imx1-i2c
+      - items:
+          - const: fsl,imx7d-i2c
+          - const: fsl,imx21-i2c
       - items:
           - enum:
               - fsl,imx25-i2c
-- 
2.17.1


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

* Re: [PATCH 3/7] dt-bindings: mailbox: fsl,mu: Use unevaluatedProperties
  2020-08-29 11:17 ` [PATCH 3/7] dt-bindings: mailbox: fsl,mu: Use unevaluatedProperties Krzysztof Kozlowski
@ 2020-09-03 16:40   ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2020-09-03 16:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Wolfram Sang, Dong Aisheng, linux-clk, devicetree,
	linux-arm-kernel, linux-kernel, linux-i2c

On Sat, Aug 29, 2020 at 01:17:56PM +0200, Krzysztof Kozlowski wrote:
> Additional properties actually might appear (e.g. power-domains) so use
> unevaluatedProperties to fix dtbs_check warnings like:
> 
>   arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml:
>     mailbox@5d280000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  Documentation/devicetree/bindings/mailbox/fsl,mu.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

NAK. See https://lore.kernel.org/r/CAL_JsqKPXJxsHPS34_TCf9bwgKxZNSV4mvQR-WKRnknQVtGGxQ@mail.gmail.com/

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

* Re: [PATCH 4/7] dt-bindings: i2c: imx-lpi2c: Use unevaluatedProperties
  2020-08-29 11:17 ` [PATCH 4/7] dt-bindings: i2c: imx-lpi2c: " Krzysztof Kozlowski
@ 2020-09-03 16:40   ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2020-09-03 16:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Wolfram Sang, Dong Aisheng, linux-clk, devicetree,
	linux-arm-kernel, linux-kernel, linux-i2c

On Sat, Aug 29, 2020 at 01:17:57PM +0200, Krzysztof Kozlowski wrote:
> Additional properties actually might appear (e.g. power-domains) so use
> unevaluatedProperties to fix dtbs_check warnings like:
> 
>   arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dt.yaml: i2c@5a800000:
>     'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'power-domains' do not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

NAK. See https://lore.kernel.org/r/CAL_JsqKPXJxsHPS34_TCf9bwgKxZNSV4mvQR-WKRnknQVtGGxQ@mail.gmail.com/

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

* Re: [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties
  2020-08-29 11:17 ` [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties Krzysztof Kozlowski
@ 2020-09-03 16:41   ` Rob Herring
  2020-09-03 20:36     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 12+ messages in thread
From: Rob Herring @ 2020-09-03 16:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Wolfram Sang, Dong Aisheng, linux-clk, devicetree,
	linux-arm-kernel, linux-kernel, linux-i2c

On Sat, Aug 29, 2020 at 01:17:59PM +0200, Krzysztof Kozlowski wrote:
> Additional properties actually might appear (e.g. power-domains or child
> nodes) so use unevaluatedProperties to fix dtbs_check warnings like:
> 
>   arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: i2c@30a20000:
>     '#address-cells', '#size-cells', 'pmic@25' do not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

NAK. See https://lore.kernel.org/r/CAL_JsqKPXJxsHPS34_TCf9bwgKxZNSV4mvQR-WKRnknQVtGGxQ@mail.gmail.com/

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

* Re: [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties
  2020-09-03 16:41   ` Rob Herring
@ 2020-09-03 20:36     ` Krzysztof Kozlowski
  2020-09-04 14:29       ` Rob Herring
  0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-03 20:36 UTC (permalink / raw)
  To: Rob Herring
  Cc: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Wolfram Sang, Dong Aisheng, linux-clk, devicetree,
	linux-arm-kernel, linux-kernel, linux-i2c

On Thu, 3 Sep 2020 at 18:41, Rob Herring <robh@kernel.org> wrote:
>
> On Sat, Aug 29, 2020 at 01:17:59PM +0200, Krzysztof Kozlowski wrote:
> > Additional properties actually might appear (e.g. power-domains or child
> > nodes) so use unevaluatedProperties to fix dtbs_check warnings like:
> >
> >   arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: i2c@30a20000:
> >     '#address-cells', '#size-cells', 'pmic@25' do not match any of the regexes: 'pinctrl-[0-9]+'
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> NAK. See https://lore.kernel.org/r/CAL_JsqKPXJxsHPS34_TCf9bwgKxZNSV4mvQR-WKRnknQVtGGxQ@mail.gmail.com/

I can reference the generic i2c-controller schema and add missing
properties but what to do with children (pmic@25 and many other)? I
see that all of the other I2C controller dtschema files solve it by
skipping "additionalProperties: false". Is this the way to go with I2C
controllers?

Best regards,
Krzysztof

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

* Re: [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties
  2020-09-03 20:36     ` Krzysztof Kozlowski
@ 2020-09-04 14:29       ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2020-09-04 14:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Anson Huang, Wolfram Sang, Dong Aisheng, linux-clk, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, Linux I2C

On Thu, Sep 3, 2020 at 2:36 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, 3 Sep 2020 at 18:41, Rob Herring <robh@kernel.org> wrote:
> >
> > On Sat, Aug 29, 2020 at 01:17:59PM +0200, Krzysztof Kozlowski wrote:
> > > Additional properties actually might appear (e.g. power-domains or child
> > > nodes) so use unevaluatedProperties to fix dtbs_check warnings like:
> > >
> > >   arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: i2c@30a20000:
> > >     '#address-cells', '#size-cells', 'pmic@25' do not match any of the regexes: 'pinctrl-[0-9]+'
> > >
> > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > > ---
> > >  Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > NAK. See https://lore.kernel.org/r/CAL_JsqKPXJxsHPS34_TCf9bwgKxZNSV4mvQR-WKRnknQVtGGxQ@mail.gmail.com/
>
> I can reference the generic i2c-controller schema and add missing
> properties but what to do with children (pmic@25 and many other)? I
> see that all of the other I2C controller dtschema files solve it by
> skipping "additionalProperties: false". Is this the way to go with I2C
> controllers?

If there's a $ref to the i2c schema, then using unevaluatedProperties
is correct.

Rob

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

end of thread, other threads:[~2020-09-04 14:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 11:17 [PATCH 1/7] dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas Krzysztof Kozlowski
2020-08-29 11:17 ` [PATCH 2/7] dt-bindings: mailbox: fsl,mu: Fix i.MX 8QXP compatible matching Krzysztof Kozlowski
2020-08-29 11:17 ` [PATCH 3/7] dt-bindings: mailbox: fsl,mu: Use unevaluatedProperties Krzysztof Kozlowski
2020-09-03 16:40   ` Rob Herring
2020-08-29 11:17 ` [PATCH 4/7] dt-bindings: i2c: imx-lpi2c: " Krzysztof Kozlowski
2020-09-03 16:40   ` Rob Herring
2020-08-29 11:17 ` [PATCH 5/7] dt-bindings: i2c: imx-lpi2c: Fix i.MX 8QXP compatible matching Krzysztof Kozlowski
2020-08-29 11:17 ` [PATCH 6/7] dt-bindings: i2c: imx: Use unevaluatedProperties Krzysztof Kozlowski
2020-09-03 16:41   ` Rob Herring
2020-09-03 20:36     ` Krzysztof Kozlowski
2020-09-04 14:29       ` Rob Herring
2020-08-29 11:18 ` [PATCH 7/7] dt-bindings: i2c: imx: Fix i.MX 7 compatible matching Krzysztof Kozlowski

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