All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: soc: ti: wkup_m3_ipc: convert bindings to json-schema
@ 2022-04-07  3:22 Drew Fustini
  2022-04-07  7:55 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Fustini @ 2022-04-07  3:22 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Dave Gerlach, Suman Anna,
	Tony Lindgren, Nishanth Menon, devicetree, linux-kernel
  Cc: Drew Fustini

Convert the wkup_m3_ipc bindings documentation to json-schema.

Link: https://lore.kernel.org/linux-arm-kernel/20220221125522.l3tntb6i7yjxp6vb@flattered/
Suggested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
---
 .../bindings/soc/ti/wkup_m3_ipc.txt           | 57 ------------
 .../bindings/soc/ti/wkup_m3_ipc.yaml          | 86 +++++++++++++++++++
 2 files changed, 86 insertions(+), 57 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.txt
 create mode 100644 Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.yaml

diff --git a/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.txt b/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.txt
deleted file mode 100644
index 401550487ed6..000000000000
--- a/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-Wakeup M3 IPC Driver
-=====================
-
-The TI AM33xx and AM43xx family of devices use a small Cortex M3 co-processor
-(commonly referred to as Wakeup M3 or CM3) to help with various low power tasks
-that cannot be controlled from the MPU, like suspend/resume and certain deep
-C-states for CPU Idle. Once the wkup_m3_ipc driver uses the wkup_m3_rproc driver
-to boot the wkup_m3, it handles communication with the CM3 using IPC registers
-present in the SoC's control module and a mailbox. The wkup_m3_ipc exposes an
-API to allow the SoC PM code to execute specific PM tasks.
-
-Wkup M3 Device Node:
-====================
-A wkup_m3_ipc device node is used to represent the IPC registers within an
-SoC.
-
-Required properties:
---------------------
-- compatible:		Should be,
-				"ti,am3352-wkup-m3-ipc" for AM33xx SoCs
-				"ti,am4372-wkup-m3-ipc" for AM43xx SoCs
-- reg:			Contains the IPC register address space to communicate
-			with the Wakeup M3 processor
-- interrupts:		Contains the interrupt information for the wkup_m3
-			interrupt that signals the MPU.
-- ti,rproc:		phandle to the wkup_m3 rproc node so the IPC driver
-			can boot it.
-- mboxes:		phandles used by IPC framework to get correct mbox
-			channel for communication. Must point to appropriate
-			mbox_wkupm3 child node.
-
-Example:
---------
-/* AM33xx */
-	l4_wkup: l4_wkup@44c00000 {
-		...
-
-		scm: scm@210000 {
-			compatible = "ti,am3-scm", "simple-bus";
-			reg = <0x210000 0x2000>;
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges = <0 0x210000 0x2000>;
-
-			...
-
-			wkup_m3_ipc: wkup_m3_ipc@1324 {
-				compatible = "ti,am3352-wkup-m3-ipc";
-				reg = <0x1324 0x24>;
-				interrupts = <78>;
-				ti,rproc = <&wkup_m3>;
-				mboxes = <&mailbox &mbox_wkupm3>;
-			};
-
-			...
-		};
-	};
diff --git a/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.yaml b/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.yaml
new file mode 100644
index 000000000000..04ed5ada1d28
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/ti/wkup_m3_ipc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Wakeup M3 IPC device
+
+maintainers:
+  - Dave Gerlach <d-gerlach@ti.com>
+  - Drew Fustini <dfustini@baylibre.com>
+
+description: |+
+
+  The TI AM33xx and AM43xx family of devices use a small Cortex M3 co-processor
+  (commonly referred to as Wakeup M3 or CM3) to help with various low power tasks
+  that cannot be controlled from the MPU, like suspend/resume and certain deep
+  C-states for CPU Idle. Once the wkup_m3_ipc driver uses the wkup_m3_rproc driver
+  to boot the wkup_m3, it handles communication with the CM3 using IPC registers
+  present in the SoC's control module and a mailbox. The wkup_m3_ipc exposes an
+  API to allow the SoC PM code to execute specific PM tasks.
+
+  Wkup M3 Device Node
+  ====================
+  A wkup_m3_ipc device node is used to represent the IPC registers within an
+  SoC.
+
+properties:
+
+  compatible:
+    enum:
+      - ti,am3352-wkup-m3-ipc # for AM33xx SoCs
+      - ti,am4372-wkup-m3-ipc # for AM43xx SoCs
+
+  reg:
+    description:
+      Contains the IPC register address space to communicate with the
+      Wakeup M3 processor
+    maxItems: 1
+
+  interrupts:
+    description:
+      Contains the interrupt information for the wkup_m3 interrupt that
+      signals the MPU
+    maxItems: 1
+
+  ti,rproc:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to the wkup_m3 rproc node so the IPC driver can boot it
+
+  mboxes:
+    description:
+      phandles used by IPC framework to get correct mbox
+      channel for communication. Must point to appropriate
+      mbox_wkupm3 child node.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - ti,rproc
+  - mboxes
+
+additionalProperties: false
+
+examples:
+  - |
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        mailbox: mailbox {
+            #mbox-cells = <1>;
+        };
+
+        wkup_m3_ipc: wkup_m3_ipc@1324 {
+           compatible = "ti,am3352-wkup-m3-ipc";
+           reg = <0x1324 0x24>;
+           interrupts = <78>;
+           ti,rproc = <&wkup_m3>;
+           mboxes = <&mailbox &mbox_wkupm3>;
+        };
+    };
+...
-- 
2.32.0


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

