Unverified Commit a06ce12e authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

ASoC: dt-bindings: Add common sound card properties



Almost every board machine / sound cards has "audio-routing" and "model"
properties, so move them to common schema to have only one definition of
these properties.

For amlogic,gx-sound-card, drop the minItems: 2 from the
"audio-routing", because any limit here - lower or upper- is rather
meaningless.  This will also fix `dtbs_check` warnings like:

  meson-gxm-s912-libretech-pc.dtb: sound: audio-routing: ['AU2 INL', 'ACODEC LOLN', 'AU2 INR', 'ACODEC LORN', '7J4-14 LEFT', 'AU2 OUTL', '7J4-11 RIGHT', 'AU2 OUTR'] is too long

Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-1-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7ac1102b
Loading
Loading
Loading
Loading
+3 −12
Original line number Original line Diff line number Diff line
@@ -9,6 +9,9 @@ title: Amlogic AXG sound card
maintainers:
maintainers:
  - Jerome Brunet <jbrunet@baylibre.com>
  - Jerome Brunet <jbrunet@baylibre.com>


allOf:
  - $ref: sound-card-common.yaml#

properties:
properties:
  compatible:
  compatible:
    const: amlogic,axg-sound-card
    const: amlogic,axg-sound-card
@@ -17,23 +20,12 @@ properties:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    $ref: /schemas/types.yaml#/definitions/phandle-array
    description: list of auxiliary devices
    description: list of auxiliary devices


  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description:
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source.

  audio-widgets:
  audio-widgets:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description:
    description:
      A list off component DAPM widget. Each entry is a pair of strings,
      A list off component DAPM widget. Each entry is a pair of strings,
      the first being the widget type, the second being the widget name
      the first being the widget type, the second being the widget name


  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

patternProperties:
patternProperties:
  "^dai-link-[0-9]+$":
  "^dai-link-[0-9]+$":
    type: object
    type: object
@@ -108,7 +100,6 @@ patternProperties:
      - sound-dai
      - sound-dai


required:
required:
  - model
  - dai-link-0
  - dai-link-0


unevaluatedProperties: false
unevaluatedProperties: false
+4 −13
Original line number Original line Diff line number Diff line
@@ -9,6 +9,9 @@ title: Amlogic GX sound card
maintainers:
maintainers:
  - Jerome Brunet <jbrunet@baylibre.com>
  - Jerome Brunet <jbrunet@baylibre.com>


allOf:
  - $ref: sound-card-common.yaml#

properties:
properties:
  compatible:
  compatible:
    items:
    items:
@@ -18,14 +21,6 @@ properties:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    $ref: /schemas/types.yaml#/definitions/phandle-array
    description: list of auxiliary devices
    description: list of auxiliary devices


  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    minItems: 2
    description: |-
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source.

  audio-widgets:
  audio-widgets:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    minItems: 2
    minItems: 2
@@ -33,10 +28,6 @@ properties:
      A list off component DAPM widget. Each entry is a pair of strings,
      A list off component DAPM widget. Each entry is a pair of strings,
      the first being the widget type, the second being the widget name
      the first being the widget type, the second being the widget name


  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

patternProperties:
patternProperties:
  "^dai-link-[0-9]+$":
  "^dai-link-[0-9]+$":
    type: object
    type: object
@@ -86,7 +77,7 @@ required:
  - model
  - model
  - dai-link-0
  - dai-link-0


additionalProperties: false
unevaluatedProperties: false


examples:
examples:
  - |
  - |
+4 −13
Original line number Original line Diff line number Diff line
@@ -17,6 +17,9 @@ description: |
  such as SAI, MICFIL, .etc through building rpmsg channels between
  such as SAI, MICFIL, .etc through building rpmsg channels between
  Cortex-A and Cortex-M.
  Cortex-A and Cortex-M.


allOf:
  - $ref: sound-card-common.yaml#

properties:
properties:
  compatible:
  compatible:
    enum:
    enum:
@@ -27,10 +30,6 @@ properties:
      - fsl,imx8ulp-rpmsg-audio
      - fsl,imx8ulp-rpmsg-audio
      - fsl,imx93-rpmsg-audio
      - fsl,imx93-rpmsg-audio


  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

  clocks:
  clocks:
    items:
    items:
      - description: Peripheral clock for register access
      - description: Peripheral clock for register access
@@ -66,13 +65,6 @@ properties:
    $ref: /schemas/types.yaml#/definitions/phandle
    $ref: /schemas/types.yaml#/definitions/phandle
    description: The phandle to a node of audio codec
    description: The phandle to a node of audio codec


  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description: |
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source.

  fsl,enable-lpa:
  fsl,enable-lpa:
    $ref: /schemas/types.yaml#/definitions/flag
    $ref: /schemas/types.yaml#/definitions/flag
    description: enable low power audio path.
    description: enable low power audio path.
@@ -101,9 +93,8 @@ properties:


required:
required:
  - compatible
  - compatible
  - model


additionalProperties: false
unevaluatedProperties: false


examples:
examples:
  - |
  - |
+4 −13
Original line number Original line Diff line number Diff line
@@ -13,23 +13,15 @@ maintainers:
description:
description:
  This binding describes the SC7180 sound card which uses LPASS for audio.
  This binding describes the SC7180 sound card which uses LPASS for audio.


allOf:
  - $ref: sound-card-common.yaml#

properties:
properties:
  compatible:
  compatible:
    enum:
    enum:
      - google,sc7180-trogdor
      - google,sc7180-trogdor
      - google,sc7180-coachz
      - google,sc7180-coachz


  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description:
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source.

  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

  "#address-cells":
  "#address-cells":
    const: 1
    const: 1


@@ -86,11 +78,10 @@ patternProperties:


required:
required:
  - compatible
  - compatible
  - model
  - "#address-cells"
  - "#address-cells"
  - "#size-cells"
  - "#size-cells"


additionalProperties: false
unevaluatedProperties: false


examples:
examples:


+4 −13
Original line number Original line Diff line number Diff line
@@ -13,22 +13,14 @@ maintainers:
description:
description:
  This binding describes the SC7280 sound card which uses LPASS for audio.
  This binding describes the SC7280 sound card which uses LPASS for audio.


allOf:
  - $ref: sound-card-common.yaml#

properties:
properties:
  compatible:
  compatible:
    enum:
    enum:
      - google,sc7280-herobrine
      - google,sc7280-herobrine


  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description:
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source.

  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

  "#address-cells":
  "#address-cells":
    const: 1
    const: 1


@@ -97,11 +89,10 @@ patternProperties:


required:
required:
  - compatible
  - compatible
  - model
  - "#address-cells"
  - "#address-cells"
  - "#size-cells"
  - "#size-cells"


additionalProperties: false
unevaluatedProperties: false


examples:
examples:


Loading