2023-01-12 20:57:51

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH 0/8] Modem support for MSM8226

This series adds support for modem remoteproc found on MSM8226.
It also adds needed device tree nodes and enables modem used for
location service on matisse-wifi.

Luca Weiss (3):
remoteproc: qcom_q6v5_mss: Handle platforms with only single power
domain
remoteproc: qcom_q6v5_mss: Add modem support on MSM8226
ARM: dts: qcom: msm8226: Add modem remoteproc node

Matti Lehtimäki (5):
dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226
dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226
ARM: dts: qcom: msm8226: Add node for TCSR halt regs
ARM: dts: qcom: msm8226: Add smsm node
ARM: dts: qcom: apq8026-samsung-matisse-wifi: Enable modem

.../devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
.../remoteproc/qcom,msm8916-mss-pil.yaml | 41 +++++-
.../dts/qcom-apq8026-samsung-matisse-wifi.dts | 13 +-
arch/arm/boot/dts/qcom-msm8226.dtsi | 127 ++++++++++++++++
drivers/remoteproc/qcom_q6v5_mss.c | 137 ++++++++++++++++++
5 files changed, 313 insertions(+), 6 deletions(-)

--
2.34.1


2023-01-12 21:19:47

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226

From: Luca Weiss <[email protected]>

Add support for the external power block headswitch register needed by
MSM8226 and some other qcom platforms.

Signed-off-by: Luca Weiss <[email protected]>
Co-developed-by: Matti Lehtimäki <[email protected]>
Signed-off-by: Matti Lehtimäki <[email protected]>
---
drivers/remoteproc/qcom_q6v5_mss.c | 123 +++++++++++++++++++++++++++++
1 file changed, 123 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 745627a36bcf..0dff7e811736 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -131,6 +131,11 @@
#define QDSP6SS_BOOT_CMD 0x404
#define BOOT_FSM_TIMEOUT 10000

