public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mailbox: dt-bindings: mailbox: Convert to DT-SCHEMA
@ 2026-03-21 21:20 Atharv Dubey
  2026-03-21 22:33 ` Rob Herring (Arm)
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Atharv Dubey @ 2026-03-21 21:20 UTC (permalink / raw)
  To: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Jassi Brar, linux-kernel, devicetree, Atharv Dubey

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>


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

end of thread, other threads:[~2026-03-23 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-21 21:20 [PATCH] mailbox: dt-bindings: mailbox: Convert to DT-SCHEMA Atharv Dubey
2026-03-21 22:33 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox