linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mailbox: ti,message-manager: Convert to yaml
@ 2021-04-14  0:27 Nishanth Menon
  2021-04-15 14:02 ` [PATCH] dt-bindings: mailbox: ti, message-manager: " Lokesh Vutla
  0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Menon @ 2021-04-14  0:27 UTC (permalink / raw)
  To: Jassi Brar, Rob Herring
  Cc: Nishanth Menon, devicetree, linux-kernel, Santosh Shilimkar,
	linux-arm-kernel

Convert the ti,secure-proxy to yaml for better checks and documentation.
Differences being mostly in the examples:
- I've dropped the example usage of mailbox client, it is better done in
  tisci node definition
- included header in example for buildable example

NOTE: The following checkpatch warning is generated since we do include
the header
in the example, but this is a false positive warning.
  WARNING: DT binding docs and includes should be a separate patch. See:
  Documentation/devicetree/bindings/submitting-patches.rst

Signed-off-by: Nishanth Menon <nm@ti.com>
---

Depending on how [1] turns out in discussion, we might want to queue [2]
appropriately.

[1] https://lore.kernel.org/linux-arm-kernel/CAK8P3a1L8rWpR5b66v6Su8-m7-scA0wZQr_g_4KnV4dnrky6ZA@mail.gmail.com/
[2] https://lore.kernel.org/linux-arm-kernel/20210414001926.20002-1-nm@ti.com/
 .../bindings/mailbox/ti,message-manager.txt   | 50 -------------
 .../bindings/mailbox/ti,message-manager.yaml  | 75 +++++++++++++++++++
 2 files changed, 75 insertions(+), 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mailbox/ti,message-manager.txt
 create mode 100644 Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml

diff --git a/Documentation/devicetree/bindings/mailbox/ti,message-manager.txt b/Documentation/devicetree/bindings/mailbox/ti,message-manager.txt
deleted file mode 100644
index ebf0e3710cee..000000000000
--- a/Documentation/devicetree/bindings/mailbox/ti,message-manager.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-Texas Instruments' Message Manager Driver
-========================================
-
-The Texas Instruments' Message Manager is a mailbox controller that has
-configurable queues selectable at SoC(System on Chip) integration. The Message
-manager is broken up into queues in different address regions that are called
-"proxies" - each instance is unidirectional and is instantiated at SoC
-integration level to indicate receive or transmit path.
-
-Message Manager Device Node:
-===========================
-Required properties:
---------------------
-- compatible:		Shall be: "ti,k2g-message-manager"
-- reg-names 		queue_proxy_region - Map the queue proxy region.
-			queue_state_debug_region - Map the queue state debug
-			region.
-- reg:			Contains the register map per reg-names.
-- #mbox-cells		Shall be 2. Contains the queue ID and proxy ID in that
-		        order referring to the transfer path.
-- interrupt-names:	Contains interrupt names matching the rx transfer path
-			for a given SoC. Receive interrupts shall be of the
-			format: "rx_<QID>".
-			For ti,k2g-message-manager, this shall contain:
-				"rx_005", "rx_057"
-- interrupts:		Contains the interrupt information corresponding to
-			interrupt-names property.
-
-Example(K2G):
-------------
-
-	msgmgr: msgmgr@2a00000 {
-		compatible = "ti,k2g-message-manager";
-		#mbox-cells = <2>;
-		reg-names = "queue_proxy_region", "queue_state_debug_region";
-		reg = <0x02a00000 0x400000>, <0x028c3400 0x400>;
-		interrupt-names = "rx_005", "rx_057";
-		interrupts = <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>;
-	};
-
-	pmmc: pmmc {
-		[...]
-		mbox-names = "rx", "tx";
-		# RX queue ID is 5, proxy ID is 2
-		# TX queue ID is 0, proxy ID is 0
-		mboxes= <&msgmgr 5 2>,
-			<&msgmgr 0 0>;
-		[...]
-	};
diff --git a/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml
new file mode 100644
index 000000000000..4987e803ac37
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/ti,message-manager.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments' Message Manager Driver
+
+maintainers:
+  - Nishanth Menon <nm@ti.com>
+
+description: |
+  The Texas Instruments' Message Manager is a mailbox controller that has
+  configurable queues selectable at SoC(System on Chip) integration. The Message
+  manager is broken up into queues in different address regions that are called
+  "proxies" - each instance is unidirectional and is instantiated at SoC
+  integration level to indicate receive or transmit path.
+
+properties:
+  $nodename:
+    pattern: "^mailbox@[0-9a-f]+$"
+
+  compatible:
+    const: ti,k2g-message-manager
+
+  "#mbox-cells":
+    const: 2
+    description:
+      Contains the queue ID and proxy ID in that order referring to the
+      transfer path.
+
+  reg-names:
+    items:
+      - const: queue_proxy_region
+      - const: queue_state_debug_region
+
+  reg:
+    minItems: 2
+
+  interrupt-names:
+    items:
+      - const: rx_005
+      - const: rx_057
+    description:
+      Contains interrupt names matching the Rx transfer path for a given SoC.
+      Receive interrupts shall be of the format "rx_<QID>".
+
+  interrupts:
+    minItems: 2
+    description:
+      Contains the interrupt information for the Rx interrupt paths for message
+      manager corresponding to the interrupt-names.
+
+required:
+  - compatible
+  - reg-names
+  - reg
+  - interrupt-names
+  - interrupts
+  - "#mbox-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    msgmgr: mailbox@2a00000 {
+          compatible = "ti,k2g-message-manager";
+          #mbox-cells = <2>;
+          reg-names = "queue_proxy_region", "queue_state_debug_region";
+          reg = <0x02a00000 0x400000>, <0x028c3400 0x400>;
+          interrupt-names = "rx_005", "rx_057";
+          interrupts = <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                       <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>;
+    };
-- 
2.31.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: mailbox: ti, message-manager: Convert to yaml
  2021-04-14  0:27 [PATCH] dt-bindings: mailbox: ti,message-manager: Convert to yaml Nishanth Menon
@ 2021-04-15 14:02 ` Lokesh Vutla
  2021-04-15 14:13   ` Nishanth Menon
  0 siblings, 1 reply; 3+ messages in thread
From: Lokesh Vutla @ 2021-04-15 14:02 UTC (permalink / raw)
  To: Nishanth Menon, Jassi Brar, Rob Herring
  Cc: devicetree, linux-kernel, Santosh Shilimkar, linux-arm-kernel

[..snip..]

> diff --git a/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml
> new file mode 100644
> index 000000000000..4987e803ac37
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml
> @@ -0,0 +1,75 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mailbox/ti,message-manager.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments' Message Manager Driver

Driver is not the right word here. Can you change it to node?

Thanks and regards,
Lokesh


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: mailbox: ti, message-manager: Convert to yaml
  2021-04-15 14:02 ` [PATCH] dt-bindings: mailbox: ti, message-manager: " Lokesh Vutla
@ 2021-04-15 14:13   ` Nishanth Menon
  0 siblings, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2021-04-15 14:13 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: Jassi Brar, Rob Herring, devicetree, linux-kernel,
	Santosh Shilimkar, linux-arm-kernel

On 19:32-20210415, Lokesh Vutla wrote:
> [..snip..]
> 
> > diff --git a/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml
> > new file mode 100644
> > index 000000000000..4987e803ac37
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml
> > @@ -0,0 +1,75 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mailbox/ti,message-manager.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Texas Instruments' Message Manager Driver
> 
> Driver is not the right word here. Can you change it to node?


Indeed, thanks. v2 incoming. I also noticed a commit message typo while
at it.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-04-15 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14  0:27 [PATCH] dt-bindings: mailbox: ti,message-manager: Convert to yaml Nishanth Menon
2021-04-15 14:02 ` [PATCH] dt-bindings: mailbox: ti, message-manager: " Lokesh Vutla
2021-04-15 14:13   ` Nishanth Menon

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