2021-10-01 11:27:59

by Srinivasa Rao Mandadapu

[permalink] [raw]
Subject: [PATCH 6/8] ASoC: dt-bindings: Add SC7280 sound card bindings

Add bindings for lpass sc7280 based soundcards which supports
audio over i2s based speaker, soundwire based headset, msm dmics
and HDMI Port.

Signed-off-by: Venkata Prasad Potturu <[email protected]>
Signed-off-by: Srinivasa Rao Mandadapu <[email protected]>
---
.../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 69 +++++++++++++++++++---
1 file changed, 61 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml
index 1e23c0e..6840533 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml
@@ -22,35 +22,36 @@ properties:
- qcom,lpass-cpu
- qcom,apq8016-lpass-cpu
- qcom,sc7180-lpass-cpu
+ - qcom,sc7280-lpass-cpu

reg:
- maxItems: 2
+ maxItems: 5
description: LPAIF core registers

reg-names:
- maxItems: 2
+ maxItems: 5

clocks:
minItems: 3
- maxItems: 6
+ maxItems: 7

clock-names:
minItems: 3
- maxItems: 6
+ maxItems: 7

interrupts:
- maxItems: 2
+ maxItems: 4
description: LPAIF DMA buffer interrupt

interrupt-names:
- maxItems: 2
+ maxItems: 4

qcom,adsp:
$ref: /schemas/types.yaml#/definitions/phandle
description: Phandle for the audio DSP node

iommus:
- maxItems: 2
+ maxItems: 3
description: Phandle to apps_smmu node with sid mask

power-domains:
@@ -69,7 +70,7 @@ patternProperties:
"^dai-link@[0-9a-f]$":
type: object
description: |
- LPASS CPU dai node for each I2S device. Bindings of each node
+ LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
depends on the specific driver providing the functionality and
properties.
properties:
@@ -174,6 +175,58 @@ allOf:
- iommus
- power-domains

+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,sc7280-lpass-cpu
+
+ then:
+ properties:
+ clock-names:
+ oneOf:
+ - items: #for I2S
+ - const: lpass_aon_cc_audio_hm_h_clk
+ - const: lpass_core_cc_sysnoc_mport_core_clk
+ - const: lpass_core_cc_ext_if1_ibit_clk
+ - items: #for Soundwire
+ - const: lpass_aon_cc_audio_hm_h_clk
+ - const: lpass_audio_cc_codec_mem0_clk
+ - const: lpass_audio_cc_codec_mem1_clk
+ - const: lpass_audio_cc_codec_mem2_clk
+ - items: #for HDMI
+ - const: lpass_aon_cc_audio_hm_h_clk
+
+ reg-names:
+ anyOf:
+ - items: #for I2S
+ - const: lpass-lpaif
+ - items: #for I2S and HDMI
+ - const: lpass-hdmiif
+ - const: lpass-lpaif
+ - items: #for I2S, soundwire and HDMI
+ - const: lpass-cdc-lpm
+ - const: lpass-rxtx-lpaif
+ - const: lpass-va-lpaif
+ - const: lpass-hdmiif
+ - const: lpass-lpaif
+ interrupt-names:
+ anyOf:
+ - items: #for I2S
+ - const: lpass-irq-lpaif
+ - items: #for I2S and HDMI
+ - const: lpass-irq-lpaif
+ - const: lpass-irq-hdmi
+ - items: #for I2S, soundwire and HDMI
+ - const: lpass-irq-lpaif
+ - lpass-irq-vaif
+ - lpass-irq-rxtxif
+ - lpass-irq-hdmi
+
+ required:
+ - iommus
+ - power-domains
+
examples:
- |
#include <dt-bindings/sound/sc7180-lpass.h>
--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


2021-10-01 19:19:37

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 6/8] ASoC: dt-bindings: Add SC7280 sound card bindings

On Fri, 01 Oct 2021 16:51:30 +0530, Srinivasa Rao Mandadapu wrote:
> Add bindings for lpass sc7280 based soundcards which supports
> audio over i2s based speaker, soundwire based headset, msm dmics
> and HDMI Port.
>
> Signed-off-by: Venkata Prasad Potturu <[email protected]>
> Signed-off-by: Srinivasa Rao Mandadapu <[email protected]>
> ---
> .../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 69 +++++++++++++++++++---
> 1 file changed, 61 insertions(+), 8 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,lpass-cpu.yaml: allOf:3:then:properties:interrupt-names:anyOf:2:items: 'anyOf' conditional failed, one must be fixed:
[{'const': 'lpass-irq-lpaif'}, 'lpass-irq-vaif', 'lpass-irq-rxtxif', 'lpass-irq-hdmi'] is not of type 'object', 'boolean'
'lpass-irq-vaif' is not of type 'object', 'boolean'
'lpass-irq-rxtxif' is not of type 'object', 'boolean'
'lpass-irq-hdmi' is not of type 'object', 'boolean'
from schema $id: http://json-schema.org/draft-07/schema#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml: ignoring, error in schema: allOf: 3: then: properties: interrupt-names: anyOf: 2: items
warning: no schema found in file: ./Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml
Documentation/devicetree/bindings/sound/qcom,lpass-cpu.example.dt.yaml:0:0: /example-0/soc/lpass@62d80000: failed to match any schema with compatible: ['qcom,sc7180-lpass-cpu']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1535291

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.