linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] DT: Improve validation for Marvell SoCs
@ 2020-05-21  9:13 Lubomir Rintel
  2020-05-21  9:13 ` [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema Lubomir Rintel
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel

Hi,

chained to this message is a second version of remaining patches from the
first spin of the "DT: Improve validation for Marvell SoCs" [1] patch set.

[1] https://lore.kernel.org/lkml/20200317093922.20785-1-lkundrak@v3.sk/

I've attempted to address the review of the v1, each patch includes a
detailed change log.

Compared to v1, wherever the license or maintainer information was
missing, I've filled in GPL-2.0-only and people listed in MAINTAINERS
file. As I've indicated in v1 cover letter, am not sure whether this is
the optimal course of action. However I've included the relevant people
in v1 Cc list and asked for clarifications, but didn't really get any
feedback to that.

Cheers
Lubo




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

* [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-27  7:59   ` Ulf Hansson
  2020-05-21  9:13 ` [PATCH v2 2/9] dt-bindings: gpio: Convert mrvl-gpio " Lubomir Rintel
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

Convert the sdhci-pxa binding to DT schema format using json-schema.

At the same time, fix a couple of issues with the examples discovered by
the validation tool -- a semicolon instead of a comma and wrong node names.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- move reg-names items: from the conditional to main properties:, only
  specify maxItems and minItems in conditional branches
- Specify minItems and maxItems in properties/reg instad of on
  conditional branchs
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file

 .../devicetree/bindings/mmc/sdhci-pxa.txt     |  50 ---------
 .../devicetree/bindings/mmc/sdhci-pxa.yaml    | 103 ++++++++++++++++++
 2 files changed, 103 insertions(+), 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
 create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml

diff --git a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
deleted file mode 100644
index 3d1b449d6097..000000000000
--- a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-* Marvell sdhci-pxa v2/v3 controller
-
-This file documents differences between the core properties in mmc.txt
-and the properties used by the sdhci-pxav2 and sdhci-pxav3 drivers.
-
-Required properties:
-- compatible: Should be "mrvl,pxav2-mmc", "mrvl,pxav3-mmc" or
-  "marvell,armada-380-sdhci".
-- reg:
-  * for "mrvl,pxav2-mmc" and "mrvl,pxav3-mmc", one register area for
-    the SDHCI registers.
-
-  * for "marvell,armada-380-sdhci", three register areas. The first
-    one for the SDHCI registers themselves, the second one for the
-    AXI/Mbus bridge registers of the SDHCI unit, the third one for the
-    SDIO3 Configuration register
-- reg names: should be "sdhci", "mbus", "conf-sdio3". only mandatory
-  for "marvell,armada-380-sdhci"
-- clocks: Array of clocks required for SDHCI; requires at least one for
-    I/O clock.
-- clock-names: Array of names corresponding to clocks property; shall be
-    "io" for I/O clock and "core" for optional core clock.
-
-Optional properties:
-- mrvl,clk-delay-cycles: Specify a number of cycles to delay for tuning.
-
-Example:
-
-sdhci@d4280800 {
-	compatible = "mrvl,pxav3-mmc";
-	reg = <0xd4280800 0x800>;
-	bus-width = <8>;
-	interrupts = <27>;
-	clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>;
-	clock-names = "io", "core";
-	non-removable;
-	mrvl,clk-delay-cycles = <31>;
-};
-
-sdhci@d8000 {
-	compatible = "marvell,armada-380-sdhci";
-	reg-names = "sdhci", "mbus", "conf-sdio3";
-	reg = <0xd8000 0x1000>,
-		<0xdc000 0x100>;
-		<0x18454 0x4>;
-	interrupts = <0 25 0x4>;
-	clocks = <&gateclk 17>;
-	clock-names = "io";
-	mrvl,clk-delay-cycles = <0x1F>;
-};
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml b/Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml
new file mode 100644
index 000000000000..27ea069aa5fc
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml
@@ -0,0 +1,103 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/sdhci-pxa.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell PXA SDHCI v2/v3 bindings
+
+maintainers:
+  - Ulf Hansson <ulf.hansson@linaro.org>
+  - Rob Herring <robh+dt@kernel.org>
+
+allOf:
+  - $ref: mmc-controller.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: marvell,armada-380-sdhci
+    then:
+      properties:
+        regs:
+          minItems: 3
+        reg-names:
+          minItems: 3
+      required:
+        - reg-names
+    else:
+      properties:
+        regs:
+          maxItems: 1
+        reg-names:
+          maxItems: 1
+
+properties:
+  compatible:
+    enum:
+      - mrvl,pxav2-mmc
+      - mrvl,pxav3-mmc
+      - marvell,armada-380-sdhci
+
+  reg:
+    minItems: 1
+    maxItems: 3
+
+  reg-names:
+    items:
+      - const: sdhci
+      - const: mbus
+      - const: conf-sdio3
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    maxItems: 2
+    items:
+      - const: io
+      - const: core
+
+  mrvl,clk-delay-cycles:
+    description: Specify a number of cycles to delay for tuning.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+examples:
+  - |
+    #include <dt-bindings/clock/berlin2.h>
+    mmc@d4280800 {
+        compatible = "mrvl,pxav3-mmc";
+        reg = <0xd4280800 0x800>;
+        bus-width = <8>;
+        interrupts = <27>;
+        clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>;
+        clock-names = "io", "core";
+        non-removable;
+        mrvl,clk-delay-cycles = <31>;
+    };
+  - |
+    mmc@d8000 {
+        compatible = "marvell,armada-380-sdhci";
+        reg-names = "sdhci", "mbus", "conf-sdio3";
+        reg = <0xd8000 0x1000>,
+              <0xdc000 0x100>,
+              <0x18454 0x4>;
+        interrupts = <0 25 0x4>;
+        clocks = <&gateclk 17>;
+        clock-names = "io";
+        mrvl,clk-delay-cycles = <0x1F>;
+    };
+
+...
-- 
2.26.2


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

* [PATCH v2 2/9] dt-bindings: gpio: Convert mrvl-gpio to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
  2020-05-21  9:13 ` [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-21 19:57   ` robh
  2020-05-21  9:13 ` [PATCH v2 3/9] dt-bindings: i2c: Convert i2c-pxa " Lubomir Rintel
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

This converts the mrvl-gpio binding to DT schema format using json-schema.

Various fixes were done during the conversion, such as adding more
properties that are in fact mandatory or extending the examples to
include child nodes with extra GPIO blocks.

The compatible strings are a mess. It is not clear why so many of them
are needed; the driver doesn't really seem to differentiate between the
models. Some of them, like marvell,pxa93x-gpio and marvell,pxa1928-gpio
are not used at all, so it's not known how many interrupts they utilize.
On the other hand, mrvl,pxa-gpio has been seen in the tree, but it
doesn't end up in any actual DTB file.

In any case -- the schema merely copies whatever was in the original
binding document, so it's hopefully no more wrong that the original.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Drop marvell,pxa1928-gpio
- Drop ranges from example with no gcb child nodes
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file

 .../devicetree/bindings/gpio/mrvl-gpio.txt    |  48 -----
 .../devicetree/bindings/gpio/mrvl-gpio.yaml   | 174 ++++++++++++++++++
 2 files changed, 174 insertions(+), 48 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml

diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
deleted file mode 100644
index 30fd2201b3d4..000000000000
--- a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-* Marvell PXA GPIO controller
-
-Required properties:
-- compatible : Should be "intel,pxa25x-gpio", "intel,pxa26x-gpio",
-		"intel,pxa27x-gpio", "intel,pxa3xx-gpio",
-		"marvell,pxa93x-gpio", "marvell,mmp-gpio",
-		"marvell,mmp2-gpio" or marvell,pxa1928-gpio.
-- reg : Address and length of the register set for the device
-- interrupts : Should be the port interrupt shared by all gpio pins.
-  There're three gpio interrupts in arch-pxa, and they're gpio0,
-  gpio1 and gpio_mux. There're only one gpio interrupt in arch-mmp,
-  gpio_mux.
-- interrupt-names : Should be the names of irq resources. Each interrupt
-  uses its own interrupt name, so there should be as many interrupt names
-  as referenced interrupts.
-- interrupt-controller : Identifies the node as an interrupt controller.
-- #interrupt-cells: Specifies the number of cells needed to encode an
-  interrupt source.
-- gpio-controller : Marks the device node as a gpio controller.
-- #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify flags. See gpio.txt for possible
-  values.
-
-Example for a MMP platform:
-
-	gpio: gpio@d4019000 {
-		compatible = "marvell,mmp-gpio";
-		reg = <0xd4019000 0x1000>;
-		interrupts = <49>;
-		interrupt-names = "gpio_mux";
-		gpio-controller;
-		#gpio-cells = <2>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-      };
-
-Example for a PXA3xx platform:
-
-	gpio: gpio@40e00000 {
-		compatible = "intel,pxa3xx-gpio";
-		reg = <0x40e00000 0x10000>;
-		interrupt-names = "gpio0", "gpio1", "gpio_mux";
-		interrupts = <8 9 10>;
-		gpio-controller;
-		#gpio-cells = <0x2>;
-		interrupt-controller;
-		#interrupt-cells = <0x2>;
-	};
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml b/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml
new file mode 100644
index 000000000000..575ccc75ae30
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml
@@ -0,0 +1,174 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/mrvl-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell PXA GPIO controller
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+  - Bartosz Golaszewski <bgolaszewski@baylibre.com>
+  - Rob Herring <robh+dt@kernel.org>
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - intel,pxa25x-gpio
+              - intel,pxa26x-gpio
+              - intel,pxa27x-gpio
+              - intel,pxa3xx-gpio
+    then:
+      properties:
+        interrupts:
+          minItems: 3
+          maxItems: 3
+        interrupt-names:
+          items:
+            - const: gpio0
+            - const: gpio1
+            - const: gpio_mux
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - marvell,mmp-gpio
+              - marvell,mmp2-gpio
+    then:
+      properties:
+        interrupts:
+          maxItems: 1
+        interrupt-names:
+          items:
+            - const: gpio_mux
+
+properties:
+  $nodename:
+    pattern: '^gpio@[0-9a-f]+$'
+
+  compatible:
+    enum:
+      - intel,pxa25x-gpio
+      - intel,pxa26x-gpio
+      - intel,pxa27x-gpio
+      - intel,pxa3xx-gpio
+      - marvell,mmp-gpio
+      - marvell,mmp2-gpio
+      - marvell,pxa93x-gpio
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  ranges: true
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  gpio-ranges:
+    maxItems: 1
+
+  interrupts: true
+
+  interrupt-names: true
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
+
+patternProperties:
+  '^gpio@[0-9a-f]*$':
+    type: object
+    properties:
+      reg:
+        maxItems: 1
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - '#address-cells'
+  - '#size-cells'
+  - reg
+  - gpio-controller
+  - '#gpio-cells'
+  - interrupts
+  - interrupt-names
+  - interrupt-controller
+  - '#interrupt-cells'
+  - ranges
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/pxa-clock.h>
+    gpio@40e00000 {
+        compatible = "intel,pxa3xx-gpio";
+        #address-cells = <1>;
+        #size-cells = <1>;
+        reg = <0x40e00000 0x10000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        interrupts = <8>, <9>, <10>;
+        interrupt-names = "gpio0", "gpio1", "gpio_mux";
+        clocks = <&clks CLK_GPIO>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+    };
+  - |
+    #include <dt-bindings/clock/marvell,pxa910.h>
+    gpio@d4019000 {
+        compatible = "marvell,mmp-gpio";
+        #address-cells = <1>;
+        #size-cells = <1>;
+        reg = <0xd4019000 0x1000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        interrupts = <49>;
+        interrupt-names = "gpio_mux";
+        clocks = <&soc_clocks PXA910_CLK_GPIO>;
+        resets = <&soc_clocks PXA910_CLK_GPIO>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+        ranges;
+
+        gpio@d4019000 {
+            reg = <0xd4019000 0x4>;
+        };
+
+        gpio@d4019004 {
+            reg = <0xd4019004 0x4>;
+        };
+
+        gpio@d4019008 {
+            reg = <0xd4019008 0x4>;
+        };
+
+        gpio@d4019100 {
+            reg = <0xd4019100 0x4>;
+        };
+     };
+
+...
-- 
2.26.2


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

* [PATCH v2 3/9] dt-bindings: i2c: Convert i2c-pxa to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
  2020-05-21  9:13 ` [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema Lubomir Rintel
  2020-05-21  9:13 ` [PATCH v2 2/9] dt-bindings: gpio: Convert mrvl-gpio " Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-28 22:57   ` Rob Herring
  2020-05-21  9:13 ` [PATCH v2 4/9] dt-bindings: interrupt-controller: Convert mrvl,intc " Lubomir Rintel
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

A conversion of the i2c-pxa binding to DT schema format using json-schema.

This also cleans ups some errors in the binding: The compatible string
description suggested that "mmp" in "mrvl,mmp-twsi" is to be substituted
with a processor model, which wouldn't be a right thing to do and indeed
nobody seems to have been doing that. There also was "Recommended
properties" section that included optional as well as mandatory
properties. Missing mandatory properties were added to the example.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file

 .../devicetree/bindings/i2c/i2c-pxa.txt       | 31 --------
 .../devicetree/bindings/i2c/i2c-pxa.yaml      | 72 +++++++++++++++++++
 2 files changed, 72 insertions(+), 31 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-pxa.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-pxa.yaml

diff --git a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
deleted file mode 100644
index c30783c0eca0..000000000000
--- a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-* Marvell MMP I2C controller
-
-Required properties :
-
- - reg : Offset and length of the register set for the device
- - compatible : should be "mrvl,mmp-twsi" where mmp is the name of a
-   compatible processor, e.g. pxa168, pxa910, mmp2, mmp3.
-   For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required
-   as shown in the example below.
-   For the Armada 3700, the compatible should be "marvell,armada-3700-i2c".
-
-Recommended properties :
-
- - interrupts : the interrupt number
- - mrvl,i2c-polling : Disable interrupt of i2c controller. Polling
-   status register of i2c controller instead.
- - mrvl,i2c-fast-mode : Enable fast mode of i2c controller.
-
-Examples:
-	twsi1: i2c@d4011000 {
-		compatible = "mrvl,mmp-twsi";
-		reg = <0xd4011000 0x1000>;
-		interrupts = <7>;
-		mrvl,i2c-fast-mode;
-	};
-	
-	twsi2: i2c@d4025000 {
-		compatible = "mrvl,mmp-twsi";
-		reg = <0xd4025000 0x1000>;
-		interrupts = <58>;
-	};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml b/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
new file mode 100644
index 000000000000..19c81972243d
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-pxa.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP I2C controller bindings
+
+maintainers:
+  - Rob Herring <robh+dt@kernel.org>
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+  - if:
+      not:
+        required:
+          - mrvl,i2c-polling
+    then:
+        required:
+          - interrupts
+
+properties:
+  compatible:
+    enum:
+      - mrvl,mmp-twsi
+      - mrvl,pxa-i2c
+      - marvell,armada-3700-i2c
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+
+  resets:
+    minItems: 1
+
+  mrvl,i2c-polling:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: |
+      Disable interrupt of i2c controller. Polling status register of i2c
+      controller instead.
+
+  mrvl,i2c-fast-mode:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: Enable fast mode of i2c controller.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - '#address-cells'
+  - '#size-cells'
+
+examples:
+  - |
+    #include <dt-bindings/clock/marvell,mmp2.h>
+    i2c@d4011000 {
+        compatible = "mrvl,mmp-twsi";
+        reg = <0xd4011000 0x1000>;
+        interrupts = <7>;
+        clocks = <&soc_clocks MMP2_CLK_TWSI1>;
+        mrvl,i2c-fast-mode;
+        #address-cells = <1>;
+        #size-cells = <0>;
+    };
+
+...
-- 
2.26.2


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

* [PATCH v2 4/9] dt-bindings: interrupt-controller: Convert mrvl,intc to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
                   ` (2 preceding siblings ...)
  2020-05-21  9:13 ` [PATCH v2 3/9] dt-bindings: i2c: Convert i2c-pxa " Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-21  9:13 ` [PATCH v2 5/9] dt-bindings: media: Convert marvell,mmp2-ccic " Lubomir Rintel
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

Convert the mrvl,intc binding to DT schema format using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Move minItems/maxItems to main reg property definition from the
  conditional one
- Drop the condition for marvell,orion-intc
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file

 .../interrupt-controller/mrvl,intc.txt        |  64 ---------
 .../interrupt-controller/mrvl,intc.yaml       | 134 ++++++++++++++++++
 2 files changed, 134 insertions(+), 64 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt b/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt
deleted file mode 100644
index a0ed02725a9d..000000000000
--- a/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-* Marvell MMP Interrupt controller
-
-Required properties:
-- compatible : Should be
-               "mrvl,mmp-intc" on Marvel MMP,
-               "mrvl,mmp2-intc" along with "mrvl,mmp2-mux-intc" on MMP2 or
-               "marvell,mmp3-intc" with "mrvl,mmp2-mux-intc" on MMP3
-- reg : Address and length of the register set of the interrupt controller.
-  If the interrupt controller is intc, address and length means the range
-  of the whole interrupt controller. The "marvell,mmp3-intc" controller
-  also has a secondary range for the second CPU core.  If the interrupt
-  controller is mux-intc, address and length means one register. Since
-  address of mux-intc is in the range of intc. mux-intc is secondary
-  interrupt controller.
-- reg-names : Name of the register set of the interrupt controller. It's
-  only required in mux-intc interrupt controller.
-- interrupts : Should be the port interrupt shared by mux interrupts. It's
-  only required in mux-intc interrupt controller.
-- interrupt-controller : Identifies the node as an interrupt controller.
-- #interrupt-cells : Specifies the number of cells needed to encode an
-  interrupt source.
-- mrvl,intc-nr-irqs : Specifies the number of interrupts in the interrupt
-  controller.
-- mrvl,clr-mfp-irq : Specifies the interrupt that needs to clear MFP edge
-  detection first.
-
-Example:
-	intc: interrupt-controller@d4282000 {
-		compatible = "mrvl,mmp2-intc";
-		interrupt-controller;
-		#interrupt-cells = <1>;
-		reg = <0xd4282000 0x1000>;
-		mrvl,intc-nr-irqs = <64>;
-	};
-
-	intcmux4@d4282150 {
-		compatible = "mrvl,mmp2-mux-intc";
-		interrupts = <4>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-		reg = <0x150 0x4>, <0x168 0x4>;
-		reg-names = "mux status", "mux mask";
-		mrvl,intc-nr-irqs = <2>;
-	};
-
-* Marvell Orion Interrupt controller
-
-Required properties
-- compatible :  Should be "marvell,orion-intc".
-- #interrupt-cells: Specifies the number of cells needed to encode an
-  interrupt source. Supported value is <1>.
-- interrupt-controller : Declare this node to be an interrupt controller.
-- reg : Interrupt mask address. A list of 4 byte ranges, one per controller.
-        One entry in the list represents 32 interrupts.
-
-Example:
-
-	intc: interrupt-controller {
-        	compatible = "marvell,orion-intc", "marvell,intc";
-		interrupt-controller;
-		#interrupt-cells = <1>;
-                reg = <0xfed20204 0x04>,
-		      <0xfed20214 0x04>;
-        };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml
new file mode 100644
index 000000000000..372ccbfae771
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml
@@ -0,0 +1,134 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/mrvl,intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP/Orion Interrupt controller bindings
+
+maintainers:
+  - Thomas Gleixner <tglx@linutronix.de>
+  - Jason Cooper <jason@lakedaemon.net>
+  - Marc Zyngier <maz@kernel.org>
+  - Rob Herring <robh+dt@kernel.org>
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          not:
+            contains:
+              const: marvell,orion-intc
+    then:
+      required:
+        - mrvl,intc-nr-irqs
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mrvl,mmp-intc
+              - mrvl,mmp2-intc
+    then:
+      properties:
+        reg:
+          maxItems: 1
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - marvell,mmp3-intc
+              - mrvl,mmp2-mux-intc
+    then:
+      properties:
+        reg:
+          minItems: 2
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: mrvl,mmp2-mux-intc
+    then:
+      properties:
+        interrupts:
+          maxItems: 1
+        reg-names:
+          items:
+            - const: 'mux status'
+            - const: 'mux mask'
+      required:
+        - interrupts
+    else:
+      properties:
+        interrupts: false
+
+properties:
+  '#interrupt-cells':
+    const: 1
+
+  compatible:
+    enum:
+      - mrvl,mmp-intc
+      - mrvl,mmp2-intc
+      - marvell,mmp3-intc
+      - marvell,orion-intc
+      - mrvl,mmp2-mux-intc
+
+  reg:
+    minItems: 1
+    maxItems: 2
+
+  reg-names: true
+
+  interrupts: true
+
+  interrupt-controller: true
+
+  mrvl,intc-nr-irqs:
+    description: |
+      Specifies the number of interrupts in the interrupt controller.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  mrvl,clr-mfp-irq:
+    description: |
+      Specifies the interrupt that needs to clear MFP edge detection first.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - '#interrupt-cells'
+  - compatible
+  - reg
+  - interrupt-controller
+
+additionalProperties: false
+
+examples:
+  - |
+    interrupt-controller@d4282000 {
+        compatible = "mrvl,mmp2-intc";
+        interrupt-controller;
+        #interrupt-cells = <1>;
+        reg = <0xd4282000 0x1000>;
+        mrvl,intc-nr-irqs = <64>;
+    };
+
+    interrupt-controller@d4282150 {
+        compatible = "mrvl,mmp2-mux-intc";
+        interrupts = <4>;
+        interrupt-controller;
+        #interrupt-cells = <1>;
+        reg = <0x150 0x4>, <0x168 0x4>;
+        reg-names = "mux status", "mux mask";
+        mrvl,intc-nr-irqs = <2>;
+    };
+  - |
+    interrupt-controller@fed20204 {
+        compatible = "marvell,orion-intc";
+        interrupt-controller;
+        #interrupt-cells = <1>;
+        reg = <0xfed20204 0x04>,
+              <0xfed20214 0x04>;
+    };
+
+...
-- 
2.26.2


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

* [PATCH v2 5/9] dt-bindings: media: Convert marvell,mmp2-ccic to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
                   ` (3 preceding siblings ...)
  2020-05-21  9:13 ` [PATCH v2 4/9] dt-bindings: interrupt-controller: Convert mrvl,intc " Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-28 22:59   ` Rob Herring
  2020-05-21  9:13 ` [PATCH v2 6/9] dt-bindings: rtc: Convert sa1100-rtc " Lubomir Rintel
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

Convert the marvell,mmp2-ccic binding to DT schema format using
json-schema. While at that this drops the "func" and "phy" clocks.

The driver consumes clocks with those names, but it's not clear
what are they for and they are not used in DT systems. "phy" is
probably a clock for the sensor and it would belong in the sensor
node.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Fix indentation
- Drop clocks other than "axi"
- s/GPL-2.0-or-later/GPL-2.0-only/

 .../bindings/media/marvell,mmp2-ccic.txt      | 50 ----------
 .../bindings/media/marvell,mmp2-ccic.yaml     | 97 +++++++++++++++++++
 2 files changed, 97 insertions(+), 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt
 create mode 100644 Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml

diff --git a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt
deleted file mode 100644
index 7ec2c8c8a3b9..000000000000
--- a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-Marvell MMP2 camera host interface
-
-Required properties:
- - compatible: Should be "marvell,mmp2-ccic".
- - reg: Register base and size.
- - interrupts: The interrupt number.
- - #clock-cells: Must be 0.
-
-Optional properties:
- - clocks: Reference to the input clock as specified by
-           Documentation/devicetree/bindings/clock/clock-bindings.txt.
- - clock-names: Names of the clocks used; "axi" for the AXI bus interface,
-                "func" for the peripheral clock and "phy" for the parallel
-                video bus interface.
- - clock-output-names: Optional clock source for sensors. Shall be "mclk".
-
-Required subnodes:
- - port: The parallel bus interface port with a single endpoint linked to
-         the sensor's endpoint as described in
-         Documentation/devicetree/bindings/media/video-interfaces.txt.
-
-Required endpoint properties:
- - bus-type: data bus type, <5> or <6> for Parallel or Bt.656 respectively
- - pclk-sample: pixel clock polarity
- - hsync-active: horizontal synchronization polarity (only required for
-   parallel bus)
- - vsync-active: vertical synchronization polarity (only required for
-   parallel bus)
-
-Example:
-
-	camera0: camera@d420a000 {
-		compatible = "marvell,mmp2-ccic";
-		reg = <0xd420a000 0x800>;
-		interrupts = <42>;
-		clocks = <&soc_clocks MMP2_CLK_CCIC0>;
-		clock-names = "axi";
-		#clock-cells = <0>;
-		clock-output-names = "mclk";
-
-		port {
-			camera0_0: endpoint {
-				remote-endpoint = <&ov7670_0>;
-                                bus-type = <5>;      /* Parallel */
-                                hsync-active = <1>;  /* Active high */
-                                vsync-active = <1>;  /* Active high */
-                                pclk-sample = <0>;   /* Falling */
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml
new file mode 100644
index 000000000000..fb399de668bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/marvell,mmp2-ccic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP2 camera host interface bindings
+
+maintainers:
+  - Lubomir Rintel <lkundrak@v3.sk>
+
+properties:
+  $nodename:
+    pattern: '^camera@[a-f0-9]+$'
+
+  compatible:
+    const: marvell,mmp2-ccic
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  port:
+    type: object
+    additionalProperties: false
+
+    properties:
+      endpoint:
+        type: object
+        additionalProperties: false
+
+        # Properties described in
+        # Documentation/devicetree/bindings/media/video-interfaces.txt
+        properties:
+          remote-endpoint: true
+          hsync-active: true
+          vsync-active: true
+          pclk-sample: true
+          bus-type: true
+
+        required:
+          - remote-endpoint
+
+    required:
+      - endpoint
+
+  clocks:
+    minItems: 1
+    maxItems: 3
+    items:
+      - description: AXI bus interface clock
+      - description: Peripheral clock
+      - description: Parallel video bus interface clock
+
+  clock-names:
+    const: axi
+
+  '#clock-cells':
+    const: 0
+
+  clock-output-names:
+    const: mclk
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - port
+
+examples:
+  - |
+    #include <dt-bindings/clock/marvell,mmp2.h>
+
+    camera@d420a000 {
+      compatible = "marvell,mmp2-ccic";
+      reg = <0xd420a000 0x800>;
+      interrupts = <42>;
+      clocks = <&soc_clocks MMP2_CLK_CCIC0>;
+      clock-names = "axi";
+      #clock-cells = <0>;
+      clock-output-names = "mclk";
+
+      port {
+        camera0_0: endpoint {
+          remote-endpoint = <&ov7670_0>;
+          bus-type = <5>;      /* Parallel */
+          hsync-active = <1>;  /* Active high */
+          vsync-active = <1>;  /* Active high */
+          pclk-sample = <0>;   /* Falling */
+        };
+      };
+    };
+
+...
-- 
2.26.2


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

* [PATCH v2 6/9] dt-bindings: rtc: Convert sa1100-rtc to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
                   ` (4 preceding siblings ...)
  2020-05-21  9:13 ` [PATCH v2 5/9] dt-bindings: media: Convert marvell,mmp2-ccic " Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-21  9:13 ` [PATCH v2 7/9] dt-bindings: spi: Convert spi-pxa2xx " Lubomir Rintel
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

Convert the sa1100-rtc binding to DT schema format using json-schema.
While add that, add clocks and resets that are actually used.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Remove interrupts/maxItems
- Mention clocks and resets in the patch description
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file

 .../devicetree/bindings/rtc/sa1100-rtc.txt    | 17 ------
 .../devicetree/bindings/rtc/sa1100-rtc.yaml   | 57 +++++++++++++++++++
 2 files changed, 57 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml

diff --git a/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt b/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
deleted file mode 100644
index 968ac820254b..000000000000
--- a/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-* Marvell Real Time Clock controller
-
-Required properties:
-- compatible: should be "mrvl,sa1100-rtc"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- interrupts: Should be two. The first interrupt number is the rtc alarm
-  interrupt and the second interrupt number is the rtc hz interrupt.
-- interrupt-names: Assign name of irq resource.
-
-Example:
-	rtc: rtc@d4010000 {
-		compatible = "mrvl,mmp-rtc";
-		reg = <0xd4010000 0x1000>;
-		interrupts = <5>, <6>;
-		interrupt-names = "rtc 1Hz", "rtc alarm";
-	};
diff --git a/Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml b/Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml
new file mode 100644
index 000000000000..482e5af215b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/sa1100-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Real Time Clock controller bindings
+
+allOf:
+  - $ref: rtc.yaml#
+
+maintainers:
+  - Alessandro Zummo <a.zummo@towertech.it>
+  - Alexandre Belloni <alexandre.belloni@bootlin.com>
+  - Rob Herring <robh+dt@kernel.org>
+
+properties:
+  compatible:
+    enum:
+      - mrvl,sa1100-rtc
+      - mrvl,mmp-rtc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  interrupts:
+    minItems: 2
+
+  interrupt-names:
+    items:
+      - const: 'rtc 1Hz'
+      - const: 'rtc alarm'
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-names
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc: rtc@d4010000 {
+        compatible = "mrvl,mmp-rtc";
+        reg = <0xd4010000 0x1000>;
+        interrupts = <5>, <6>;
+        interrupt-names = "rtc 1Hz", "rtc alarm";
+    };
+
+...
-- 
2.26.2


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

* [PATCH v2 7/9] dt-bindings: spi: Convert spi-pxa2xx to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
                   ` (5 preceding siblings ...)
  2020-05-21  9:13 ` [PATCH v2 6/9] dt-bindings: rtc: Convert sa1100-rtc " Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-28 23:03   ` Rob Herring
  2020-05-21  9:13 ` [PATCH v2 8/9] dt-bindings: timer: Convert mrvl,mmp-timer " Lubomir Rintel
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

A straightforward conversion of the the spi-pxa2xx binding to DT schema
format using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Drop #address-cells and #size-cells
- s/GPL-2.0-or-later/GPL-2.0-only/

 .../bindings/spi/marvell,mmp2-ssp.yaml        | 56 +++++++++++++++++++
 .../devicetree/bindings/spi/spi-pxa2xx.txt    | 27 ---------
 2 files changed, 56 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-pxa2xx.txt

diff --git a/Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml b/Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml
new file mode 100644
index 000000000000..09bd831250a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/marvell,mmp2-ssp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PXA2xx SSP SPI Controller bindings
+
+maintainers:
+  - Lubomir Rintel <lkundrak@v3.sk>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    const: marvell,mmp2-ssp
+
+  interrupts:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  ready-gpios:
+    description: |
+      GPIO used to signal a SPI master that the FIFO is filled and we're
+      ready to service a transfer. Only useful in slave mode.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+dependencies:
+  ready-gpios: [ spi-slave ]
+
+examples:
+  - |
+    #include <dt-bindings/clock/marvell,mmp2.h>
+    spi@d4035000 {
+        compatible = "marvell,mmp2-ssp";
+        #address-cells = <1>;
+        #size-cells = <0>;
+        reg = <0xd4035000 0x1000>;
+        clocks = <&soc_clocks MMP2_CLK_SSP0>;
+        interrupts = <0>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt b/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
deleted file mode 100644
index e30e0c2a4bce..000000000000
--- a/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-PXA2xx SSP SPI Controller
-
-Required properties:
-- compatible: Must be "marvell,mmp2-ssp".
-- reg: Offset and length of the device's register set.
-- interrupts: Should be the interrupt number.
-- clocks: Should contain a single entry describing the clock input.
-- #address-cells:  Number of cells required to define a chip select address.
-- #size-cells: Should be zero.
-
-Optional properties:
-- cs-gpios: list of GPIO chip selects. See the SPI bus bindings,
-  Documentation/devicetree/bindings/spi/spi-bus.txt
-- spi-slave: Empty property indicating the SPI controller is used in slave mode.
-- ready-gpios: GPIO used to signal a SPI master that the FIFO is filled
-  and we're ready to service a transfer. Only useful in slave mode.
-
-Child nodes represent devices on the SPI bus
-  See ../spi/spi-bus.txt
-
-Example:
-	ssp1: spi@d4035000 {
-		compatible = "marvell,mmp2-ssp";
-		reg = <0xd4035000 0x1000>;
-		clocks = <&soc_clocks MMP2_CLK_SSP0>;
-		interrupts = <0>;
-	};
-- 
2.26.2


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

* [PATCH v2 8/9] dt-bindings: timer: Convert mrvl,mmp-timer to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
                   ` (6 preceding siblings ...)
  2020-05-21  9:13 ` [PATCH v2 7/9] dt-bindings: spi: Convert spi-pxa2xx " Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-21  9:13 ` [PATCH v2 9/9] dt-bindings: usb: Convert ehci-mv " Lubomir Rintel
  2020-05-28 22:52 ` [PATCH 0/9] DT: Improve validation for Marvell SoCs Rob Herring
  9 siblings, 0 replies; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

A straightforward conversion of the mrvl,mmp-timer binding to DT schema
format using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file

 .../bindings/timer/mrvl,mmp-timer.txt         | 17 -------
 .../bindings/timer/mrvl,mmp-timer.yaml        | 46 +++++++++++++++++++
 2 files changed, 46 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml

diff --git a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt
deleted file mode 100644
index b8f02c663521..000000000000
--- a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-* Marvell MMP Timer controller
-
-Required properties:
-- compatible : Should be "mrvl,mmp-timer".
-- reg : Address and length of the register set of timer controller.
-- interrupts : Should be the interrupt number.
-
-Optional properties:
-- clocks : Should contain a single entry describing the clock input.
-
-Example:
-	timer0: timer@d4014000 {
-		compatible = "mrvl,mmp-timer";
-		reg = <0xd4014000 0x100>;
-		interrupts = <13>;
-		clocks = <&coreclk 2>;
-	};
diff --git a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml
new file mode 100644
index 000000000000..1fbc260a0cbd
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/mrvl,mmp-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP Timer bindings
+
+maintainers:
+  - Daniel Lezcano <daniel.lezcano@linaro.org>
+  - Thomas Gleixner <tglx@linutronix.de>
+  - Rob Herring <robh+dt@kernel.org>
+
+properties:
+  $nodename:
+    pattern: '^timer@[a-f0-9]+$'
+
+  compatible:
+    const: mrvl,mmp-timer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    timer@d4014000 {
+        compatible = "mrvl,mmp-timer";
+        reg = <0xd4014000 0x100>;
+        interrupts = <13>;
+        clocks = <&coreclk 2>;
+    };
+
+...
-- 
2.26.2


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

* [PATCH v2 9/9] dt-bindings: usb: Convert ehci-mv to json-schema
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
                   ` (7 preceding siblings ...)
  2020-05-21  9:13 ` [PATCH v2 8/9] dt-bindings: timer: Convert mrvl,mmp-timer " Lubomir Rintel
@ 2020-05-21  9:13 ` Lubomir Rintel
  2020-05-28 23:05   ` Rob Herring
  2020-05-28 22:52 ` [PATCH 0/9] DT: Improve validation for Marvell SoCs Rob Herring
  9 siblings, 1 reply; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-21  9:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel,
	Lubomir Rintel

A straightforward conversion of the ehci-mv binding to DT schema format
using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- s/GPL-2.0-or-later/GPL-2.0-only/

 .../devicetree/bindings/usb/ehci-mv.txt       | 23 -------
 .../bindings/usb/marvell,pxau2o-ehci.yaml     | 60 +++++++++++++++++++
 2 files changed, 60 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/ehci-mv.txt
 create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml

diff --git a/Documentation/devicetree/bindings/usb/ehci-mv.txt b/Documentation/devicetree/bindings/usb/ehci-mv.txt
deleted file mode 100644
index 335589895763..000000000000
--- a/Documentation/devicetree/bindings/usb/ehci-mv.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-* Marvell PXA/MMP EHCI controller.
-
-Required properties:
-
-- compatible: must be "marvell,pxau2o-ehci"
-- reg: physical base addresses of the controller and length of memory mapped region
-- interrupts: one EHCI controller interrupt should be described here
-- clocks: phandle list of usb clocks
-- clock-names: should be "USBCLK"
-- phys: phandle for the PHY device
-- phy-names: should be "usb"
-
-Example:
-
-	ehci0: usb-ehci@d4208000 {
-		compatible = "marvell,pxau2o-ehci";
-		reg = <0xd4208000 0x200>;
-		interrupts = <44>;
-		clocks = <&soc_clocks MMP2_CLK_USB>;
-		clock-names = "USBCLK";
-		phys = <&usb_otg_phy>;
-		phy-names = "usb";
-	};
diff --git a/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
new file mode 100644
index 000000000000..eccd8cb45f77
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/marvell,pxau2o-ehci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell PXA/MMP EHCI bindings
+
+maintainers:
+  - Lubomir Rintel <lkundrak@v3.sk>
+
+allOf:
+  - $ref: usb-hcd.yaml#
+
+properties:
+  compatible:
+    const: marvell,pxau2o-ehci
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: USBCLK
+
+  phys:
+    maxItems: 1
+
+  phy-names:
+    const: usb
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - phys
+  - phy-names
+
+examples:
+  - |
+    #include <dt-bindings/clock/marvell,mmp2.h>
+    usb@d4208000 {
+        compatible = "marvell,pxau2o-ehci";
+        reg = <0xd4208000 0x200>;
+        interrupts = <44>;
+        clocks = <&soc_clocks MMP2_CLK_USB>;
+        clock-names = "USBCLK";
+        phys = <&usb_otg_phy>;
+        phy-names = "usb";
+    };
+
+...
-- 
2.26.2


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

* Re: [PATCH v2 2/9] dt-bindings: gpio: Convert mrvl-gpio to json-schema
  2020-05-21  9:13 ` [PATCH v2 2/9] dt-bindings: gpio: Convert mrvl-gpio " Lubomir Rintel
@ 2020-05-21 19:57   ` robh
  0 siblings, 0 replies; 20+ messages in thread
From: robh @ 2020-05-21 19:57 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: Alessandro Zummo, Daniel Lezcano, Marc Zyngier, Thomas Gleixner,
	Jason Cooper, linux-kernel, Bartosz Golaszewski, devicetree,
	Ulf Hansson, Linus Walleij, Alexandre Belloni, Rob Herring

On Thu, 21 May 2020 11:13:49 +0200, Lubomir Rintel wrote:
> This converts the mrvl-gpio binding to DT schema format using json-schema.
> 
> Various fixes were done during the conversion, such as adding more
> properties that are in fact mandatory or extending the examples to
> include child nodes with extra GPIO blocks.
> 
> The compatible strings are a mess. It is not clear why so many of them
> are needed; the driver doesn't really seem to differentiate between the
> models. Some of them, like marvell,pxa93x-gpio and marvell,pxa1928-gpio
> are not used at all, so it's not known how many interrupts they utilize.
> On the other hand, mrvl,pxa-gpio has been seen in the tree, but it
> doesn't end up in any actual DTB file.
> 
> In any case -- the schema merely copies whatever was in the original
> binding document, so it's hopefully no more wrong that the original.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> 
> ---
> Changes since v1:
> - Drop marvell,pxa1928-gpio
> - Drop ranges from example with no gcb child nodes
> - Add default GPL-2.0-only license tag
> - Fill in maintainers from MAINTAINERS file
> 
>  .../devicetree/bindings/gpio/mrvl-gpio.txt    |  48 -----
>  .../devicetree/bindings/gpio/mrvl-gpio.yaml   | 174 ++++++++++++++++++
>  2 files changed, 174 insertions(+), 48 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
>  create mode 100644 Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml
> 


My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/gpio/mrvl-gpio.example.dt.yaml: gpio@40e00000: 'ranges' is a required property

See https://patchwork.ozlabs.org/patch/1295044

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.


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

* Re: [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema
  2020-05-21  9:13 ` [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema Lubomir Rintel
@ 2020-05-27  7:59   ` Ulf Hansson
  2020-05-28 22:54     ` Rob Herring
  0 siblings, 1 reply; 20+ messages in thread
From: Ulf Hansson @ 2020-05-27  7:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Lubomir Rintel, Alessandro Zummo, Alexandre Belloni,
	Bartosz Golaszewski, Daniel Lezcano, Jason Cooper, Linus Walleij,
	Marc Zyngier, Thomas Gleixner, DTML, Linux Kernel Mailing List

On Thu, 21 May 2020 at 11:14, Lubomir Rintel <lkundrak@v3.sk> wrote:
>
> Convert the sdhci-pxa binding to DT schema format using json-schema.
>
> At the same time, fix a couple of issues with the examples discovered by
> the validation tool -- a semicolon instead of a comma and wrong node names.
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

Rob, are you fine with this v2? I am intending to queue it up via my
mmc tree, unless you want to pick it?

Kind regards
Uffe

>
> ---
> Changes since v1:
> - move reg-names items: from the conditional to main properties:, only
>   specify maxItems and minItems in conditional branches
> - Specify minItems and maxItems in properties/reg instad of on
>   conditional branchs
> - Add default GPL-2.0-only license tag
> - Fill in maintainers from MAINTAINERS file
>
>  .../devicetree/bindings/mmc/sdhci-pxa.txt     |  50 ---------
>  .../devicetree/bindings/mmc/sdhci-pxa.yaml    | 103 ++++++++++++++++++
>  2 files changed, 103 insertions(+), 50 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml
>
> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
> deleted file mode 100644
> index 3d1b449d6097..000000000000
> --- a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
> +++ /dev/null
> @@ -1,50 +0,0 @@
> -* Marvell sdhci-pxa v2/v3 controller
> -
> -This file documents differences between the core properties in mmc.txt
> -and the properties used by the sdhci-pxav2 and sdhci-pxav3 drivers.
> -
> -Required properties:
> -- compatible: Should be "mrvl,pxav2-mmc", "mrvl,pxav3-mmc" or
> -  "marvell,armada-380-sdhci".
> -- reg:
> -  * for "mrvl,pxav2-mmc" and "mrvl,pxav3-mmc", one register area for
> -    the SDHCI registers.
> -
> -  * for "marvell,armada-380-sdhci", three register areas. The first
> -    one for the SDHCI registers themselves, the second one for the
> -    AXI/Mbus bridge registers of the SDHCI unit, the third one for the
> -    SDIO3 Configuration register
> -- reg names: should be "sdhci", "mbus", "conf-sdio3". only mandatory
> -  for "marvell,armada-380-sdhci"
> -- clocks: Array of clocks required for SDHCI; requires at least one for
> -    I/O clock.
> -- clock-names: Array of names corresponding to clocks property; shall be
> -    "io" for I/O clock and "core" for optional core clock.
> -
> -Optional properties:
> -- mrvl,clk-delay-cycles: Specify a number of cycles to delay for tuning.
> -
> -Example:
> -
> -sdhci@d4280800 {
> -       compatible = "mrvl,pxav3-mmc";
> -       reg = <0xd4280800 0x800>;
> -       bus-width = <8>;
> -       interrupts = <27>;
> -       clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>;
> -       clock-names = "io", "core";
> -       non-removable;
> -       mrvl,clk-delay-cycles = <31>;
> -};
> -
> -sdhci@d8000 {
> -       compatible = "marvell,armada-380-sdhci";
> -       reg-names = "sdhci", "mbus", "conf-sdio3";
> -       reg = <0xd8000 0x1000>,
> -               <0xdc000 0x100>;
> -               <0x18454 0x4>;
> -       interrupts = <0 25 0x4>;
> -       clocks = <&gateclk 17>;
> -       clock-names = "io";
> -       mrvl,clk-delay-cycles = <0x1F>;
> -};
> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml b/Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml
> new file mode 100644
> index 000000000000..27ea069aa5fc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml
> @@ -0,0 +1,103 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/sdhci-pxa.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Marvell PXA SDHCI v2/v3 bindings
> +
> +maintainers:
> +  - Ulf Hansson <ulf.hansson@linaro.org>
> +  - Rob Herring <robh+dt@kernel.org>
> +
> +allOf:
> +  - $ref: mmc-controller.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: marvell,armada-380-sdhci
> +    then:
> +      properties:
> +        regs:
> +          minItems: 3
> +        reg-names:
> +          minItems: 3
> +      required:
> +        - reg-names
> +    else:
> +      properties:
> +        regs:
> +          maxItems: 1
> +        reg-names:
> +          maxItems: 1
> +
> +properties:
> +  compatible:
> +    enum:
> +      - mrvl,pxav2-mmc
> +      - mrvl,pxav3-mmc
> +      - marvell,armada-380-sdhci
> +
> +  reg:
> +    minItems: 1
> +    maxItems: 3
> +
> +  reg-names:
> +    items:
> +      - const: sdhci
> +      - const: mbus
> +      - const: conf-sdio3
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 1
> +    maxItems: 2
> +
> +  clock-names:
> +    minItems: 1
> +    maxItems: 2
> +    items:
> +      - const: io
> +      - const: core
> +
> +  mrvl,clk-delay-cycles:
> +    description: Specify a number of cycles to delay for tuning.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/berlin2.h>
> +    mmc@d4280800 {
> +        compatible = "mrvl,pxav3-mmc";
> +        reg = <0xd4280800 0x800>;
> +        bus-width = <8>;
> +        interrupts = <27>;
> +        clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>;
> +        clock-names = "io", "core";
> +        non-removable;
> +        mrvl,clk-delay-cycles = <31>;
> +    };
> +  - |
> +    mmc@d8000 {
> +        compatible = "marvell,armada-380-sdhci";
> +        reg-names = "sdhci", "mbus", "conf-sdio3";
> +        reg = <0xd8000 0x1000>,
> +              <0xdc000 0x100>,
> +              <0x18454 0x4>;
> +        interrupts = <0 25 0x4>;
> +        clocks = <&gateclk 17>;
> +        clock-names = "io";
> +        mrvl,clk-delay-cycles = <0x1F>;
> +    };
> +
> +...
> --
> 2.26.2
>

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

* Re: [PATCH 0/9] DT: Improve validation for Marvell SoCs
  2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
                   ` (8 preceding siblings ...)
  2020-05-21  9:13 ` [PATCH v2 9/9] dt-bindings: usb: Convert ehci-mv " Lubomir Rintel
@ 2020-05-28 22:52 ` Rob Herring
  2020-05-30 18:14   ` Lubomir Rintel
  9 siblings, 1 reply; 20+ messages in thread
From: Rob Herring @ 2020-05-28 22:52 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel

On Thu, May 21, 2020 at 11:13:47AM +0200, Lubomir Rintel wrote:
> Hi,
> 
> chained to this message is a second version of remaining patches from the
> first spin of the "DT: Improve validation for Marvell SoCs" [1] patch set.
> 
> [1] https://lore.kernel.org/lkml/20200317093922.20785-1-lkundrak@v3.sk/
> 
> I've attempted to address the review of the v1, each patch includes a
> detailed change log.
> 
> Compared to v1, wherever the license or maintainer information was
> missing, I've filled in GPL-2.0-only and people listed in MAINTAINERS
> file. As I've indicated in v1 cover letter, am not sure whether this is
> the optimal course of action. However I've included the relevant people
> in v1 Cc list and asked for clarifications, but didn't really get any
> feedback to that.

Find someone that would care if the bindings are deleted. I'm fine 
if you put yourself. Maybe subsystem maintainers are willing to take 
orphans. I really only want my name on common things.

Rob

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

* Re: [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema
  2020-05-27  7:59   ` Ulf Hansson
@ 2020-05-28 22:54     ` Rob Herring
  2020-05-29 11:10       ` Ulf Hansson
  0 siblings, 1 reply; 20+ messages in thread
From: Rob Herring @ 2020-05-28 22:54 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Lubomir Rintel, Alessandro Zummo, Alexandre Belloni,
	Bartosz Golaszewski, Daniel Lezcano, Jason Cooper, Linus Walleij,
	Marc Zyngier, Thomas Gleixner, DTML, Linux Kernel Mailing List

On Wed, May 27, 2020 at 09:59:10AM +0200, Ulf Hansson wrote:
> On Thu, 21 May 2020 at 11:14, Lubomir Rintel <lkundrak@v3.sk> wrote:
> >
> > Convert the sdhci-pxa binding to DT schema format using json-schema.
> >
> > At the same time, fix a couple of issues with the examples discovered by
> > the validation tool -- a semicolon instead of a comma and wrong node names.
> >
> > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> 
> Rob, are you fine with this v2? I am intending to queue it up via my
> mmc tree, unless you want to pick it?

You can take it if you drop my name from 'maintainers'. Ideally, it 
shouldn't be your name either (should have called it 'owners' 
instead...).

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 3/9] dt-bindings: i2c: Convert i2c-pxa to json-schema
  2020-05-21  9:13 ` [PATCH v2 3/9] dt-bindings: i2c: Convert i2c-pxa " Lubomir Rintel
@ 2020-05-28 22:57   ` Rob Herring
  0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2020-05-28 22:57 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel

On Thu, May 21, 2020 at 11:13:50AM +0200, Lubomir Rintel wrote:
> A conversion of the i2c-pxa binding to DT schema format using json-schema.
> 
> This also cleans ups some errors in the binding: The compatible string
> description suggested that "mmp" in "mrvl,mmp-twsi" is to be substituted
> with a processor model, which wouldn't be a right thing to do and indeed
> nobody seems to have been doing that. There also was "Recommended
> properties" section that included optional as well as mandatory
> properties. Missing mandatory properties were added to the example.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> 
> ---
> Changes since v1:
> - Add default GPL-2.0-only license tag
> - Fill in maintainers from MAINTAINERS file
> 
>  .../devicetree/bindings/i2c/i2c-pxa.txt       | 31 --------
>  .../devicetree/bindings/i2c/i2c-pxa.yaml      | 72 +++++++++++++++++++
>  2 files changed, 72 insertions(+), 31 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-pxa.txt
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
> deleted file mode 100644
> index c30783c0eca0..000000000000
> --- a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -* Marvell MMP I2C controller
> -
> -Required properties :
> -
> - - reg : Offset and length of the register set for the device
> - - compatible : should be "mrvl,mmp-twsi" where mmp is the name of a
> -   compatible processor, e.g. pxa168, pxa910, mmp2, mmp3.
> -   For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required
> -   as shown in the example below.
> -   For the Armada 3700, the compatible should be "marvell,armada-3700-i2c".
> -
> -Recommended properties :
> -
> - - interrupts : the interrupt number
> - - mrvl,i2c-polling : Disable interrupt of i2c controller. Polling
> -   status register of i2c controller instead.
> - - mrvl,i2c-fast-mode : Enable fast mode of i2c controller.
> -
> -Examples:
> -	twsi1: i2c@d4011000 {
> -		compatible = "mrvl,mmp-twsi";
> -		reg = <0xd4011000 0x1000>;
> -		interrupts = <7>;
> -		mrvl,i2c-fast-mode;
> -	};
> -	
> -	twsi2: i2c@d4025000 {
> -		compatible = "mrvl,mmp-twsi";
> -		reg = <0xd4025000 0x1000>;
> -		interrupts = <58>;
> -	};
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml b/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
> new file mode 100644
> index 000000000000..19c81972243d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/i2c-pxa.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Marvell MMP I2C controller bindings
> +
> +maintainers:
> +  - Rob Herring <robh+dt@kernel.org>
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +  - if:
> +      not:
> +        required:
> +          - mrvl,i2c-polling
> +    then:
> +        required:
> +          - interrupts
> +
> +properties:
> +  compatible:
> +    enum:
> +      - mrvl,mmp-twsi
> +      - mrvl,pxa-i2c
> +      - marvell,armada-3700-i2c
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 1
> +
> +  resets:
> +    minItems: 1
> +
> +  mrvl,i2c-polling:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: |
> +      Disable interrupt of i2c controller. Polling status register of i2c
> +      controller instead.
> +
> +  mrvl,i2c-fast-mode:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: Enable fast mode of i2c controller.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - '#address-cells'
> +  - '#size-cells'

Add: 

unevaluatedProperties: false

> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/marvell,mmp2.h>
> +    i2c@d4011000 {
> +        compatible = "mrvl,mmp-twsi";
> +        reg = <0xd4011000 0x1000>;
> +        interrupts = <7>;
> +        clocks = <&soc_clocks MMP2_CLK_TWSI1>;
> +        mrvl,i2c-fast-mode;
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +    };
> +
> +...
> -- 
> 2.26.2
> 

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

* Re: [PATCH v2 5/9] dt-bindings: media: Convert marvell,mmp2-ccic to json-schema
  2020-05-21  9:13 ` [PATCH v2 5/9] dt-bindings: media: Convert marvell,mmp2-ccic " Lubomir Rintel
@ 2020-05-28 22:59   ` Rob Herring
  0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2020-05-28 22:59 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: Alexandre Belloni, Alessandro Zummo, Marc Zyngier, linux-kernel,
	Ulf Hansson, Bartosz Golaszewski, Linus Walleij, Daniel Lezcano,
	Jason Cooper, Thomas Gleixner, Rob Herring, devicetree

On Thu, 21 May 2020 11:13:52 +0200, Lubomir Rintel wrote:
> Convert the marvell,mmp2-ccic binding to DT schema format using
> json-schema. While at that this drops the "func" and "phy" clocks.
> 
> The driver consumes clocks with those names, but it's not clear
> what are they for and they are not used in DT systems. "phy" is
> probably a clock for the sensor and it would belong in the sensor
> node.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> 
> ---
> Changes since v1:
> - Fix indentation
> - Drop clocks other than "axi"
> - s/GPL-2.0-or-later/GPL-2.0-only/
> 
>  .../bindings/media/marvell,mmp2-ccic.txt      | 50 ----------
>  .../bindings/media/marvell,mmp2-ccic.yaml     | 97 +++++++++++++++++++
>  2 files changed, 97 insertions(+), 50 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/media/marvell,mmp2-ccic.txt
>  create mode 100644 Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml
> 

Applied, thanks!

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

* Re: [PATCH v2 7/9] dt-bindings: spi: Convert spi-pxa2xx to json-schema
  2020-05-21  9:13 ` [PATCH v2 7/9] dt-bindings: spi: Convert spi-pxa2xx " Lubomir Rintel
@ 2020-05-28 23:03   ` Rob Herring
  0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2020-05-28 23:03 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: Thomas Gleixner, Alessandro Zummo, Jason Cooper, Ulf Hansson,
	Marc Zyngier, devicetree, Bartosz Golaszewski, Alexandre Belloni,
	Daniel Lezcano, Rob Herring, linux-kernel, Linus Walleij

On Thu, 21 May 2020 11:13:54 +0200, Lubomir Rintel wrote:
> A straightforward conversion of the the spi-pxa2xx binding to DT schema
> format using json-schema.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> 
> ---
> Changes since v1:
> - Drop #address-cells and #size-cells
> - s/GPL-2.0-or-later/GPL-2.0-only/
> 
>  .../bindings/spi/marvell,mmp2-ssp.yaml        | 56 +++++++++++++++++++
>  .../devicetree/bindings/spi/spi-pxa2xx.txt    | 27 ---------
>  2 files changed, 56 insertions(+), 27 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml
>  delete mode 100644 Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
> 

Applied, thanks!

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

* Re: [PATCH v2 9/9] dt-bindings: usb: Convert ehci-mv to json-schema
  2020-05-21  9:13 ` [PATCH v2 9/9] dt-bindings: usb: Convert ehci-mv " Lubomir Rintel
@ 2020-05-28 23:05   ` Rob Herring
  0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2020-05-28 23:05 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: Linus Walleij, Marc Zyngier, Thomas Gleixner, Daniel Lezcano,
	Rob Herring, Alessandro Zummo, devicetree, Bartosz Golaszewski,
	Alexandre Belloni, linux-kernel, Ulf Hansson, Jason Cooper

On Thu, 21 May 2020 11:13:56 +0200, Lubomir Rintel wrote:
> A straightforward conversion of the ehci-mv binding to DT schema format
> using json-schema.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> 
> ---
> Changes since v1:
> - s/GPL-2.0-or-later/GPL-2.0-only/
> 
>  .../devicetree/bindings/usb/ehci-mv.txt       | 23 -------
>  .../bindings/usb/marvell,pxau2o-ehci.yaml     | 60 +++++++++++++++++++
>  2 files changed, 60 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/usb/ehci-mv.txt
>  create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml
> 

Applied, thanks!

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

* Re: [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema
  2020-05-28 22:54     ` Rob Herring
@ 2020-05-29 11:10       ` Ulf Hansson
  0 siblings, 0 replies; 20+ messages in thread
From: Ulf Hansson @ 2020-05-29 11:10 UTC (permalink / raw)
  To: Rob Herring, Lubomir Rintel
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, DTML, Linux Kernel Mailing List

On Fri, 29 May 2020 at 00:54, Rob Herring <robh@kernel.org> wrote:
>
> On Wed, May 27, 2020 at 09:59:10AM +0200, Ulf Hansson wrote:
> > On Thu, 21 May 2020 at 11:14, Lubomir Rintel <lkundrak@v3.sk> wrote:
> > >
> > > Convert the sdhci-pxa binding to DT schema format using json-schema.
> > >
> > > At the same time, fix a couple of issues with the examples discovered by
> > > the validation tool -- a semicolon instead of a comma and wrong node names.
> > >
> > > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> >
> > Rob, are you fine with this v2? I am intending to queue it up via my
> > mmc tree, unless you want to pick it?
>
> You can take it if you drop my name from 'maintainers'. Ideally, it
> shouldn't be your name either (should have called it 'owners'
> instead...).

Patch amended!

>
> Reviewed-by: Rob Herring <robh@kernel.org>

Thanks, applied to my next branch!

Kind regards
Uffe

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

* Re: [PATCH 0/9] DT: Improve validation for Marvell SoCs
  2020-05-28 22:52 ` [PATCH 0/9] DT: Improve validation for Marvell SoCs Rob Herring
@ 2020-05-30 18:14   ` Lubomir Rintel
  0 siblings, 0 replies; 20+ messages in thread
From: Lubomir Rintel @ 2020-05-30 18:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alessandro Zummo, Alexandre Belloni, Bartosz Golaszewski,
	Daniel Lezcano, Jason Cooper, Linus Walleij, Marc Zyngier,
	Thomas Gleixner, Ulf Hansson, devicetree, linux-kernel

On Thu, May 28, 2020 at 04:52:44PM -0600, Rob Herring wrote:
> On Thu, May 21, 2020 at 11:13:47AM +0200, Lubomir Rintel wrote:
> > Hi,
> > 
> > chained to this message is a second version of remaining patches from the
> > first spin of the "DT: Improve validation for Marvell SoCs" [1] patch set.
> > 
> > [1] https://lore.kernel.org/lkml/20200317093922.20785-1-lkundrak@v3.sk/
> > 
> > I've attempted to address the review of the v1, each patch includes a
> > detailed change log.
> > 
> > Compared to v1, wherever the license or maintainer information was
> > missing, I've filled in GPL-2.0-only and people listed in MAINTAINERS
> > file. As I've indicated in v1 cover letter, am not sure whether this is
> > the optimal course of action. However I've included the relevant people
> > in v1 Cc list and asked for clarifications, but didn't really get any
> > feedback to that.
> 
> Find someone that would care if the bindings are deleted. I'm fine 
> if you put yourself. Maybe subsystem maintainers are willing to take 
> orphans. I really only want my name on common things.

Thanks for clarification & fixups to the patches.

I'm wondering if Documentation/devicetree/writing-schema.rst could
perhaps be made a bit clearer about how the maintainer key in a binding
document is different from what is in the MAINTAINERS file.

> Rob

Lubo

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

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

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21  9:13 [PATCH 0/9] DT: Improve validation for Marvell SoCs Lubomir Rintel
2020-05-21  9:13 ` [PATCH v2 1/9] dt-bindings: mmc: Convert sdhci-pxa to json-schema Lubomir Rintel
2020-05-27  7:59   ` Ulf Hansson
2020-05-28 22:54     ` Rob Herring
2020-05-29 11:10       ` Ulf Hansson
2020-05-21  9:13 ` [PATCH v2 2/9] dt-bindings: gpio: Convert mrvl-gpio " Lubomir Rintel
2020-05-21 19:57   ` robh
2020-05-21  9:13 ` [PATCH v2 3/9] dt-bindings: i2c: Convert i2c-pxa " Lubomir Rintel
2020-05-28 22:57   ` Rob Herring
2020-05-21  9:13 ` [PATCH v2 4/9] dt-bindings: interrupt-controller: Convert mrvl,intc " Lubomir Rintel
2020-05-21  9:13 ` [PATCH v2 5/9] dt-bindings: media: Convert marvell,mmp2-ccic " Lubomir Rintel
2020-05-28 22:59   ` Rob Herring
2020-05-21  9:13 ` [PATCH v2 6/9] dt-bindings: rtc: Convert sa1100-rtc " Lubomir Rintel
2020-05-21  9:13 ` [PATCH v2 7/9] dt-bindings: spi: Convert spi-pxa2xx " Lubomir Rintel
2020-05-28 23:03   ` Rob Herring
2020-05-21  9:13 ` [PATCH v2 8/9] dt-bindings: timer: Convert mrvl,mmp-timer " Lubomir Rintel
2020-05-21  9:13 ` [PATCH v2 9/9] dt-bindings: usb: Convert ehci-mv " Lubomir Rintel
2020-05-28 23:05   ` Rob Herring
2020-05-28 22:52 ` [PATCH 0/9] DT: Improve validation for Marvell SoCs Rob Herring
2020-05-30 18:14   ` Lubomir Rintel

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