* Re: [PATCH] dt-bindings: soc: ti: wkup_m3_ipc: convert bindings to json-schema
  2022-04-07  3:22 [PATCH] dt-bindings: soc: ti: wkup_m3_ipc: convert bindings to json-schema Drew Fustini
@ 2022-04-07  7:55 ` Krzysztof Kozlowski
  2022-04-07  9:08   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:55 UTC (permalink / raw)
  To: Drew Fustini, Rob Herring, Krzysztof Kozlowski, Dave Gerlach,
	Suman Anna, Tony Lindgren, Nishanth Menon, devicetree,
	linux-kernel

On 07/04/2022 05:22, Drew Fustini wrote:
> Convert the wkup_m3_ipc bindings documentation to json-schema.
> 

(...)

> diff --git a/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.yaml b/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.yaml
> new file mode 100644
> index 000000000000..04ed5ada1d28
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.yaml
> @@ -0,0 +1,86 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/ti/wkup_m3_ipc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Wakeup M3 IPC device
> +
> +maintainers:
> +  - Dave Gerlach <d-gerlach@ti.com>
> +  - Drew Fustini <dfustini@baylibre.com>
> +
> +description: |+
> +

Remove unneeded line break.

> +  The TI AM33xx and AM43xx family of devices use a small Cortex M3 co-processor
> +  (commonly referred to as Wakeup M3 or CM3) to help with various low power tasks
> +  that cannot be controlled from the MPU, like suspend/resume and certain deep
> +  C-states for CPU Idle. Once the wkup_m3_ipc driver uses the wkup_m3_rproc driver
> +  to boot the wkup_m3, it handles communication with the CM3 using IPC registers
> +  present in the SoC's control module and a mailbox. The wkup_m3_ipc exposes an
> +  API to allow the SoC PM code to execute specific PM tasks.
> +
> +  Wkup M3 Device Node
> +  ====================
> +  A wkup_m3_ipc device node is used to represent the IPC registers within an
> +  SoC.
> +
> +properties:
> +

Remove unneeded line break.

> +  compatible:
> +    enum:
> +      - ti,am3352-wkup-m3-ipc # for AM33xx SoCs
> +      - ti,am4372-wkup-m3-ipc # for AM43xx SoCs
> +
> +  reg:
> +    description:
> +      Contains the IPC register address space to communicate with the
> +      Wakeup M3 processor

Just "The IPC register address space to communicate with the Wakeup M3
processor"

> +    maxItems: 1
> +
> +  interrupts:
> +    description:
> +      Contains the interrupt information for the wkup_m3 interrupt that
> +      signals the MPU

Just the "wkup_m3 interrupt that signals the MPU".

> +    maxItems: 1
> +
> +  ti,rproc:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      phandle to the wkup_m3 rproc node so the IPC driver can boot it
> +
> +  mboxes:
> +    description:
> +      phandles used by IPC framework to get correct mbox
> +      channel for communication. Must point to appropriate
> +      mbox_wkupm3 child node.
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - ti,rproc
> +  - mboxes
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    soc {
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +
> +        mailbox: mailbox {
> +            #mbox-cells = <1>;
> +        };

I propose to skip the mailbox node, it's trivial and obvious from
mailbox providers/consumers documentation.

Best regards,
Krzysztof

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

* Re: [PATCH] dt-bindings: soc: ti: wkup_m3_ipc: convert bindings to json-schema
  2022-04-07  7:55 ` Krzysztof Kozlowski
@ 2022-04-07  9:08   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  9:08 UTC (permalink / raw)
  To: Drew Fustini, Rob Herring, Krzysztof Kozlowski, Dave Gerlach,
	Suman Anna, Tony Lindgren, Nishanth Menon, devicetree,
	linux-kernel

On 07/04/2022 09:55, Krzysztof Kozlowski wrote:

(...)

>> +  - |
>> +    soc {
>> +        #address-cells = <1>;
>> +        #size-cells = <1>;
>> +
>> +        mailbox: mailbox {
>> +            #mbox-cells = <1>;
>> +        };
> 
> I propose to skip the mailbox node, it's trivial and obvious from
> mailbox providers/consumers documentation.

That was a wrong advice, you indeed need it to describe the phandle, as
Rob suggested.

Best regards,
Krzysztof

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

end of thread, other threads:[~2022-04-07  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  3:22 [PATCH] dt-bindings: soc: ti: wkup_m3_ipc: convert bindings to json-schema Drew Fustini
2022-04-07  7:55 ` Krzysztof Kozlowski
2022-04-07  9:08   ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.