* [PATCH v3 01/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Support platforms with one power domain
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-27 22:45 ` [PATCH v3 02/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Luca Weiss
` (11 subsequent siblings)
12 siblings, 0 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss, Krzysztof Kozlowski
From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Add support for platforms such as MSM8974 which have the mx voltage rail
exposed as regulator and only cx voltage rail as power domain.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
.../bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 34 +++++++++++++++++++---
1 file changed, 30 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 588b010b2a9e53946a615219fc1468bc700deef8..c81364daa34b545e99261bf1f94ae2ad28d48ea7 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
@@ -70,16 +70,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,msm8974-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,msm8974-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)
@@ -207,13 +208,38 @@ allOf:
required:
- power-domains
- power-domain-names
- else:
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8909-mss-pil
+ - qcom,msm8916-mss-pil
+ then:
properties:
power-domains:
+ minItems: 2
maxItems: 2
power-domain-names:
+ minItems: 2
maxItems: 2
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8974-mss-pil
+ then:
+ properties:
+ power-domains:
+ maxItems: 1
+ power-domain-names:
+ maxItems: 1
+ required:
+ - mx-supply
+
- if:
properties:
compatible:
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH v3 02/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
2025-01-27 22:45 ` [PATCH v3 01/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Support platforms with one power domain Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-27 22:45 ` [PATCH v3 03/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8926 Luca Weiss
` (10 subsequent siblings)
12 siblings, 0 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss, Krzysztof Kozlowski
From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Add support for external power block headswitch (BHS) registers.
Similarly to MSM8974 also MSM8226 has the mx voltage rail exposed as
regulator and only cx voltage rail as power domain.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
.../bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 26 ++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
index c81364daa34b545e99261bf1f94ae2ad28d48ea7..0a3e39c55ec3dcfc9a4d4ac28f5debd77dc49b99 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,7 +71,7 @@ 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,msm8974-mss-pil)
+ (not valid for qcom,msm8226-mss-pil or qcom,msm8974-mss-pil)
- description: MSS proxy power domain (control handed over after startup)
(only valid for qcom,msm8953-mss-pil)
minItems: 1
@@ -78,7 +79,7 @@ properties:
power-domain-names:
items:
- const: cx
- - const: mx # not valid for qcom,msm8974-mss-pil
+ - const: mx # not valid for qcom,msm8226-mss-pil or qcom,msm8974-mss-pil
- const: mss # only valid for qcom,msm8953-mss-pil
minItems: 1
@@ -107,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:
@@ -230,6 +240,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,msm8226-mss-pil
- qcom,msm8974-mss-pil
then:
properties:
@@ -240,6 +251,17 @@ allOf:
required:
- mx-supply
+ - if:
+ properties:
+ compatible:
+ const: qcom,msm8226-mss-pil
+ then:
+ required:
+ - qcom,ext-bhs-reg
+ else:
+ properties:
+ qcom,ext-bhs-reg: false
+
- if:
properties:
compatible:
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH v3 03/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8926
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
2025-01-27 22:45 ` [PATCH v3 01/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Support platforms with one power domain Luca Weiss
2025-01-27 22:45 ` [PATCH v3 02/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8226 Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 7:39 ` Krzysztof Kozlowski
2025-01-27 22:45 ` [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain Luca Weiss
` (9 subsequent siblings)
12 siblings, 1 reply; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
Compared to MSM8226 the LTE-capable MSM8926 requires mss-supply and
doesn't require qcom,ext-bhs-reg.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
.../devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
index 0a3e39c55ec3dcfc9a4d4ac28f5debd77dc49b99..c179b560572b2c1aa85521e4bd01d1857530f6c4 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
@@ -20,6 +20,7 @@ properties:
- qcom,msm8226-mss-pil
- qcom,msm8909-mss-pil
- qcom,msm8916-mss-pil
+ - qcom,msm8926-mss-pil
- qcom,msm8953-mss-pil
- qcom,msm8974-mss-pil
@@ -71,7 +72,8 @@ 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 or qcom,msm8974-mss-pil)
+ (not valid for qcom,msm8226-mss-pil, qcom,msm8926-mss-pil
+ and qcom,msm8974-mss-pil)
- description: MSS proxy power domain (control handed over after startup)
(only valid for qcom,msm8953-mss-pil)
minItems: 1
@@ -79,7 +81,7 @@ properties:
power-domain-names:
items:
- const: cx
- - const: mx # not valid for qcom,msm8226-mss-pil or qcom,msm8974-mss-pil
+ - const: mx # not valid for qcom,msm8226-mss-pil, qcom-msm8926-mss-pil and qcom,msm8974-mss-pil
- const: mss # only valid for qcom,msm8953-mss-pil
minItems: 1
@@ -241,6 +243,7 @@ allOf:
contains:
enum:
- qcom,msm8226-mss-pil
+ - qcom,msm8926-mss-pil
- qcom,msm8974-mss-pil
then:
properties:
@@ -265,7 +268,10 @@ allOf:
- if:
properties:
compatible:
- const: qcom,msm8974-mss-pil
+ contains:
+ enum:
+ - qcom,msm8926-mss-pil
+ - qcom,msm8974-mss-pil
then:
required:
- mss-supply
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 03/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8926
2025-01-27 22:45 ` [PATCH v3 03/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8926 Luca Weiss
@ 2025-01-28 7:39 ` Krzysztof Kozlowski
0 siblings, 0 replies; 31+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-28 7:39 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:35PM +0100, Luca Weiss wrote:
> Compared to MSM8226 the LTE-capable MSM8926 requires mss-supply and
> doesn't require qcom,ext-bhs-reg.
>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
> .../devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (2 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 03/13] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8926 Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 7:33 ` Stephan Gerhold
2025-01-28 10:45 ` Konrad Dybcio
2025-01-27 22:45 ` [PATCH v3 05/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 Luca Weiss
` (8 subsequent siblings)
12 siblings, 2 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
For example MSM8974 has mx voltage rail exposed as regulator and only cx
voltage rail is exposed as power domain. This power domain (cx) is
attached internally in power domain and cannot be attached in this driver.
Fixes: 8750cf392394 ("remoteproc: qcom_q6v5_mss: Allow replacing regulators with power domains")
Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
drivers/remoteproc/qcom_q6v5_mss.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index e78bd986dc3f256effce4470222c0a5faeea86ec..0e1b0934ceedd13d5790b798afc95d68a8314c75 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1831,6 +1831,13 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs,
while (pd_names[num_pds])
num_pds++;
+ /* Handle single power domain */
+ if (num_pds == 1 && dev->pm_domain) {
+ devs[0] = dev;
+ pm_runtime_enable(dev);
+ return 1;
+ }
+
for (i = 0; i < num_pds; i++) {
devs[i] = dev_pm_domain_attach_by_name(dev, pd_names[i]);
if (IS_ERR_OR_NULL(devs[i])) {
@@ -1851,8 +1858,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 (pd_count == 1 && dev->pm_domain) {
+ pm_runtime_disable(dev);
+ return;
+ }
+
for (i = 0; i < pd_count; i++)
dev_pm_domain_detach(pds[i], false);
}
@@ -2449,13 +2463,13 @@ static const struct rproc_hexagon_res msm8974_mss = {
.supply = "pll",
.uA = 100000,
},
- {}
- },
- .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "mx",
.uV = 1050000,
},
+ {}
+ },
+ .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "cx",
.uA = 100000,
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain
2025-01-27 22:45 ` [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain Luca Weiss
@ 2025-01-28 7:33 ` Stephan Gerhold
2025-01-28 10:45 ` Konrad Dybcio
1 sibling, 0 replies; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 7:33 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:36PM +0100, Luca Weiss wrote:
> For example MSM8974 has mx voltage rail exposed as regulator and only cx
> voltage rail is exposed as power domain. This power domain (cx) is
> attached internally in power domain and cannot be attached in this driver.
>
> Fixes: 8750cf392394 ("remoteproc: qcom_q6v5_mss: Allow replacing regulators with power domains")
> Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> drivers/remoteproc/qcom_q6v5_mss.c | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index e78bd986dc3f256effce4470222c0a5faeea86ec..0e1b0934ceedd13d5790b798afc95d68a8314c75 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -1831,6 +1831,13 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs,
> while (pd_names[num_pds])
> num_pds++;
>
> + /* Handle single power domain */
> + if (num_pds == 1 && dev->pm_domain) {
> + devs[0] = dev;
> + pm_runtime_enable(dev);
> + return 1;
> + }
> +
> for (i = 0; i < num_pds; i++) {
> devs[i] = dev_pm_domain_attach_by_name(dev, pd_names[i]);
> if (IS_ERR_OR_NULL(devs[i])) {
> @@ -1851,8 +1858,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 (pd_count == 1 && dev->pm_domain) {
> + pm_runtime_disable(dev);
> + return;
> + }
> +
> for (i = 0; i < pd_count; i++)
> dev_pm_domain_detach(pds[i], false);
> }
> @@ -2449,13 +2463,13 @@ static const struct rproc_hexagon_res msm8974_mss = {
> .supply = "pll",
> .uA = 100000,
> },
> - {}
> - },
> - .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
> {
> .supply = "mx",
> .uV = 1050000,
> },
> + {}
> + },
> + .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
> {
> .supply = "cx",
> .uA = 100000,
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain
2025-01-27 22:45 ` [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain Luca Weiss
2025-01-28 7:33 ` Stephan Gerhold
@ 2025-01-28 10:45 ` Konrad Dybcio
2025-01-28 10:55 ` Stephan Gerhold
1 sibling, 1 reply; 31+ messages in thread
From: Konrad Dybcio @ 2025-01-28 10:45 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold, Konrad Dybcio,
Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On 27.01.2025 11:45 PM, Luca Weiss wrote:
> For example MSM8974 has mx voltage rail exposed as regulator and only cx
> voltage rail is exposed as power domain. This power domain (cx) is
> attached internally in power domain and cannot be attached in this driver.
>
> Fixes: 8750cf392394 ("remoteproc: qcom_q6v5_mss: Allow replacing regulators with power domains")
> Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
> drivers/remoteproc/qcom_q6v5_mss.c | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index e78bd986dc3f256effce4470222c0a5faeea86ec..0e1b0934ceedd13d5790b798afc95d68a8314c75 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -1831,6 +1831,13 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs,
> while (pd_names[num_pds])
> num_pds++;
>
> + /* Handle single power domain */
> + if (num_pds == 1 && dev->pm_domain) {
> + devs[0] = dev;
> + pm_runtime_enable(dev);
This call can fail
Konrad
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain
2025-01-28 10:45 ` Konrad Dybcio
@ 2025-01-28 10:55 ` Stephan Gerhold
2025-01-28 11:15 ` Konrad Dybcio
0 siblings, 1 reply; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 10:55 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold, Konrad Dybcio,
Matti Lehtimäki, linux-arm-msm, linux-remoteproc, devicetree,
linux-kernel
On Tue, Jan 28, 2025 at 11:45:51AM +0100, Konrad Dybcio wrote:
> On 27.01.2025 11:45 PM, Luca Weiss wrote:
> > For example MSM8974 has mx voltage rail exposed as regulator and only cx
> > voltage rail is exposed as power domain. This power domain (cx) is
> > attached internally in power domain and cannot be attached in this driver.
> >
> > Fixes: 8750cf392394 ("remoteproc: qcom_q6v5_mss: Allow replacing regulators with power domains")
> > Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> > Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> > Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> > ---
> > drivers/remoteproc/qcom_q6v5_mss.c | 20 +++++++++++++++++---
> > 1 file changed, 17 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> > index e78bd986dc3f256effce4470222c0a5faeea86ec..0e1b0934ceedd13d5790b798afc95d68a8314c75 100644
> > --- a/drivers/remoteproc/qcom_q6v5_mss.c
> > +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> > @@ -1831,6 +1831,13 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs,
> > while (pd_names[num_pds])
> > num_pds++;
> >
> > + /* Handle single power domain */
> > + if (num_pds == 1 && dev->pm_domain) {
> > + devs[0] = dev;
> > + pm_runtime_enable(dev);
>
> This call can fail
>
It returns void though? :D
void pm_runtime_enable(struct device *dev);
Stephan
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain
2025-01-28 10:55 ` Stephan Gerhold
@ 2025-01-28 11:15 ` Konrad Dybcio
0 siblings, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2025-01-28 11:15 UTC (permalink / raw)
To: Stephan Gerhold, Konrad Dybcio
Cc: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold, Konrad Dybcio,
Matti Lehtimäki, linux-arm-msm, linux-remoteproc, devicetree,
linux-kernel
On 28.01.2025 11:55 AM, Stephan Gerhold wrote:
> On Tue, Jan 28, 2025 at 11:45:51AM +0100, Konrad Dybcio wrote:
>> On 27.01.2025 11:45 PM, Luca Weiss wrote:
>>> For example MSM8974 has mx voltage rail exposed as regulator and only cx
>>> voltage rail is exposed as power domain. This power domain (cx) is
>>> attached internally in power domain and cannot be attached in this driver.
>>>
>>> Fixes: 8750cf392394 ("remoteproc: qcom_q6v5_mss: Allow replacing regulators with power domains")
>>> Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
>>> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
>>> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
>>> ---
>>> drivers/remoteproc/qcom_q6v5_mss.c | 20 +++++++++++++++++---
>>> 1 file changed, 17 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
>>> index e78bd986dc3f256effce4470222c0a5faeea86ec..0e1b0934ceedd13d5790b798afc95d68a8314c75 100644
>>> --- a/drivers/remoteproc/qcom_q6v5_mss.c
>>> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
>>> @@ -1831,6 +1831,13 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs,
>>> while (pd_names[num_pds])
>>> num_pds++;
>>>
>>> + /* Handle single power domain */
>>> + if (num_pds == 1 && dev->pm_domain) {
>>> + devs[0] = dev;
>>> + pm_runtime_enable(dev);
>>
>> This call can fail
>>
>
> It returns void though? :D
>
> void pm_runtime_enable(struct device *dev);
*wipes glasses very hard*
oh..
Konrad
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 05/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (3 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms with one power domain Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 7:50 ` Stephan Gerhold
2025-01-27 22:45 ` [PATCH v3 06/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8926 Luca Weiss
` (7 subsequent siblings)
12 siblings, 1 reply; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
Add support for the external power block headswitch register needed by
MSM8226 and some other qcom platforms.
Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
drivers/remoteproc/qcom_q6v5_mss.c | 113 +++++++++++++++++++++++++++++++++++++
1 file changed, 113 insertions(+)
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 0e1b0934ceedd13d5790b798afc95d68a8314c75..32f35fe89416f167fe49be7ca02a24af842e0073 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -134,6 +134,11 @@
#define BOOT_FSM_TIMEOUT 10000
#define BHS_CHECK_MAX_LOOPS 200
+/* 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;
@@ -161,6 +166,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;
};
@@ -180,6 +186,7 @@ struct q6v5 {
u32 halt_nc;
u32 halt_vq6;
u32 conn_box;
+ u32 ext_bhs;
u32 qaccept_mdm;
u32 qaccept_cx;
@@ -237,6 +244,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;
u64 mpss_perm;
@@ -246,6 +254,7 @@ struct q6v5 {
};
enum {
+ MSS_MSM8226,
MSS_MSM8909,
MSS_MSM8916,
MSS_MSM8953,
@@ -1750,6 +1759,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",
@@ -1871,6 +1897,34 @@ 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_set_bits(qproc->conn_map, qproc->ext_bhs, EXTERNAL_BHS_ON);
+
+ 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_clear_bits(qproc->conn_map, qproc->ext_bhs, EXTERNAL_BHS_ON);
+}
+
static int q6v5_init_reset(struct q6v5 *qproc)
{
qproc->mss_restart = devm_reset_control_get_exclusive(qproc->dev,
@@ -2021,6 +2075,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;
@@ -2079,6 +2134,12 @@ 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)
+ goto detach_proxy_pds;
+ }
+
qproc->has_alt_reset = desc->has_alt_reset;
ret = q6v5_init_reset(qproc);
if (ret)
@@ -2143,6 +2204,9 @@ static void 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);
}
@@ -2174,6 +2238,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,
@@ -2202,6 +2267,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,
@@ -2233,6 +2299,7 @@ static const struct rproc_hexagon_res sdm660_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_SDM660,
@@ -2268,6 +2335,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,
@@ -2299,6 +2367,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,
@@ -2337,6 +2406,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,
@@ -2371,6 +2441,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,
@@ -2416,6 +2487,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,
@@ -2451,6 +2523,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,
@@ -2504,13 +2577,53 @@ 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,
+ },
+ {}
+ },
+ .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.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 05/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226
2025-01-27 22:45 ` [PATCH v3 05/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 Luca Weiss
@ 2025-01-28 7:50 ` Stephan Gerhold
0 siblings, 0 replies; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 7:50 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:37PM +0100, Luca Weiss wrote:
> Add support for the external power block headswitch register needed by
> MSM8226 and some other qcom platforms.
>
> Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
> drivers/remoteproc/qcom_q6v5_mss.c | 113 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 113 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index 0e1b0934ceedd13d5790b798afc95d68a8314c75..32f35fe89416f167fe49be7ca02a24af842e0073 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -134,6 +134,11 @@
> #define BOOT_FSM_TIMEOUT 10000
> #define BHS_CHECK_MAX_LOOPS 200
>
> +/* 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;
> @@ -161,6 +166,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;
> };
> @@ -180,6 +186,7 @@ struct q6v5 {
> u32 halt_nc;
> u32 halt_vq6;
> u32 conn_box;
> + u32 ext_bhs;
>
> u32 qaccept_mdm;
> u32 qaccept_cx;
> @@ -237,6 +244,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;
> u64 mpss_perm;
> @@ -246,6 +254,7 @@ struct q6v5 {
> };
>
> enum {
> + MSS_MSM8226,
> MSS_MSM8909,
> MSS_MSM8916,
> MSS_MSM8953,
> @@ -1750,6 +1759,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",
> @@ -1871,6 +1897,34 @@ 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_set_bits(qproc->conn_map, qproc->ext_bhs, EXTERNAL_BHS_ON);
> +
> + 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_clear_bits(qproc->conn_map, qproc->ext_bhs, EXTERNAL_BHS_ON);
> +}
> +
> static int q6v5_init_reset(struct q6v5 *qproc)
> {
> qproc->mss_restart = devm_reset_control_get_exclusive(qproc->dev,
> @@ -2021,6 +2075,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;
> @@ -2079,6 +2134,12 @@ 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)
> + goto detach_proxy_pds;
> + }
> +
> qproc->has_alt_reset = desc->has_alt_reset;
> ret = q6v5_init_reset(qproc);
> if (ret)
> @@ -2143,6 +2204,9 @@ static void 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);
Sorry, just seeing this now: I think this is like the "active_supply"
you just added for MSM8926. It should get enabled when the modem is
started, and disabled when it gets stopped.
The calls to q6v5_external_bhs_enable() / q6v5_external_bhs_disable()
should be next to
ret = q6v5_regulator_enable(qproc, qproc->active_regs,
qproc->active_reg_count);
and
q6v5_regulator_disable(qproc, qproc->active_regs,
qproc->active_reg_count);
, instead of being called in the driver probe()/remove() function.
Downstream also has this next to the regulator_enable()/disable() [1]
(drv->vreg = mss-supply).
Thanks,
Stephan
[1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BF.1.1.3-02310-8x26.0/arch/arm/mach-msm/pil-msa.c#L71-109
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 06/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8926
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (4 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 05/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8226 Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 7:55 ` Stephan Gerhold
2025-01-27 22:45 ` [PATCH v3 07/13] ARM: dts: qcom: msm8226: Add node for TCSR halt regs Luca Weiss
` (6 subsequent siblings)
12 siblings, 1 reply; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
While MSM8926 being 'just' an LTE-capable variant of MSM8226 it appears
the modem setup has changed significantly, by requiring mss-supply and
not using the ext-bhs-reg.
Add a new compatible and new struct to support that.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
drivers/remoteproc/qcom_q6v5_mss.c | 48 ++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 32f35fe89416f167fe49be7ca02a24af842e0073..cd7ea7bb345f558636f9414c43460b29b3be6f5c 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -257,6 +257,7 @@ enum {
MSS_MSM8226,
MSS_MSM8909,
MSS_MSM8916,
+ MSS_MSM8926,
MSS_MSM8953,
MSS_MSM8974,
MSS_MSM8996,
@@ -2621,11 +2622,58 @@ static const struct rproc_hexagon_res msm8226_mss = {
.version = MSS_MSM8226,
};
+static const struct rproc_hexagon_res msm8926_mss = {
+ .hexagon_mba_image = "mba.b00",
+ .proxy_supply = (struct qcom_mss_reg_res[]) {
+ {
+ .supply = "pll",
+ .uA = 100000,
+ },
+ {
+ .supply = "mx",
+ .uV = 1050000,
+ },
+ {}
+ },
+ .active_supply = (struct qcom_mss_reg_res[]) {
+ {
+ .supply = "mss",
+ .uV = 1050000,
+ .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 = false,
+ .has_ext_cntl_regs = false,
+ .has_vq6 = false,
+ .version = MSS_MSM8926,
+};
+
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,msm8926-mss-pil", .data = &msm8926_mss},
{ .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss},
{ .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss},
{ .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss},
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 06/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8926
2025-01-27 22:45 ` [PATCH v3 06/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8926 Luca Weiss
@ 2025-01-28 7:55 ` Stephan Gerhold
0 siblings, 0 replies; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 7:55 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:38PM +0100, Luca Weiss wrote:
> While MSM8926 being 'just' an LTE-capable variant of MSM8226 it appears
> the modem setup has changed significantly, by requiring mss-supply and
> not using the ext-bhs-reg.
>
> Add a new compatible and new struct to support that.
>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
I wonder if you could reuse &msm8974_mss here. Anyway, I suppose it's
better to not allow the fallback_proxy_supply that MSM8974 has. I think
it's fine as-is. :-)
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> drivers/remoteproc/qcom_q6v5_mss.c | 48 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index 32f35fe89416f167fe49be7ca02a24af842e0073..cd7ea7bb345f558636f9414c43460b29b3be6f5c 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -257,6 +257,7 @@ enum {
> MSS_MSM8226,
> MSS_MSM8909,
> MSS_MSM8916,
> + MSS_MSM8926,
> MSS_MSM8953,
> MSS_MSM8974,
> MSS_MSM8996,
> @@ -2621,11 +2622,58 @@ static const struct rproc_hexagon_res msm8226_mss = {
> .version = MSS_MSM8226,
> };
>
> +static const struct rproc_hexagon_res msm8926_mss = {
> + .hexagon_mba_image = "mba.b00",
> + .proxy_supply = (struct qcom_mss_reg_res[]) {
> + {
> + .supply = "pll",
> + .uA = 100000,
> + },
> + {
> + .supply = "mx",
> + .uV = 1050000,
> + },
> + {}
> + },
> + .active_supply = (struct qcom_mss_reg_res[]) {
> + {
> + .supply = "mss",
> + .uV = 1050000,
> + .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 = false,
> + .has_ext_cntl_regs = false,
> + .has_vq6 = false,
> + .version = MSS_MSM8926,
> +};
> +
> 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,msm8926-mss-pil", .data = &msm8926_mss},
> { .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss},
> { .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss},
> { .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss},
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 07/13] ARM: dts: qcom: msm8226: Add node for TCSR halt regs
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (5 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 06/13] remoteproc: qcom_q6v5_mss: Add modem support on MSM8926 Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 11:11 ` Konrad Dybcio
2025-01-27 22:45 ` [PATCH v3 08/13] ARM: dts: qcom: msm8226: Add smsm node Luca Weiss
` (5 subsequent siblings)
12 siblings, 1 reply; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Add a syscon device node for the TCSR halt regs needed by
modem and other remoteprocs.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
index 64c8ac94f352e46dc4a18f902d2c30114ecd91d2..caaeeadf289f78d29403312738bbb714eaad74d2 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
@@ -851,6 +851,11 @@ tcsr_mutex: hwlock@fd484000 {
#hwlock-cells = <1>;
};
+ tcsr_regs_1: syscon@fd485000 {
+ compatible = "qcom,tcsr-msm8226", "syscon";
+ reg = <0xfd485000 0x1000>;
+ };
+
tlmm: pinctrl@fd510000 {
compatible = "qcom,msm8226-pinctrl";
reg = <0xfd510000 0x4000>;
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 07/13] ARM: dts: qcom: msm8226: Add node for TCSR halt regs
2025-01-27 22:45 ` [PATCH v3 07/13] ARM: dts: qcom: msm8226: Add node for TCSR halt regs Luca Weiss
@ 2025-01-28 11:11 ` Konrad Dybcio
0 siblings, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2025-01-28 11:11 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold, Konrad Dybcio,
Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On 27.01.2025 11:45 PM, Luca Weiss wrote:
> From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
>
> Add a syscon device node for the TCSR halt regs needed by
> modem and other remoteprocs.
>
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 08/13] ARM: dts: qcom: msm8226: Add smsm node
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (6 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 07/13] ARM: dts: qcom: msm8226: Add node for TCSR halt regs Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-27 22:45 ` [PATCH v3 09/13] ARM: dts: qcom: msm8226: Add modem remoteproc node Luca Weiss
` (4 subsequent siblings)
12 siblings, 0 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss, Stephan Gerhold
From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Add smsm node for remoteproc cores.
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Co-developed-by: Luca Weiss <luca@lucaweiss.eu>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 34 ++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
index caaeeadf289f78d29403312738bbb714eaad74d2..7e0838af6c2d0dc26e0082471b70578bc627491d 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
@@ -253,6 +253,40 @@ adsp_smp2p_in: slave-kernel {
};
};
+ smsm {
+ compatible = "qcom,smsm";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mboxes = <0>, <&apcs 13>, <&apcs 9>, <&apcs 19>;
+
+ apps_smsm: apps@0 {
+ reg = <0>;
+ #qcom,smem-state-cells = <1>;
+ };
+
+ modem_smsm: modem@1 {
+ reg = <1>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ adsp_smsm: adsp@2 {
+ reg = <2>;
+ interrupts = <GIC_SPI 157 IRQ_TYPE_EDGE_RISING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ wcnss_smsm: wcnss@7 {
+ reg = <7>;
+ interrupts = <GIC_SPI 144 IRQ_TYPE_EDGE_RISING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
soc: soc {
compatible = "simple-bus";
#address-cells = <1>;
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH v3 09/13] ARM: dts: qcom: msm8226: Add modem remoteproc node
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (7 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 08/13] ARM: dts: qcom: msm8226: Add smsm node Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 8:05 ` Stephan Gerhold
2025-01-27 22:45 ` [PATCH v3 10/13] ARM: dts: qcom: msm8226: Add BAM DMUX Ethernet/IP device Luca Weiss
` (3 subsequent siblings)
12 siblings, 1 reply; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
Add a node for the modem remoteproc found on MSM8226.
Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
.../dts/qcom/qcom-apq8026-samsung-milletwifi.dts | 2 +
.../qcom/qcom-msm8226-samsung-matisse-common.dtsi | 6 +-
arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 82 ++++++++++++++++++++++
arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 2 +
4 files changed, 90 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
index 7d519156d91d156d801c477711751aba66cc3224..a8543ca7b5569549418683b6be320784eba1768c 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
@@ -12,6 +12,8 @@
#include "pm8226.dtsi"
/delete-node/ &adsp_region;
+/delete-node/ &mba_region;
+/delete-node/ &mpss_region;
/delete-node/ &smem_region;
/ {
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
index a15a44fc0181bf23e7531ecdc8978505ca48189d..fbd568c7d6b7415d240aa1a2329d07cf9135274c 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
@@ -8,6 +8,8 @@
#include "pm8226.dtsi"
/delete-node/ &adsp_region;
+/delete-node/ &mba_region;
+/delete-node/ &mpss_region;
/delete-node/ &smem_region;
/ {
@@ -145,12 +147,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;
};
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
index 7e0838af6c2d0dc26e0082471b70578bc627491d..55bb070dcf489064f5b14902da1acd2762232ef9 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
@@ -213,6 +213,18 @@ smem_region: smem@3000000 {
no-map;
};
+ mpss_region: mpss@8000000 {
+ reg = <0x08000000 0x5100000>;
+ no-map;
+ status = "disabled";
+ };
+
+ mba_region: mba@d100000 {
+ reg = <0x0d100000 0x100000>;
+ no-map;
+ status = "disabled";
+ };
+
adsp_region: adsp@dc00000 {
reg = <0x0dc00000 0x1900000>;
no-map;
@@ -253,6 +265,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>;
+
+ mboxes = <&apcs 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>;
@@ -879,6 +916,51 @@ spmi_bus: spmi@fc4cf000 {
#interrupt-cells = <4>;
};
+ 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";
+
+ memory-region = <&mba_region>, <&mpss_region>;
+
+ status = "disabled";
+
+ smd-edge {
+ interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&apcs 12>;
+ qcom,smd-edge = <0>;
+
+ label = "modem";
+ };
+ };
+
tcsr_mutex: hwlock@fd484000 {
compatible = "qcom,msm8226-tcsr-mutex", "qcom,tcsr-mutex";
reg = <0xfd484000 0x1000>;
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
index 3037344eb24055071cc77c9cfce0f1d0f95de921..18396623a91dd4bf4b66f01c1d983c391722f3b5 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
@@ -9,6 +9,8 @@
#include "pm8226.dtsi"
/delete-node/ &adsp_region;
+/delete-node/ &mba_region;
+/delete-node/ &mpss_region;
/delete-node/ &smem_region;
/ {
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 09/13] ARM: dts: qcom: msm8226: Add modem remoteproc node
2025-01-27 22:45 ` [PATCH v3 09/13] ARM: dts: qcom: msm8226: Add modem remoteproc node Luca Weiss
@ 2025-01-28 8:05 ` Stephan Gerhold
0 siblings, 0 replies; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 8:05 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:41PM +0100, Luca Weiss wrote:
> Add a node for the modem remoteproc found on MSM8226.
>
> Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> .../dts/qcom/qcom-apq8026-samsung-milletwifi.dts | 2 +
> .../qcom/qcom-msm8226-samsung-matisse-common.dtsi | 6 +-
> arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 82 ++++++++++++++++++++++
> arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 2 +
> 4 files changed, 90 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
> index 7d519156d91d156d801c477711751aba66cc3224..a8543ca7b5569549418683b6be320784eba1768c 100644
> --- a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
> @@ -12,6 +12,8 @@
> #include "pm8226.dtsi"
>
> /delete-node/ &adsp_region;
> +/delete-node/ &mba_region;
> +/delete-node/ &mpss_region;
> /delete-node/ &smem_region;
>
> / {
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> index a15a44fc0181bf23e7531ecdc8978505ca48189d..fbd568c7d6b7415d240aa1a2329d07cf9135274c 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> @@ -8,6 +8,8 @@
> #include "pm8226.dtsi"
>
> /delete-node/ &adsp_region;
> +/delete-node/ &mba_region;
> +/delete-node/ &mpss_region;
> /delete-node/ &smem_region;
>
> / {
> @@ -145,12 +147,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;
> };
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
> index 7e0838af6c2d0dc26e0082471b70578bc627491d..55bb070dcf489064f5b14902da1acd2762232ef9 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
> @@ -213,6 +213,18 @@ smem_region: smem@3000000 {
> no-map;
> };
>
> + mpss_region: mpss@8000000 {
> + reg = <0x08000000 0x5100000>;
> + no-map;
> + status = "disabled";
> + };
> +
> + mba_region: mba@d100000 {
> + reg = <0x0d100000 0x100000>;
> + no-map;
> + status = "disabled";
> + };
> +
> adsp_region: adsp@dc00000 {
> reg = <0x0dc00000 0x1900000>;
> no-map;
> @@ -253,6 +265,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>;
> +
> + mboxes = <&apcs 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>;
> @@ -879,6 +916,51 @@ spmi_bus: spmi@fc4cf000 {
> #interrupt-cells = <4>;
> };
>
> + 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";
> +
> + memory-region = <&mba_region>, <&mpss_region>;
> +
> + status = "disabled";
> +
> + smd-edge {
> + interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
> +
> + mboxes = <&apcs 12>;
> + qcom,smd-edge = <0>;
> +
> + label = "modem";
> + };
> + };
> +
> tcsr_mutex: hwlock@fd484000 {
> compatible = "qcom,msm8226-tcsr-mutex", "qcom,tcsr-mutex";
> reg = <0xfd484000 0x1000>;
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> index 3037344eb24055071cc77c9cfce0f1d0f95de921..18396623a91dd4bf4b66f01c1d983c391722f3b5 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> @@ -9,6 +9,8 @@
> #include "pm8226.dtsi"
>
> /delete-node/ &adsp_region;
> +/delete-node/ &mba_region;
> +/delete-node/ &mpss_region;
> /delete-node/ &smem_region;
>
> / {
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 10/13] ARM: dts: qcom: msm8226: Add BAM DMUX Ethernet/IP device
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (8 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 09/13] ARM: dts: qcom: msm8226: Add modem remoteproc node Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-27 22:45 ` [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926 Luca Weiss
` (2 subsequent siblings)
12 siblings, 0 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss, Stephan Gerhold
BAM DMUX is used as the network interface to the modem.
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
index 55bb070dcf489064f5b14902da1acd2762232ef9..1091eb13576c1cce1821a9200d4c344387851583 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi
@@ -916,6 +916,18 @@ spmi_bus: spmi@fc4cf000 {
#interrupt-cells = <4>;
};
+ bam_dmux_dma: dma-controller@fc834000 {
+ compatible = "qcom,bam-v1.4.0";
+ reg = <0xfc834000 0x7000>;
+ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+
+ num-channels = <6>;
+ qcom,num-ees = <1>;
+ qcom,powered-remotely;
+ };
+
modem: remoteproc@fc880000 {
compatible = "qcom,msm8226-mss-pil";
reg = <0xfc880000 0x100>,
@@ -951,6 +963,20 @@ modem: remoteproc@fc880000 {
status = "disabled";
+ bam_dmux: bam-dmux {
+ compatible = "qcom,bam-dmux";
+
+ interrupt-parent = <&modem_smsm>;
+ interrupts = <1 IRQ_TYPE_EDGE_BOTH>, <11 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "pc", "pc-ack";
+
+ qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>;
+ qcom,smem-state-names = "pc", "pc-ack";
+
+ dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>;
+ dma-names = "tx", "rx";
+ };
+
smd-edge {
interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (9 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 10/13] ARM: dts: qcom: msm8226: Add BAM DMUX Ethernet/IP device Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 8:07 ` Stephan Gerhold
2025-01-28 11:13 ` Konrad Dybcio
2025-01-27 22:45 ` [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem Luca Weiss
2025-01-27 22:45 ` [PATCH v3 13/13] ARM: dts: qcom: msm8226-samsung-matisse-common: " Luca Weiss
12 siblings, 2 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
MSM8926, while being 'just' an LTE-capable variant of MSM8226, the dts
needs to slightly change since the modem doesn't use the ext-bhs-reg and
needs mss-supply, therefore it gets a new compatible.
Since we already have two -common.dtsi files which are used on both
APQ8026/MSM8226 and MSM8926 devices, change the setup a bit by removing
the SoC include from those and requiring the device dts to pick the
correct one.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
arch/arm/boot/dts/qcom/msm8926.dtsi | 11 +++++++++++
arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts | 1 +
arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi | 6 +++++-
arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts | 1 +
arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts | 1 +
arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts | 1 +
.../boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi | 6 +++++-
arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 2 +-
.../arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts | 1 +
arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts | 1 +
arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts | 2 +-
arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts | 1 +
12 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/qcom/msm8926.dtsi b/arch/arm/boot/dts/qcom/msm8926.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..629654c525b4bf415e41dca7b3d9fc60a5ee75fd
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/msm8926.dtsi
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025, Luca Weiss <luca@lucaweiss.eu>
+ */
+
+#include "qcom-msm8226.dtsi"
+
+&modem {
+ compatible = "qcom,msm8926-mss-pil";
+ /delete-property/ qcom,ext-bhs-reg;
+};
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts
index da3be658e822fb6408738e7e79453b87c39478e1..4546fa8beba46d31345da1ee3eded20e8a853f6b 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts
@@ -5,6 +5,7 @@
/dts-v1/;
+#include "qcom-msm8226.dtsi"
#include "qcom-msm8226-samsung-matisse-common.dtsi"
/ {
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
index ca76bf8af75e463bc3a2a5cfc1c2b574f0ac17f5..d4a32af0ef8f1ca6c0926261d7756a4d6bfba23f 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
@@ -8,7 +8,11 @@
* Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
*/
-#include "qcom-msm8226.dtsi"
+/*
+ * The .dts should first include qcom-msm8226.dtsi or msm8926.dtsi depending on
+ * the SoC on the given device.
+ */
+
#include "pm8226.dtsi"
#include <dt-bindings/input/input.h>
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts
index 2c664b5934ec54b7d53a2e3a8d86a1df864d33a9..f448c908841610bc53cccccb431d5ce50d205fc1 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts
@@ -8,6 +8,7 @@
/dts-v1/;
+#include "qcom-msm8226.dtsi"
#include "qcom-msm8226-microsoft-common.dtsi"
/ {
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts
index 731c5c3756784677580f09fad31ba28b0533145d..94bf3b1ad1bd1fb926ac5bb7174394965d52609c 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts
@@ -8,6 +8,7 @@
/dts-v1/;
+#include "qcom-msm8226.dtsi"
#include "qcom-msm8226-microsoft-common.dtsi"
/ {
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
index a28a83cb534055a36a55f907094b34f48b6266be..d8cdb75dfbb8bdafd8bb8fecfe3b9ab3f42b41e4 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
@@ -8,6 +8,7 @@
/dts-v1/;
+#include "qcom-msm8226.dtsi"
#include "qcom-msm8226-microsoft-common.dtsi"
/* This device has no magnetometer */
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
index fbd568c7d6b7415d240aa1a2329d07cf9135274c..0a3147656f36ca2616e0e3cc7c1dd808b55f3a88 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
@@ -3,8 +3,12 @@
* Copyright (c) 2022, Matti Lehtimäki <matti.lehtimaki@gmail.com>
*/
+/*
+ * The .dts should first include qcom-msm8226.dtsi or msm8926.dtsi depending on
+ * the SoC on the given device.
+ */
+
#include <dt-bindings/input/input.h>
-#include "qcom-msm8226.dtsi"
#include "pm8226.dtsi"
/delete-node/ &adsp_region;
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
index 18396623a91dd4bf4b66f01c1d983c391722f3b5..d6eaa82cee4daf6a1386902f537f1351811d4a06 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
@@ -5,7 +5,7 @@
/dts-v1/;
-#include "qcom-msm8226.dtsi"
+#include "msm8926.dtsi"
#include "pm8226.dtsi"
/delete-node/ &adsp_region;
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts
index 9b48661d69c53829c30ece8544ffff97f3032a59..eea4fd8cd9725f1ef629aae446ff7aa6c49fb2fa 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts
@@ -8,6 +8,7 @@
/dts-v1/;
+#include "msm8926.dtsi"
#include "qcom-msm8226-microsoft-common.dtsi"
/* This device has touchscreen on i2c3 instead */
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts
index 55077a5f2e34f84857ee35d22157362759151c5a..f23bbb94cc5e4343f667e53d66bc289228a85134 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts
@@ -8,6 +8,7 @@
/dts-v1/;
+#include "msm8926.dtsi"
#include "qcom-msm8226-microsoft-common.dtsi"
/* This device has touchscreen on i2c1 instead */
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
index 376a33125941028a3977e76373ee96959b08ee3e..db3273c755c2b5480b9c00336314b63900a74cbd 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
@@ -2,7 +2,7 @@
/dts-v1/;
-#include "qcom-msm8226.dtsi"
+#include "msm8926.dtsi"
#include "pm8226.dtsi"
/delete-node/ &smem_region;
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
index d0e1bc39f8ef700aa648148ac070f59062d049d7..772827cad972ad4ff032cfb9310568c5d2f0170f 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
@@ -6,6 +6,7 @@
/dts-v1/;
+#include "msm8926.dtsi"
#include "qcom-msm8226-samsung-matisse-common.dtsi"
/ {
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926
2025-01-27 22:45 ` [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926 Luca Weiss
@ 2025-01-28 8:07 ` Stephan Gerhold
2025-01-28 16:46 ` Luca Weiss
2025-01-28 11:13 ` Konrad Dybcio
1 sibling, 1 reply; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 8:07 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:43PM +0100, Luca Weiss wrote:
> MSM8926, while being 'just' an LTE-capable variant of MSM8226, the dts
> needs to slightly change since the modem doesn't use the ext-bhs-reg and
> needs mss-supply, therefore it gets a new compatible.
>
> Since we already have two -common.dtsi files which are used on both
> APQ8026/MSM8226 and MSM8926 devices, change the setup a bit by removing
> the SoC include from those and requiring the device dts to pick the
> correct one.
>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
> arch/arm/boot/dts/qcom/msm8926.dtsi | 11 +++++++++++
> arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts | 1 +
> arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi | 6 +++++-
> arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts | 1 +
> arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts | 1 +
> arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts | 1 +
> .../boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi | 6 +++++-
> arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 2 +-
> .../arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts | 1 +
> arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts | 1 +
> arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts | 2 +-
> arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts | 1 +
> 12 files changed, 30 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom/msm8926.dtsi b/arch/arm/boot/dts/qcom/msm8926.dtsi
I'm personally not a big fan of mixing the naming with and without qcom-
prefix. But anyway:
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> new file mode 100644
> index 0000000000000000000000000000000000000000..629654c525b4bf415e41dca7b3d9fc60a5ee75fd
> --- /dev/null
> +++ b/arch/arm/boot/dts/qcom/msm8926.dtsi
> @@ -0,0 +1,11 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2025, Luca Weiss <luca@lucaweiss.eu>
> + */
> +
> +#include "qcom-msm8226.dtsi"
> +
> +&modem {
> + compatible = "qcom,msm8926-mss-pil";
> + /delete-property/ qcom,ext-bhs-reg;
> +};
> diff --git a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts
> index da3be658e822fb6408738e7e79453b87c39478e1..4546fa8beba46d31345da1ee3eded20e8a853f6b 100644
> --- a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts
> @@ -5,6 +5,7 @@
>
> /dts-v1/;
>
> +#include "qcom-msm8226.dtsi"
> #include "qcom-msm8226-samsung-matisse-common.dtsi"
>
> / {
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
> index ca76bf8af75e463bc3a2a5cfc1c2b574f0ac17f5..d4a32af0ef8f1ca6c0926261d7756a4d6bfba23f 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
> @@ -8,7 +8,11 @@
> * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
> */
>
> -#include "qcom-msm8226.dtsi"
> +/*
> + * The .dts should first include qcom-msm8226.dtsi or msm8926.dtsi depending on
> + * the SoC on the given device.
> + */
> +
> #include "pm8226.dtsi"
> #include <dt-bindings/input/input.h>
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts
> index 2c664b5934ec54b7d53a2e3a8d86a1df864d33a9..f448c908841610bc53cccccb431d5ce50d205fc1 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts
> @@ -8,6 +8,7 @@
>
> /dts-v1/;
>
> +#include "qcom-msm8226.dtsi"
> #include "qcom-msm8226-microsoft-common.dtsi"
>
> / {
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts
> index 731c5c3756784677580f09fad31ba28b0533145d..94bf3b1ad1bd1fb926ac5bb7174394965d52609c 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts
> @@ -8,6 +8,7 @@
>
> /dts-v1/;
>
> +#include "qcom-msm8226.dtsi"
> #include "qcom-msm8226-microsoft-common.dtsi"
>
> / {
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
> index a28a83cb534055a36a55f907094b34f48b6266be..d8cdb75dfbb8bdafd8bb8fecfe3b9ab3f42b41e4 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
> @@ -8,6 +8,7 @@
>
> /dts-v1/;
>
> +#include "qcom-msm8226.dtsi"
> #include "qcom-msm8226-microsoft-common.dtsi"
>
> /* This device has no magnetometer */
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> index fbd568c7d6b7415d240aa1a2329d07cf9135274c..0a3147656f36ca2616e0e3cc7c1dd808b55f3a88 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> @@ -3,8 +3,12 @@
> * Copyright (c) 2022, Matti Lehtimäki <matti.lehtimaki@gmail.com>
> */
>
> +/*
> + * The .dts should first include qcom-msm8226.dtsi or msm8926.dtsi depending on
> + * the SoC on the given device.
> + */
> +
> #include <dt-bindings/input/input.h>
> -#include "qcom-msm8226.dtsi"
> #include "pm8226.dtsi"
>
> /delete-node/ &adsp_region;
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> index 18396623a91dd4bf4b66f01c1d983c391722f3b5..d6eaa82cee4daf6a1386902f537f1351811d4a06 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> @@ -5,7 +5,7 @@
>
> /dts-v1/;
>
> -#include "qcom-msm8226.dtsi"
> +#include "msm8926.dtsi"
> #include "pm8226.dtsi"
>
> /delete-node/ &adsp_region;
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts
> index 9b48661d69c53829c30ece8544ffff97f3032a59..eea4fd8cd9725f1ef629aae446ff7aa6c49fb2fa 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts
> @@ -8,6 +8,7 @@
>
> /dts-v1/;
>
> +#include "msm8926.dtsi"
> #include "qcom-msm8226-microsoft-common.dtsi"
>
> /* This device has touchscreen on i2c3 instead */
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts
> index 55077a5f2e34f84857ee35d22157362759151c5a..f23bbb94cc5e4343f667e53d66bc289228a85134 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts
> @@ -8,6 +8,7 @@
>
> /dts-v1/;
>
> +#include "msm8926.dtsi"
> #include "qcom-msm8226-microsoft-common.dtsi"
>
> /* This device has touchscreen on i2c1 instead */
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
> index 376a33125941028a3977e76373ee96959b08ee3e..db3273c755c2b5480b9c00336314b63900a74cbd 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
> @@ -2,7 +2,7 @@
>
> /dts-v1/;
>
> -#include "qcom-msm8226.dtsi"
> +#include "msm8926.dtsi"
> #include "pm8226.dtsi"
>
> /delete-node/ &smem_region;
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
> index d0e1bc39f8ef700aa648148ac070f59062d049d7..772827cad972ad4ff032cfb9310568c5d2f0170f 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
> @@ -6,6 +6,7 @@
>
> /dts-v1/;
>
> +#include "msm8926.dtsi"
> #include "qcom-msm8226-samsung-matisse-common.dtsi"
>
> / {
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926
2025-01-28 8:07 ` Stephan Gerhold
@ 2025-01-28 16:46 ` Luca Weiss
2025-01-28 17:45 ` Stephan Gerhold
0 siblings, 1 reply; 31+ messages in thread
From: Luca Weiss @ 2025-01-28 16:46 UTC (permalink / raw)
To: Stephan Gerhold
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On dinsdag 28 januari 2025 09:07:29 Midden-Europese standaardtijd Stephan
Gerhold wrote:
> On Mon, Jan 27, 2025 at 11:45:43PM +0100, Luca Weiss wrote:
> > MSM8926, while being 'just' an LTE-capable variant of MSM8226, the dts
> > needs to slightly change since the modem doesn't use the ext-bhs-reg and
> > needs mss-supply, therefore it gets a new compatible.
> >
> > Since we already have two -common.dtsi files which are used on both
> > APQ8026/MSM8226 and MSM8926 devices, change the setup a bit by removing
> > the SoC include from those and requiring the device dts to pick the
> > correct one.
> >
> > Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> > ---
> > arch/arm/boot/dts/qcom/msm8926.dtsi | 11 ++++++
+++++
> > arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts | 1 +
> > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi | 6 +++++-
> > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts | 1 +
> > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts | 1 +
> > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts | 1 +
> > .../boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi | 6 +++++-
> > arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 2 +-
> > .../arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts | 1 +
> > arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts | 1 +
> > arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts | 2 +-
> > arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts | 1 +
> > 12 files changed, 30 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/qcom/msm8926.dtsi b/arch/arm/boot/dts/qcom/
msm8926.dtsi
>
> I'm personally not a big fan of mixing the naming with and without qcom-
> prefix. But anyway:
Same, but already all PMICs were renamed to get rid of the pmXXXX- prefix, and
there's even some new dts files that don't have the qcom- prefix anymore.
I can also send a patch to rename the .dtsi files to remove the prefix to be
at least consistent with the PMICs, and the .dts files we'd need to keep with
the original name to not cause any issues with the users of those - even
though there have also been plenty of cases where we renamed those.
Regards
Luca
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926
2025-01-28 16:46 ` Luca Weiss
@ 2025-01-28 17:45 ` Stephan Gerhold
0 siblings, 0 replies; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 17:45 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Tue, Jan 28, 2025 at 05:46:09PM +0100, Luca Weiss wrote:
> On dinsdag 28 januari 2025 09:07:29 Midden-Europese standaardtijd Stephan
> Gerhold wrote:
> > On Mon, Jan 27, 2025 at 11:45:43PM +0100, Luca Weiss wrote:
> > > MSM8926, while being 'just' an LTE-capable variant of MSM8226, the dts
> > > needs to slightly change since the modem doesn't use the ext-bhs-reg and
> > > needs mss-supply, therefore it gets a new compatible.
> > >
> > > Since we already have two -common.dtsi files which are used on both
> > > APQ8026/MSM8226 and MSM8926 devices, change the setup a bit by removing
> > > the SoC include from those and requiring the device dts to pick the
> > > correct one.
> > >
> > > Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> > > ---
> > > arch/arm/boot/dts/qcom/msm8926.dtsi | 11 ++++++
> +++++
> > > arch/arm/boot/dts/qcom/qcom-apq8026-samsung-matisse-wifi.dts | 1 +
> > > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi | 6 +++++-
> > > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-dempsey.dts | 1 +
> > > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-makepeace.dts | 1 +
> > > arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts | 1 +
> > > .../boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi | 6 +++++-
> > > arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 2 +-
> > > .../arm/boot/dts/qcom/qcom-msm8926-microsoft-superman-lte.dts | 1 +
> > > arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts | 1 +
> > > arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts | 2 +-
> > > arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts | 1 +
> > > 12 files changed, 30 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/qcom/msm8926.dtsi b/arch/arm/boot/dts/qcom/
> msm8926.dtsi
> >
> > I'm personally not a big fan of mixing the naming with and without qcom-
> > prefix. But anyway:
>
> Same, but already all PMICs were renamed to get rid of the pmXXXX- prefix, and
> there's even some new dts files that don't have the qcom- prefix anymore.
>
:/
Omitting the qcom- prefix for .dts files is kind of broken. On ARM32,
the vendor subdirectories only exist inside the kernel source. When
installing the dtbs they are still placed in a single directory. This
means there would be a risk of naming conflicts (granted, very
unlikely). More importantly however, it makes it more difficult to find
the DTBs belonging to a certain vendor... :/
IMHO the naming convention for ARM32 DTBs should just have been
preserved the way it was before, but well that's how it is now I
suppose.
Stephan
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926
2025-01-27 22:45 ` [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926 Luca Weiss
2025-01-28 8:07 ` Stephan Gerhold
@ 2025-01-28 11:13 ` Konrad Dybcio
1 sibling, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2025-01-28 11:13 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold, Konrad Dybcio,
Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On 27.01.2025 11:45 PM, Luca Weiss wrote:
> MSM8926, while being 'just' an LTE-capable variant of MSM8226, the dts
> needs to slightly change since the modem doesn't use the ext-bhs-reg and
> needs mss-supply, therefore it gets a new compatible.
>
> Since we already have two -common.dtsi files which are used on both
> APQ8026/MSM8226 and MSM8926 devices, change the setup a bit by removing
> the SoC include from those and requiring the device dts to pick the
> correct one.
>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (10 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 11/13] ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926 Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 8:12 ` Stephan Gerhold
2025-01-28 11:14 ` Konrad Dybcio
2025-01-27 22:45 ` [PATCH v3 13/13] ARM: dts: qcom: msm8226-samsung-matisse-common: " Luca Weiss
12 siblings, 2 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
Enable the modem found on the MSM8926 HTC One Mini 2.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
index d6eaa82cee4daf6a1386902f537f1351811d4a06..cb571aa13c11598182dc020f064fe8268bcc061f 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
@@ -195,6 +195,16 @@ &blsp1_i2c6 {
/* TPS61310 Flash/Torch @ 33 */
};
+&modem {
+ mx-supply = <&pm8226_l3>;
+ pll-supply = <&pm8226_l8>;
+ mss-supply = <&pm8226_s5>;
+
+ firmware-name = "qcom/msm8926/memul/mba.b00", "qcom/msm8926/memul/modem.mdt";
+
+ status = "okay";
+};
+
&pm8226_vib {
status = "okay";
};
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem
2025-01-27 22:45 ` [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem Luca Weiss
@ 2025-01-28 8:12 ` Stephan Gerhold
2025-01-28 11:14 ` Konrad Dybcio
1 sibling, 0 replies; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 8:12 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:44PM +0100, Luca Weiss wrote:
> Enable the modem found on the MSM8926 HTC One Mini 2.
>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> index d6eaa82cee4daf6a1386902f537f1351811d4a06..cb571aa13c11598182dc020f064fe8268bcc061f 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> @@ -195,6 +195,16 @@ &blsp1_i2c6 {
> /* TPS61310 Flash/Torch @ 33 */
> };
>
> +&modem {
> + mx-supply = <&pm8226_l3>;
> + pll-supply = <&pm8226_l8>;
> + mss-supply = <&pm8226_s5>;
> +
> + firmware-name = "qcom/msm8926/memul/mba.b00", "qcom/msm8926/memul/modem.mdt";
> +
> + status = "okay";
> +};
> +
> &pm8226_vib {
> status = "okay";
> };
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem
2025-01-27 22:45 ` [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem Luca Weiss
2025-01-28 8:12 ` Stephan Gerhold
@ 2025-01-28 11:14 ` Konrad Dybcio
2025-01-28 16:48 ` Luca Weiss
1 sibling, 1 reply; 31+ messages in thread
From: Konrad Dybcio @ 2025-01-28 11:14 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold, Konrad Dybcio,
Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On 27.01.2025 11:45 PM, Luca Weiss wrote:
> Enable the modem found on the MSM8926 HTC One Mini 2.
>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
> arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> index d6eaa82cee4daf6a1386902f537f1351811d4a06..cb571aa13c11598182dc020f064fe8268bcc061f 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> @@ -195,6 +195,16 @@ &blsp1_i2c6 {
> /* TPS61310 Flash/Torch @ 33 */
> };
>
> +&modem {
> + mx-supply = <&pm8226_l3>;
> + pll-supply = <&pm8226_l8>;
> + mss-supply = <&pm8226_s5>;
> +
> + firmware-name = "qcom/msm8926/memul/mba.b00", "qcom/msm8926/memul/modem.mdt";
mbn?
Konrad
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem
2025-01-28 11:14 ` Konrad Dybcio
@ 2025-01-28 16:48 ` Luca Weiss
0 siblings, 0 replies; 31+ messages in thread
From: Luca Weiss @ 2025-01-28 16:48 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
Konrad Dybcio
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On dinsdag 28 januari 2025 12:14:09 Midden-Europese standaardtijd Konrad
Dybcio wrote:
> On 27.01.2025 11:45 PM, Luca Weiss wrote:
> > Enable the modem found on the MSM8926 HTC One Mini 2.
> >
> > Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> > ---
> > arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts b/arch/arm/
boot/dts/qcom/qcom-msm8926-htc-memul.dts
> > index
d6eaa82cee4daf6a1386902f537f1351811d4a06..cb571aa13c11598182dc020f064fe8268bcc061f
100644
> > --- a/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> > +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-htc-memul.dts
> > @@ -195,6 +195,16 @@ &blsp1_i2c6 {
> > /* TPS61310 Flash/Torch @ 33 */
> > };
> >
> > +&modem {
> > + mx-supply = <&pm8226_l3>;
> > + pll-supply = <&pm8226_l8>;
> > + mss-supply = <&pm8226_s5>;
> > +
> > + firmware-name = "qcom/msm8926/memul/mba.b00", "qcom/msm8926/memul/
modem.mdt";
>
> mbn?
The mba gets loaded with .b00 for some reason, not even the .mdt.
And at least on this device the .mbn doesn't work at all either, but this
might be due to very weird firmware loading on this board - because also for
loading wcnss firmware I needed to add a quite weird hack to make it load.
Modem fortunately loads fine like this.
Regards
Luca
>
> Konrad
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v3 13/13] ARM: dts: qcom: msm8226-samsung-matisse-common: Enable modem
2025-01-27 22:45 [PATCH v3 00/13] Modem support for MSM8226 Luca Weiss
` (11 preceding siblings ...)
2025-01-27 22:45 ` [PATCH v3 12/13] ARM: dts: qcom: msm8926-htc-memul: Enable modem Luca Weiss
@ 2025-01-27 22:45 ` Luca Weiss
2025-01-28 8:12 ` Stephan Gerhold
12 siblings, 1 reply; 31+ messages in thread
From: Luca Weiss @ 2025-01-27 22:45 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki
Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Luca Weiss
From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Enable modem remoteproc on samsung,matisse-wifi & matisselte.
The mattisselte - being msm8926 - requires an extra mss-supply, so add
that as well.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi | 7 +++++++
arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
index 0a3147656f36ca2616e0e3cc7c1dd808b55f3a88..f1544a7e8369c329360e235c48291a5d4c261fdc 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
@@ -229,6 +229,13 @@ &blsp1_uart3 {
status = "okay";
};
+&modem {
+ mx-supply = <&pm8226_l3>;
+ pll-supply = <&pm8226_l8>;
+
+ status = "okay";
+};
+
&rpm_requests {
regulators {
compatible = "qcom,rpm-pm8226-regulators";
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
index 772827cad972ad4ff032cfb9310568c5d2f0170f..73e19176eb97af569d99580c6b28fb2e0ec7f1b3 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
@@ -28,6 +28,10 @@ reg_tsp_3p3v: regulator-tsp-3p3v {
};
};
+&modem {
+ mss-supply = <&pm8226_s5>;
+};
+
&tlmm {
tsp_en1_default_state: tsp-en1-default-state {
pins = "gpio32";
--
2.48.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v3 13/13] ARM: dts: qcom: msm8226-samsung-matisse-common: Enable modem
2025-01-27 22:45 ` [PATCH v3 13/13] ARM: dts: qcom: msm8226-samsung-matisse-common: " Luca Weiss
@ 2025-01-28 8:12 ` Stephan Gerhold
0 siblings, 0 replies; 31+ messages in thread
From: Stephan Gerhold @ 2025-01-28 8:12 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Konrad Dybcio, Matti Lehtimäki,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
On Mon, Jan 27, 2025 at 11:45:45PM +0100, Luca Weiss wrote:
> From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
>
> Enable modem remoteproc on samsung,matisse-wifi & matisselte.
>
> The mattisselte - being msm8926 - requires an extra mss-supply, so add
> that as well.
>
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi | 7 +++++++
> arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts | 4 ++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> index 0a3147656f36ca2616e0e3cc7c1dd808b55f3a88..f1544a7e8369c329360e235c48291a5d4c261fdc 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-samsung-matisse-common.dtsi
> @@ -229,6 +229,13 @@ &blsp1_uart3 {
> status = "okay";
> };
>
> +&modem {
> + mx-supply = <&pm8226_l3>;
> + pll-supply = <&pm8226_l8>;
> +
> + status = "okay";
> +};
> +
> &rpm_requests {
> regulators {
> compatible = "qcom,rpm-pm8226-regulators";
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
> index 772827cad972ad4ff032cfb9310568c5d2f0170f..73e19176eb97af569d99580c6b28fb2e0ec7f1b3 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-samsung-matisselte.dts
> @@ -28,6 +28,10 @@ reg_tsp_3p3v: regulator-tsp-3p3v {
> };
> };
>
> +&modem {
> + mss-supply = <&pm8226_s5>;
> +};
> +
> &tlmm {
> tsp_en1_default_state: tsp-en1-default-state {
> pins = "gpio32";
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 31+ messages in thread