Add bindings for the samsung exynos ACPM mailbox protocol.
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
.../firmware/samsung,exynos-acpm-ipc.yaml | 64 +++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml
diff --git a/Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml b/Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml
new file mode 100644
index 000000000000..bfc9b4af9ea1
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2024 Linaro Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/firmware/samsung,exynos-acpm-ipc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung exynos ACPM mailbox protocol
+
+maintainers:
+ - Tudor Ambarus <tudor.ambarus@linaro.org>
+
+description: |
+ ACPM (Alive Clock and Power Manager) is a firmware that operates on the
+ APM (Active Power Management) module that handles overall power management
+ activities. ACPM and masters regard each other as independent hardware
+ component and communicate with each other using mailbox messages and
+ shared memory.
+
+ This binding is intended to define the interface the firmware implementing
+ ACPM provides for OSPM in the device tree.
+
+properties:
+ $nodename:
+ const: acpm_ipc
+
+ compatible:
+ const: google,gs101-acpm-ipc
+
+ mboxes:
+ description:
+ List of phandle and mailbox channel specifiers.
+ maxItems: 1
+
+ shmem:
+ description:
+ List of phandle pointing to the shared memory (SHM) area. The memory
+ contains channels configuration data and the TX/RX ring buffers that
+ are used for passing messages to/from the ACPM firmware.
+ maxItems: 1
+
+ initdata-base:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Base address of the configuration data in the shared memory.
+
+additionalProperties: false
+
+required:
+ - compatible
+ - mboxes
+ - shmem
+ - initdata-base
+
+examples:
+ - |
+ firmware {
+ acpm_ipc: acpm_ipc {
+ compatible = "google,gs101-acpm-ipc";
+ mboxes = <&ap2apm_mailbox 0>;
+ shmem = <&apm_sram>;
+ initdata-base = <0xa000>;
+ };
+ };
--
2.47.0.338.g60cca15819-goog
On Thu, Dec 05, 2024 at 05:53:43PM +0000, Tudor Ambarus wrote:
> Add bindings for the samsung exynos ACPM mailbox protocol.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> ---
> .../firmware/samsung,exynos-acpm-ipc.yaml | 64 +++++++++++++++++++
> 1 file changed, 64 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml
>
> diff --git a/Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml b/Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml
> new file mode 100644
> index 000000000000..bfc9b4af9ea1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/firmware/samsung,exynos-acpm-ipc.yaml
Filename based on comaptible, so google,gs101-acpm-ipc.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2024 Linaro Ltd.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/firmware/samsung,exynos-acpm-ipc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung exynos ACPM mailbox protocol
s/exynos/Exynos/
> +
> +maintainers:
> + - Tudor Ambarus <tudor.ambarus@linaro.org>
> +
> +description: |
> + ACPM (Alive Clock and Power Manager) is a firmware that operates on the
> + APM (Active Power Management) module that handles overall power management
> + activities. ACPM and masters regard each other as independent hardware
> + component and communicate with each other using mailbox messages and
> + shared memory.
> +
> + This binding is intended to define the interface the firmware implementing
> + ACPM provides for OSPM in the device tree.
> +
> +properties:
> + $nodename:
> + const: acpm_ipc
Drop, no schemas have anything like this.
> +
> + compatible:
> + const: google,gs101-acpm-ipc
> +
> + mboxes:
> + description:
> + List of phandle and mailbox channel specifiers.
Drop description.
> + maxItems: 1
> +
> + shmem:
> + description:
> + List of phandle pointing to the shared memory (SHM) area. The memory
> + contains channels configuration data and the TX/RX ring buffers that
> + are used for passing messages to/from the ACPM firmware.
> + maxItems: 1
> +
> + initdata-base:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + Base address of the configuration data in the shared memory.
If you really need this, then it should be rather encoded as part of
shemm phandle (phandle-array with describing items, just like syscon
phandles are done).
But OTOH, I don't see why this is needed at all so far - compatible
defines it.
> +
> +additionalProperties: false
This should be placed after required block.
> +
> +required:
> + - compatible
> + - mboxes
> + - shmem
> + - initdata-base
> +
> +examples:
> + - |
> + firmware {
Drop
> + acpm_ipc: acpm_ipc {
Drop unused label.
Node name: power-management (based on your binding description)
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "google,gs101-acpm-ipc";
Best regards,
Krzysztof
On 12/9/24 8:03 AM, Krzysztof Kozlowski wrote: >> + initdata-base: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + description: >> + Base address of the configuration data in the shared memory. > If you really need this, then it should be rather encoded as part of > shemm phandle (phandle-array with describing items, just like syscon > phandles are done). > > But OTOH, I don't see why this is needed at all so far - compatible > defines it. Indeed, I shall move it to compatible. If firmware ever changes, and uses a different offset to the configuration data, then I can introduce a new compatible. I agree with all the other comments as well, will address them in v4. Thanks! ta
© 2016 - 2025 Red Hat, Inc.