2024-04-24 16:35:16

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 0/7] Use mboxes instead of syscon for APCS (arm32 & arm64)

The first patch is for removing a bogus error warning I've noticed while
developing this on msm8226 - there the patches are also coming later for
this SoC since apcs is getting hooked up to cpufreq there also.

Apart from usages from the qcom,smsm driver (patches coming!) all other
usages of the apcs mailbox now go via the mailbox driver - where one is
used, so some arm32 boards will continue using "qcom,ipc*" properties in
the short or long term.

Only compile-tested apart from msm8953 (tested on sdm632-fairphone-fp3)
and msm8974 (tested on msm8974pro-fairphone-fp2), but I don't expect any
complications with this.

Signed-off-by: Luca Weiss <[email protected]>
---
Luca Weiss (7):
rpmsg: qcom_smd: Don't print error during probe deferral
ARM: dts: qcom: msm8974: Use mboxes properties for APCS
arm64: dts: qcom: msm8916: Use mboxes properties for APCS
arm64: dts: qcom: msm8939: Use mboxes properties for APCS
arm64: dts: qcom: msm8953: Use mboxes properties for APCS
arm64: dts: qcom: msm8976: Use mboxes properties for APCS
arm64: dts: qcom: msm8994: Use mboxes properties for APCS

arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 14 +++++++-------
arch/arm64/boot/dts/qcom/msm8916.dtsi | 10 +++++-----
arch/arm64/boot/dts/qcom/msm8939.dtsi | 4 ++--
arch/arm64/boot/dts/qcom/msm8953.dtsi | 10 +++++-----
arch/arm64/boot/dts/qcom/msm8976.dtsi | 8 ++++----
arch/arm64/boot/dts/qcom/msm8994.dtsi | 6 +++---
drivers/rpmsg/qcom_smd.c | 3 ++-
7 files changed, 28 insertions(+), 27 deletions(-)
---
base-commit: 43173e6dbaa227f3107310d4df4a3bacd5e0df33
change-id: 20240423-apcs-mboxes-12ee6c01a5b3

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



2024-04-24 16:35:52

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 2/7] ARM: dts: qcom: msm8974: Use mboxes properties for APCS

Instead of passing the syscon to the various nodes, use the mbox
interface using the mboxes property.

