[PATCH v2 0/2] Support mailbox interface in qcom,smsm driver
From: Luca Weiss
Date: Thu Jun 06 2024 - 15:19:14 EST
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 <luca@xxxxxxxxx>
---
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/20240424-smsm-mbox-v1-0-555f3f442841@xxxxxxxxx
---
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 <luca@xxxxxxxxx>