Document MSM8953/MSM8976 QDSP6 cards.
Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
---
.../sound/qcom,apq8016-sbc-sndcard.yaml | 51 ++++++++++++++++---
1 file changed, 45 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml
index 6ad451549036..1706ce334d2f 100644
--- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml
@@ -15,16 +15,16 @@ properties:
enum:
- qcom,apq8016-sbc-sndcard
- qcom,msm8916-qdsp6-sndcard
+ - qcom,msm8953-qdsp6-sndcard
+ - qcom,msm8976-qdsp6-sndcard
reg:
- items:
- - description: Microphone I/O mux register address
- - description: Speaker I/O mux register address
+ minItems: 2
+ maxItems: 3
reg-names:
- items:
- - const: mic-iomux
- - const: spkr-iomux
+ minItems: 2
+ maxItems: 3
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
@@ -106,6 +106,45 @@ required:
- reg-names
- model
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,apq8016-sbc-sndcard
+ - qcom,msm8916-qdsp6-sndcard
+ then:
+ properties:
+ reg:
+ items:
+ - description: Microphone I/O mux register address
+ - description: Speaker I/O mux register address
+ reg-names:
+ items:
+ - const: mic-iomux
+ - const: spkr-iomux
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8953-qdsp6-sndcard
+ - qcom,msm8976-qdsp6-sndcard
+ then:
+ properties:
+ reg:
+ items:
+ - description: Microphone I/O mux register address
+ - description: Speaker I/O mux register address
+ - description: Quinary Mi2S I/O mux register address
+ reg-names:
+ items:
+ - const: mic-iomux
+ - const: spkr-iomux
+ - const: quin-iomux
+
additionalProperties: false
examples:
--
2.45.2
On 27/07/2024 20:20, Adam Skladowski wrote: > Document MSM8953/MSM8976 QDSP6 cards. > > Signed-off-by: Adam Skladowski <a39.skl@gmail.com> > --- Your cover letter must ALWAYS clearly document the dependency. > .../sound/qcom,apq8016-sbc-sndcard.yaml | 51 ++++++++++++++++--- > 1 file changed, 45 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml > index 6ad451549036..1706ce334d2f 100644 > --- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml > +++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml > @@ -15,16 +15,16 @@ properties: > enum: > - qcom,apq8016-sbc-sndcard > - qcom,msm8916-qdsp6-sndcard > + - qcom,msm8953-qdsp6-sndcard > + - qcom,msm8976-qdsp6-sndcard > > reg: > - items: > - - description: Microphone I/O mux register address > - - description: Speaker I/O mux register address As I explained you on IRC, grow the list here and add minItems > + minItems: 2 > + maxItems: 3 > > reg-names: > - items: As I explained you on IRC, grow the list here and add minItems > - - const: mic-iomux > - - const: spkr-iomux > + minItems: 2 > + maxItems: 3 > > audio-routing: > $ref: /schemas/types.yaml#/definitions/non-unique-string-array > @@ -106,6 +106,45 @@ required: > - reg-names > - model > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,apq8016-sbc-sndcard > + - qcom,msm8916-qdsp6-sndcard > + then: > + properties: > + reg: maxItems: 2 > + items: > + - description: Microphone I/O mux register address > + - description: Speaker I/O mux register address > + reg-names: maxItems :2 > + items: > + - const: mic-iomux > + - const: spkr-iomux > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,msm8953-qdsp6-sndcard > + - qcom,msm8976-qdsp6-sndcard > + then: > + properties: > + reg: minItems: 3 > + items: > + - description: Microphone I/O mux register address > + - description: Speaker I/O mux register address > + - description: Quinary Mi2S I/O mux register address > + reg-names: minItems: 3 Best regards, Krzysztof
On Sat, Jul 27, 2024 at 08:20:26PM GMT, Adam Skladowski wrote:
> Document MSM8953/MSM8976 QDSP6 cards.
>
> Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
> ---
> .../sound/qcom,apq8016-sbc-sndcard.yaml | 51 ++++++++++++++++---
> 1 file changed, 45 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml
> index 6ad451549036..1706ce334d2f 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.yaml
> @@ -15,16 +15,16 @@ properties:
> enum:
> - qcom,apq8016-sbc-sndcard
> - qcom,msm8916-qdsp6-sndcard
> + - qcom,msm8953-qdsp6-sndcard
> + - qcom,msm8976-qdsp6-sndcard
>
> reg:
> - items:
> - - description: Microphone I/O mux register address
> - - description: Speaker I/O mux register address
> + minItems: 2
> + maxItems: 3
>
> reg-names:
> - items:
> - - const: mic-iomux
> - - const: spkr-iomux
> + minItems: 2
> + maxItems: 3
>
> audio-routing:
> $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> @@ -106,6 +106,45 @@ required:
> - reg-names
> - model
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,apq8016-sbc-sndcard
> + - qcom,msm8916-qdsp6-sndcard
> + then:
> + properties:
> + reg:
> + items:
> + - description: Microphone I/O mux register address
> + - description: Speaker I/O mux register address
> + reg-names:
> + items:
> + - const: mic-iomux
> + - const: spkr-iomux
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,msm8953-qdsp6-sndcard
> + - qcom,msm8976-qdsp6-sndcard
> + then:
> + properties:
> + reg:
> + items:
> + - description: Microphone I/O mux register address
> + - description: Speaker I/O mux register address
> + - description: Quinary Mi2S I/O mux register address
> + reg-names:
> + items:
> + - const: mic-iomux
> + - const: spkr-iomux
> + - const: quin-iomux
As msm8953 / msm8976 just add one new region it might be better to
move the lists back to top-level definitions (still having mix/maxItems
next to it) and then in the conditional branches just specify maxItems:2
for apq8016/msm8916 and maxItems:3 for msm8953/msm8976.
This way it becomes:
reg:
items:
- description: Microphone I/O mux register address
- description: Speaker I/O mux register address
minItems: 2
maxItems: 3
# same for reg-names
[....]
- if:
properties:
compatible:
contains:
enum:
- qcom,apq8016-sbc-sndcard
- qcom,msm8916-qdsp6-sndcard
then:
properties:
reg:
maxItems: 2
reg-names:
maxItems: 2
else:
properties:
reg:
maxItems: 3
reg-names:
maxItems: 3
> +
> additionalProperties: false
>
> examples:
> --
> 2.45.2
>
--
With best wishes
Dmitry
© 2016 - 2026 Red Hat, Inc.