Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Support mailbox interface in qcom,smsm driver
@ 2024-06-06 19:18 Luca Weiss
  2024-06-06 19:18 ` [PATCH v2 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc Luca Weiss
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Luca Weiss @ 2024-06-06 19:18 UTC (permalink / raw)
  To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Andy Gross
  Cc: Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel,
	Luca Weiss

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,
-- 
Luca Weiss <luca@z3ntu.xyz>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-14 22:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 19:18 [PATCH v2 0/2] Support mailbox interface in qcom,smsm driver Luca Weiss
2024-06-06 19:18 ` [PATCH v2 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc Luca Weiss
2024-06-07  7:24   ` Krzysztof Kozlowski
2024-06-06 19:18 ` [PATCH v2 2/2] soc: qcom: smsm: Support using mailbox interface Luca Weiss
2024-06-14 22:48 ` [PATCH v2 0/2] Support mailbox interface in qcom,smsm driver Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox