From: Thierry Reding <thierry.reding@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Rob Herring <robh+dt@kernel.org>
Cc: Jon Hunter <jonathanh@nvidia.com>,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: [PATCH v2 03/16] dt-bindings: mailbox: tegra: Convert to json-schema
Date: Fri, 19 Nov 2021 15:38:26 +0100 [thread overview]
Message-ID: <20211119143839.1950739-4-thierry.reding@gmail.com> (raw)
In-Reply-To: <20211119143839.1950739-1-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
Convert the NVIDIA Tegra HSP bindings from the free-form text format to
json-schema.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- add missing additionalProperties: false
.../bindings/mailbox/nvidia,tegra186-hsp.txt | 72 ------------
.../bindings/mailbox/nvidia,tegra186-hsp.yaml | 111 ++++++++++++++++++
2 files changed, 111 insertions(+), 72 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt
create mode 100644 Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.yaml
diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt
deleted file mode 100644
index ff3eafc5a882..000000000000
--- a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-NVIDIA Tegra Hardware Synchronization Primitives (HSP)
-
-The HSP modules are used for the processors to share resources and communicate
-together. It provides a set of hardware synchronization primitives for
-interprocessor communication. So the interprocessor communication (IPC)
-protocols can use hardware synchronization primitives, when operating between
-two processors not in an SMP relationship.
-
-The features that HSP supported are shared mailboxes, shared semaphores,
-arbitrated semaphores and doorbells.
-
-Required properties:
-- name : Should be hsp
-- compatible
- Array of strings.
- one of:
- - "nvidia,tegra186-hsp"
- - "nvidia,tegra194-hsp", "nvidia,tegra186-hsp"
-- reg : Offset and length of the register set for the device.
-- interrupt-names
- Array of strings.
- Contains a list of names for the interrupts described by the interrupt
- property. May contain the following entries, in any order:
- - "doorbell"
- - "sharedN", where 'N' is a number from zero up to the number of
- external interrupts supported by the HSP instance minus one.
- Users of this binding MUST look up entries in the interrupt property
- by name, using this interrupt-names property to do so.
-- interrupts
- Array of interrupt specifiers.
- Must contain one entry per entry in the interrupt-names property,
- in a matching order.
-- #mbox-cells : Should be 2.
-
-The mbox specifier of the "mboxes" property in the client node should contain
-two cells. The first cell determines the HSP type and the second cell is used
-to identify the mailbox that the client is going to use.
-
-For doorbells, the second cell specifies the index of the doorbell to use.
-
-For shared mailboxes, the second cell is composed of two fields:
-- bits 31..24:
- A bit mask of flags that further specify how the shared mailbox will be
- used. Valid flags are:
- - bit 31:
- Defines the direction of the mailbox. If set, the mailbox will be used
- as a producer (i.e. used to send data). If cleared, the mailbox is the
- consumer of data sent by a producer.
-
-- bits 23.. 0:
- The index of the shared mailbox to use. The number of available mailboxes
- may vary by instance of the HSP block and SoC generation.
-
-The following file contains definitions that can be used to construct mailbox
-specifiers:
-
- <dt-bindings/mailbox/tegra186-hsp.h>
-
-Example:
-
-hsp_top0: hsp@3c00000 {
- compatible = "nvidia,tegra186-hsp";
- reg = <0x0 0x03c00000 0x0 0xa0000>;
- interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "doorbell";
- #mbox-cells = <2>;
-};
-
-client {
- ...
- mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_XXX>;
-};
diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.yaml b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.yaml
new file mode 100644
index 000000000000..c43fc4c56f77
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.yaml
@@ -0,0 +1,111 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/nvidia,tegra186-hsp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Hardware Synchronization Primitives (HSP)
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+ The HSP modules are used for the processors to share resources and
+ communicate together. It provides a set of hardware synchronization
+ primitives for interprocessor communication. So the interprocessor
+ communication (IPC) protocols can use hardware synchronization
+ primitives, when operating between two processors not in an SMP
+ relationship.
+
+ The features that HSP supported are shared mailboxes, shared
+ semaphores, arbitrated semaphores and doorbells.
+
+ The mbox specifier of the "mboxes" property in the client node should
+ contain two cells. The first cell determines the HSP type and the
+ second cell is used to identify the mailbox that the client is going
+ to use.
+
+ For doorbells, the second cell specifies the index of the doorbell to
+ use.
+
+ For shared mailboxes, the second cell is composed of two fields:
+ - bits 31..24:
+ A bit mask of flags that further specify how the shared mailbox
+ will be used. Valid flags are:
+ - bit 31:
+ Defines the direction of the mailbox. If set, the mailbox
+ will be used as a producer (i.e. used to send data). If
+ cleared, the mailbox is the consumer of data sent by a
+ producer.
+
+ - bits 23..0:
+ The index of the shared mailbox to use. The number of available
+ mailboxes may vary by instance of the HSP block and SoC
+ generation.
+
+ The following file contains definitions that can be used to
+ construct mailbox specifiers:
+
+ <dt-bindings/mailbox/tegra186-hsp.h>
+
+properties:
+ $nodename:
+ pattern: "^hsp@[0-9a-f]+$"
+
+ compatible:
+ oneOf:
+ - const: nvidia,tegra186-hsp
+ - const: nvidia,tegra194-hsp
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ maxItems: 9
+
+ interrupt-names:
+ oneOf:
+ # shared interrupts are optional
+ - items:
+ - const: doorbell
+
+ - items:
+ - const: doorbell
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+
+ - items:
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+ - pattern: "^shared[0-7]$"
+
+ "#mbox-cells":
+ const: 2
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/mailbox/tegra186-hsp.h>
+
+ hsp_top0: hsp@3c00000 {
+ compatible = "nvidia,tegra186-hsp";
+ reg = <0x03c00000 0xa0000>;
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "doorbell";
+ #mbox-cells = <2>;
+ };
+
+ client {
+ mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_CCPLEX>;
+ };
--
2.33.1
next prev parent reply other threads:[~2021-11-19 14:38 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 14:38 [PATCH v2 00/16] dt-bindings: Convert Tegra DT bindings to json-schema Thierry Reding
2021-11-19 14:38 ` [PATCH v2 01/16] dt-bindings: misc: Convert Tegra MISC " Thierry Reding
2021-11-30 1:29 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 02/16] dt-bindings: mmc: tegra: Convert " Thierry Reding
2021-11-30 1:31 ` Rob Herring
2021-11-19 14:38 ` Thierry Reding [this message]
2021-11-30 1:32 ` [PATCH v2 03/16] dt-bindings: mailbox: " Rob Herring
2021-11-19 14:38 ` [PATCH v2 04/16] dt-bindings: mailbox: tegra: Document Tegra234 HSP Thierry Reding
2021-11-30 1:32 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 05/16] dt-bindings: rtc: tegra: Convert to json-schema Thierry Reding
2021-11-30 1:33 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 06/16] dt-bindings: rtc: tegra: Document Tegra234 RTC Thierry Reding
2021-11-30 1:33 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 07/16] dt-bindings: fuse: tegra: Convert to json-schema Thierry Reding
2021-11-30 1:35 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 08/16] dt-bindings: fuse: tegra: Document Tegra234 FUSE Thierry Reding
2021-11-30 1:35 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 09/16] dt-bindings: mmc: tegra: Document Tegra234 SDHCI Thierry Reding
2021-11-30 1:35 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 10/16] dt-bindings: serial: 8250: Document Tegra234 UART Thierry Reding
2021-11-30 1:36 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 11/16] dt-bindings: tegra: pmc: Convert to json-schema Thierry Reding
2021-11-30 1:41 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 12/16] dt-bindings: firmware: tegra: " Thierry Reding
2021-11-30 1:43 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 13/16] dt-bindings: i2c: tegra-bpmp: " Thierry Reding
2021-11-23 16:34 ` Rob Herring
2021-11-30 1:44 ` Rob Herring
2021-12-01 17:42 ` Thierry Reding
2021-12-01 18:42 ` Rob Herring
2021-12-02 17:55 ` Thierry Reding
2021-12-02 21:08 ` Rob Herring
2021-12-02 22:38 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 14/16] dt-bindings: thermal: tegra186-bpmp: " Thierry Reding
2021-11-30 1:44 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 15/16] dt-bindings: serial: tegra-tcu: " Thierry Reding
2021-11-23 16:34 ` Rob Herring
2021-11-30 1:45 ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 16/16] dt-bindings: serial: Document Tegra234 TCU Thierry Reding
2021-11-23 16:34 ` Rob Herring
2021-11-30 1:45 ` Rob Herring
2021-12-09 17:05 ` [PATCH v2 00/16] dt-bindings: Convert Tegra DT bindings to json-schema Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211119143839.1950739-4-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).