mbox series

[v2,0/2] Support mailbox interface in qcom,smsm driver

Message ID 20240606-smsm-mbox-v2-0-8abe6b5f01da@z3ntu.xyz
Headers show
Series Support mailbox interface in qcom,smsm driver | expand

Message

Luca Weiss June 6, 2024, 7:18 p.m. UTC
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@z3ntu.xyz>
---
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@z3ntu.xyz

---
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,

Comments

Bjorn Andersson June 14, 2024, 10:48 p.m. UTC | #1
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,