Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame^] | 1 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/sound/qcom,lpass-rx-macro.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: LPASS(Low Power Audio Subsystem) RX Macro audio codec |
| 8 | |
| 9 | maintainers: |
| 10 | - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> |
| 11 | |
| 12 | properties: |
| 13 | compatible: |
| 14 | enum: |
| 15 | - qcom,sc7280-lpass-rx-macro |
| 16 | - qcom,sm8250-lpass-rx-macro |
| 17 | - qcom,sm8450-lpass-rx-macro |
| 18 | - qcom,sm8550-lpass-rx-macro |
| 19 | - qcom,sc8280xp-lpass-rx-macro |
| 20 | |
| 21 | reg: |
| 22 | maxItems: 1 |
| 23 | |
| 24 | "#sound-dai-cells": |
| 25 | const: 1 |
| 26 | |
| 27 | '#clock-cells': |
| 28 | const: 0 |
| 29 | |
| 30 | clocks: |
| 31 | minItems: 3 |
| 32 | maxItems: 5 |
| 33 | |
| 34 | clock-names: |
| 35 | minItems: 3 |
| 36 | maxItems: 5 |
| 37 | |
| 38 | clock-output-names: |
| 39 | maxItems: 1 |
| 40 | |
| 41 | power-domains: |
| 42 | maxItems: 2 |
| 43 | |
| 44 | power-domain-names: |
| 45 | items: |
| 46 | - const: macro |
| 47 | - const: dcodec |
| 48 | |
| 49 | required: |
| 50 | - compatible |
| 51 | - reg |
| 52 | - "#sound-dai-cells" |
| 53 | |
| 54 | allOf: |
| 55 | - $ref: dai-common.yaml# |
| 56 | - if: |
| 57 | properties: |
| 58 | compatible: |
| 59 | enum: |
| 60 | - qcom,sc7280-lpass-rx-macro |
| 61 | then: |
| 62 | properties: |
| 63 | clock-names: |
| 64 | oneOf: |
| 65 | - items: # for ADSP based platforms |
| 66 | - const: mclk |
| 67 | - const: npl |
| 68 | - const: macro |
| 69 | - const: dcodec |
| 70 | - const: fsgen |
| 71 | - items: # for ADSP bypass based platforms |
| 72 | - const: mclk |
| 73 | - const: npl |
| 74 | - const: fsgen |
| 75 | |
| 76 | - if: |
| 77 | properties: |
| 78 | compatible: |
| 79 | enum: |
| 80 | - qcom,sc8280xp-lpass-rx-macro |
| 81 | - qcom,sm8250-lpass-rx-macro |
| 82 | - qcom,sm8450-lpass-rx-macro |
| 83 | then: |
| 84 | properties: |
| 85 | clocks: |
| 86 | minItems: 5 |
| 87 | maxItems: 5 |
| 88 | clock-names: |
| 89 | items: |
| 90 | - const: mclk |
| 91 | - const: npl |
| 92 | - const: macro |
| 93 | - const: dcodec |
| 94 | - const: fsgen |
| 95 | |
| 96 | - if: |
| 97 | properties: |
| 98 | compatible: |
| 99 | enum: |
| 100 | - qcom,sm8550-lpass-rx-macro |
| 101 | then: |
| 102 | properties: |
| 103 | clocks: |
| 104 | minItems: 4 |
| 105 | maxItems: 4 |
| 106 | clock-names: |
| 107 | items: |
| 108 | - const: mclk |
| 109 | - const: macro |
| 110 | - const: dcodec |
| 111 | - const: fsgen |
| 112 | |
| 113 | unevaluatedProperties: false |
| 114 | |
| 115 | examples: |
| 116 | - | |
| 117 | #include <dt-bindings/sound/qcom,q6afe.h> |
| 118 | codec@3200000 { |
| 119 | compatible = "qcom,sm8250-lpass-rx-macro"; |
| 120 | reg = <0x3200000 0x1000>; |
| 121 | #sound-dai-cells = <1>; |
| 122 | #clock-cells = <0>; |
| 123 | clocks = <&audiocc 0>, |
| 124 | <&audiocc 1>, |
| 125 | <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, |
| 126 | <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, |
| 127 | <&vamacro>; |
| 128 | clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; |
| 129 | clock-output-names = "mclk"; |
| 130 | }; |