Documentation / devicetree / bindings / sound / qcom,q6dsp-lpass-ports.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,q6dsp-lpass-ports.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm DSP LPASS(Low Power Audio SubSystem) Audio Ports

maintainers:
  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

description: |
  This binding describes the Qualcomm DSP LPASS Audio ports

properties:
  compatible:
    enum:
      - qcom,q6afe-dais
 
  '#sound-dai-cells':
    const: 1
 
  '#address-cells':
    const: 1
 
  '#size-cells':
    const: 0
 
# Digital Audio Interfaces
patternProperties:
  '^dai@[0-9]+$':
    type: object
    description:
      Q6DSP Digital Audio Interfaces.

    properties:
      reg:
        description:
          Digital Audio Interface ID

      qcom,sd-lines:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        description:
          List of serial data lines used by this dai.should be one or more of the 0-3 sd lines.
        minItems: 1
        maxItems: 4
        uniqueItems: true
        items:
          minimum: 0
          maximum: 3

      qcom,tdm-sync-mode:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2]
        description:
          TDM Synchronization mode
            0 = Short sync bit mode
            1 = Long sync mode
            2 = Short sync slot mode

      qcom,tdm-sync-src:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1]
        description:
          TDM Synchronization source
            0 = External source
            1 = Internal source

      qcom,tdm-data-out:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1]
        description:
          TDM Data out signal to drive with other masters
            0 = Disable
            1 = Enable

      qcom,tdm-invert-sync:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1]
        description:
          TDM Invert the sync
            0 = Normal
            1 = Invert

      qcom,tdm-data-delay:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2]
        description:
          TDM Number of bit clock to delay data
            0 = 0 bit clock cycle
            1 = 1 bit clock cycle
            2 = 2 bit clock cycle

      qcom,tdm-data-align:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1]
        description:
          Indicate how data is packed within the slot. For example, 32 slot
          width in case of sample bit width is 24TDM Invert the sync.
            0 = MSB
            1 = LSB

    required:
      - reg

    allOf:
      - if:
          properties:
            reg:
              contains:
                # TDM DAI ID range from PRIMARY_TDM_RX_0 - QUINARY_TDM_TX_7
                items:
                  minimum: 24
                  maximum: 103
        then:
          required:
            - qcom,tdm-sync-mode
            - qcom,tdm-sync-src
            - qcom,tdm-data-out
            - qcom,tdm-invert-sync
            - qcom,tdm-data-delay
            - qcom,tdm-data-align

      - if:
          properties:
            reg:
              contains:
                # MI2S DAI ID range PRIMARY_MI2S_RX - QUATERNARY_MI2S_TX and
                # QUINARY_MI2S_RX - QUINARY_MI2S_TX
                items:
                  oneOf:
                    - minimum: 16
                      maximum: 23
                    - minimum: 127
                      maximum: 128
        then:
          required:
            - qcom,sd-lines

    additionalProperties: false

required:
  - compatible
  - "#sound-dai-cells"
  - "#address-cells"
  - "#size-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
 
    dais {
        compatible = "qcom,q6afe-dais";
        #address-cells = <1>;
        #size-cells = <0>;
        #sound-dai-cells = <1>;
 
        dai@22 {
            reg = <QUATERNARY_MI2S_RX>;
            qcom,sd-lines = <0 1 2 3>;
        };
    };