2023-01-28 05:35:31

by Bhupesh Sharma

[permalink] [raw]
Subject: [PATCH 1/2] remoteproc: qcom: pas: Add sm6115 remoteprocs

Among the subsystems in the Qualcomm sm6115 platform we find
audio, compute and modem DSPs.

Add support for controlling these using the peripheral
authentication service (PAS) remoteproc driver.

Signed-off-by: Bhupesh Sharma <[email protected]>
---
drivers/remoteproc/qcom_q6v5_pas.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 4e1d9b08def4..9eb5a92bf5f6 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1184,6 +1184,9 @@ static const struct of_device_id adsp_of_match[] = {
{ .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init},
{ .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init},
{ .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource},
+ { .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init},
+ { .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init},
+ { .compatible = "qcom,sm6115-mpss-pas", .data = &sc8180x_mpss_resource},
{ .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource},
{ .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource},
{ .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init},
--
2.38.1



2023-01-28 05:35:37

by Bhupesh Sharma

[permalink] [raw]
Subject: [PATCH 2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file

This documents the aDSP, cDSP and MPSS DSPs present
on the SM6115 SoC.

Signed-off-by: Bhupesh Sharma <[email protected]>
---
.../bindings/remoteproc/qcom,sm6115-pas.yaml | 143 ++++++++++++++++++
1 file changed, 143 insertions(+)
create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
new file mode 100644
index 000000000000..f5d1fa9f45f1
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
@@ -0,0 +1,143 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/remoteproc/qcom,sm6115-pas.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM6115 Peripheral Authentication Service
+
+maintainers:
+ - Bhupesh Sharma <[email protected]>
+
+description:
+ Qualcomm SM6115 SoC Peripheral Authentication Service loads and boots
+ firmware on the Qualcomm DSP Hexagon cores.
+
+properties:
+ compatible:
+ enum:
+ - qcom,sm6115-adsp-pas
+ - qcom,sm6115-cdsp-pas
+ - qcom,sm6115-mpss-pas
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: XO clock
+
+ clock-names:
+ items:
+ - const: xo
+
+ memory-region:
+ minItems: 1
+ description: Reference to the reserved-memory for the Hexagon core
+
+ smd-edge: false
+
+ firmware-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: Firmware name for the Hexagon core
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: /schemas/remoteproc/qcom,pas-common.yaml#
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6115-adsp-pas
+ - qcom,sm6115-cdsp-pas
+ then:
+ properties:
+ interrupts:
+ maxItems: 5
+ interrupt-names:
+ maxItems: 5
+ else:
+ properties:
+ interrupts:
+ minItems: 6
+ interrupt-names:
+ minItems: 6
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6115-cdsp-pas
+ - qcom,sm6115-mpss-pas
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: CX power domain
+ power-domain-names:
+ items:
+ - const: cx
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6115-adsp-pas
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: LPI CX power domain
+ - description: LPI MX power domain
+ power-domain-names:
+ items:
+ - const: lcx
+ - const: lmx
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmcc.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
+ remoteproc@ab00000 {
+ compatible = "qcom,sm6115-adsp-pas";
+ reg = <0x0ab00000 0x100>;
+
+ clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "xo";
+
+ firmware-name = "qcom/sm6115/adsp.mdt";
+
+ interrupts-extended = <&intc GIC_SPI 282 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog", "fatal", "ready",
+ "handover", "stop-ack";
+
+ memory-region = <&pil_adsp_mem>;
+
+ power-domains = <&rpmpd SM6115_VDD_LPI_CX>,
+ <&rpmpd SM6115_VDD_LPI_MX>;
+
+ qcom,smem-states = <&adsp_smp2p_out 0>;
+ qcom,smem-state-names = "stop";
+
+ glink-edge {
+ interrupts = <GIC_SPI 277 IRQ_TYPE_EDGE_RISING>;
+ label = "lpass";
+ qcom,remote-pid = <2>;
+ mboxes = <&apcs_glb 8>;
+
+ /* ... */
+
+ };
+ };
--
2.38.1


2023-01-28 10:20:03

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] remoteproc: qcom: pas: Add sm6115 remoteprocs

On 28/01/2023 06:35, Bhupesh Sharma wrote:
> Among the subsystems in the Qualcomm sm6115 platform we find
> audio, compute and modem DSPs.
>
> Add support for controlling these using the peripheral
> authentication service (PAS) remoteproc driver.
>
> Signed-off-by: Bhupesh Sharma <[email protected]>


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

Best regards,
Krzysztof


2023-01-28 10:21:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file

On 28/01/2023 06:35, Bhupesh Sharma wrote:
> This documents the aDSP, cDSP and MPSS DSPs present
> on the SM6115 SoC.

This should be patch #1 - before you start using compatibles.

Subject: drop second/last, redundant "yaml file". The "dt-bindings"
prefix is already stating that these are bindings and their expected format.

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


Best regards,
Krzysztof


2023-01-28 14:20:48

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file


On Sat, 28 Jan 2023 11:05:04 +0530, Bhupesh Sharma wrote:
> This documents the aDSP, cDSP and MPSS DSPs present
> on the SM6115 SoC.
>
> Signed-off-by: Bhupesh Sharma <[email protected]>
> ---
> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 143 ++++++++++++++++++
> 1 file changed, 143 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/remoteproc/qcom,pas-common.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.example.dtb: remoteproc@ab00000: False schema does not allow {'compatible': ['qcom,sm6115-adsp-pas'], 'reg': [[179306496, 256]], 'clocks': [[4294967295, 0]], 'clock-names': ['xo'], 'firmware-name': ['qcom/sm6115/adsp.mdt'], 'interrupts-extended': [[4294967295, 0, 282, 1], [4294967295, 0, 1], [4294967295, 1, 1], [4294967295, 2, 1], [4294967295, 3, 1]], 'interrupt-names': ['wdog', 'fatal', 'ready', 'handover', 'stop-ack'], 'memory-region': [[4294967295]], 'power-domains': [[4294967295, 6], [4294967295, 7]], 'qcom,smem-states': [[4294967295, 0]], 'qcom,smem-state-names': ['stop'], 'glink-edge': {'interrupts': [[0, 277, 1]], 'label': ['lpass'], 'qcom,remote-pid': [[2]], 'mboxes': [[4294967295, 8]]}, '$nodename': ['remoteproc@ab00000']}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.example.dtb: remoteproc@ab00000: Unevaluated properties are not allowed ('glink-edge', 'qcom,smem-state-names', 'qcom,smem-states' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


2023-01-29 11:08:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file

On 28/01/2023 15:20, Rob Herring wrote:
>
> On Sat, 28 Jan 2023 11:05:04 +0530, Bhupesh Sharma wrote:
>> This documents the aDSP, cDSP and MPSS DSPs present
>> on the SM6115 SoC.
>>
>> Signed-off-by: Bhupesh Sharma <[email protected]>
>> ---
>> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 143 ++++++++++++++++++
>> 1 file changed, 143 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
>>
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> ./Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/remoteproc/qcom,pas-common.yaml

This is expected - the qcom,pas-common.yaml is in remoteproc repo.

Best regards,
Krzysztof


2023-01-30 09:02:24

by Mukesh Ojha

[permalink] [raw]
Subject: Re: [PATCH 1/2] remoteproc: qcom: pas: Add sm6115 remoteprocs



On 1/28/2023 11:05 AM, Bhupesh Sharma wrote:
> Among the subsystems in the Qualcomm sm6115 platform we find
> audio, compute and modem DSPs.
>
> Add support for controlling these using the peripheral
> authentication service (PAS) remoteproc driver.
>
> Signed-off-by: Bhupesh Sharma <[email protected]>

Reviewed-by: Mukesh Ojha <[email protected]>

-Mukesh
> ---
> drivers/remoteproc/qcom_q6v5_pas.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index 4e1d9b08def4..9eb5a92bf5f6 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -1184,6 +1184,9 @@ static const struct of_device_id adsp_of_match[] = {
> { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init},
> { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init},
> { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource},
> + { .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init},
> + { .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init},
> + { .compatible = "qcom,sm6115-mpss-pas", .data = &sc8180x_mpss_resource},
> { .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource},
> { .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource},
> { .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init},

2023-01-30 15:11:14

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file

On Sun, Jan 29, 2023 at 12:08:34PM +0100, Krzysztof Kozlowski wrote:
> On 28/01/2023 15:20, Rob Herring wrote:
> >
> > On Sat, 28 Jan 2023 11:05:04 +0530, Bhupesh Sharma wrote:
> >> This documents the aDSP, cDSP and MPSS DSPs present
> >> on the SM6115 SoC.
> >>
> >> Signed-off-by: Bhupesh Sharma <[email protected]>
> >> ---
> >> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 143 ++++++++++++++++++
> >> 1 file changed, 143 insertions(+)
> >> create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
> >>
> >
> > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> >
> > yamllint warnings/errors:
> >
> > dtschema/dtc warnings/errors:
> > ./Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/remoteproc/qcom,pas-common.yaml
>
> This is expected - the qcom,pas-common.yaml is in remoteproc repo.

Where is that dependency mentioned in this patch? If not mentioned, I
will mention it for you with the error report.

Rob


2023-02-14 17:28:28

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 1/2] remoteproc: qcom: pas: Add sm6115 remoteprocs

On Sat, 28 Jan 2023 11:05:03 +0530, Bhupesh Sharma wrote:
> Among the subsystems in the Qualcomm sm6115 platform we find
> audio, compute and modem DSPs.
>
> Add support for controlling these using the peripheral
> authentication service (PAS) remoteproc driver.
>
>
> [...]

Applied, thanks!

[1/2] remoteproc: qcom: pas: Add sm6115 remoteprocs
commit: 3c7306589dddbcc0ac53ec6b2c3a14875879e20c
[2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file
commit: 838c558bb8bc3a9a4de840fd25c6ad0ebc4d1ed7

Best regards,
--
Bjorn Andersson <[email protected]>

2023-03-09 08:29:13

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file

On 28/01/2023 06:35, Bhupesh Sharma wrote:
> This documents the aDSP, cDSP and MPSS DSPs present
> on the SM6115 SoC.
>
> Signed-off-by: Bhupesh Sharma <[email protected]>
> ---
> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 143 ++++++++++++++++++
> 1 file changed, 143 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
>
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
> new file mode 100644
> index 000000000000..f5d1fa9f45f1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
> @@ -0,0 +1,143 @@
> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/remoteproc/qcom,sm6115-pas.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm SM6115 Peripheral Authentication Service
> +
> +maintainers:
> + - Bhupesh Sharma <[email protected]>
> +
> +description:
> + Qualcomm SM6115 SoC Peripheral Authentication Service loads and boots
> + firmware on the Qualcomm DSP Hexagon cores.
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,sm6115-adsp-pas
> + - qcom,sm6115-cdsp-pas
> + - qcom,sm6115-mpss-pas
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + items:
> + - description: XO clock
> +
> + clock-names:
> + items:
> + - const: xo
> +
> + memory-region:
> + minItems: 1

maxItems instead

> + description: Reference to the reserved-memory for the Hexagon core
> +
> + smd-edge: false
> +
> + firmware-name:
> + $ref: /schemas/types.yaml#/definitions/string
> + description: Firmware name for the Hexagon core
> +
> +required:
> + - compatible
> + - reg

also memory-region


Best regards,
Krzysztof


2023-03-13 19:54:21

by Bhupesh Sharma

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file

Hi Krzysztof,

On 3/9/23 1:56 PM, Krzysztof Kozlowski wrote:
> On 28/01/2023 06:35, Bhupesh Sharma wrote:
>> This documents the aDSP, cDSP and MPSS DSPs present
>> on the SM6115 SoC.
>>
>> Signed-off-by: Bhupesh Sharma <[email protected]>
>> ---
>> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 143 ++++++++++++++++++
>> 1 file changed, 143 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
>> new file mode 100644
>> index 000000000000..f5d1fa9f45f1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
>> @@ -0,0 +1,143 @@
>> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/remoteproc/qcom,sm6115-pas.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm SM6115 Peripheral Authentication Service
>> +
>> +maintainers:
>> + - Bhupesh Sharma <[email protected]>
>> +
>> +description:
>> + Qualcomm SM6115 SoC Peripheral Authentication Service loads and boots
>> + firmware on the Qualcomm DSP Hexagon cores.
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - qcom,sm6115-adsp-pas
>> + - qcom,sm6115-cdsp-pas
>> + - qcom,sm6115-mpss-pas
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + clocks:
>> + items:
>> + - description: XO clock
>> +
>> + clock-names:
>> + items:
>> + - const: xo
>> +
>> + memory-region:
>> + minItems: 1
>
> maxItems instead
>
>> + description: Reference to the reserved-memory for the Hexagon core
>> +
>> + smd-edge: false
>> +
>> + firmware-name:
>> + $ref: /schemas/types.yaml#/definitions/string
>> + description: Firmware name for the Hexagon core
>> +
>> +required:
>> + - compatible
>> + - reg
>
> also memory-region


Since this patch was already picked up by Bjorn, I will send a fix as
per your suggestion as a separate patch shortly.

Thanks,
Bhupesh