2022-09-21 04:56:50

by Sireesh Kodali

[permalink] [raw]
Subject: [PATCH v4 0/4] remoteproc: qcom: Add support for pronto-v3

This patch series adds support for the pronto-v3 remoteproc found on the
MSM8953 platform. It also converts the documentation for wcnss to YAML.

Changes since v3:
* Fixed example dt in conversion patch failing dt_bindings_check
* Made sure patch series reaches all maintainers, v3's cover went
missing

Changes since v2:
* Fixed email for maintainer
* rm qcom,wcnss-pil.txt
* Add more details in commit message for qcom,pronto compatible
* Fixed dt_binding_check errors

Link to v2: https://lkml.org/lkml/2022/9/8/1199

Sireesh Kodali (3):
dt-bindings: remoteproc: qcom: Convert wcnss documentation to YAML
dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible
dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3

Vladimir Lypak (1):
remoteproc: qcom: qcom_wcnss: Add support for pronto-v3

.../bindings/remoteproc/qcom,wcnss-pil.txt | 177 -----------
.../bindings/remoteproc/qcom,wcnss-pil.yaml | 288 ++++++++++++++++++
drivers/remoteproc/qcom_wcnss.c | 13 +
3 files changed, 301 insertions(+), 177 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml

--
2.37.3


2022-09-21 04:56:54

by Sireesh Kodali

[permalink] [raw]
Subject: [PATCH v4 1/4] remoteproc: qcom: qcom_wcnss: Add support for pronto-v3

From: Vladimir Lypak <[email protected]>

Pronto-v3 is similar to pronto-v2. It requires two power domains, and it
requires the xo clock. It is used on the MSM8953 platform.

Signed-off-by: Vladimir Lypak <[email protected]>
Signed-off-by: Sireesh Kodali <[email protected]>
---
drivers/remoteproc/qcom_wcnss.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 68f37296b151..ff18bfae5eb6 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -141,6 +141,18 @@ static const struct wcnss_data pronto_v2_data = {
.num_vregs = 1,
};