+/* External power block headswitch */
+#define EXTERNAL_BHS_ON BIT(0)
+#define EXTERNAL_BHS_STATUS BIT(4)
+#define EXTERNAL_BHS_TIMEOUT_US 50
+
struct reg_info {
struct regulator *reg;
int uV;
@@ -158,6 +163,7 @@ struct rproc_hexagon_res {
bool has_mba_logs;
bool has_spare_reg;
bool has_qaccept_regs;
+ bool has_ext_bhs_reg;
bool has_ext_cntl_regs;
bool has_vq6;
};
@@ -177,6 +183,7 @@ struct q6v5 {
u32 halt_nc;
u32 halt_vq6;
u32 conn_box;
+ u32 ext_bhs;

u32 qaccept_mdm;
u32 qaccept_cx;
@@ -230,6 +237,7 @@ struct q6v5 {
bool has_mba_logs;
bool has_spare_reg;
bool has_qaccept_regs;
+ bool has_ext_bhs_reg;
bool has_ext_cntl_regs;
bool has_vq6;
int mpss_perm;
@@ -239,6 +247,7 @@ struct q6v5 {
};

enum {
+ MSS_MSM8226,
MSS_MSM8909,
MSS_MSM8916,
MSS_MSM8953,
@@ -1738,6 +1747,23 @@ static int q6v5_init_mem(struct q6v5 *qproc, struct platform_device *pdev)
qproc->qaccept_axi = args.args[2];
}

+ if (qproc->has_ext_bhs_reg) {
+ ret = of_parse_phandle_with_fixed_args(pdev->dev.of_node,
+ "qcom,ext-bhs-reg",
+ 1, 0, &args);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "failed to parse ext-bhs-reg index 0\n");
+ return -EINVAL;
+ }
+
+ qproc->conn_map = syscon_node_to_regmap(args.np);
+ of_node_put(args.np);
+ if (IS_ERR(qproc->conn_map))
+ return PTR_ERR(qproc->conn_map);
+
+ qproc->ext_bhs = args.args[0];
+ }
+
if (qproc->has_ext_cntl_regs) {
ret = of_parse_phandle_with_fixed_args(pdev->dev.of_node,
"qcom,ext-regs",
@@ -1863,6 +1889,36 @@ static void q6v5_pds_detach(struct q6v5 *qproc, struct device **pds,
dev_pm_domain_detach(pds[i], false);
}

+static int q6v5_external_bhs_enable(struct q6v5 *qproc)
+{
+ u32 val;
+ int ret = 0;
+
+ /*
+ * Enable external power block headswitch and wait for it to
+ * stabilize
+ */
+ regmap_update_bits(qproc->conn_map, qproc->ext_bhs,
+ EXTERNAL_BHS_ON, 1);
+
+ ret = regmap_read_poll_timeout(qproc->conn_map, qproc->ext_bhs,
+ val, val & EXTERNAL_BHS_STATUS,
+ 1, EXTERNAL_BHS_TIMEOUT_US);
+
+ if (ret) {
+ dev_err(qproc->dev, "External BHS timed out\n");
+ ret = -ETIMEDOUT;
+ }
+
+ return ret;
+}
+
+static void q6v5_external_bhs_disable(struct q6v5 *qproc)
+{
+ regmap_update_bits(qproc->conn_map, qproc->ext_bhs,
+ EXTERNAL_BHS_ON, 0);
+}
+
static int q6v5_init_reset(struct q6v5 *qproc)
{
qproc->mss_restart = devm_reset_control_get_exclusive(qproc->dev,
@@ -1984,6 +2040,7 @@ static int q6v5_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, qproc);

qproc->has_qaccept_regs = desc->has_qaccept_regs;
+ qproc->has_ext_bhs_reg = desc->has_ext_bhs_reg;
qproc->has_ext_cntl_regs = desc->has_ext_cntl_regs;
qproc->has_vq6 = desc->has_vq6;
qproc->has_spare_reg = desc->has_spare_reg;
@@ -2054,6 +2111,14 @@ static int q6v5_probe(struct platform_device *pdev)
qproc->proxy_pd_count = ret;
}

+ if (qproc->has_ext_bhs_reg) {
+ ret = q6v5_external_bhs_enable(qproc);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "Failed to enable external BHS.\n");
+ goto detach_proxy_pds;
+ }
+ }
+
qproc->has_alt_reset = desc->has_alt_reset;
ret = q6v5_init_reset(qproc);
if (ret)
@@ -2118,6 +2183,9 @@ static int q6v5_remove(struct platform_device *pdev)
qcom_remove_smd_subdev(rproc, &qproc->smd_subdev);
qcom_remove_glink_subdev(rproc, &qproc->glink_subdev);

+ if (qproc->has_ext_bhs_reg)
+ q6v5_external_bhs_disable(qproc);
+
q6v5_pds_detach(qproc, qproc->proxy_pds, qproc->proxy_pd_count);

rproc_free(rproc);
@@ -2153,6 +2221,7 @@ static const struct rproc_hexagon_res sc7180_mss = {
.has_mba_logs = true,
.has_spare_reg = true,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_SC7180,
@@ -2181,6 +2250,7 @@ static const struct rproc_hexagon_res sc7280_mss = {
.has_mba_logs = true,
.has_spare_reg = false,
.has_qaccept_regs = true,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = true,
.has_vq6 = true,
.version = MSS_SC7280,
@@ -2216,6 +2286,7 @@ static const struct rproc_hexagon_res sdm845_mss = {
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_SDM845,
@@ -2247,6 +2318,7 @@ static const struct rproc_hexagon_res msm8998_mss = {
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8998,
@@ -2286,6 +2358,7 @@ static const struct rproc_hexagon_res msm8996_mss = {
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8996,
@@ -2320,6 +2393,7 @@ static const struct rproc_hexagon_res msm8909_mss = {
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8909,
@@ -2365,6 +2439,7 @@ static const struct rproc_hexagon_res msm8916_mss = {
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8916,
@@ -2400,6 +2475,7 @@ static const struct rproc_hexagon_res msm8953_mss = {
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8953,
@@ -2453,13 +2529,60 @@ static const struct rproc_hexagon_res msm8974_mss = {
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
+ .has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8974,
};

+static const struct rproc_hexagon_res msm8226_mss = {
+ .hexagon_mba_image = "mba.b00",
+ .proxy_supply = (struct qcom_mss_reg_res[]) {
+ {
+ .supply = "pll",
+ .uA = 100000,
+ },
+ {
+ .supply = "mx",
+ .uV = 1050000,
+ },
+ {}
+ },
+ .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
+ {
+ .supply = "cx",
+ .uA = 100000,
+ },
+ {}
+ },
+ .proxy_clk_names = (char*[]){
+ "xo",
+ NULL
+ },
+ .active_clk_names = (char*[]){
+ "iface",
+ "bus",
+ "mem",
+ NULL
+ },
+ .proxy_pd_names = (char*[]){
+ "cx",
+ NULL
+ },
+ .need_mem_protection = false,
+ .has_alt_reset = false,
+ .has_mba_logs = false,
+ .has_spare_reg = false,
+ .has_qaccept_regs = false,
+ .has_ext_bhs_reg = true,
+ .has_ext_cntl_regs = false,
+ .has_vq6 = false,
+ .version = MSS_MSM8226,
+};
+
static const struct of_device_id q6v5_of_match[] = {
{ .compatible = "qcom,q6v5-pil", .data = &msm8916_mss},
+ { .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss},
{ .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss},
{ .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss},
{ .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss},
--
2.34.1

2023-01-12 21:21:14

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH 4/8] dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226

Document the qcom,msm8226-tcsr compatible.

Signed-off-by: Matti Lehtimäki <[email protected]>
---
Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
index adcae6c007d9..d463fb47278f 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
@@ -31,6 +31,7 @@ properties:
- qcom,tcsr-ipq6018
- qcom,tcsr-ipq8064
- qcom,tcsr-mdm9615
+ - qcom,tcsr-msm8226
- qcom,tcsr-msm8660
- qcom,tcsr-msm8916
- qcom,tcsr-msm8953
--
2.34.1

2023-01-12 21:23:17

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH 8/8] ARM: dts: qcom: apq8026-samsung-matisse-wifi: Enable modem

Enable modem remoteproc on samsung,matisse-wifi.

Signed-off-by: Matti Lehtimäki <[email protected]>
---
.../boot/dts/qcom-apq8026-samsung-matisse-wifi.dts | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
index 91b860e24681..c84ae3e2a602 100644
--- a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
+++ b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
@@ -10,6 +10,8 @@
#include "qcom-pm8226.dtsi"

/delete-node/ &adsp_region;
+/delete-node/ &mba_region;
+/delete-node/ &mpss_region;
/delete-node/ &smem_region;

/ {
@@ -165,12 +167,12 @@ framebuffer@3200000 {
no-map;
};

- mpss@8400000 {
+ mpss_region: mpss@8400000 {
reg = <0x08400000 0x1f00000>;
no-map;
};

- mba@a300000 {
+ mba_region: mba@a300000 {
reg = <0x0a300000 0x100000>;
no-map;
};
@@ -279,6 +281,13 @@ touchscreen@4a {
};
};

+&modem {
+ mx-supply = <&pm8226_l3>;
+ pll-supply = <&pm8226_l8>;
+
+ status = "okay";
+};
+
&rpm_requests {
regulators {
compatible = "qcom,rpm-pm8226-regulators";
--
2.34.1

2023-01-12 21:33:37

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH 5/8] ARM: dts: qcom: msm8226: Add node for TCSR halt regs

Add a syscon device node for the TCSR halt regs needed by
modem and other remoteprocs.

Signed-off-by: Matti Lehtimäki <[email protected]>
---
arch/arm/boot/dts/qcom-msm8226.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index 4cba25dad8d6..394662cbf282 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -590,6 +590,11 @@ tcsr_mutex: hwlock@fd484000 {
#hwlock-cells = <1>;
};

+ tcsr_regs_1: syscon@fd485000 {
+ compatible = "qcom,msm8226-tcsr", "syscon";
+ reg = <0xfd485000 0x1000>;
+ };
+
adsp: remoteproc@fe200000 {
compatible = "qcom,msm8226-adsp-pil";
reg = <0xfe200000 0x100>;
--
2.34.1

2023-01-12 21:34:55

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH 7/8] ARM: dts: qcom: msm8226: Add modem remoteproc node

From: Luca Weiss <[email protected]>

Add a node for the modem remoteproc found on MSM8226.

Signed-off-by: Luca Weiss <[email protected]>
Co-developed-by: Matti Lehtimäki <[email protected]>
Signed-off-by: Matti Lehtimäki <[email protected]>
---
arch/arm/boot/dts/qcom-msm8226.dtsi | 86 +++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index 2639167c8976..34ea9cf46ae0 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -56,6 +56,16 @@ smem_region: smem@3000000 {
no-map;
};

+ mpss_region: mpss@8000000 {
+ reg = <0x08000000 0x5100000>;
+ no-map;
+ };
+
+ mba_region: mba@d100000 {
+ reg = <0x0d100000 0x100000>;
+ no-map;
+ };
+
adsp_region: adsp@dc00000 {
reg = <0x0dc00000 0x1900000>;
no-map;
@@ -140,6 +150,31 @@ adsp_smp2p_in: slave-kernel {
};
};

+ smp2p-modem {
+ compatible = "qcom,smp2p";
+ qcom,smem = <435>, <428>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <GIC_SPI 27 IRQ_TYPE_EDGE_RISING>;
+
+ qcom,ipc = <&apcs 8 14>;
+
+ qcom,local-pid = <0>;
+ qcom,remote-pid = <1>;
+
+ modem_smp2p_out: master-kernel {
+ qcom,entry-name = "master-kernel";
+ #qcom,smem-state-cells = <1>;
+ };
+
+ modem_smp2p_in: slave-kernel {
+ qcom,entry-name = "slave-kernel";
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
smsm {
compatible = "qcom,smsm";
#address-cells = <1>;
@@ -620,6 +655,57 @@ rpm_msg_ram: sram@fc428000 {
reg = <0xfc428000 0x4000>;
};

+ modem: remoteproc@fc880000 {
+ compatible = "qcom,msm8226-mss-pil";
+ reg = <0xfc880000 0x100>,
+ <0xfc820000 0x020>;
+ reg-names = "qdsp6", "rmb";
+
+ interrupts-extended = <&intc GIC_SPI 24 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
+
+ clocks = <&gcc GCC_MSS_Q6_BIMC_AXI_CLK>,
+ <&gcc GCC_MSS_CFG_AHB_CLK>,
+ <&gcc GCC_BOOT_ROM_AHB_CLK>,
+ <&xo_board>;
+ clock-names = "iface", "bus", "mem", "xo";
+
+ resets = <&gcc GCC_MSS_RESTART>;
+ reset-names = "mss_restart";
+
+ power-domains = <&rpmpd MSM8226_VDDCX>;
+ power-domain-names = "cx";
+
+ qcom,ext-bhs-reg = <&tcsr_regs_1 0x194>;
+ qcom,halt-regs = <&tcsr_regs_1 0x180 0x200 0x280>;
+
+ qcom,smem-states = <&modem_smp2p_out 0>;
+ qcom,smem-state-names = "stop";
+
+ status = "disabled";
+
+ mba {
+ memory-region = <&mba_region>;
+ };
+
+ mpss {
+ memory-region = <&mpss_region>;
+ };
+
+ smd-edge {
+ interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
+
+ qcom,ipc = <&apcs 8 12>;
+ qcom,smd-edge = <0>;
+
+ label = "modem";
+ };
+ };
+
tcsr_mutex: hwlock@fd484000 {
compatible = "qcom,msm8226-tcsr-mutex", "qcom,tcsr-mutex";
reg = <0xfd484000 0x1000>;
--
2.34.1

2023-01-12 22:47:02

by Stephan Gerhold

[permalink] [raw]
Subject: Re: [PATCH 7/8] ARM: dts: qcom: msm8226: Add modem remoteproc node

On Thu, Jan 12, 2023 at 10:26:10PM +0200, Matti Lehtim?ki wrote:
> From: Luca Weiss <[email protected]>
>
> Add a node for the modem remoteproc found on MSM8226.
>
> Signed-off-by: Luca Weiss <[email protected]>
> Co-developed-by: Matti Lehtim?ki <[email protected]>
> Signed-off-by: Matti Lehtim?ki <[email protected]>
> ---
> arch/arm/boot/dts/qcom-msm8226.dtsi | 86 +++++++++++++++++++++++++++++
> 1 file changed, 86 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
> index 2639167c8976..34ea9cf46ae0 100644
> --- a/arch/arm/boot/dts/qcom-msm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
> [...]
> @@ -620,6 +655,57 @@ rpm_msg_ram: sram@fc428000 {
> reg = <0xfc428000 0x4000>;
> };
>
> + modem: remoteproc@fc880000 {
> + compatible = "qcom,msm8226-mss-pil";
> + reg = <0xfc880000 0x100>,
> + <0xfc820000 0x020>;
> + reg-names = "qdsp6", "rmb";
> +
> + interrupts-extended = <&intc GIC_SPI 24 IRQ_TYPE_EDGE_RISING>,
> + <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
> + <&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
> + <&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
> + <&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
> + interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
> +
> + clocks = <&gcc GCC_MSS_Q6_BIMC_AXI_CLK>,
> + <&gcc GCC_MSS_CFG_AHB_CLK>,
> + <&gcc GCC_BOOT_ROM_AHB_CLK>,
> + <&xo_board>;
> + clock-names = "iface", "bus", "mem", "xo";
> +
> + resets = <&gcc GCC_MSS_RESTART>;
> + reset-names = "mss_restart";
> +
> + power-domains = <&rpmpd MSM8226_VDDCX>;
> + power-domain-names = "cx";
> +
> + qcom,ext-bhs-reg = <&tcsr_regs_1 0x194>;
> + qcom,halt-regs = <&tcsr_regs_1 0x180 0x200 0x280>;
> +
> + qcom,smem-states = <&modem_smp2p_out 0>;
> + qcom,smem-state-names = "stop";
> +
> + status = "disabled";
> +
> + mba {
> + memory-region = <&mba_region>;
> + };
> +
> + mpss {
> + memory-region = <&mpss_region>;
> + };

Please prefer using memory-region with two items in the node above, as
suggested in the DT schema:

memory-region = <&mba_region>, <&mpss_region>;

Thanks,
Stephan

2023-01-12 23:13:41

by Stephan Gerhold

[permalink] [raw]
Subject: Re: [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226

On Thu, Jan 12, 2023 at 10:26:06PM +0200, Matti Lehtim?ki wrote:
> From: Luca Weiss <[email protected]>
>
> Add support for the external power block headswitch register needed by
> MSM8226 and some other qcom platforms.
>
> Signed-off-by: Luca Weiss <[email protected]>
> Co-developed-by: Matti Lehtim?ki <[email protected]>
> Signed-off-by: Matti Lehtim?ki <[email protected]>
> ---
> drivers/remoteproc/qcom_q6v5_mss.c | 123 +++++++++++++++++++++++++++++
> 1 file changed, 123 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index 745627a36bcf..0dff7e811736 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> [...]
> @@ -2453,13 +2529,60 @@ static const struct rproc_hexagon_res msm8974_mss = {
> .has_mba_logs = false,
> .has_spare_reg = false,
> .has_qaccept_regs = false,
> + .has_ext_bhs_reg = false,
> .has_ext_cntl_regs = false,
> .has_vq6 = false,
> .version = MSS_MSM8974,
> };

If you change MX in the DT schema for MSM8974 like I suggested please
also add a patch here that moves mx from "fallback_proxy_supply" to
"proxy_supply". This is also a fix for my patch back then
(Fixes: 8750cf39239 ("remoteproc: qcom_q6v5_mss: Allow replacing
regulators with power domains")).

>
> +static const struct rproc_hexagon_res msm8226_mss = {
> + .hexagon_mba_image = "mba.b00",
> + .proxy_supply = (struct qcom_mss_reg_res[]) {
> + {
> + .supply = "pll",
> + .uA = 100000,
> + },
> + {
> + .supply = "mx",
> + .uV = 1050000,
> + },
> + {}
> + },
> + .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
> + {
> + .supply = "cx",
> + .uA = 100000,
> + },
> + {}
> + },

I assume you're immediately going to start with CX represented as power
domain on 8226, so you don't need the fallback here for using it as
regulator on old DTBs.

Thanks,
Stephan

2023-01-13 08:54:40

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 4/8] dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226

On 12/01/2023 21:26, Matti Lehtimäki wrote:
> Document the qcom,msm8226-tcsr compatible.
>
> Signed-off-by: Matti Lehtimäki <[email protected]>
> ---

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-01-13 15:30:02

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 4/8] dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226

On Thu, 12 Jan 2023, Matti Lehtimäki wrote:

> Document the qcom,msm8226-tcsr compatible.
>
> Signed-off-by: Matti Lehtimäki <[email protected]>
> ---
> Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
> 1 file changed, 1 insertion(+)

Applied, thanks

--
Lee Jones [李琼斯]