xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,q6dsp-lpass-ports.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: "http://devicetree.org/schemas/sound/qcom,q6dsp-lpass-ports.yaml#"
58cc087a1SEmmanuel Vadot$schema: "http://devicetree.org/meta-schemas/core.yaml#"
68cc087a1SEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Qualcomm DSP LPASS(Low Power Audio SubSystem) Audio Ports
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
108cc087a1SEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
118cc087a1SEmmanuel Vadot
128cc087a1SEmmanuel Vadotdescription: |
138cc087a1SEmmanuel Vadot  This binding describes the Qualcomm DSP LPASS Audio ports
148cc087a1SEmmanuel Vadot
158cc087a1SEmmanuel Vadotproperties:
168cc087a1SEmmanuel Vadot  compatible:
178cc087a1SEmmanuel Vadot    enum:
188cc087a1SEmmanuel Vadot      - qcom,q6afe-dais
198cc087a1SEmmanuel Vadot
208cc087a1SEmmanuel Vadot  '#sound-dai-cells':
218cc087a1SEmmanuel Vadot    const: 1
228cc087a1SEmmanuel Vadot
238cc087a1SEmmanuel Vadot  '#address-cells':
248cc087a1SEmmanuel Vadot    const: 1
258cc087a1SEmmanuel Vadot
268cc087a1SEmmanuel Vadot  '#size-cells':
278cc087a1SEmmanuel Vadot    const: 0
288cc087a1SEmmanuel Vadot
298cc087a1SEmmanuel Vadot#Digital Audio Interfaces
308cc087a1SEmmanuel VadotpatternProperties:
318cc087a1SEmmanuel Vadot  '^dai@[0-9]+$':
328cc087a1SEmmanuel Vadot    type: object
338cc087a1SEmmanuel Vadot    description:
348cc087a1SEmmanuel Vadot      Q6DSP Digital Audio Interfaces.
358cc087a1SEmmanuel Vadot
368cc087a1SEmmanuel Vadot    properties:
378cc087a1SEmmanuel Vadot      reg:
388cc087a1SEmmanuel Vadot        description:
398cc087a1SEmmanuel Vadot          Digital Audio Interface ID
408cc087a1SEmmanuel Vadot
418cc087a1SEmmanuel Vadot      qcom,sd-lines:
428cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32-array
438cc087a1SEmmanuel Vadot        description:
448cc087a1SEmmanuel Vadot          List of serial data lines used by this dai.should be one or more of the 0-3 sd lines.
458cc087a1SEmmanuel Vadot        minItems: 1
468cc087a1SEmmanuel Vadot        maxItems: 4
478cc087a1SEmmanuel Vadot        uniqueItems: true
488cc087a1SEmmanuel Vadot        items:
498cc087a1SEmmanuel Vadot          minimum: 0
508cc087a1SEmmanuel Vadot          maximum: 3
518cc087a1SEmmanuel Vadot
528cc087a1SEmmanuel Vadot      qcom,tdm-sync-mode:
538cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
548cc087a1SEmmanuel Vadot        enum: [0, 1, 2]
558cc087a1SEmmanuel Vadot        description:
568cc087a1SEmmanuel Vadot          TDM Synchronization mode
578cc087a1SEmmanuel Vadot            0 = Short sync bit mode
588cc087a1SEmmanuel Vadot            1 = Long sync mode
598cc087a1SEmmanuel Vadot            2 = Short sync slot mode
608cc087a1SEmmanuel Vadot
618cc087a1SEmmanuel Vadot      qcom,tdm-sync-src:
628cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
638cc087a1SEmmanuel Vadot        enum: [0, 1]
648cc087a1SEmmanuel Vadot        description:
658cc087a1SEmmanuel Vadot          TDM Synchronization source
668cc087a1SEmmanuel Vadot            0 = External source
678cc087a1SEmmanuel Vadot            1 = Internal source
688cc087a1SEmmanuel Vadot
698cc087a1SEmmanuel Vadot      qcom,tdm-data-out:
708cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
718cc087a1SEmmanuel Vadot        enum: [0, 1]
728cc087a1SEmmanuel Vadot        description:
738cc087a1SEmmanuel Vadot          TDM Data out signal to drive with other masters
748cc087a1SEmmanuel Vadot            0 = Disable
758cc087a1SEmmanuel Vadot            1 = Enable
768cc087a1SEmmanuel Vadot
778cc087a1SEmmanuel Vadot      qcom,tdm-invert-sync:
788cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
798cc087a1SEmmanuel Vadot        enum: [0, 1]
808cc087a1SEmmanuel Vadot        description:
818cc087a1SEmmanuel Vadot          TDM Invert the sync
828cc087a1SEmmanuel Vadot            0 = Normal
838cc087a1SEmmanuel Vadot            1 = Invert
848cc087a1SEmmanuel Vadot
858cc087a1SEmmanuel Vadot      qcom,tdm-data-delay:
868cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
878cc087a1SEmmanuel Vadot        enum: [0, 1, 2]
888cc087a1SEmmanuel Vadot        description:
898cc087a1SEmmanuel Vadot          TDM Number of bit clock to delay data
908cc087a1SEmmanuel Vadot            0 = 0 bit clock cycle
918cc087a1SEmmanuel Vadot            1 = 1 bit clock cycle
928cc087a1SEmmanuel Vadot            2 = 2 bit clock cycle
938cc087a1SEmmanuel Vadot
948cc087a1SEmmanuel Vadot      qcom,tdm-data-align:
958cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
968cc087a1SEmmanuel Vadot        enum: [0, 1]
978cc087a1SEmmanuel Vadot        description:
988cc087a1SEmmanuel Vadot          Indicate how data is packed within the slot. For example, 32 slot
998cc087a1SEmmanuel Vadot          width in case of sample bit width is 24TDM Invert the sync.
1008cc087a1SEmmanuel Vadot            0 = MSB
1018cc087a1SEmmanuel Vadot            1 = LSB
1028cc087a1SEmmanuel Vadot
1038cc087a1SEmmanuel Vadot    required:
1048cc087a1SEmmanuel Vadot      - reg
1058cc087a1SEmmanuel Vadot
1068cc087a1SEmmanuel Vadot    allOf:
1078cc087a1SEmmanuel Vadot      - if:
1088cc087a1SEmmanuel Vadot          properties:
1098cc087a1SEmmanuel Vadot            reg:
1108cc087a1SEmmanuel Vadot              contains:
1118cc087a1SEmmanuel Vadot                # TDM DAI ID range from PRIMARY_TDM_RX_0 - QUINARY_TDM_TX_7
1128cc087a1SEmmanuel Vadot                items:
1138cc087a1SEmmanuel Vadot                  minimum: 24
1148cc087a1SEmmanuel Vadot                  maximum: 103
1158cc087a1SEmmanuel Vadot        then:
1168cc087a1SEmmanuel Vadot          required:
1178cc087a1SEmmanuel Vadot            - qcom,tdm-sync-mode
1188cc087a1SEmmanuel Vadot            - qcom,tdm-sync-src
1198cc087a1SEmmanuel Vadot            - qcom,tdm-data-out
1208cc087a1SEmmanuel Vadot            - qcom,tdm-invert-sync
1218cc087a1SEmmanuel Vadot            - qcom,tdm-data-delay
1228cc087a1SEmmanuel Vadot            - qcom,tdm-data-align
1238cc087a1SEmmanuel Vadot
1248cc087a1SEmmanuel Vadot      - if:
1258cc087a1SEmmanuel Vadot          properties:
1268cc087a1SEmmanuel Vadot            reg:
1278cc087a1SEmmanuel Vadot              contains:
1288cc087a1SEmmanuel Vadot                # MI2S DAI ID range PRIMARY_MI2S_RX - QUATERNARY_MI2S_TX and
1298cc087a1SEmmanuel Vadot                # QUINARY_MI2S_RX - QUINARY_MI2S_TX
1308cc087a1SEmmanuel Vadot                items:
1318cc087a1SEmmanuel Vadot                  oneOf:
1328cc087a1SEmmanuel Vadot                    - minimum: 16
1338cc087a1SEmmanuel Vadot                      maximum: 23
1348cc087a1SEmmanuel Vadot                    - minimum: 127
1358cc087a1SEmmanuel Vadot                      maximum: 128
1368cc087a1SEmmanuel Vadot        then:
1378cc087a1SEmmanuel Vadot          required:
1388cc087a1SEmmanuel Vadot            - qcom,sd-lines
1398cc087a1SEmmanuel Vadot
1408cc087a1SEmmanuel Vadot    additionalProperties: false
1418cc087a1SEmmanuel Vadot
1428cc087a1SEmmanuel Vadotrequired:
1438cc087a1SEmmanuel Vadot  - compatible
1448cc087a1SEmmanuel Vadot  - "#sound-dai-cells"
1458cc087a1SEmmanuel Vadot  - "#address-cells"
1468cc087a1SEmmanuel Vadot  - "#size-cells"
1478cc087a1SEmmanuel Vadot
1488cc087a1SEmmanuel VadotadditionalProperties: false
1498cc087a1SEmmanuel Vadot
1508cc087a1SEmmanuel Vadotexamples:
1518cc087a1SEmmanuel Vadot  - |
152*8bab661aSEmmanuel Vadot    #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
1537ef62cebSEmmanuel Vadot
1547ef62cebSEmmanuel Vadot    dais {
1558cc087a1SEmmanuel Vadot        compatible = "qcom,q6afe-dais";
1568cc087a1SEmmanuel Vadot        #address-cells = <1>;
1578cc087a1SEmmanuel Vadot        #size-cells = <0>;
1588cc087a1SEmmanuel Vadot        #sound-dai-cells = <1>;
1598cc087a1SEmmanuel Vadot
1608cc087a1SEmmanuel Vadot        dai@22 {
1618cc087a1SEmmanuel Vadot            reg = <QUATERNARY_MI2S_RX>;
1628cc087a1SEmmanuel Vadot            qcom,sd-lines = <0 1 2 3>;
1638cc087a1SEmmanuel Vadot        };
1648cc087a1SEmmanuel Vadot    };
165