diff mbox series

[v8,1/3] dt-bindings: firmware: add google,gs101-acpm-ipc

Message ID 20250211-gs101-acpm-v8-1-01d01f522da6@linaro.org (mailing list archive)
State New
Headers show
Series firmware: add Exynos ACPM protocol driver | expand

Commit Message

Tudor Ambarus Feb. 11, 2025, 8:52 a.m. UTC
Add bindings for the Samsung Exynos ACPM mailbox protocol.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/firmware/google,gs101-acpm-ipc.yaml   | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)

Comments

Diederik de Haas Feb. 11, 2025, 10:36 a.m. UTC | #1
On Tue Feb 11, 2025 at 9:52 AM CET, Tudor Ambarus wrote:
> Add bindings for the Samsung Exynos ACPM mailbox protocol.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/firmware/google,gs101-acpm-ipc.yaml   | 50 ++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
> new file mode 100644
> index 000000000000..982cb8d62011
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Shouldn't this be ``(GPL-2.0-only OR BSD-2-Clause)`` ?

AFAIK it's the recommended form since SPDX 3.0:
https://spdx.dev/license-list-3-0-released/

Cheers,
  Diederik
Tudor Ambarus Feb. 11, 2025, 11:57 a.m. UTC | #2
On 2/11/25 10:36 AM, Diederik de Haas wrote:
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> Shouldn't this be ``(GPL-2.0-only OR BSD-2-Clause)`` ?
> 
> AFAIK it's the recommended form since SPDX 3.0:
> https://spdx.dev/license-list-3-0-released/

It should, it's a copy-paste error.

Looking in the driver patch, I shall update
include/linux/firmware/samsung/exynos-acpm-protocol.h to GPL-2.0-only as
well.

And then I shall s/MODULE_LICENSE("GPL");/MODULE_LICENSE("GPL v2");/
everywhere as "GPL" indicates [GNU Public License v2 or later].

I'm going to respin everything to fix the License mismatch in the set.

Thanks!
ta
André Draszik Feb. 11, 2025, 12:02 p.m. UTC | #3
Hi Tudor,

On Tue, 2025-02-11 at 11:57 +0000, Tudor Ambarus wrote:
> And then I shall s/MODULE_LICENSE("GPL");/MODULE_LICENSE("GPL v2");/
> everywhere as "GPL" indicates [GNU Public License v2 or later].

No, please don't, see Documentation/process/license-rules.rst.

Cheers,
Andre'
Krzysztof Kozlowski Feb. 11, 2025, 12:05 p.m. UTC | #4
On 11/02/2025 13:02, André Draszik wrote:
> Hi Tudor,
> 
> On Tue, 2025-02-11 at 11:57 +0000, Tudor Ambarus wrote:
>> And then I shall s/MODULE_LICENSE("GPL");/MODULE_LICENSE("GPL v2");/
>> everywhere as "GPL" indicates [GNU Public License v2 or later].
> 
> No, please don't, see Documentation/process/license-rules.rst.
For the rest of suggestions here I also recommend rereading docs. I
don't get why we need to change "GPL-2.0 OR BSD-2-Clause", but maybe I
miss some docs. Whatever SPDX recommends is irrelevant if kernel
recommends for example something else, so be sure you make it aligned
with actual kernel preference.

Best regards,
Krzysztof
Tudor Ambarus Feb. 11, 2025, 1:29 p.m. UTC | #5
On 2/11/25 12:05 PM, Krzysztof Kozlowski wrote:
> On 11/02/2025 13:02, André Draszik wrote:
>> Hi Tudor,
>>
>> On Tue, 2025-02-11 at 11:57 +0000, Tudor Ambarus wrote:
>>> And then I shall s/MODULE_LICENSE("GPL");/MODULE_LICENSE("GPL v2");/
>>> everywhere as "GPL" indicates [GNU Public License v2 or later].
>>
>> No, please don't, see Documentation/process/license-rules.rst.

Indeed, thanks, Andre'! The tag shouldn't convey the detailed license
information, as the only decision to be made is whether the module is
free software or not. I'll keep MODULE_LICENSE("GPL");

> For the rest of suggestions here I also recommend rereading docs. I

always a good suggestion :)

> don't get why we need to change "GPL-2.0 OR BSD-2-Clause", but maybe I