+static const struct wcnss_data pronto_v3_data = {
+ .pmu_offset = 0x1004,
+ .spare_offset = 0x1088,
+
+ .pd_names = { "mx", "cx" },
+ .vregs = (struct wcnss_vreg_info[]) {
+ { "vddpx", 1800000, 1800000, 0 },
+ },
+ .num_pd_vregs = 2,
+ .num_vregs = 1,
+};
+
static int wcnss_load(struct rproc *rproc, const struct firmware *fw)
{
struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv;
@@ -675,6 +687,7 @@ static const struct of_device_id wcnss_of_match[] = {
{ .compatible = "qcom,riva-pil", &riva_data },
{ .compatible = "qcom,pronto-v1-pil", &pronto_v1_data },
{ .compatible = "qcom,pronto-v2-pil", &pronto_v2_data },
+ { .compatible = "qcom,pronto-v3-pil", &pronto_v3_data },
{ },
};
MODULE_DEVICE_TABLE(of, wcnss_of_match);
--
2.37.3

2022-09-21 04:57:13

by Sireesh Kodali

[permalink] [raw]
Subject: [PATCH v4 3/4] dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible

This is not a fallback compatible, it must be present in addition to
"qcom,pronto-v*". It is also not documented in qcom,wcnss-pil.txt. This
is the reason for documenting it in a separate commit.

This compatible is used in the wcn36xx driver to determine which
register must be accessed. However it isn't immediately clear why the
wcn36xx driver relies on this extra compatible string rather than just
looking for "qcom,pronto-v*".

Signed-off-by: Sireesh Kodali <[email protected]>
---
.../bindings/remoteproc/qcom,wcnss-pil.yaml | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
index a99a1e5242f8..31232c59b22b 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
@@ -15,10 +15,15 @@ description:

properties:
compatible:
- enum:
- - qcom,riva-pil
- - qcom,pronto-v1-pil
- - qcom,pronto-v2-pil
+ description:
+ Append "qcom,pronto" if the device is actually pronto, and not riva
+ oneOf:
+ - items:
+ - enum:
+ - qcom,pronto-v1-pil
+ - qcom,pronto-v2-pil
+ - const: qcom,pronto
+ - const: qcom,riva-pil

reg:
maxItems: 3
@@ -198,7 +203,7 @@ examples:
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/power/qcom-rpmpd.h>
pronto@a21b000 {
- compatible = "qcom,pronto-v2-pil";
+ compatible = "qcom,pronto-v2-pil", "qcom,pronto";
reg = <0x0a204000 0x2000>, <0x0a202000 0x1000>, <0x0a21b000 0x3000>;
reg-names = "ccu", "dxe", "pmu";

--
2.37.3

2022-09-21 04:57:35

by Sireesh Kodali

[permalink] [raw]
Subject: [PATCH v4 4/4] dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3

The pronto v3 remoteproc is similar to pronto v2. It is found on the
MSM8953 platform, which is used by SDM450, SDM625, SDM626, APQ8053 and
other SoCs. Since the configuration is same on all SoCs, a single
compatible is used.

Signed-off-by: Sireesh Kodali <[email protected]>
---
.../bindings/remoteproc/qcom,wcnss-pil.yaml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
index 31232c59b22b..639c52284f4f 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
@@ -22,6 +22,7 @@ properties:
- enum:
- qcom,pronto-v1-pil
- qcom,pronto-v2-pil
+ - qcom,pronto-v3-pil
- const: qcom,pronto
- const: qcom,riva-pil

@@ -197,6 +198,21 @@ allOf:
- power-domains
- power-domain-names

+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,pronto-v3-pil
+ then:
+ properties:
+ vddmx-supply: false
+ vddcx-supply: false
+
+ required:
+ - power-domains
+ - power-domain-names
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
--
2.37.3

2022-09-21 08:51:11

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 4/4] dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3

On Wed, 21 Sep 2022 10:06:48 +0530, Sireesh Kodali wrote:
> The pronto v3 remoteproc is similar to pronto v2. It is found on the
> MSM8953 platform, which is used by SDM450, SDM625, SDM626, APQ8053 and
> other SoCs. Since the configuration is same on all SoCs, a single
> compatible is used.
>
> Signed-off-by: Sireesh Kodali <[email protected]>
> ---
> .../bindings/remoteproc/qcom,wcnss-pil.yaml | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


remoteproc@fb21b000: 'power-domain-names' is a required property
arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dtb

remoteproc@fb21b000: 'power-domains' is a required property
arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dtb

2022-09-21 09:09:06

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 3/4] dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible

On Wed, 21 Sep 2022 10:06:47 +0530, Sireesh Kodali wrote:
> This is not a fallback compatible, it must be present in addition to
> "qcom,pronto-v*". It is also not documented in qcom,wcnss-pil.txt. This
> is the reason for documenting it in a separate commit.
>
> This compatible is used in the wcn36xx driver to determine which
> register must be accessed. However it isn't immediately clear why the
> wcn36xx driver relies on this extra compatible string rather than just
> looking for "qcom,pronto-v*".
>
> Signed-off-by: Sireesh Kodali <[email protected]>
> ---
> .../bindings/remoteproc/qcom,wcnss-pil.yaml | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


remoteproc@fb21b000: 'power-domain-names' is a required property
arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dtb

remoteproc@fb21b000: 'power-domains' is a required property
arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dtb

2022-09-21 19:39:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 4/4] dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3

On 21/09/2022 06:36, Sireesh Kodali wrote:
> The pronto v3 remoteproc is similar to pronto v2. It is found on the
> MSM8953 platform, which is used by SDM450, SDM625, SDM626, APQ8053 and
> other SoCs. Since the configuration is same on all SoCs, a single
> compatible is used.
>


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

Best regards,
Krzysztof

2022-09-21 20:44:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 3/4] dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible

On 21/09/2022 06:36, Sireesh Kodali wrote:
> This is not a fallback compatible, it must be present in addition to
> "qcom,pronto-v*". It is also not documented in qcom,wcnss-pil.txt. This
> is the reason for documenting it in a separate commit.
>
> This compatible is used in the wcn36xx driver to determine which
> register must be accessed. However it isn't immediately clear why the
> wcn36xx driver relies on this extra compatible string rather than just
> looking for "qcom,pronto-v*".


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

Best regards,
Krzysztof