2024-06-06 19:31:44

by Luca Weiss

[permalink] [raw]
Subject: [PATCH v2 0/2] Support mailbox interface in qcom,smsm driver

Take a shot at converting the last driver that requires direct
"qcom,ipc*" syscon references in devicetree by allowing the smsm driver
to use the mailbox interface to achieve the same effect.

Still not sure if the devicetree bindings are the prettiest but they're
functional.

One alternative I'm thinking of is to use mbox-names to not have <0>
elements in dt, and reference the items by name from the driver?

e.g. this change for msm8226 could be represented differently.

- qcom,ipc-1 = <&apcs 8 13>;
- qcom,ipc-2 = <&apcs 8 9>;
- qcom,ipc-3 = <&apcs 8 19>;
+ mboxes = <0>, <&apcs 13>, <&apcs 9>, <&apcs 19>;

vs. for example:

- qcom,ipc-1 = <&apcs 8 13>;
- qcom,ipc-2 = <&apcs 8 9>;
- qcom,ipc-3 = <&apcs 8 19>;
+ mboxes = <&apcs 13>, <&apcs 9>, <&apcs 19>;
+ mbox-names = "ipc-1", "ipc-2", "ipc-3";

But also here the name with 'ipc-N' is probably not particularly
fitting?

Please let me know your thoughts and any suggestions.

Signed-off-by: Luca Weiss <[email protected]>
---
Changes in v2:
- Mark qcom,ipc-N as deprecated
- Update & expand description for mboxes property
- Don't duplicate example, just update existing one since qcom,ipc-N is
deprecated now anyways
- Pick up tags
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Luca Weiss (2):
dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc
soc: qcom: smsm: Support using mailbox interface

.../devicetree/bindings/soc/qcom/qcom,smsm.yaml | 30 +++++++++----
drivers/soc/qcom/smsm.c | 51 +++++++++++++++++++++-
2 files changed, 71 insertions(+), 10 deletions(-)
---
base-commit: ee78a17615ad0cfdbbc27182b1047cd36c9d4d5f
change-id: 20240424-smsm-mbox-0666f35eae44

Best regards,
--
Luca Weiss <[email protected]>



2024-06-14 22:50:12

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] Support mailbox interface in qcom,smsm driver


On Thu, 06 Jun 2024 21:18:31 +0200, Luca Weiss wrote:
> Take a shot at converting the last driver that requires direct
> "qcom,ipc*" syscon references in devicetree by allowing the smsm driver
> to use the mailbox interface to achieve the same effect.
>
> Still not sure if the devicetree bindings are the prettiest but they're
> functional.
>
> [...]

Applied, thanks!

[1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc
commit: 5e66abcf1e250f032ecb18a7ecfac5287298ed8e
[2/2] soc: qcom: smsm: Support using mailbox interface
commit: 75287992f58a74271a083fef0356bc81d629f671

Best regards,
--
Bjorn Andersson <[email protected]>