remoteproc: qcom: Add support for pronto-v3
v6 cover 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 v5:
* Fixed memory corruption in driver patch
* Slightly improved driver patch's commit message
Link to v5: https://lkml.org/lkml/2022/9/29/19
Sireesh Kodali (4):
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
dt-bindings: remoteproc: wcnss-pil: Make supplies optionally required
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 | 294 ++++++++++++++++++ drivers/remoteproc/qcom_wcnss.c | 12 + 3 files changed, 306 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
Signature · 1 line
2.37.3
PATCH v6 1/5 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, one regulator, and it requires the xo clock. It is used on the MSM8953 platform.
--- drivers/remoteproc/qcom_wcnss.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/remoteproc/qcom_wcnss.c +12 -0
@@ -141,6 +141,17 @@ 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_vregs =1 , +}; +static int wcnss_load (struct rproc *rproc,const struct firmware *fw) {struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv;
@@ -675,6 +686,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);
Signature · 1 line
2.37.3
Re: [PATCH v6 1/5] remoteproc: qcom: qcom_wcnss: Add support for pronto-v3
Quoted 8 lines · Sireesh Kodali
From: Vladimir Lypak <[email protected]>
Pronto-v3 is similar to pronto-v2. It requires two power domains, one regulator, 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]>
Quoted 37 lines
--- drivers/remoteproc/qcom_wcnss.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/remoteproc/qcom_wcnss.c +12
-0@@ -141,6 +141,17 @@ 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_vregs =1 , +}; +static int wcnss_load (struct rproc *rproc,const struct firmware *fw) {struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv;@@ -675,6 +686,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);Signature · 1 line
2.37.3
PATCH v6 2/5 dt-bindings: remoteproc: qcom: Convert wcnss documentation to YAML
In reply to Sireesh KodaliThis is a direct conversion of the existing txt documentation to YAML. It is in preparation for the addition of pronto-v3 to the docs. This patch doesn't document any of the existing subnodes/properties that are not documented in the existing txt file. That is done in a separate patch.
--- .../bindings/remoteproc/qcom,wcnss-pil.txt | 177 ------------ .../bindings/remoteproc/qcom,wcnss-pil.yaml | 269 ++++++++++++++++++ 2 files changed, 269 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
Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt deleted +0 -177
@@ -1,177 +0,0 @@ -Qualcomm WCNSS Peripheral Image Loader - -This document defines the binding for a component that loads and boots firmware -on the Qualcomm WCNSS core. - -- compatible: - Usage: required - Value type: <string> - Definition: must be one of: - "qcom,riva-pil", - "qcom,pronto-v1-pil", - "qcom,pronto-v2-pil" - -- reg: - Usage: required - Value type: <prop-encoded-array> - Definition: must specify the base address and size of the CCU, DXE and - PMU register blocks - -- reg-names: - Usage: required - Value type: <stringlist> - Definition: must be "ccu", "dxe", "pmu" - -- interrupts-extended: - Usage: required - Value type: <prop-encoded-array> - Definition: must list the watchdog and fatal IRQs and may specify the - ready, handover and stop-ack IRQs - -- interrupt-names: - Usage: required - Value type: <stringlist> - Definition: should be "wdog", "fatal", optionally followed by "ready", - "handover", "stop-ack" - -- firmware-name: - Usage: optional - Value type: <string> - Definition: must list the relative firmware image path for the - WCNSS core. Defaults to "wcnss.mdt". - -- vddmx-supply: (deprecated for qcom,pronto-v1/2-pil) -- vddcx-supply: (deprecated for qcom,pronto-v1/2-pil) -- vddpx-supply: - Usage: required - Value type: <phandle> - Definition: reference to the regulators to be held on behalf of the - booting of the WCNSS core - -- power-domains: - Usage: required (for qcom,pronto-v1/2-pil) - Value type: <phandle> - Definition: reference to the power domains to be held on behalf of the - booting of the WCNSS core - -- power-domain-names: - Usage: required (for qcom,pronto-v1/2-pil) - Value type: <stringlist> - Definition: must be "cx", "mx" - -- qcom,smem-states: - Usage: optional - Value type: <prop-encoded-array> - Definition: reference to the SMEM state used to indicate to WCNSS that - it should shut down - -- qcom,smem-state-names: - Usage: optional - Value type: <stringlist> - Definition: should be "stop" - -- memory-region: - Usage: required - Value type: <prop-encoded-array> - Definition: reference to reserved-memory node for the remote processor - see ../reserved-memory/reserved-memory.txt - -= SUBNODES -A required subnode of the WCNSS PIL is used to describe the attached rf module -and its resource dependencies. It is described by the following properties: - -- compatible: - Usage: required - Value type: <string> - Definition: must be one of: - "qcom,wcn3620", - "qcom,wcn3660", - "qcom,wcn3660b", - "qcom,wcn3680" - -- clocks: - Usage: required - Value type: <prop-encoded-array> - Definition: should specify the xo clock and optionally the rf clock - -- clock-names: - Usage: required - Value type: <stringlist> - Definition: should be "xo", optionally followed by "rf" - -- vddxo-supply: -- vddrfa-supply: -- vddpa-supply: -- vdddig-supply: - Usage: required - Value type: <phandle> - Definition: reference to the regulators to be held on behalf of the - booting of the WCNSS core - - -The wcnss node can also have an subnode named "smd-edge" that describes the SMD -edge, channels and devices related to the WCNSS. -See ../soc/qcom/qcom,smd.yaml for details on how to describe the SMD edge. - -= EXAMPLE -The following example describes the resources needed to boot control the WCNSS, -with attached WCN3680, as it is commonly found on MSM8974 boards. - -pronto@fb204000 { - compatible = "qcom,pronto-v2-pil"; - reg = <0xfb204000 0x2000>, <0xfb202000 0x1000>, <0xfb21b000 0x3000>; - reg-names = "ccu", "dxe", "pmu"; - - interrupts-extended = <&intc 0 149 1>, - <&wcnss_smp2p_slave 0 0>, - <&wcnss_smp2p_slave 1 0>, - <&wcnss_smp2p_slave 2 0>, - <&wcnss_smp2p_slave 3 0>; - interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack"; - - power-domains = <&rpmpd MSM8974_VDDCX>, <&rpmpd MSM8974_VDDMX>; - power-domain-names = "cx", "mx"; - - vddpx-supply = <&pm8941_s3>; - - qcom,smem-states = <&wcnss_smp2p_out 0>; - qcom,smem-state-names = "stop"; - - memory-region = <&wcnss_region>; - - pinctrl-names = "default"; - pinctrl-0 = <&wcnss_pin_a>; - - iris { - compatible = "qcom,wcn3680"; - - clocks = <&rpmcc RPM_CXO_CLK_SRC>, <&rpmcc RPM_CXO_A2>; - clock-names = "xo", "rf"; - - vddxo-supply = <&pm8941_l6>; - vddrfa-supply = <&pm8941_l11>; - vddpa-supply = <&pm8941_l19>; - vdddig-supply = <&pm8941_s3>; - }; - - smd-edge { - interrupts = <0 142 1>; - - qcom,ipc = <&apcs 8 17>; - qcom,smd-edge = <6>; - qcom,remote-pid = <4>; - - label = "pronto"; - - wcnss { - compatible = "qcom,wcnss"; - qcom,smd-channels = "WCNSS_CTRL"; - - qcom,mmio = <&pronto>; - - bt { - compatible = "qcom,wcnss-bt"; - }; - }; - }; -};
Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml new file +269 -0
269 lines not on this page · raw message
Signature · 1 line
2.37.3
PATCH v6 3/5 dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible
In reply to Sireesh KodaliThis 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*".
--- .../bindings/remoteproc/qcom,wcnss-pil.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml +10 -5
@@ -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
@@ -200,7 +205,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";
Signature · 1 line
2.37.3
PATCH v6 4/5 dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3
In reply to Sireesh KodaliThe 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.
--- .../bindings/remoteproc/qcom,wcnss-pil.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml +16 -0
@@ -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
@@ -199,6 +200,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>
Signature · 1 line
2.37.3
PATCH v6 5/5 dt-bindings: remoteproc: wcnss-pil: Make supplies optionally required
In reply to Sireesh KodaliOn MSM8974, power domains are not yet supported. The platform uses regulators. This patch marks either the power-domains or *-supply as required (instead of always requiring the power domains).
--- .../devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml +7 -3
@@ -196,9 +196,13 @@ allOf: deprecated: true description: Deprecated for qcom,pronto-v1/2-pil - required: - - power-domains - - power-domain-names + oneOf: + - required: + - power-domains + - power-domain-names + - required: + - vddmx-supply + - vddcx-supply - if: properties:
Signature · 1 line
2.37.3
Quoted 8 lines · Sireesh Kodali
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 v5:
* Fixed memory corruption in driver patch
* Slightly improved driver patch's commit message[...]
Applied, thanks!
[1/5] remoteproc: qcom: qcom_wcnss: Add support for pronto-v3
commit: 4c707cf5c7ddd43c6d574281a5591f71ed8d310c
[2/5] dt-bindings: remoteproc: qcom: Convert wcnss documentation to YAML
commit: 9a660c7fd69ae9fff3f941140db25339937f8eee
[3/5] dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible
commit: 409db7b777c81ef249688cddba882d16dbb064e0
[4/5] dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3
commit: a890eebe42ad2c0cfe44a34a4f9e7d1a735a55d8
[5/5] dt-bindings: remoteproc: wcnss-pil: Make supplies optionally required
commit: a4421a22bfd966852349e5c38278e9a6eaefb456Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>