Signed-off-by: Luca Weiss <[email protected]>
---
arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
index 20958c47ff3a..0f1dc4355c7a 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
@@ -130,7 +130,7 @@ master-stats {

smd-edge {
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 0>;
+ mboxes = <&apcs 0>;
qcom,smd-edge = <15>;

rpm_requests: rpm-requests {
@@ -217,7 +217,7 @@ smp2p-adsp {
interrupt-parent = <&intc>;
interrupts = <GIC_SPI 158 IRQ_TYPE_EDGE_RISING>;

- qcom,ipc = <&apcs 8 10>;
+ mboxes = <&apcs 10>;

qcom,local-pid = <0>;
qcom,remote-pid = <2>;
@@ -242,7 +242,7 @@ smp2p-modem {
interrupt-parent = <&intc>;
interrupts = <GIC_SPI 27 IRQ_TYPE_EDGE_RISING>;

- qcom,ipc = <&apcs 8 14>;
+ mboxes = <&apcs 14>;

qcom,local-pid = <0>;
qcom,remote-pid = <1>;
@@ -267,7 +267,7 @@ smp2p-wcnss {
interrupt-parent = <&intc>;
interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;

- qcom,ipc = <&apcs 8 18>;
+ mboxes = <&apcs 18>;

qcom,local-pid = <0>;
qcom,remote-pid = <4>;
@@ -757,7 +757,7 @@ iris {
smd-edge {
interrupts = <GIC_SPI 142 IRQ_TYPE_EDGE_RISING>;

- qcom,ipc = <&apcs 8 17>;
+ mboxes = <&apcs 17>;
qcom,smd-edge = <6>;

wcnss {
@@ -1576,7 +1576,7 @@ bam_dmux: bam-dmux {
smd-edge {
interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;

- qcom,ipc = <&apcs 8 12>;
+ mboxes = <&apcs 12>;
qcom,smd-edge = <0>;

label = "modem";
@@ -2213,7 +2213,7 @@ remoteproc_adsp: remoteproc@fe200000 {
smd-edge {
interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;

- qcom,ipc = <&apcs 8 8>;
+ mboxes = <&apcs 8>;
qcom,smd-edge = <1>;
label = "lpass";
};

--
2.44.0


2024-04-24 16:38:09

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 0/7] Use mboxes instead of syscon for APCS (arm32 & arm64)

On Mittwoch, 24. April 2024 18:23:53 MESZ Luca Weiss wrote:
> The first patch is for removing a bogus error warning I've noticed while
> developing this on msm8226 - there the patches are also coming later for
> this SoC since apcs is getting hooked up to cpufreq there also.
>
> Apart from usages from the qcom,smsm driver (patches coming!) all other
> usages of the apcs mailbox now go via the mailbox driver - where one is
> used, so some arm32 boards will continue using "qcom,ipc*" properties in
> the short or long term.
>
> Only compile-tested apart from msm8953 (tested on sdm632-fairphone-fp3)
> and msm8974 (tested on msm8974pro-fairphone-fp2), but I don't expect any
> complications with this.

I think I forgot to mention this, but the msm8974 patch depends on
this series:
https://lore.kernel.org/linux-arm-msm/[email protected]/

>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Luca Weiss (7):
> rpmsg: qcom_smd: Don't print error during probe deferral
> ARM: dts: qcom: msm8974: Use mboxes properties for APCS
> arm64: dts: qcom: msm8916: Use mboxes properties for APCS
> arm64: dts: qcom: msm8939: Use mboxes properties for APCS
> arm64: dts: qcom: msm8953: Use mboxes properties for APCS
> arm64: dts: qcom: msm8976: Use mboxes properties for APCS
> arm64: dts: qcom: msm8994: Use mboxes properties for APCS
>
> arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 14 +++++++-------
> arch/arm64/boot/dts/qcom/msm8916.dtsi | 10 +++++-----
> arch/arm64/boot/dts/qcom/msm8939.dtsi | 4 ++--
> arch/arm64/boot/dts/qcom/msm8953.dtsi | 10 +++++-----
> arch/arm64/boot/dts/qcom/msm8976.dtsi | 8 ++++----
> arch/arm64/boot/dts/qcom/msm8994.dtsi | 6 +++---
> drivers/rpmsg/qcom_smd.c | 3 ++-
> 7 files changed, 28 insertions(+), 27 deletions(-)
> ---
> base-commit: 43173e6dbaa227f3107310d4df4a3bacd5e0df33
> change-id: 20240423-apcs-mboxes-12ee6c01a5b3
>
> Best regards,
>





2024-04-24 17:32:01

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 0/7] Use mboxes instead of syscon for APCS (arm32 & arm64)

On Wed, Apr 24, 2024 at 06:23:53PM +0200, Luca Weiss wrote:
> The first patch is for removing a bogus error warning I've noticed while
> developing this on msm8226 - there the patches are also coming later for
> this SoC since apcs is getting hooked up to cpufreq there also.
>
> Apart from usages from the qcom,smsm driver (patches coming!) all other
> usages of the apcs mailbox now go via the mailbox driver - where one is
> used, so some arm32 boards will continue using "qcom,ipc*" properties in
> the short or long term.
>

Very nice, thank you for cleaning this up.

Regards,
Bjorn

> Only compile-tested apart from msm8953 (tested on sdm632-fairphone-fp3)
> and msm8974 (tested on msm8974pro-fairphone-fp2), but I don't expect any
> complications with this.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Luca Weiss (7):
> rpmsg: qcom_smd: Don't print error during probe deferral
> ARM: dts: qcom: msm8974: Use mboxes properties for APCS
> arm64: dts: qcom: msm8916: Use mboxes properties for APCS
> arm64: dts: qcom: msm8939: Use mboxes properties for APCS
> arm64: dts: qcom: msm8953: Use mboxes properties for APCS
> arm64: dts: qcom: msm8976: Use mboxes properties for APCS
> arm64: dts: qcom: msm8994: Use mboxes properties for APCS
>
> arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 14 +++++++-------
> arch/arm64/boot/dts/qcom/msm8916.dtsi | 10 +++++-----
> arch/arm64/boot/dts/qcom/msm8939.dtsi | 4 ++--
> arch/arm64/boot/dts/qcom/msm8953.dtsi | 10 +++++-----
> arch/arm64/boot/dts/qcom/msm8976.dtsi | 8 ++++----
> arch/arm64/boot/dts/qcom/msm8994.dtsi | 6 +++---
> drivers/rpmsg/qcom_smd.c | 3 ++-
> 7 files changed, 28 insertions(+), 27 deletions(-)
> ---
> base-commit: 43173e6dbaa227f3107310d4df4a3bacd5e0df33
> change-id: 20240423-apcs-mboxes-12ee6c01a5b3
>
> Best regards,
> --
> Luca Weiss <[email protected]>
>

2024-04-24 20:15:33

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 2/7] ARM: dts: qcom: msm8974: Use mboxes properties for APCS



On 4/24/24 18:23, Luca Weiss wrote:
> Instead of passing the syscon to the various nodes, use the mbox
> interface using the mboxes property.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2024-06-04 20:34:55

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/7] Use mboxes instead of syscon for APCS (arm32 & arm64)


On Wed, 24 Apr 2024 18:23:53 +0200, Luca Weiss wrote:
> The first patch is for removing a bogus error warning I've noticed while
> developing this on msm8226 - there the patches are also coming later for
> this SoC since apcs is getting hooked up to cpufreq there also.
>
> Apart from usages from the qcom,smsm driver (patches coming!) all other
> usages of the apcs mailbox now go via the mailbox driver - where one is
> used, so some arm32 boards will continue using "qcom,ipc*" properties in
> the short or long term.
>
> [...]

Applied, thanks!

[3/7] arm64: dts: qcom: msm8916: Use mboxes properties for APCS
commit: 3e971470619d80dd343e3abd80cb997bcb48f200
[4/7] arm64: dts: qcom: msm8939: Use mboxes properties for APCS
commit: 22e4e43484c4dd1f29a72cc62411072758e0681a
[5/7] arm64: dts: qcom: msm8953: Use mboxes properties for APCS
commit: 11dff973ebe21950c7c5221919141fb0cb16354e
[6/7] arm64: dts: qcom: msm8976: Use mboxes properties for APCS
commit: a3d5570d8c8c6efc3d15d015b517f4e8bd11898f
[7/7] arm64: dts: qcom: msm8994: Use mboxes properties for APCS
commit: ba5d9a91f8c3caf6867b3b87dce080d056222561

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