linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/34] Devicetree schema
@ 2018-12-03 21:31 Rob Herring
  2018-12-03 21:32 ` [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2018-12-03 21:31 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Mark Rutland, Alexandre Belloni, Heiko Stuebner, Sean Hudson,
	Neil Armstrong, Sekhar Nori, Patrice Chotard, David Brown,
	Grant Likely, Manivannan Sadhasivam, Frank Rowand,
	linux-renesas-soc, Kumar Gala, Kevin Hilman, Viresh Kumar,
	Daniel Lezcano, Magnus Damm, Michal Simek, Jonathan Hunter,
	linux-rockchip, arm, Andy Gross, Tsahee Zidenberg


The current DT binding documentation is not ideal as it is just free form
text with at most only a loose structure. This makes reviewing bindings a
manual process. The bindings are often duplicating information that's
already defined elsewhere and missing information one would need to
validate a DTS file. The examples in binding documents are not built and
a source of lots of typos sometimes found in review and sometimes not.
Secondly, there's no verification that DTS files match what the
documentation says. While dtc does do some checking (and has gained more
recently), it can't do per binding checks as it would have to understand
thousands of compatible strings to match on.

There's been a number of proposals over the years to address validation.
They've all suffered from inventing their own validation language and the
effort it would take to fully define and flush out a validation language.
Enter json-schema. The language has a defined specification, maps well to
DT data, and there are numerous existing tools which can be leveraged.
The actual DT schema doc files are stored as YAML using only a JSON
compatible subset. YAML is considered more human readable allowing
comments for example.

This series adds the build support, some documentation, and converts
some bindings (mostly ARM board/soc bindings). The tools, core schema,
and meta-schema are in a separate repository[1]. This might eventually
be integrated with dtc or added to the kernel, but for now I plan to
keep it separate.

This series is available here[2]. The branch also has a doc2yaml script
which can help convert binding files. It's not perfect, but works pretty
well considering the input is free form text.

My plan is to merge this initial support for v4.21. There's not yet any
requirement that new bindings be submitted using the schema. I think that
should wait a bit until after this gets a bit more exposure. I do have
some tooling in place to test submitted patches and update DT patchwork
with the result.


SoC maintainers,
The board/soc bindings can go thru your trees if there are conflicts (if
any SoC or board is added). It shouldn't matter if they go in separately
from the build support. shmobile, rockchip, fsl and amlogic already have
conflicts with next. Otherwise, I can take them via the DT tree.

Rob


v2:
 - Rebase to v4.20-rc2
 - Add some missing Xilinx boards (from Michal Simek)
 - Add ability to validate with a single specified schema using
   the DT_SCHEMA_FILES variable.
 - Add back some dropped comments for board names
 - Various maintainer fixes
 - Rework ARM PMU interrupts schema.
 - Updates to ARM CPU vendor specific properties.
 - Add i2c-gpio conversion to json-schema. Serves as example of including
   another schema (i2c-controller.yaml)
 - Set license on schema files to GPL-2.0
 - Improvements to writing-schema.md and annotated example.


[1] https://github.com/robherring/yaml-bindings
[2] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git yaml-bindings-v2

Michal Simek (1):
  dt-bindings: arm: Add missing Xilinx boards

Rob Herring (33):
  kbuild: Add support for DT binding schema checks
  dt-bindings: Add a writing DT schemas how-to and annotated example
  dt-bindings: Convert trivial-devices.txt to json-schema
  dt-bindings: altera: Convert clkmgr binding to json-schema
  dt-bindings: i2c: Convert i2c-gpio binding to json-schema
  dt-bindings: timer: Convert ARM timer bindings to json-schema
  dt-bindings: arm: Convert cpu binding to json-schema
  dt-bindings: arm: Convert PMU binding to json-schema
  dt-bindings: arm: Convert primecell binding to json-schema
  dt-bindings: arm: Convert Actions Semi bindings to jsonschema
  dt-bindings: arm: Convert Alpine board/soc bindings to json-schema
  dt-bindings: arm: Convert Altera board/soc bindings to json-schema
  dt-bindings: arm: amlogic: Move 'amlogic,meson-gx-ao-secure' binding
    to its own file
  dt-bindings: arm: Convert Amlogic board/soc bindings to json-schema
  dt-bindings: arm: Convert Atmel board/soc bindings to json-schema
  dt-bindings: arm: Convert Calxeda board/soc bindings to json-schema
  dt-bindings: arm: Convert TI davinci board/soc bindings to json-schema
  dt-bindings: arm: Convert FSL board/soc bindings to json-schema
  dt-bindings: arm: Convert MediaTek board/soc bindings to json-schema
  dt-bindings: arm: Convert TI nspire board/soc bindings to json-schema
  dt-bindings: arm: Convert Oxford Semi board/soc bindings to
    json-schema
  dt-bindings: arm: Convert QCom board/soc bindings to json-schema
  dt-bindings: arm: Convert Realtek board/soc bindings to json-schema
  dt-bindings: arm: Convert Rockchip board/soc bindings to json-schema
  dt-bindings: arm: renesas: Move 'renesas,prr' binding to its own doc
  dt-bindings: arm: Convert Renesas board/soc bindings to json-schema
  dt-bindings: arm: Convert CSR SiRF board/soc bindings to json-schema
  dt-bindings: arm: Convert SPEAr board/soc bindings to json-schema
  dt-bindings: arm: Convert ST STi board/soc bindings to json-schema
  dt-bindings: arm: Convert Tegra board/soc bindings to json-schema
  dt-bindings: arm: Convert VIA board/soc bindings to json-schema
  dt-bindings: arm: Convert Xilinx board/soc bindings to json-schema
  dt-bindings: arm: Convert ZTE board/soc bindings to json-schema

 .gitignore                                    |   1 +
 Documentation/Makefile                        |   2 +-
 Documentation/devicetree/bindings/.gitignore  |   1 +
 Documentation/devicetree/bindings/Makefile    |  33 ++
 .../devicetree/bindings/arm/actions.txt       |  56 --
 .../devicetree/bindings/arm/actions.yaml      |  38 ++
 .../devicetree/bindings/arm/al,alpine.txt     |  16 -
 .../devicetree/bindings/arm/al,alpine.yaml    |  21 +
 .../devicetree/bindings/arm/altera.txt        |  14 -
 .../devicetree/bindings/arm/altera.yaml       |  20 +
 .../arm/altera/socfpga-clk-manager.txt        |  11 -
 .../arm/altera/socfpga-clk-manager.yaml       |  31 ++
 .../devicetree/bindings/arm/amlogic.txt       | 138 -----
 .../devicetree/bindings/arm/amlogic.yaml      | 109 ++++
 .../amlogic/amlogic,meson-gx-ao-secure.txt    |  28 +
 .../devicetree/bindings/arm/armadeus.txt      |   6 -
 .../devicetree/bindings/arm/atmel-at91.txt    |  72 ---
 .../devicetree/bindings/arm/atmel-at91.yaml   | 133 +++++
 Documentation/devicetree/bindings/arm/bhf.txt |   6 -
 .../devicetree/bindings/arm/calxeda.txt       |  15 -
 .../devicetree/bindings/arm/calxeda.yaml      |  22 +
 .../bindings/arm/compulab-boards.txt          |  25 -
 .../devicetree/bindings/arm/cpus.txt          | 490 -----------------
 .../devicetree/bindings/arm/cpus.yaml         | 507 ++++++++++++++++++
 .../devicetree/bindings/arm/davinci.txt       |  25 -
 Documentation/devicetree/bindings/arm/fsl.txt | 229 --------
 .../devicetree/bindings/arm/fsl.yaml          | 214 ++++++++
 .../devicetree/bindings/arm/i2se.txt          |  22 -
 .../devicetree/bindings/arm/mediatek.txt      |  79 ---
 .../devicetree/bindings/arm/mediatek.yaml     |  85 +++
 .../devicetree/bindings/arm/nspire.txt        |  14 -
 .../devicetree/bindings/arm/olimex.txt        |  10 -
 .../devicetree/bindings/arm/oxnas.txt         |  14 -
 .../devicetree/bindings/arm/oxnas.yaml        |  25 +
 Documentation/devicetree/bindings/arm/pmu.txt |  70 ---
 .../devicetree/bindings/arm/pmu.yaml          |  91 ++++
 .../devicetree/bindings/arm/primecell.txt     |  46 --
 .../devicetree/bindings/arm/primecell.yaml    |  36 ++
 .../devicetree/bindings/arm/qcom.txt          |  57 --
 .../devicetree/bindings/arm/qcom.yaml         | 125 +++++
 .../devicetree/bindings/arm/realtek.txt       |  22 -
 .../devicetree/bindings/arm/realtek.yaml      |  23 +
 .../devicetree/bindings/arm/renesas,prr.txt   |  20 +
 .../devicetree/bindings/arm/rockchip.txt      | 240 ---------
 .../devicetree/bindings/arm/rockchip.yaml     | 251 +++++++++
 .../devicetree/bindings/arm/shmobile.txt      | 169 ------
 .../devicetree/bindings/arm/shmobile.yaml     | 218 ++++++++
 .../devicetree/bindings/arm/sirf.txt          |  11 -
 .../devicetree/bindings/arm/sirf.yaml         |  27 +
 .../devicetree/bindings/arm/spear.txt         |  26 -
 .../devicetree/bindings/arm/spear.yaml        |  25 +
 Documentation/devicetree/bindings/arm/sti.txt |  23 -
 .../devicetree/bindings/arm/sti.yaml          |  23 +
 .../devicetree/bindings/arm/technologic.txt   |  23 -
 .../devicetree/bindings/arm/tegra.txt         |  65 ---
 .../devicetree/bindings/arm/tegra.yaml        | 101 ++++
 .../devicetree/bindings/arm/ti/nspire.yaml    |  24 +
 .../bindings/arm/ti/ti,davinci.yaml           |  26 +
 .../devicetree/bindings/arm/vt8500.txt        |  22 -
 .../devicetree/bindings/arm/vt8500.yaml       |  23 +
 .../devicetree/bindings/arm/xilinx.txt        |  83 ---
 .../devicetree/bindings/arm/xilinx.yaml       | 114 ++++
 Documentation/devicetree/bindings/arm/zte.txt |  14 -
 .../devicetree/bindings/arm/zte.yaml          |  26 +
 .../devicetree/bindings/example-schema.yaml   | 170 ++++++
 .../devicetree/bindings/i2c/i2c-gpio.txt      |  46 --
 .../devicetree/bindings/i2c/i2c-gpio.yaml     |  73 +++
 .../bindings/timer/arm,arch_timer.txt         | 112 ----
 .../bindings/timer/arm,arch_timer.yaml        | 103 ++++
 .../bindings/timer/arm,arch_timer_mmio.yaml   | 120 +++++
 .../bindings/timer/arm,global_timer.txt       |  27 -
 .../bindings/timer/arm,global_timer.yaml      |  46 ++
 .../devicetree/bindings/trivial-devices.txt   | 190 -------
 .../devicetree/bindings/trivial-devices.yaml  | 392 ++++++++++++++
 Documentation/devicetree/writing-schema.md    | 130 +++++
 Makefile                                      |  11 +-
 scripts/Makefile.lib                          |  24 +-
 77 files changed, 3487 insertions(+), 2493 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/.gitignore
 create mode 100644 Documentation/devicetree/bindings/Makefile
 delete mode 100644 Documentation/devicetree/bindings/arm/actions.txt
 create mode 100644 Documentation/devicetree/bindings/arm/actions.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/al,alpine.txt
 create mode 100644 Documentation/devicetree/bindings/arm/al,alpine.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/altera.txt
 create mode 100644 Documentation/devicetree/bindings/arm/altera.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/altera/socfpga-clk-manager.txt
 create mode 100644 Documentation/devicetree/bindings/arm/altera/socfpga-clk-manager.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/amlogic.txt
 create mode 100644 Documentation/devicetree/bindings/arm/amlogic.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/armadeus.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/atmel-at91.txt
 create mode 100644 Documentation/devicetree/bindings/arm/atmel-at91.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/bhf.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/calxeda.txt
 create mode 100644 Documentation/devicetree/bindings/arm/calxeda.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/compulab-boards.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/cpus.txt
 create mode 100644 Documentation/devicetree/bindings/arm/cpus.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/davinci.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/fsl.txt
 create mode 100644 Documentation/devicetree/bindings/arm/fsl.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/i2se.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/mediatek.txt
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/nspire.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/olimex.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/oxnas.txt
 create mode 100644 Documentation/devicetree/bindings/arm/oxnas.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/pmu.txt
 create mode 100644 Documentation/devicetree/bindings/arm/pmu.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/primecell.txt
 create mode 100644 Documentation/devicetree/bindings/arm/primecell.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/qcom.txt
 create mode 100644 Documentation/devicetree/bindings/arm/qcom.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/realtek.txt
 create mode 100644 Documentation/devicetree/bindings/arm/realtek.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/renesas,prr.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/rockchip.txt
 create mode 100644 Documentation/devicetree/bindings/arm/rockchip.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/shmobile.txt
 create mode 100644 Documentation/devicetree/bindings/arm/shmobile.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/sirf.txt
 create mode 100644 Documentation/devicetree/bindings/arm/sirf.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/spear.txt
 create mode 100644 Documentation/devicetree/bindings/arm/spear.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/sti.txt
 create mode 100644 Documentation/devicetree/bindings/arm/sti.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/technologic.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/tegra.txt
 create mode 100644 Documentation/devicetree/bindings/arm/tegra.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/ti/nspire.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/ti/ti,davinci.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/vt8500.txt
 create mode 100644 Documentation/devicetree/bindings/arm/vt8500.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/xilinx.txt
 create mode 100644 Documentation/devicetree/bindings/arm/xilinx.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/zte.txt
 create mode 100644 Documentation/devicetree/bindings/arm/zte.yaml
 create mode 100644 Documentation/devicetree/bindings/example-schema.yaml
 delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-gpio.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-gpio.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/arm,arch_timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/arm,arch_timer.yaml
 create mode 100644 Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/arm,global_timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/arm,global_timer.yaml
 delete mode 100644 Documentation/devicetree/bindings/trivial-devices.txt
 create mode 100644 Documentation/devicetree/bindings/trivial-devices.yaml
 create mode 100644 Documentation/devicetree/writing-schema.md

--
2.19.1

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

* [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema
  2018-12-03 21:31 [PATCH v2 00/34] Devicetree schema Rob Herring
@ 2018-12-03 21:32 ` Rob Herring
  2018-12-04  8:50   ` Thierry Reding
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2018-12-03 21:32 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Sean Hudson, Frank Rowand, linux-arm-kernel, linuxppc-dev,
	Grant Likely, Kumar Gala, arm, Mark Rutland, Thierry Reding,
	Jonathan Hunter, linux-tegra

Convert Tegra SoC bindings to DT schema format using json-schema.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: devicetree@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/arm/tegra.txt         |  65 -----------
 .../devicetree/bindings/arm/tegra.yaml        | 101 ++++++++++++++++++
 2 files changed, 101 insertions(+), 65 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/tegra.txt
 create mode 100644 Documentation/devicetree/bindings/arm/tegra.yaml

diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
deleted file mode 100644
index c59b15f64346..000000000000
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-NVIDIA Tegra device tree bindings
--------------------------------------------
-
-SoCs
--------------------------------------------
-
-Each device tree must specify which Tegra SoC it uses, using one of the
-following compatible values:
-
-  nvidia,tegra20
-  nvidia,tegra30
-  nvidia,tegra114
-  nvidia,tegra124
-  nvidia,tegra132
-  nvidia,tegra210
-  nvidia,tegra186
-  nvidia,tegra194
-
-Boards
--------------------------------------------
-
-Each device tree must specify which one or more of the following
-board-specific compatible values:
-
-  ad,medcom-wide
-  ad,plutux
-  ad,tamonten
-  ad,tec
-  compal,paz00
-  compulab,trimslice
-  nvidia,beaver
-  nvidia,cardhu
-  nvidia,cardhu-a02
-  nvidia,cardhu-a04
-  nvidia,dalmore
-  nvidia,harmony
-  nvidia,jetson-tk1
-  nvidia,norrin
-  nvidia,p2371-0000
-  nvidia,p2371-2180
-  nvidia,p2571
-  nvidia,p2771-0000
-  nvidia,p2972-0000
-  nvidia,roth
-  nvidia,seaboard
-  nvidia,tn7
-  nvidia,ventana
-  toradex,apalis_t30
-  toradex,apalis_t30-eval
-  toradex,apalis_t30-v1.1
-  toradex,apalis_t30-v1.1-eval
-  toradex,apalis-tk1
-  toradex,apalis-tk1-eval
-  toradex,apalis-tk1-v1.2
-  toradex,apalis-tk1-v1.2-eval
-  toradex,colibri_t20
-  toradex,colibri_t20-eval-v3
-  toradex,colibri_t20-iris
-  toradex,colibri_t30
-  toradex,colibri_t30-eval-v3
-
-Trusted Foundations
--------------------------------------------
-Tegra supports the Trusted Foundation secure monitor. See the
-"tlm,trusted-foundations" binding's documentation for more details.
diff --git a/Documentation/devicetree/bindings/arm/tegra.yaml b/Documentation/devicetree/bindings/arm/tegra.yaml
new file mode 100644
index 000000000000..66493892ffc1
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/tegra.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/tegra.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra device tree bindings
+
+maintainers:
+  - Marcel Ziswiler <marcel.ziswiler@toradex.com>
+  - Peter De Schrijver <pdeschrijver@nvidia.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - compal,paz00
+              - compulab,trimslice
+              - nvidia,harmony
+              - nvidia,seaboard
+              - nvidia,ventana
+          - const: nvidia,tegra20
+      - items:
+          - enum:
+              - ad,medcom-wide
+              - ad,plutux
+              - ad,tec
+          - const: ad,tamonten
+          - const: nvidia,tegra20
+      - items:
+          - enum:
+              - toradex,colibri_t20-eval-v3
+              - toradex,colibri_t20-iris
+          - const: toradex,colibri_t20
+          - const: nvidia,tegra20
+      - items:
+          - enum:
+              - nvidia,beaver
+          - const: nvidia,tegra30
+      - items:
+          - enum:
+              - nvidia,cardhu-a02
+              - nvidia,cardhu-a04
+          - const: nvidia,cardhu
+          - const: nvidia,tegra30
+      - items:
+          - const: toradex,apalis_t30-eval
+          - const: toradex,apalis_t30
+          - const: nvidia,tegra30
+      - items:
+          - const: toradex,apalis_t30-eval-v1.1
+          - const: toradex,apalis_t30-eval
+          - const: toradex,apalis_t30-v1.1
+          - const: toradex,apalis_t30
+          - const: nvidia,tegra30
+      - items:
+          - enum:
+              - toradex,colibri_t30-eval-v3
+          - const: toradex,colibri_t30
+          - const: nvidia,tegra30
+      - items:
+          - enum:
+              - nvidia,dalmore
+              - nvidia,roth
+              - nvidia,tn7
+          - const: nvidia,tegra114
+      - items:
+          - enum:
+              - nvidia,jetson-tk1
+              - nvidia,venice2
+          - const: nvidia,tegra124
+      - items:
+          - const: toradex,apalis-tk1-eval
+          - const: toradex,apalis-tk1
+          - const: nvidia,tegra124
+      - items:
+          - const: toradex,apalis-tk1-v1.2-eval
+          - const: toradex,apalis-tk1-eval
+          - const: toradex,apalis-tk1-v1.2
+          - const: toradex,apalis-tk1
+          - const: nvidia,tegra124
+      - items:
+          - enum:
+              - nvidia,norrin
+          - const: nvidia,tegra132
+          - const: nvidia,tegra124
+      - items:
+          - enum:
+              - nvidia,p2371-0000
+              - nvidia,p2371-2180
+              - nvidia,p2571
+          - const: nvidia,tegra210
+      - items:
+          - enum:
+              - nvidia,p2771-0000
+          - const: nvidia,tegra186
+      - items:
+          - enum:
+              - nvidia,p2972-0000
+          - const: nvidia,tegra194
-- 
2.19.1

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

* Re: [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema
  2018-12-03 21:32 ` [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema Rob Herring
@ 2018-12-04  8:50   ` Thierry Reding
  2018-12-06 22:38     ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2018-12-04  8:50 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, Sean Hudson, Frank Rowand,
	linux-arm-kernel, linuxppc-dev, Grant Likely, Kumar Gala, arm,
	Mark Rutland, Jonathan Hunter, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 6741 bytes --]

On Mon, Dec 03, 2018 at 03:32:19PM -0600, Rob Herring wrote:
> Convert Tegra SoC bindings to DT schema format using json-schema.
> 
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: devicetree@vger.kernel.org
> Cc: linux-tegra@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/arm/tegra.txt         |  65 -----------
>  .../devicetree/bindings/arm/tegra.yaml        | 101 ++++++++++++++++++
>  2 files changed, 101 insertions(+), 65 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/tegra.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/tegra.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
> deleted file mode 100644
> index c59b15f64346..000000000000
> --- a/Documentation/devicetree/bindings/arm/tegra.txt
> +++ /dev/null
> @@ -1,65 +0,0 @@
> -NVIDIA Tegra device tree bindings
> --------------------------------------------
> -
> -SoCs
> --------------------------------------------
> -
> -Each device tree must specify which Tegra SoC it uses, using one of the
> -following compatible values:
> -
> -  nvidia,tegra20
> -  nvidia,tegra30
> -  nvidia,tegra114
> -  nvidia,tegra124
> -  nvidia,tegra132
> -  nvidia,tegra210
> -  nvidia,tegra186
> -  nvidia,tegra194
> -
> -Boards
> --------------------------------------------
> -
> -Each device tree must specify which one or more of the following
> -board-specific compatible values:
> -
> -  ad,medcom-wide
> -  ad,plutux
> -  ad,tamonten
> -  ad,tec
> -  compal,paz00
> -  compulab,trimslice
> -  nvidia,beaver
> -  nvidia,cardhu
> -  nvidia,cardhu-a02
> -  nvidia,cardhu-a04
> -  nvidia,dalmore
> -  nvidia,harmony
> -  nvidia,jetson-tk1
> -  nvidia,norrin
> -  nvidia,p2371-0000
> -  nvidia,p2371-2180
> -  nvidia,p2571
> -  nvidia,p2771-0000
> -  nvidia,p2972-0000
> -  nvidia,roth
> -  nvidia,seaboard
> -  nvidia,tn7
> -  nvidia,ventana
> -  toradex,apalis_t30
> -  toradex,apalis_t30-eval
> -  toradex,apalis_t30-v1.1
> -  toradex,apalis_t30-v1.1-eval
> -  toradex,apalis-tk1
> -  toradex,apalis-tk1-eval
> -  toradex,apalis-tk1-v1.2
> -  toradex,apalis-tk1-v1.2-eval
> -  toradex,colibri_t20
> -  toradex,colibri_t20-eval-v3
> -  toradex,colibri_t20-iris
> -  toradex,colibri_t30
> -  toradex,colibri_t30-eval-v3
> -
> -Trusted Foundations
> --------------------------------------------
> -Tegra supports the Trusted Foundation secure monitor. See the
> -"tlm,trusted-foundations" binding's documentation for more details.
> diff --git a/Documentation/devicetree/bindings/arm/tegra.yaml b/Documentation/devicetree/bindings/arm/tegra.yaml
> new file mode 100644
> index 000000000000..66493892ffc1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/tegra.yaml
> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/tegra.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#

Could you explain what these are? They give 404, so I assume they are
more like placeholders and not actually used?

> +
> +title: NVIDIA Tegra device tree bindings
> +
> +maintainers:
> +  - Marcel Ziswiler <marcel.ziswiler@toradex.com>
> +  - Peter De Schrijver <pdeschrijver@nvidia.com>

Not sure how you got that list, but probably from git history. I think
it makes sense to replace Marcel and Peter with Jon and myself.

Other than that, looks fine to me. Some of the enumerations below look
somewhat hard to parse, but I suspect that it will become second nature
in no time.

Acked-by: Thierry Reding <treding@nvidia.com>

> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - compal,paz00
> +              - compulab,trimslice
> +              - nvidia,harmony
> +              - nvidia,seaboard
> +              - nvidia,ventana
> +          - const: nvidia,tegra20
> +      - items:
> +          - enum:
> +              - ad,medcom-wide
> +              - ad,plutux
> +              - ad,tec
> +          - const: ad,tamonten
> +          - const: nvidia,tegra20
> +      - items:
> +          - enum:
> +              - toradex,colibri_t20-eval-v3
> +              - toradex,colibri_t20-iris
> +          - const: toradex,colibri_t20
> +          - const: nvidia,tegra20
> +      - items:
> +          - enum:
> +              - nvidia,beaver
> +          - const: nvidia,tegra30
> +      - items:
> +          - enum:
> +              - nvidia,cardhu-a02
> +              - nvidia,cardhu-a04
> +          - const: nvidia,cardhu
> +          - const: nvidia,tegra30
> +      - items:
> +          - const: toradex,apalis_t30-eval
> +          - const: toradex,apalis_t30
> +          - const: nvidia,tegra30
> +      - items:
> +          - const: toradex,apalis_t30-eval-v1.1
> +          - const: toradex,apalis_t30-eval
> +          - const: toradex,apalis_t30-v1.1
> +          - const: toradex,apalis_t30
> +          - const: nvidia,tegra30
> +      - items:
> +          - enum:
> +              - toradex,colibri_t30-eval-v3
> +          - const: toradex,colibri_t30
> +          - const: nvidia,tegra30
> +      - items:
> +          - enum:
> +              - nvidia,dalmore
> +              - nvidia,roth
> +              - nvidia,tn7
> +          - const: nvidia,tegra114
> +      - items:
> +          - enum:
> +              - nvidia,jetson-tk1
> +              - nvidia,venice2
> +          - const: nvidia,tegra124
> +      - items:
> +          - const: toradex,apalis-tk1-eval
> +          - const: toradex,apalis-tk1
> +          - const: nvidia,tegra124
> +      - items:
> +          - const: toradex,apalis-tk1-v1.2-eval
> +          - const: toradex,apalis-tk1-eval
> +          - const: toradex,apalis-tk1-v1.2
> +          - const: toradex,apalis-tk1
> +          - const: nvidia,tegra124
> +      - items:
> +          - enum:
> +              - nvidia,norrin
> +          - const: nvidia,tegra132
> +          - const: nvidia,tegra124
> +      - items:
> +          - enum:
> +              - nvidia,p2371-0000
> +              - nvidia,p2371-2180
> +              - nvidia,p2571
> +          - const: nvidia,tegra210
> +      - items:
> +          - enum:
> +              - nvidia,p2771-0000
> +          - const: nvidia,tegra186
> +      - items:
> +          - enum:
> +              - nvidia,p2972-0000
> +          - const: nvidia,tegra194
> -- 
> 2.19.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema
  2018-12-04  8:50   ` Thierry Reding
@ 2018-12-06 22:38     ` Rob Herring
  2018-12-07 11:46       ` Thierry Reding
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2018-12-06 22:38 UTC (permalink / raw)
  To: Thierry Reding
  Cc: devicetree, linux-kernel@vger.kernel.org, Sean Hudson,
	Frank Rowand,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linuxppc-dev, Grant Likely, Kumar Gala, ARM-SoC Maintainers,
	Mark Rutland, Jon Hunter, linux-tegra

On Tue, Dec 4, 2018 at 2:50 AM Thierry Reding <thierry.reding@gmail.com> wrote:
>
> On Mon, Dec 03, 2018 at 03:32:19PM -0600, Rob Herring wrote:
> > Convert Tegra SoC bindings to DT schema format using json-schema.
> >
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Jonathan Hunter <jonathanh@nvidia.com>
> > Cc: devicetree@vger.kernel.org
> > Cc: linux-tegra@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../devicetree/bindings/arm/tegra.txt         |  65 -----------
> >  .../devicetree/bindings/arm/tegra.yaml        | 101 ++++++++++++++++++
> >  2 files changed, 101 insertions(+), 65 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/arm/tegra.txt
> >  create mode 100644 Documentation/devicetree/bindings/arm/tegra.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
> > deleted file mode 100644
> > index c59b15f64346..000000000000
> > --- a/Documentation/devicetree/bindings/arm/tegra.txt
> > +++ /dev/null
> > @@ -1,65 +0,0 @@
> > -NVIDIA Tegra device tree bindings
> > --------------------------------------------
> > -
> > -SoCs
> > --------------------------------------------
> > -
> > -Each device tree must specify which Tegra SoC it uses, using one of the
> > -following compatible values:
> > -
> > -  nvidia,tegra20
> > -  nvidia,tegra30
> > -  nvidia,tegra114
> > -  nvidia,tegra124
> > -  nvidia,tegra132
> > -  nvidia,tegra210
> > -  nvidia,tegra186
> > -  nvidia,tegra194
> > -
> > -Boards
> > --------------------------------------------
> > -
> > -Each device tree must specify which one or more of the following
> > -board-specific compatible values:
> > -
> > -  ad,medcom-wide
> > -  ad,plutux
> > -  ad,tamonten
> > -  ad,tec
> > -  compal,paz00
> > -  compulab,trimslice
> > -  nvidia,beaver
> > -  nvidia,cardhu
> > -  nvidia,cardhu-a02
> > -  nvidia,cardhu-a04
> > -  nvidia,dalmore
> > -  nvidia,harmony
> > -  nvidia,jetson-tk1
> > -  nvidia,norrin
> > -  nvidia,p2371-0000
> > -  nvidia,p2371-2180
> > -  nvidia,p2571
> > -  nvidia,p2771-0000
> > -  nvidia,p2972-0000
> > -  nvidia,roth
> > -  nvidia,seaboard
> > -  nvidia,tn7
> > -  nvidia,ventana
> > -  toradex,apalis_t30
> > -  toradex,apalis_t30-eval
> > -  toradex,apalis_t30-v1.1
> > -  toradex,apalis_t30-v1.1-eval
> > -  toradex,apalis-tk1
> > -  toradex,apalis-tk1-eval
> > -  toradex,apalis-tk1-v1.2
> > -  toradex,apalis-tk1-v1.2-eval
> > -  toradex,colibri_t20
> > -  toradex,colibri_t20-eval-v3
> > -  toradex,colibri_t20-iris
> > -  toradex,colibri_t30
> > -  toradex,colibri_t30-eval-v3
> > -
> > -Trusted Foundations
> > --------------------------------------------
> > -Tegra supports the Trusted Foundation secure monitor. See the
> > -"tlm,trusted-foundations" binding's documentation for more details.
> > diff --git a/Documentation/devicetree/bindings/arm/tegra.yaml b/Documentation/devicetree/bindings/arm/tegra.yaml
> > new file mode 100644
> > index 000000000000..66493892ffc1
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/tegra.yaml
> > @@ -0,0 +1,101 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/tegra.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
>
> Could you explain what these are? They give 404, so I assume they are
> more like placeholders and not actually used?

Please read the documentation in patch 2. They are used, but aren't live URLs.

> > +
> > +title: NVIDIA Tegra device tree bindings
> > +
> > +maintainers:
> > +  - Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > +  - Peter De Schrijver <pdeschrijver@nvidia.com>
>
> Not sure how you got that list, but probably from git history. I think
> it makes sense to replace Marcel and Peter with Jon and myself.

Will do.

> Other than that, looks fine to me. Some of the enumerations below look
> somewhat hard to parse, but I suspect that it will become second nature
> in no time.

We can add descriptions and/or comments if that helps. I didn't add
them if not already there.

> Acked-by: Thierry Reding <treding@nvidia.com>

Thanks.

Rob

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

* Re: [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema
  2018-12-06 22:38     ` Rob Herring
@ 2018-12-07 11:46       ` Thierry Reding
  0 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2018-12-07 11:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel@vger.kernel.org, Sean Hudson,
	Frank Rowand,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linuxppc-dev, Grant Likely, Kumar Gala, ARM-SoC Maintainers,
	Mark Rutland, Jon Hunter, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 4849 bytes --]

On Thu, Dec 06, 2018 at 04:38:44PM -0600, Rob Herring wrote:
> On Tue, Dec 4, 2018 at 2:50 AM Thierry Reding <thierry.reding@gmail.com> wrote:
> >
> > On Mon, Dec 03, 2018 at 03:32:19PM -0600, Rob Herring wrote:
> > > Convert Tegra SoC bindings to DT schema format using json-schema.
> > >
> > > Cc: Mark Rutland <mark.rutland@arm.com>
> > > Cc: Thierry Reding <thierry.reding@gmail.com>
> > > Cc: Jonathan Hunter <jonathanh@nvidia.com>
> > > Cc: devicetree@vger.kernel.org
> > > Cc: linux-tegra@vger.kernel.org
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > >  .../devicetree/bindings/arm/tegra.txt         |  65 -----------
> > >  .../devicetree/bindings/arm/tegra.yaml        | 101 ++++++++++++++++++
> > >  2 files changed, 101 insertions(+), 65 deletions(-)
> > >  delete mode 100644 Documentation/devicetree/bindings/arm/tegra.txt
> > >  create mode 100644 Documentation/devicetree/bindings/arm/tegra.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
> > > deleted file mode 100644
> > > index c59b15f64346..000000000000
> > > --- a/Documentation/devicetree/bindings/arm/tegra.txt
> > > +++ /dev/null
> > > @@ -1,65 +0,0 @@
> > > -NVIDIA Tegra device tree bindings
> > > --------------------------------------------
> > > -
> > > -SoCs
> > > --------------------------------------------
> > > -
> > > -Each device tree must specify which Tegra SoC it uses, using one of the
> > > -following compatible values:
> > > -
> > > -  nvidia,tegra20
> > > -  nvidia,tegra30
> > > -  nvidia,tegra114
> > > -  nvidia,tegra124
> > > -  nvidia,tegra132
> > > -  nvidia,tegra210
> > > -  nvidia,tegra186
> > > -  nvidia,tegra194
> > > -
> > > -Boards
> > > --------------------------------------------
> > > -
> > > -Each device tree must specify which one or more of the following
> > > -board-specific compatible values:
> > > -
> > > -  ad,medcom-wide
> > > -  ad,plutux
> > > -  ad,tamonten
> > > -  ad,tec
> > > -  compal,paz00
> > > -  compulab,trimslice
> > > -  nvidia,beaver
> > > -  nvidia,cardhu
> > > -  nvidia,cardhu-a02
> > > -  nvidia,cardhu-a04
> > > -  nvidia,dalmore
> > > -  nvidia,harmony
> > > -  nvidia,jetson-tk1
> > > -  nvidia,norrin
> > > -  nvidia,p2371-0000
> > > -  nvidia,p2371-2180
> > > -  nvidia,p2571
> > > -  nvidia,p2771-0000
> > > -  nvidia,p2972-0000
> > > -  nvidia,roth
> > > -  nvidia,seaboard
> > > -  nvidia,tn7
> > > -  nvidia,ventana
> > > -  toradex,apalis_t30
> > > -  toradex,apalis_t30-eval
> > > -  toradex,apalis_t30-v1.1
> > > -  toradex,apalis_t30-v1.1-eval
> > > -  toradex,apalis-tk1
> > > -  toradex,apalis-tk1-eval
> > > -  toradex,apalis-tk1-v1.2
> > > -  toradex,apalis-tk1-v1.2-eval
> > > -  toradex,colibri_t20
> > > -  toradex,colibri_t20-eval-v3
> > > -  toradex,colibri_t20-iris
> > > -  toradex,colibri_t30
> > > -  toradex,colibri_t30-eval-v3
> > > -
> > > -Trusted Foundations
> > > --------------------------------------------
> > > -Tegra supports the Trusted Foundation secure monitor. See the
> > > -"tlm,trusted-foundations" binding's documentation for more details.
> > > diff --git a/Documentation/devicetree/bindings/arm/tegra.yaml b/Documentation/devicetree/bindings/arm/tegra.yaml
> > > new file mode 100644
> > > index 000000000000..66493892ffc1
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/arm/tegra.yaml
> > > @@ -0,0 +1,101 @@
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/arm/tegra.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > Could you explain what these are? They give 404, so I assume they are
> > more like placeholders and not actually used?
> 
> Please read the documentation in patch 2. They are used, but aren't live URLs.

Okay, thanks for pointing that out. I wasn't Cc'ed on that patch, so it
took a while to hunt it down.

> > > +
> > > +title: NVIDIA Tegra device tree bindings
> > > +
> > > +maintainers:
> > > +  - Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > +  - Peter De Schrijver <pdeschrijver@nvidia.com>
> >
> > Not sure how you got that list, but probably from git history. I think
> > it makes sense to replace Marcel and Peter with Jon and myself.
> 
> Will do.
> 
> > Other than that, looks fine to me. Some of the enumerations below look
> > somewhat hard to parse, but I suspect that it will become second nature
> > in no time.
> 
> We can add descriptions and/or comments if that helps. I didn't add
> them if not already there.

My comment was regarding the schema syntax with the oneOf, - items, etc.
That's all new to me and difficult to read, but I'm sure I'll get used
to it.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2018-12-07 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-03 21:31 [PATCH v2 00/34] Devicetree schema Rob Herring
2018-12-03 21:32 ` [PATCH v2 30/34] dt-bindings: arm: Convert Tegra board/soc bindings to json-schema Rob Herring
2018-12-04  8:50   ` Thierry Reding
2018-12-06 22:38     ` Rob Herring
2018-12-07 11:46       ` Thierry Reding

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