* [PATCH 0/8] Modem support for MSM8226
@ 2023-01-12 20:26 Matti Lehtimäki
2023-01-12 20:26 ` [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Matti Lehtimäki
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Matti Lehtimäki @ 2023-01-12 20:26 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
Bjorn Andersson, devicetree, Konrad Dybcio, linux-kernel,
linux-remoteproc, Stephan Gerhold
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
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 2023-01-12 20:26 [PATCH 0/8] Modem support for MSM8226 Matti Lehtimäki @ 2023-01-12 20:26 ` Matti Lehtimäki 2023-01-12 22:03 ` Stephan Gerhold 2023-01-13 8:40 ` Krzysztof Kozlowski 2023-01-12 20:26 ` [PATCH 2/8] remoteproc: qcom_q6v5_mss: Handle platforms with only single power domain Matti Lehtimäki 2023-01-12 20:26 ` [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 Matti Lehtimäki 2 siblings, 2 replies; 7+ messages in thread From: Matti Lehtimäki @ 2023-01-12 20:26 UTC (permalink / raw) To: linux-arm-msm Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki, Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Stephan Gerhold, linux-remoteproc, devicetree, linux-kernel Adds support for platforms with only single power domain. Adds support for external power block headswitch (BHS) registers Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> --- .../remoteproc/qcom,msm8916-mss-pil.yaml | 41 +++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml index 6e6e69ad9cd7..6a921f2711b2 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml @@ -17,6 +17,7 @@ properties: compatible: oneOf: - enum: + - qcom,msm8226-mss-pil - qcom,msm8909-mss-pil - qcom,msm8916-mss-pil - qcom,msm8953-mss-pil @@ -70,16 +71,17 @@ properties: items: - description: CX proxy power domain (control handed over after startup) - description: MX proxy power domain (control handed over after startup) + (not valid for qcom,msm8226-mss-pil) - description: MSS proxy power domain (control handed over after startup) (only valid for qcom,msm8953-mss-pil) - minItems: 2 + minItems: 1 power-domain-names: items: - const: cx - - const: mx + - const: mx # not valid for qcom,msm8226-mss-pil - const: mss # only valid for qcom,msm8953-mss-pil - minItems: 2 + minItems: 1 pll-supply: description: PLL proxy supply (control handed over after startup) @@ -106,6 +108,15 @@ properties: items: - const: stop + qcom,ext-bhs-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: External power block headswitch (BHS) register + (only valid for qcom,msm8226-mss-pil) + items: + - items: + - description: phandle to external BHS syscon region + - description: offset to the external BHS register + qcom,halt-regs: $ref: /schemas/types.yaml#/definitions/phandle-array description: @@ -205,13 +216,35 @@ allOf: required: - power-domains - power-domain-names - else: + + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8909-mss-pil + - qcom,msm8916-mss-pil + - qcom,msm8974-mss-pil + then: properties: power-domains: maxItems: 2 power-domain-names: maxItems: 2 + - if: + properties: + compatible: + const: qcom,msm8226-mss-pil + then: + properties: + power-domains: + maxItems: 1 + power-domain-names: + maxItems: 1 + required: + - qcom,ext-bhs-reg + - if: properties: compatible: -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 2023-01-12 20:26 ` [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Matti Lehtimäki @ 2023-01-12 22:03 ` Stephan Gerhold 2023-01-13 8:40 ` Krzysztof Kozlowski 1 sibling, 0 replies; 7+ messages in thread From: Stephan Gerhold @ 2023-01-12 22:03 UTC (permalink / raw) To: Matti Lehtimäki Cc: linux-arm-msm, ~postmarketos/upstreaming, phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, linux-remoteproc, devicetree, linux-kernel Hi Matti, On Thu, Jan 12, 2023 at 10:26:04PM +0200, Matti Lehtimäki wrote: > Adds support for platforms with only single power domain. This sentence is a bit misleading. MSM8226 also has both CX and MX power domains. The difference is only the way they are exposed by the firmware and the drivers in Linux. The RPM firmware allows Linux to vote for either - Voltages (exposed as regulators in Linux), or - Performance states/"voltage corners" (exposed as power domains in Linux) For the hardware there is no difference: When using power domains the performance states are simply translated to corresponding voltages within the RPM firmware. All newer platforms have moved towards using power domains for CX and MX, so for consistency it would be preferable to do the same for MSM8226 and MSM8974. Perhaps the RPM firmware even allows using them with voltage corners? In that case you could just add PM8226 L3 to rpmpd and use it as power domain like on other platforms. For some reason I assumed this is the case for MSM8974 2.5 years ago. I have to admit I no longer remember why, and verifying this reliably is probably hard... :/ But the VDD_MX setup looks identical for MSM8974 and MSM8226 to me, so please also apply the same changes for MSM8974. I would also appreciate a small comment in the commit message that the MX voltage rail is still represented as regulator on these platforms. Also, perhaps this should even be a separate patch given that it kind of fixes what I added for MSM8974 back then. > Adds support for external power block headswitch (BHS) registers > > Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> > --- > .../remoteproc/qcom,msm8916-mss-pil.yaml | 41 +++++++++++++++++-- > 1 file changed, 37 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml > index 6e6e69ad9cd7..6a921f2711b2 100644 > --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml > +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml > [...] > @@ -106,6 +108,15 @@ properties: > items: > - const: stop > > + qcom,ext-bhs-reg: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: External power block headswitch (BHS) register > + (only valid for qcom,msm8226-mss-pil) > + items: > + - items: > + - description: phandle to external BHS syscon region > + - description: offset to the external BHS register > + Please disallow this (qcom,ext-bhs-reg: false) for everything except qcom,msm8226-mss-pil. > qcom,halt-regs: > $ref: /schemas/types.yaml#/definitions/phandle-array > description: > @@ -205,13 +216,35 @@ allOf: > required: > - power-domains > - power-domain-names > - else: > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,msm8909-mss-pil > + - qcom,msm8916-mss-pil > + - qcom,msm8974-mss-pil > + then: > properties: > power-domains: > maxItems: 2 > power-domain-names: > maxItems: 2 > You also need to add minItems here now. > + - if: > + properties: > + compatible: > + const: qcom,msm8226-mss-pil > + then: > + properties: > + power-domains: > + maxItems: 1 > + power-domain-names: > + maxItems: 1 > + required: > + - qcom,ext-bhs-reg And here you need to add the mx-supply as required, since you don't have it as power domain. Thanks, Stephan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 2023-01-12 20:26 ` [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Matti Lehtimäki 2023-01-12 22:03 ` Stephan Gerhold @ 2023-01-13 8:40 ` Krzysztof Kozlowski 1 sibling, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2023-01-13 8:40 UTC (permalink / raw) To: Matti Lehtimäki, linux-arm-msm Cc: ~postmarketos/upstreaming, phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Stephan Gerhold, linux-remoteproc, devicetree, linux-kernel On 12/01/2023 21:26, Matti Lehtimäki wrote: > Adds support for platforms with only single power domain. Add https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 > Adds support for external power block headswitch (BHS) registers Add. Full stop. > > Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> > --- > .../remoteproc/qcom,msm8916-mss-pil.yaml | 41 +++++++++++++++++-- > 1 file changed, 37 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml > index 6e6e69ad9cd7..6a921f2711b2 100644 > --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml > +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml > @@ -17,6 +17,7 @@ properties: > compatible: > oneOf: > - enum: > + - qcom,msm8226-mss-pil > - qcom,msm8909-mss-pil > - qcom,msm8916-mss-pil > - qcom,msm8953-mss-pil > @@ -70,16 +71,17 @@ properties: > items: > - description: CX proxy power domain (control handed over after startup) > - description: MX proxy power domain (control handed over after startup) > + (not valid for qcom,msm8226-mss-pil) > - description: MSS proxy power domain (control handed over after startup) > (only valid for qcom,msm8953-mss-pil) > - minItems: 2 > + minItems: 1 > > power-domain-names: > items: > - const: cx > - - const: mx > + - const: mx # not valid for qcom,msm8226-mss-pil > - const: mss # only valid for qcom,msm8953-mss-pil > - minItems: 2 > + minItems: 1 > > pll-supply: > description: PLL proxy supply (control handed over after startup) > @@ -106,6 +108,15 @@ properties: > items: > - const: stop > > + qcom,ext-bhs-reg: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: External power block headswitch (BHS) register > + (only valid for qcom,msm8226-mss-pil) > + items: > + - items: > + - description: phandle to external BHS syscon region > + - description: offset to the external BHS register > + > qcom,halt-regs: > $ref: /schemas/types.yaml#/definitions/phandle-array > description: > @@ -205,13 +216,35 @@ allOf: in this block: qcom,ext-bhs-reg: false > required: > - power-domains > - power-domain-names > - else: > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,msm8909-mss-pil > + - qcom,msm8916-mss-pil > + - qcom,msm8974-mss-pil > + then: > properties: > power-domains: > maxItems: 2 > power-domain-names: > maxItems: 2 qcom,ext-bhs-reg: false > > + - if: > + properties: > + compatible: > + const: qcom,msm8226-mss-pil > + then: > + properties: > + power-domains: > + maxItems: 1 > + power-domain-names: > + maxItems: 1 > + required: > + - qcom,ext-bhs-reg > + > - if: > properties: > compatible: Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/8] remoteproc: qcom_q6v5_mss: Handle platforms with only single power domain 2023-01-12 20:26 [PATCH 0/8] Modem support for MSM8226 Matti Lehtimäki 2023-01-12 20:26 ` [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Matti Lehtimäki @ 2023-01-12 20:26 ` Matti Lehtimäki 2023-01-12 20:26 ` [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 Matti Lehtimäki 2 siblings, 0 replies; 7+ messages in thread From: Matti Lehtimäki @ 2023-01-12 20:26 UTC (permalink / raw) To: linux-arm-msm Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Matti Lehtimäki, Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier, linux-remoteproc, linux-kernel From: Luca Weiss <luca@z3ntu.xyz> For example MSM8226 has only one power domain (cx) which is attached internally in power domain and cannot be attached in this driver. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> --- drivers/remoteproc/qcom_q6v5_mss.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 2f4027664a0e..745627a36bcf 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -1820,6 +1820,13 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs, if (!pd_names) return 0; + /* Handle single power domain */ + if (dev->pm_domain) { + devs[0] = dev; + pm_runtime_enable(dev); + return 1; + } + while (pd_names[num_pds]) num_pds++; @@ -1843,8 +1850,15 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs, static void q6v5_pds_detach(struct q6v5 *qproc, struct device **pds, size_t pd_count) { + struct device *dev = qproc->dev; int i; + /* Handle single power domain */ + if (dev->pm_domain && pd_count) { + pm_runtime_disable(dev); + return; + } + for (i = 0; i < pd_count; i++) dev_pm_domain_detach(pds[i], false); } -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 2023-01-12 20:26 [PATCH 0/8] Modem support for MSM8226 Matti Lehtimäki 2023-01-12 20:26 ` [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Matti Lehtimäki 2023-01-12 20:26 ` [PATCH 2/8] remoteproc: qcom_q6v5_mss: Handle platforms with only single power domain Matti Lehtimäki @ 2023-01-12 20:26 ` Matti Lehtimäki 2023-01-12 22:14 ` Stephan Gerhold 2 siblings, 1 reply; 7+ messages in thread From: Matti Lehtimäki @ 2023-01-12 20:26 UTC (permalink / raw) To: linux-arm-msm Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Matti Lehtimäki, Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier, linux-remoteproc, linux-kernel From: Luca Weiss <luca@z3ntu.xyz> Add support for the external power block headswitch register needed by MSM8226 and some other qcom platforms. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> --- 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 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 2023-01-12 20:26 ` [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 Matti Lehtimäki @ 2023-01-12 22:14 ` Stephan Gerhold 0 siblings, 0 replies; 7+ messages in thread From: Stephan Gerhold @ 2023-01-12 22:14 UTC (permalink / raw) To: Matti Lehtimäki Cc: linux-arm-msm, ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier, linux-remoteproc, linux-kernel On Thu, Jan 12, 2023 at 10:26:06PM +0200, Matti Lehtimäki wrote: > From: Luca Weiss <luca@z3ntu.xyz> > > Add support for the external power block headswitch register needed by > MSM8226 and some other qcom platforms. > > Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> > Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> > --- > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-01-13 8:41 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-01-12 20:26 [PATCH 0/8] Modem support for MSM8226 Matti Lehtimäki 2023-01-12 20:26 ` [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Matti Lehtimäki 2023-01-12 22:03 ` Stephan Gerhold 2023-01-13 8:40 ` Krzysztof Kozlowski 2023-01-12 20:26 ` [PATCH 2/8] remoteproc: qcom_q6v5_mss: Handle platforms with only single power domain Matti Lehtimäki 2023-01-12 20:26 ` [PATCH 3/8] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 Matti Lehtimäki 2023-01-12 22:14 ` Stephan Gerhold
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox