public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Atharv Dubey <atharvd440@gmail.com>
To: Jassi Brar <jassisinghbrar@gmail.com>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: Jassi Brar <jaswinder.singh@linaro.org>,
	linux-kernel@vger.kernel.org,  devicetree@vger.kernel.org,
	Atharv Dubey <atharvd440@gmail.com>
Subject: [PATCH] mailbox: dt-bindings: mailbox: Convert to DT-SCHEMA
Date: Sun, 22 Mar 2026 02:50:01 +0530	[thread overview]
Message-ID: <20260322-mailbox-v1-1-c6251f18187c@gmail.com> (raw)

Convert the Generic Mailbox Controller and Client
binding from text format to DT schema format.

Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
 .../devicetree/bindings/mailbox/mailbox.txt        | 60 -----------------
 .../devicetree/bindings/mailbox/mailbox.yaml       | 78 ++++++++++++++++++++++
 2 files changed, 78 insertions(+), 60 deletions(-)

diff --git a/Documentation/devicetree/bindings/mailbox/mailbox.txt b/Documentation/devicetree/bindings/mailbox/mailbox.txt
deleted file mode 100644
index af8ecee2ac68..000000000000
--- a/Documentation/devicetree/bindings/mailbox/mailbox.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-* Generic Mailbox Controller and client driver bindings
-
-Generic binding to provide a way for Mailbox controller drivers to
-assign appropriate mailbox channel to client drivers.
-
-* Mailbox Controller
-
-Required property:
-- #mbox-cells: Must be at least 1. Number of cells in a mailbox
-		specifier.
-
-Example:
-	mailbox: mailbox {
-		...
-		#mbox-cells = <1>;
-	};
-
-
-* Mailbox Client
-
-Required property:
-- mboxes: List of phandle and mailbox channel specifiers.
-
-Optional property:
-- mbox-names: List of identifier strings for each mailbox channel.
-- shmem : List of phandle pointing to the shared memory(SHM) area between the
-	  users of these mailboxes for IPC, one for each mailbox. This shared
-	  memory can be part of any memory reserved for the purpose of this
-	  communication between the mailbox client and the remote.
-
-
-Example:
-	pwr_cntrl: power {
-		...
-		mbox-names = "pwr-ctrl", "rpc";
-		mboxes = <&mailbox 0 &mailbox 1>;
-	};
-
-Example with shared memory(shmem):
-
-	sram: sram@50000000 {
-		compatible = "mmio-sram";
-		reg = <0x50000000 0x10000>;
-
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0 0x50000000 0x10000>;
-
-		cl_shmem: shmem@0 {
-			compatible = "client-shmem";
-			reg = <0x0 0x200>;
-		};
-	};
-
-	client@2e000000 {
-		...
-		mboxes = <&mailbox 0>;
-		shmem = <&cl_shmem>;
-		..
-	};
diff --git a/Documentation/devicetree/bindings/mailbox/mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mailbox.yaml
new file mode 100644
index 000000000000..856386f076b4
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/mailbox.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/mailbox.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic Mailbox Controller and Client
+
+maintainers:
+  - Jassi Brar <jaswinder.singh@linaro.org>
+
+description:
+  Generic binding to provide a way for Mailbox controller drivers to
+  assign appropriate mailbox channel to client drivers.
+
+select: false
+
+properties:
+  "#mbox-cells":
+    minimum: 1
+    description:
+      Number of cells in a mailbox specifier. Must be at least 1.
+
+  mboxes:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description:
+      List of phandle and mailbox channel specifiers.
+
+  mbox-names:
+    $ref: /schemas/types.yaml#/definitions/string-array
+    description:
+      List of identifier strings for each mailbox channel.
+
+  shmem:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description:
+      List of phandles pointing to the shared memory (SHM) area between the
+      users of these mailboxes for IPC, one for each mailbox. This shared
+      memory can be part of any memory reserved for the purpose of this
+      communication between the mailbox client and the remote.
+
+additionalProperties: true
+
+examples:
+  # Mailbox Controller
+  - |
+    mailbox: mailbox {
+        #mbox-cells = <1>;
+    };
+
+  # Mailbox Client
+  - |
+    pwr_cntrl: power {
+        mbox-names = "pwr-ctrl", "rpc";
+        mboxes = <&mailbox 0>, <&mailbox 1>;
+    };
+
+  # Mailbox Client with shared memory
+  - |
+    sram: sram@50000000 {
+        compatible = "mmio-sram";
+        reg = <0x50000000 0x10000>;
+
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0 0x50000000 0x10000>;
+
+        cl_shmem: scmi-sram@0 {
+            compatible = "arm,scmi-shmem";
+            reg = <0x0 0x200>;
+        };
+    };
+
+    client@2e000000 {
+        reg = <0x2e000000 0x400>;
+        mboxes = <&mailbox 0>;
+        shmem = <&cl_shmem>;
+    };

---
base-commit: c612261bedd6bbab7109f798715e449c9d20ff2f
change-id: 20260322-mailbox-16faf3717cfe

Best regards,
-- 
Atharv Dubey <atharvd440@gmail.com>


             reply	other threads:[~2026-03-21 21:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21 21:20 Atharv Dubey [this message]
2026-03-21 22:33 ` [PATCH] mailbox: dt-bindings: mailbox: Convert to DT-SCHEMA Rob Herring (Arm)
2026-03-22  6:05 ` kernel test robot
2026-03-22  9:00 ` Krzysztof Kozlowski
2026-03-23 13:35 ` Rob Herring
2026-03-23 14:28   ` Atharv Dubey

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=20260322-mailbox-v1-1-c6251f18187c@gmail.com \
    --to=atharvd440@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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