[PATCH 00/12] ASoC/qcom/remoteproc/arm64: Qualcomm ADSP DTS and binding fixes
Hi,
Dependencies/merging ==================== 1. The DTS patches are independent. 2. The binding patches should come together, because of context changes. Could be one of: Qualcomm SoC, ASoC or DT tree.
Best regards, Krzysztof
Krzysztof Kozlowski (12): arm64: dts: qcom: sdm630: align APR services node names with dtschema arm64: dts: qcom: sdm845: align APR services node names with dtschema arm64: dts: qcom: sm8250: align APR services node names with dtschema arm64: dts: qcom: msm8996: fix APR services nodes arm64: dts: qcom: sdm845: align dai node names with dtschema arm64: dts: qcom: msm8996: align dai node names with dtschema arm64: dts: qcom: qrb5165-rb5: align dai node names with dtschema arm64: dts: qcom: sm8250: use generic name for LPASS clock controller dt-bindings: soc: qcom: apr: correct service children ASoC: dt-bindings: qcom,q6dsp-lpass-ports: cleanup example ASoC: dt-bindings: qcom,q6dsp-lpass-clocks: cleanup example dt-bindings: soc: qcom: apr: add missing properties
.../bindings/soc/qcom/qcom,apr.yaml | 85 ++++++++++++++++--- .../sound/qcom,q6dsp-lpass-clocks.yaml | 30 +++---- .../sound/qcom,q6dsp-lpass-ports.yaml | 30 +++---- arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +-- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 8 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +-- 11 files changed, 124 insertions(+), 69 deletions(-)
DT schema expects APR services node names to be "service":
qcom/sdm850-lenovo-yoga-c630.dtb: remoteproc-adsp: glink-edge:apr: 'apr-service@3', 'apr-service@4', 'apr-service@7', 'apr-service@8', 'qcom,glink-channels', 'qcom,intents' do not match any of the regexes: '^service@[1-9a-d]$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/sdm630.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi index 1bc9091cad2a..2d4e3d39727c 100644 --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi @@ -2218,12 +2218,12 @@ apr { #address-cells = <1>; #size-cells = <0>;
- q6core { + service@3 { reg = <APR_SVC_ADSP_CORE>; compatible = "qcom,q6core"; };
- q6afe: apr-service@4 { + q6afe: service@4 { compatible = "qcom,q6afe"; reg = <APR_SVC_AFE>; q6afedai: dais { @@ -2234,7 +2234,7 @@ q6afedai: dais { }; };
- q6asm: apr-service@7 { + q6asm: service@7 { compatible = "qcom,q6asm"; reg = <APR_SVC_ASM>; q6asmdai: dais { @@ -2246,7 +2246,7 @@ q6asmdai: dais { }; };
- q6adm: apr-service@8 { + q6adm: service@8 { compatible = "qcom,q6adm"; reg = <APR_SVC_ADM>; q6routing: routing {
DT schema expects APR services node names to be "service":
qcom/sdm630-sony-xperia-nile-voyager.dtb: remoteproc@15700000: glink-edge:apr:service@4: 'dais' does not match any of the regexes: '^.*@[0-9a-f]+$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 98d34b5e1df2..8e7b577f78c2 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -767,13 +767,13 @@ apr { #size-cells = <0>; qcom,intents = <512 20>;
- apr-service@3 { + service@3 { reg = <APR_SVC_ADSP_CORE>; compatible = "qcom,q6core"; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; };
- q6afe: apr-service@4 { + q6afe: service@4 { compatible = "qcom,q6afe"; reg = <APR_SVC_AFE>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; @@ -785,7 +785,7 @@ q6afedai: dais { }; };
- q6asm: apr-service@7 { + q6asm: service@7 { compatible = "qcom,q6asm"; reg = <APR_SVC_ASM>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; @@ -798,7 +798,7 @@ q6asmdai: dais { }; };
- q6adm: apr-service@8 { + q6adm: service@8 { compatible = "qcom,q6adm"; reg = <APR_SVC_ADM>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
On 9/6/22 7:16 AM, Krzysztof Kozlowski wrote:
DT schema expects APR services node names to be "service":
qcom/sdm630-sony-xperia-nile-voyager.dtb: remoteproc@15700000: glink-edge:apr:service@4: 'dais' does not match any of the regexes: '^.*@[0-9a-f]+$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 98d34b5e1df2..8e7b577f78c2 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -767,13 +767,13 @@ apr { #size-cells = <0>; qcom,intents = <512 20>;
apr-service@3 {
service@3 { reg = <APR_SVC_ADSP_CORE>; compatible = "qcom,q6core"; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; };
q6afe: apr-service@4 {
q6afe: service@4 { compatible = "qcom,q6afe"; reg = <APR_SVC_AFE>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
@@ -785,7 +785,7 @@ q6afedai: dais { }; };
q6asm: apr-service@7 {
q6asm: service@7 { compatible = "qcom,q6asm"; reg = <APR_SVC_ASM>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
@@ -798,7 +798,7 @@ q6asmdai: dais { }; };
q6adm: apr-service@8 {
q6adm: service@8 { compatible = "qcom,q6adm"; reg = <APR_SVC_ADM>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
Tested on the Lenovo Yoga C630
Tested-by: Steev Klimaszewski steev@kali.org
DT schema expects APR services node names to be "service":
qcom/sm8250-sony-xperia-edo-pdx203.dtb: remoteproc@17300000: glink-edge:apr:service@7: 'dais' does not match any of the regexes: '^.*@[0-9a-f]+$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index bc773e210023..da9f7a701bc7 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -4782,13 +4782,13 @@ apr { #address-cells = <1>; #size-cells = <0>;
- apr-service@3 { + service@3 { reg = <APR_SVC_ADSP_CORE>; compatible = "qcom,q6core"; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; };
- q6afe: apr-service@4 { + q6afe: service@4 { compatible = "qcom,q6afe"; reg = <APR_SVC_AFE>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; @@ -4805,7 +4805,7 @@ q6afecc: cc { }; };
- q6asm: apr-service@7 { + q6asm: service@7 { compatible = "qcom,q6asm"; reg = <APR_SVC_ASM>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; @@ -4818,7 +4818,7 @@ q6asmdai: dais { }; };
- q6adm: apr-service@8 { + q6adm: service@8 { compatible = "qcom,q6adm"; reg = <APR_SVC_ADM>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
DT schema expects APR services node names to be "service" and to have an unit address (as it has a "reg" property):
qcom/msm8996-xiaomi-gemini.dtb: apr: 'power-domains', 'q6adm', 'q6afe', 'q6asm', 'qcom,smd-channels' do not match any of the regexes: '^service@[1-9a-d]$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 742eac4ce9b3..8dd4f6d09330 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -3388,12 +3388,12 @@ apr { #address-cells = <1>; #size-cells = <0>;
- q6core { + service@3 { reg = <APR_SVC_ADSP_CORE>; compatible = "qcom,q6core"; };
- q6afe: q6afe { + q6afe: service@4 { compatible = "qcom,q6afe"; reg = <APR_SVC_AFE>; q6afedai: dais { @@ -3407,7 +3407,7 @@ hdmi@1 { }; };
- q6asm: q6asm { + q6asm: service@7 { compatible = "qcom,q6asm"; reg = <APR_SVC_ASM>; q6asmdai: dais { @@ -3419,7 +3419,7 @@ q6asmdai: dais { }; };
- q6adm: q6adm { + q6adm: service@8 { compatible = "qcom,q6adm"; reg = <APR_SVC_ADM>; q6routing: routing {
DT schema expects DAI node names to be "dai":
qcom/sdm845-xiaomi-beryllium.dtb: dais: 'qi2s@22' does not match any of the regexes: '^dai@[0-9]+$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index c6e2c571b452..308a154d2ec0 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -651,7 +651,7 @@ led@5 {
/* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */ &q6afedai { - qi2s@22 { + dai@22 { reg = <QUATERNARY_MI2S_RX>; qcom,sd-lines = <0 1 2 3>; }; diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts index 82c27f90d300..067559c7f624 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts @@ -338,7 +338,7 @@ resin {
/* QUAT I2S Uses 1 I2S SD Line for audio on TAS2559/60 amplifiers */ &q6afedai { - qi2s@22 { + dai@22 { reg = <QUATERNARY_MI2S_RX>; qcom,sd-lines = <0>; }; diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts index 56a510b150ab..f2ddb2847101 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts @@ -544,8 +544,8 @@ resin { };
&q6afedai { - qi2s@22 { - reg = <22>; + dai@22 { + reg = <QUATERNARY_MI2S_RX>; qcom,sd-lines = <0>; }; };
DT schema expects DAI node names to be "dai":
qcom/msm8996-mtp.dtb: dais: 'hdmi@1' does not match any of the regexes: '^dai@[0-9]+$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 8dd4f6d09330..273e41c27942 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -3401,7 +3401,7 @@ q6afedai: dais { #address-cells = <1>; #size-cells = <0>; #sound-dai-cells = <1>; - hdmi@1 { + dai@1 { reg = <1>; }; };
DT schema expects DAI node names to be "dai":
qcom/qrb5165-rb5.dtb: dais: 'qi2s@16', 'qi2s@20' do not match any of the regexes: '^dai@[0-9]+$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index bf8077a1cf9a..d39ca3671477 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -867,7 +867,7 @@ &qupv3_id_2 { };
&q6afedai { - qi2s@16 { + dai@16 { reg = <PRIMARY_MI2S_RX>; qcom,sd-lines = <0 1 2 3>; }; @@ -875,7 +875,7 @@ qi2s@16 {
/* TERT I2S Uses 1 I2S SD Lines for audio on LT9611 HDMI Bridge */ &q6afedai { - qi2s@20 { + dai@20 { reg = <TERTIARY_MI2S_RX>; qcom,sd-lines = <0>; };
The node names should be generic according to Devicetree specification, so use "clock-controller" instead of "cc". The bindings so far did not define this name (as child of APR service).
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index da9f7a701bc7..da340159c0f1 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -4799,7 +4799,7 @@ q6afedai: dais { #sound-dai-cells = <1>; };
- q6afecc: cc { + q6afecc: clock-controller { compatible = "qcom,q6afe-clocks"; #clock-cells = <2>; };
The APR bindings were not describing properly children nodes for DAIs. None of the DTSes use unit addresses for the children, so correct the nodes and reference their schema: clock-controller, dais and routing.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/soc/qcom/qcom,apr.yaml | 38 +++++++++++++------ .../sound/qcom,q6dsp-lpass-clocks.yaml | 16 ++------ .../sound/qcom,q6dsp-lpass-ports.yaml | 16 ++------ 3 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml index 028c5d105adb..61b010793fca 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -97,6 +97,22 @@ patternProperties: 3 = AMDB Service. 4 = Voice processing manager.
+ clock-controller: + $ref: /schemas/sound/qcom,q6dsp-lpass-clocks.yaml# + description: Qualcomm DSP LPASS clock controller + unevaluatedProperties: false + + dais: + # TODO: Waiting for Documentation/devicetree/bindings/sound/qcom,q6asm.txt + # Ref defined in allOf below. + type: object + description: Qualcomm DSP LPASS audio ports + + routing: + # TODO: Waiting for Documentation/devicetree/bindings/sound/qcom,q6adm.txt + type: object + description: Qualcomm DSP LPASS audio ports + qcom,protection-domain: $ref: /schemas/types.yaml#/definitions/string-array description: protection domain service name and path for apr service @@ -107,17 +123,17 @@ patternProperties: "tms/servreg", "msm/modem/wlan_pd". "tms/servreg", "msm/slpi/sensor_pd".
- '#address-cells': - const: 1 - - '#size-cells': - const: 0 - - patternProperties: - "^.*@[0-9a-f]+$": - type: object - description: - Service based devices like clock controllers or digital audio interfaces. + allOf: + - if: + properties: + compatible: + enum: + - qcom,q6afe + then: + properties: + dais: + $ref: /schemas/sound/qcom,q6dsp-lpass-ports.yaml# + unevaluatedProperties: false
additionalProperties: false
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml index f83f00737a2f..604861d84ffa 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml @@ -18,9 +18,6 @@ properties: - qcom,q6afe-clocks - qcom,q6prm-lpass-clocks
- reg: - maxItems: 1 - '#clock-cells': const: 2 description: @@ -32,7 +29,6 @@ properties:
required: - compatible - - reg - "#clock-cells"
additionalProperties: false @@ -46,11 +42,9 @@ examples: #size-cells = <0>; apr-service@4 { reg = <APR_SVC_AFE>; - #address-cells = <1>; - #size-cells = <0>; - clock-controller@2 { + + clock-controller { compatible = "qcom,q6afe-clocks"; - reg = <2>; #clock-cells = <2>; }; }; @@ -66,11 +60,9 @@ examples: service@2 { reg = <GPR_PRM_MODULE_IID>; compatible = "qcom,q6prm"; - #address-cells = <1>; - #size-cells = <0>; - clock-controller@2 { + + clock-controller { compatible = "qcom,q6prm-lpass-clocks"; - reg = <2>; #clock-cells = <2>; }; }; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml index dc7fba7b92d5..5e666d9fb388 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml @@ -18,9 +18,6 @@ properties: - qcom,q6afe-dais - qcom,q6apm-lpass-dais
- reg: - maxItems: 1 - '#sound-dai-cells': const: 1
@@ -145,7 +142,6 @@ patternProperties:
required: - compatible - - reg - "#sound-dai-cells" - "#address-cells" - "#size-cells" @@ -161,11 +157,9 @@ examples: #size-cells = <0>; apr-service@4 { reg = <APR_SVC_AFE>; - #address-cells = <1>; - #size-cells = <0>; - q6afedai@1 { + + dais { compatible = "qcom,q6afe-dais"; - reg = <1>; #address-cells = <1>; #size-cells = <0>; #sound-dai-cells = <1>; @@ -187,11 +181,9 @@ examples: service@1 { compatible = "qcom,q6apm"; reg = <GPR_APM_MODULE_IID>; - #address-cells = <1>; - #size-cells = <0>; - q6apmdai@1 { + + dais { compatible = "qcom,q6apm-lpass-dais"; - reg = <1>; #address-cells = <1>; #size-cells = <0>; #sound-dai-cells = <1>;
On Tue, 06 Sep 2022 14:16:52 +0200, Krzysztof Kozlowski wrote:
The APR bindings were not describing properly children nodes for DAIs. None of the DTSes use unit addresses for the children, so correct the nodes and reference their schema: clock-controller, dais and routing.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/soc/qcom/qcom,apr.yaml | 38 +++++++++++++------ .../sound/qcom,q6dsp-lpass-clocks.yaml | 16 ++------ .../sound/qcom,q6dsp-lpass-ports.yaml | 16 ++------ 3 files changed, 35 insertions(+), 35 deletions(-)
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: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.example.dtb: gpr: service@1: '#address-cells', '#size-cells', 'apm-dai@1' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
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.
On 06/09/2022 19:46, Rob Herring wrote:
On Tue, 06 Sep 2022 14:16:52 +0200, Krzysztof Kozlowski wrote:
The APR bindings were not describing properly children nodes for DAIs. None of the DTSes use unit addresses for the children, so correct the nodes and reference their schema: clock-controller, dais and routing.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/soc/qcom/qcom,apr.yaml | 38 +++++++++++++------ .../sound/qcom,q6dsp-lpass-clocks.yaml | 16 ++------ .../sound/qcom,q6dsp-lpass-ports.yaml | 16 ++------ 3 files changed, 35 insertions(+), 35 deletions(-)
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: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.example.dtb: gpr: service@1: '#address-cells', '#size-cells', 'apm-dai@1' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
I missed one more place with example to fix.
Best regards, Krzysztof
Cleanup the example DTS by adding APR compatible, using proper device node names for services and fixing indentation to 4-spaces.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/qcom,q6dsp-lpass-ports.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml index 5e666d9fb388..9b5b53d1edf1 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml @@ -153,9 +153,12 @@ examples: #include <dt-bindings/soc/qcom,apr.h> #include <dt-bindings/sound/qcom,q6afe.h> apr { + compatible = "qcom,apr-v2"; #address-cells = <1>; #size-cells = <0>; - apr-service@4 { + qcom,domain = <APR_DOMAIN_ADSP>; + + service@4 { reg = <APR_SVC_AFE>;
dais { @@ -165,8 +168,8 @@ examples: #sound-dai-cells = <1>;
dai@22 { - reg = <QUATERNARY_MI2S_RX>; - qcom,sd-lines = <0 1 2 3>; + reg = <QUATERNARY_MI2S_RX>; + qcom,sd-lines = <0 1 2 3>; }; }; }; @@ -178,6 +181,7 @@ examples: #address-cells = <1>; #size-cells = <0>; qcom,domain = <GPR_DOMAIN_ID_ADSP>; + service@1 { compatible = "qcom,q6apm"; reg = <GPR_APM_MODULE_IID>; @@ -189,8 +193,8 @@ examples: #sound-dai-cells = <1>;
dai@22 { - reg = <QUATERNARY_MI2S_RX>; - qcom,sd-lines = <0 1 2 3>; + reg = <QUATERNARY_MI2S_RX>; + qcom,sd-lines = <0 1 2 3>; }; }; };
Cleanup the example DTS by adding APR compatible, using proper device node names for services and fixing indentation to 4-spaces.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/qcom,q6dsp-lpass-clocks.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml index 604861d84ffa..1e1114286d3a 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml @@ -38,14 +38,17 @@ examples: #include <dt-bindings/soc/qcom,apr.h> #include <dt-bindings/sound/qcom,q6afe.h> apr { + compatible = "qcom,apr-v2"; + qcom,domain = <APR_DOMAIN_ADSP>; #address-cells = <1>; #size-cells = <0>; - apr-service@4 { + + service@4 { reg = <APR_SVC_AFE>;
clock-controller { - compatible = "qcom,q6afe-clocks"; - #clock-cells = <2>; + compatible = "qcom,q6afe-clocks"; + #clock-cells = <2>; }; }; }; @@ -57,13 +60,14 @@ examples: qcom,domain = <GPR_DOMAIN_ID_ADSP>; #address-cells = <1>; #size-cells = <0>; + service@2 { reg = <GPR_PRM_MODULE_IID>; compatible = "qcom,q6prm";
clock-controller { - compatible = "qcom,q6prm-lpass-clocks"; - #clock-cells = <2>; + compatible = "qcom,q6prm-lpass-clocks"; + #clock-cells = <2>; }; }; };
The APR bindings were not describing all properties already used in DTS: 1. Add qcom,glink-channels, qcom,smd-channels and qcom,intents (widely used). 2. Add power-domains for MSM8996.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/soc/qcom/qcom,apr.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml index 61b010793fca..9d8ab28b7ea6 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -20,6 +20,9 @@ properties: - qcom,apr-v2 - qcom,gpr
+ power-domains: + maxItems: 1 + qcom,apr-domain: $ref: /schemas/types.yaml#/definitions/uint32 enum: [1, 2, 3, 4, 5, 6, 7] @@ -52,6 +55,26 @@ properties: 2 = Audio DSP Domain 3 = Application Processor Domain
+ qcom,glink-channels: + $ref: /schemas/types.yaml#/definitions/string-array + description: Channel name used for the communication + items: + - const: apr_audio_svc + + qcom,intents: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + List of (size, amount) pairs describing what intents should be + preallocated for this virtual channel. This can be used to tweak the + default intents available for the channel to meet expectations of the + remote. + + qcom,smd-channels: + $ref: /schemas/types.yaml#/definitions/string-array + description: Channel name used for the communication + items: + - const: apr_audio_svc + '#address-cells': const: 1
@@ -141,6 +164,30 @@ required: - compatible - qcom,domain
+allOf: + - if: + properties: + compatible: + enum: + - qcom,gpr + then: + properties: + power-domains: false + + - if: + required: + - qcom,glink-channels + then: + properties: + qcom,smd-channels: false + + - if: + required: + - qcom,smd-channels + then: + properties: + qcom,glink-channels: false + additionalProperties: false
examples:
Thanks Krzysztof for tidying this up.
On 06/09/2022 13:16, Krzysztof Kozlowski wrote:
Hi,
Dependencies/merging
- The DTS patches are independent.
- The binding patches should come together, because of context changes. Could be one of: Qualcomm SoC, ASoC or DT tree.
Best regards, Krzysztof
Krzysztof Kozlowski (12): arm64: dts: qcom: sdm630: align APR services node names with dtschema arm64: dts: qcom: sdm845: align APR services node names with dtschema arm64: dts: qcom: sm8250: align APR services node names with dtschema arm64: dts: qcom: msm8996: fix APR services nodes arm64: dts: qcom: sdm845: align dai node names with dtschema arm64: dts: qcom: msm8996: align dai node names with dtschema arm64: dts: qcom: qrb5165-rb5: align dai node names with dtschema arm64: dts: qcom: sm8250: use generic name for LPASS clock controller dt-bindings: soc: qcom: apr: correct service children ASoC: dt-bindings: qcom,q6dsp-lpass-ports: cleanup example ASoC: dt-bindings: qcom,q6dsp-lpass-clocks: cleanup example dt-bindings: soc: qcom: apr: add missing properties
LGTM,
Reviewed-by: Srinivas Kandagatla srinivas.kandagatla@linaro.org
--srini
.../bindings/soc/qcom/qcom,apr.yaml | 85 ++++++++++++++++--- .../sound/qcom,q6dsp-lpass-clocks.yaml | 30 +++---- .../sound/qcom,q6dsp-lpass-ports.yaml | 30 +++---- arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +-- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 8 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +-- 11 files changed, 124 insertions(+), 69 deletions(-)
On Tue, 6 Sep 2022 14:16:43 +0200, Krzysztof Kozlowski wrote:
Dependencies/merging
- The DTS patches are independent.
- The binding patches should come together, because of context changes. Could be one of: Qualcomm SoC, ASoC or DT tree.
Best regards, Krzysztof
[...]
Applied, thanks!
[01/12] arm64: dts: qcom: sdm630: align APR services node names with dtschema commit: aa27f316de7fbf3155ffde20a6daa4041d15ac5e [02/12] arm64: dts: qcom: sdm845: align APR services node names with dtschema commit: a3692a5edc5681d47fede71efeeaa065ebcad8d9 [03/12] arm64: dts: qcom: sm8250: align APR services node names with dtschema commit: a22609bf9fee17f9045b5b1847f2585200cd1920 [04/12] arm64: dts: qcom: msm8996: fix APR services nodes commit: c05b95d3286734c83e384240eb41d9867ce11027 [05/12] arm64: dts: qcom: sdm845: align dai node names with dtschema commit: 074240974e08a50faf434fa61c8bb7859871c774 [06/12] arm64: dts: qcom: msm8996: align dai node names with dtschema commit: 6b401d49395c3fbb082e84c1df3ad77495876c18 [07/12] arm64: dts: qcom: qrb5165-rb5: align dai node names with dtschema commit: cf4a15e409ff1287506fac51c343821d846fc1bc [08/12] arm64: dts: qcom: sm8250: use generic name for LPASS clock controller commit: e0b6c1ff512db643050e4a09020d7c0b69c82807
Best regards,
participants (5)
-
Bjorn Andersson
-
Krzysztof Kozlowski
-
Rob Herring
-
Srinivas Kandagatla
-
Steev Klimaszewski