devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: i2c: tegra-bpmp: Convert to json-schema
@ 2021-12-08 14:33 Thierry Reding
  2021-12-08 14:43 ` Thierry Reding
  2021-12-08 18:58 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Thierry Reding @ 2021-12-08 14:33 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Rob Herring, Jon Hunter, devicetree, linux-tegra

From: Thierry Reding <treding@nvidia.com>

Convert the NVIDIA Tegra186 (and later) BPMP I2C bindings from the
free-form text format to json-schema.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v3:
- include i2c-controller.yaml and use unevaluatedProperties: false

Changes in v2:
- add missing additionalProperties: false

 .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 -----------------
 .../i2c/nvidia,tegra186-bpmp-i2c.yaml         | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 42 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.yaml

diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt b/Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
deleted file mode 100644
index ab240e10debc..000000000000
--- a/Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-NVIDIA Tegra186 BPMP I2C controller
-
-In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW
-devices, such as the I2C controller for the power management I2C bus. Software
-running on other CPUs must perform IPC to the BPMP in order to execute
-transactions on that I2C bus. This binding describes an I2C bus that is
-accessed in such a fashion.
-
-The BPMP I2C node must be located directly inside the main BPMP node. See
-../firmware/nvidia,tegra186-bpmp.txt for details of the BPMP binding.
-
-This node represents an I2C controller. See ../i2c/i2c.txt for details of the
-core I2C binding.
-
-Required properties:
-- compatible:
-    Array of strings.
-    One of:
-    - "nvidia,tegra186-bpmp-i2c".
-- #address-cells: Address cells for I2C device address.
-    Single-cell integer.
-    Must be <1>.
-- #size-cells:
-    Single-cell integer.
-    Must be <0>.
-- nvidia,bpmp-bus-id:
-    Single-cell integer.
-    Indicates the I2C bus number this DT node represent, as defined by the
-    BPMP firmware.
-
-Example:
-
-bpmp {
-	...
-
-	i2c {
-		compatible = "nvidia,tegra186-bpmp-i2c";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		nvidia,bpmp-bus-id = <5>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.yaml b/Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.yaml
new file mode 100644
index 000000000000..b8319dcf3d8a
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/nvidia,tegra186-bpmp-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra186 (and later) BPMP I2C controller
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+  In Tegra186 and later, the BPMP (Boot and Power Management Processor)
+  owns certain HW devices, such as the I2C controller for the power
+  management I2C bus. Software running on other CPUs must perform IPC to
+  the BPMP in order to execute transactions on that I2C bus. This
+  binding describes an I2C bus that is accessed in such a fashion.
+
+  The BPMP I2C node must be located directly inside the main BPMP node.
+  See ../firmware/nvidia,tegra186-bpmp.yaml for details of the BPMP
+  binding.
+
+  This node represents an I2C controller. See ../i2c/i2c.txt for details
+  of the core I2C binding.
+
+properties:
+  compatible:
+    const: nvidia,tegra186-bpmp-i2c
+
+  nvidia,bpmp-bus-id:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Indicates the I2C bus number this DT node represents,
+      as defined by the BPMP firmware.
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - "#address-cells"
+  - "#size-cells"
+  - nvidia,bpmp-bus-id
-- 
2.34.1


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

* Re: [PATCH v3] dt-bindings: i2c: tegra-bpmp: Convert to json-schema
  2021-12-08 14:33 [PATCH v3] dt-bindings: i2c: tegra-bpmp: Convert to json-schema Thierry Reding
@ 2021-12-08 14:43 ` Thierry Reding
  2021-12-08 18:58 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2021-12-08 14:43 UTC (permalink / raw)
  To: Rob Herring, Jon Hunter, devicetree, linux-tegra

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

On Wed, Dec 08, 2021 at 03:33:06PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Convert the NVIDIA Tegra186 (and later) BPMP I2C bindings from the
> free-form text format to json-schema.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v3:
> - include i2c-controller.yaml and use unevaluatedProperties: false
> 
> Changes in v2:
> - add missing additionalProperties: false
> 
>  .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 -----------------
>  .../i2c/nvidia,tegra186-bpmp-i2c.yaml         | 45 +++++++++++++++++++
>  2 files changed, 45 insertions(+), 42 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
>  create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.yaml

Rob, for context, I've split this one out of the 16-patch series since
you had reviewed the other 15 already. This is the updated version that
came out of the discussion we had regarding unevaluatedProperties not
working correctly because of additionalProperties: true.

Thierry

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

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

* Re: [PATCH v3] dt-bindings: i2c: tegra-bpmp: Convert to json-schema
  2021-12-08 14:33 [PATCH v3] dt-bindings: i2c: tegra-bpmp: Convert to json-schema Thierry Reding
  2021-12-08 14:43 ` Thierry Reding
@ 2021-12-08 18:58 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2021-12-08 18:58 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-tegra, Jon Hunter, Rob Herring, devicetree

On Wed, 08 Dec 2021 15:33:06 +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Convert the NVIDIA Tegra186 (and later) BPMP I2C bindings from the
> free-form text format to json-schema.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v3:
> - include i2c-controller.yaml and use unevaluatedProperties: false
> 
> Changes in v2:
> - add missing additionalProperties: false
> 
>  .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 -----------------
>  .../i2c/nvidia,tegra186-bpmp-i2c.yaml         | 45 +++++++++++++++++++
>  2 files changed, 45 insertions(+), 42 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
>  create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.yaml
> 

Applied, thanks!

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

end of thread, other threads:[~2021-12-08 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-08 14:33 [PATCH v3] dt-bindings: i2c: tegra-bpmp: Convert to json-schema Thierry Reding
2021-12-08 14:43 ` Thierry Reding
2021-12-08 18:58 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).