2023-08-12 12:24:35

by Adam Skladowski

[permalink] [raw]
Subject: [PATCH v3 0/7] MSM8976 PLL,RPMPD and DTS changes

This patch series fixes introduce support for msm8976 pll,
also brings some adjustments and fixes domains setup and few dts nitpicks.

Changes since v1
================
1. Fixed few styling issues
2. Changed compatibles for plls
3. Added fixes: tag to first patch

Changes since v2
================
1. Fixed lacking .data in pll match_data
2. Increased freq supported by A72PLL to include bin2
3. Fixed remaining IPC bits
4. Added R-b tags
5. Changed commit msg for lpass dts patch
6. Rebased patches on next-20230728

Adam Skladowski (7):
drivers: genpd: qcom: rpmpd: Fix MSM8976 power domains setup
clk: qcom: clk-hfpll: Configure l_val in init when required
clk: qcom: hfpll: Allow matching pdata
dt-bindings: clock: qcom,hfpll: Document MSM8976 compatibles
clk: qcom: hfpll: Add MSM8976 PLL data
arm64: dts: qcom: msm8976: Split lpass region
arm64: dts: qcom: msm8976: Fix ipc bit shifts

.../devicetree/bindings/clock/qcom,hfpll.txt | 3 +
arch/arm64/boot/dts/qcom/msm8976.dtsi | 15 +++--
drivers/clk/qcom/clk-hfpll.c | 4 ++
drivers/clk/qcom/clk-hfpll.h | 1 +
drivers/clk/qcom/hfpll.c | 59 ++++++++++++++++++-
drivers/genpd/qcom/rpmpd.c | 27 ++++-----
6 files changed, 85 insertions(+), 24 deletions(-)

--
2.41.0



2023-08-12 12:28:35

by Adam Skladowski

[permalink] [raw]
Subject: [PATCH v3 3/7] clk: qcom: hfpll: Allow matching pdata

HFPLL driver can be used to drive PLLs also on different SoCs like MSM8976
On MSM8976 each PLL gets it own different configuration,
add matching pdata to driver to support multiple configurations.

Signed-off-by: Adam Skladowski <[email protected]>
---
drivers/clk/qcom/hfpll.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c
index f4d78003d189..47325eb17f07 100644
--- a/drivers/clk/qcom/hfpll.c
+++ b/drivers/clk/qcom/hfpll.c
@@ -6,6 +6,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
+#include <linux/of_device.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/regmap.h>
@@ -32,7 +33,7 @@ static const struct hfpll_data hdata = {
};

static const struct of_device_id qcom_hfpll_match_table[] = {
- { .compatible = "qcom,hfpll" },
+ { .compatible = "qcom,hfpll", .data = &hdata },
{ }
};
MODULE_DEVICE_TABLE(of, qcom_hfpll_match_table);
@@ -83,7 +84,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev)

init.parent_data = &pdata;

- h->d = &hdata;
+ h->d = of_device_get_match_data(&pdev->dev);
h->clkr.hw.init = &init;
spin_lock_init(&h->lock);

--
2.41.0


2023-08-12 12:39:20

by Adam Skladowski

[permalink] [raw]
Subject: [PATCH v3 6/7] arm64: dts: qcom: msm8976: Split lpass region

MSM8976 downstream dts define reloc region which is used by pil-tz
to load both wcnss and lpass, on mainline however we might not be
able to do it and we need separate regions(also validating dts might get
problematic if we had to put memory-region(rproc node) per device).
Luckily it seems size and entry points in firmware headers appears
to be static across multiple devices including Sony Loire platform
and Xiaomi Redmi Note 3 Pro this should let us fit in first ~17MB
Split lpass region(reloc on downstream) into two separate regions.

Signed-off-by: Adam Skladowski <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8976.dtsi | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi
index ab76806317a7..7385d5edec04 100644
--- a/arch/arm64/boot/dts/qcom/msm8976.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi
@@ -338,7 +338,12 @@ mpss_mem: mpss@86c00000 {
};

lpass_mem: lpass@8c200000 {
- reg = <0x0 0x8c200000 0x0 0x1800000>;
+ reg = <0x0 0x8c200000 0x0 0x1000000>;
+ no-map;
+ };
+
+ wcnss_fw_mem: wcnss@8d200000 {
+ reg = <0x0 0x8d200000 0x0 0x800000>;
no-map;
};

--
2.41.0


2023-08-12 12:40:34

by Adam Skladowski

[permalink] [raw]
Subject: [PATCH v3 7/7] arm64: dts: qcom: msm8976: Fix ipc bit shifts

Update bits to match downstream irq-bitmask values.

Fixes: 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs")
Signed-off-by: Adam Skladowski <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8976.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi
index 7385d5edec04..ab6d3834e436 100644
--- a/arch/arm64/boot/dts/qcom/msm8976.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi
@@ -384,7 +384,7 @@ adsp_smp2p_in: slave-kernel {
smp2p-modem {
compatible = "qcom,smp2p";
interrupts = <GIC_SPI 27 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 13>;
+ qcom,ipc = <&apcs 8 14>;

qcom,local-pid = <0>;
qcom,remote-pid = <1>;
@@ -407,7 +407,7 @@ modem_smp2p_in: slave-kernel {
smp2p-wcnss {
compatible = "qcom,smp2p";
interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 17>;
+ qcom,ipc = <&apcs 8 18>;

qcom,local-pid = <0>;
qcom,remote-pid = <4>;
@@ -433,9 +433,9 @@ smsm {
#address-cells = <1>;
#size-cells = <0>;

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

apps_smsm: apps@0 {
reg = <0>;
--
2.41.0


2023-09-14 19:27:22

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v3 0/7] MSM8976 PLL,RPMPD and DTS changes


On Sat, 12 Aug 2023 13:24:43 +0200, Adam Skladowski wrote:
> This patch series fixes introduce support for msm8976 pll,
> also brings some adjustments and fixes domains setup and few dts nitpicks.
>
> Changes since v1
> ================
> 1. Fixed few styling issues
> 2. Changed compatibles for plls
> 3. Added fixes: tag to first patch
>
> [...]

Applied, thanks!

[2/7] clk: qcom: clk-hfpll: Configure l_val in init when required
commit: 500a4609eef46d49a260173b66cabb20bd5159ad
[3/7] clk: qcom: hfpll: Allow matching pdata
commit: 34e000c0963e55f24be2254fa645f8dd8257a9e0
[4/7] dt-bindings: clock: qcom,hfpll: Document MSM8976 compatibles
commit: de37ca2dc98607e74522d8f243aa7feac74577c5
[5/7] clk: qcom: hfpll: Add MSM8976 PLL data
commit: 1fa2d1a887c763246662a88e203d69b36052770c

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

2023-09-20 18:19:28

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v3 0/7] MSM8976 PLL,RPMPD and DTS changes


On Sat, 12 Aug 2023 13:24:43 +0200, Adam Skladowski wrote:
> This patch series fixes introduce support for msm8976 pll,
> also brings some adjustments and fixes domains setup and few dts nitpicks.
>
> Changes since v1
> ================
> 1. Fixed few styling issues
> 2. Changed compatibles for plls
> 3. Added fixes: tag to first patch
>
> [...]

Applied, thanks!

[6/7] arm64: dts: qcom: msm8976: Split lpass region
commit: 31c133b4a07e3db456a7e661c96653cd65a25bc6
[7/7] arm64: dts: qcom: msm8976: Fix ipc bit shifts
commit: 684277525c70f329300cc687e27248e405a4ff9e

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