I reread the docs, LICENSES/preferred/GPL-2.0 says that:
'''
  For 'GNU General Public License (GPL) version 2 only' use:
    SPDX-License-Identifier: GPL-2.0
  or
    SPDX-License-Identifier: GPL-2.0-only
```

the two are equivalent. The downstream driver uses "GPL-2.0-only". I
think it'd be good that everything that I derived from it to have the
same SPDX value, for consistency reasons.

Thus I'll amend the license on the bindings file and on
include/linux/firmware/samsung/exynos-acpm-protocol.h only.
I'm not thrilled about a new version for such a small change, but I
think it's worth it.

Thanks,
ta
Diederik de Haas Feb. 11, 2025, 1:29 p.m. UTC | #6
On Tue Feb 11, 2025 at 1:05 PM CET, Krzysztof Kozlowski wrote:
> On 11/02/2025 13:02, André Draszik wrote:
>> On Tue, 2025-02-11 at 11:57 +0000, Tudor Ambarus wrote:
>>> And then I shall s/MODULE_LICENSE("GPL");/MODULE_LICENSE("GPL v2");/
>>> everywhere as "GPL" indicates [GNU Public License v2 or later].
>> 
>> No, please don't, see Documentation/process/license-rules.rst.
> For the rest of suggestions here I also recommend rereading docs. I
> don't get why we need to change "GPL-2.0 OR BSD-2-Clause", but maybe I
> miss some docs. Whatever SPDX recommends is irrelevant if kernel
> recommends for example something else, so be sure you make it aligned
> with actual kernel preference.

Unfortunately, ``Documentation/process/license-rules.rst`` and
``LICENSES/preferred/GPL-2.0`` are not in 'sync', but I guess that's
(potentially) a discussion for another ML.

TL;DR: ``license-rules.rst`` says "GPL-2.0" while the license file
allows both.

References:
9376ff9ba298 ("LICENSES/GPL2.0: Add GPL-2.0-only/or-later as valid identifiers")

https://lore.kernel.org/all/20180422220833.078058446@linutronix.de/
(which mentions specifying the SPDX version, but that didn't get
implemented)

*sigh*
Krzysztof Kozlowski Feb. 11, 2025, 3:06 p.m. UTC | #7
On 11/02/2025 14:29, Diederik de Haas wrote:
> On Tue Feb 11, 2025 at 1:05 PM CET, Krzysztof Kozlowski wrote:
>> On 11/02/2025 13:02, André Draszik wrote:
>>> On Tue, 2025-02-11 at 11:57 +0000, Tudor Ambarus wrote:
>>>> And then I shall s/MODULE_LICENSE("GPL");/MODULE_LICENSE("GPL v2");/
>>>> everywhere as "GPL" indicates [GNU Public License v2 or later].
>>>
>>> No, please don't, see Documentation/process/license-rules.rst.
>> For the rest of suggestions here I also recommend rereading docs. I
>> don't get why we need to change "GPL-2.0 OR BSD-2-Clause", but maybe I
>> miss some docs. Whatever SPDX recommends is irrelevant if kernel
>> recommends for example something else, so be sure you make it aligned
>> with actual kernel preference.
> 
> Unfortunately, ``Documentation/process/license-rules.rst`` and
> ``LICENSES/preferred/GPL-2.0`` are not in 'sync', but I guess that's
> (potentially) a discussion for another ML.
> 
> TL;DR: ``license-rules.rst`` says "GPL-2.0" while the license file
> allows both.


What exactly is there not in sync? To me it shows the preferred GPL-2.0,
over GPL-2.0-only.

LICENSES has licenses and all SPDX tags. license-rules for
simplification uses only some and the ones there could be understood as
preferred. Probably this should be changed first.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
new file mode 100644
index 000000000000..982cb8d62011
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2024 Linaro Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/firmware/google,gs101-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:
+  compatible:
+    const: google,gs101-acpm-ipc
+
+  mboxes:
+    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
+
+required:
+  - compatible
+  - mboxes
+  - shmem
+
+additionalProperties: false
+
+examples:
+  - |
+    power-management {
+        compatible = "google,gs101-acpm-ipc";
+        mboxes = <&ap2apm_mailbox>;
+        shmem = <&apm_sram>;
+    };