Documentation / devicetree / bindings / sound / amlogic,gx-sound-card.yaml


Based on kernel version 6.10. Page generated on 2024-07-16 09:00 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,gx-sound-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Amlogic GX sound card

maintainers:
  - Jerome Brunet <jbrunet@baylibre.com>

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

properties:
  compatible:
    items:
      - const: amlogic,gx-sound-card

  audio-aux-devs:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    description: list of auxiliary devices

  audio-widgets:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    minItems: 2
    description: |-
      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

patternProperties:
  "^dai-link-[0-9]+$":
    type: object
    additionalProperties: false
    description: |-
      dai-link child nodes:
        Container for dai-link level properties and the CODEC sub-nodes.
        There should be at least one (and probably more) subnode of this type

    properties:
      dai-format:
        $ref: /schemas/types.yaml#/definitions/string
        enum: [ i2s, left-j, dsp_a ]

      mclk-fs:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: |-
          Multiplication factor between the frame rate and master clock
          rate

      sound-dai:
        maxItems: 1
        description: phandle of the CPU DAI

    patternProperties:
      "^codec(-[0-9]+)?$":
        type: object
        additionalProperties: false
        description: |-
          Codecs:
          dai-link representing backend links should have at least one subnode.
          One subnode for each codec of the dai-link. dai-link representing
          frontend links have no codec, therefore have no subnodes

        properties:
          sound-dai:
            maxItems: 1
            description: phandle of the codec DAI

        required:
          - sound-dai

    required:
      - sound-dai

required:
  - model
  - dai-link-0

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "amlogic,gx-sound-card";
        model = "GXL-ACME-S905X-FOO";
        audio-aux-devs = <&amp>;
        audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback";
 
        dai-link-0 {
               sound-dai = <&i2s_fifo>;
        };
 
        dai-link-1 {
                sound-dai = <&i2s_encoder>;
                dai-format = "i2s";
                mclk-fs = <256>;
 
                codec-0 {
                        sound-dai = <&codec0>;
                };
 
                codec-1 {
                        sound-dai = <&codec1>;
                };
        };
    };