Documentation / devicetree / bindings / sound / qcom,wcd9335.yaml


Based on kernel version 6.9. Page generated on 2024-05-14 10:02 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
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,wcd9335.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm WCD9335 Audio Codec

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

description:
  Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC with in-built
  Soundwire controller and interrupt mux. It supports both I2S/I2C and SLIMbus
  audio interfaces.

properties:
  compatible:
    const: slim217,1a0

  reg:
    maxItems: 1

  clocks:
    maxItems: 2

  clock-names:
    items:
      - const: mclk
      - const: slimbus

  interrupts:
    maxItems: 2

  interrupt-names:
    items:
      - const: intr1
      - const: intr2

  interrupt-controller: true
 
  '#interrupt-cells':
    const: 1

  reset-gpios:
    maxItems: 1

  slim-ifc-dev:
    description: SLIM IFC device interface
    $ref: /schemas/types.yaml#/definitions/phandle
 
  '#sound-dai-cells':
    const: 1

  vdd-buck-supply:
    description: 1.8V buck supply

  vdd-buck-sido-supply:
    description: 1.8V SIDO buck supply

  vdd-io-supply:
    description: 1.8V I/O supply

  vdd-micbias-supply:
    description: micbias supply

  vdd-rx-supply:
    description: 1.8V rx supply

  vdd-tx-supply:
    description: 1.8V tx supply

  vdd-vbat-supply:
    description: vbat supply

required:
  - compatible
  - reg

allOf:
  - $ref: dai-common.yaml#
  - if:
      required:
        - slim-ifc-dev
    then:
      required:
        - clocks
        - clock-names
        - interrupts
        - interrupt-names
        - interrupt-controller
        - '#interrupt-cells'
        - reset-gpios
        - slim-ifc-dev
        - '#sound-dai-cells'
        - vdd-buck-supply
        - vdd-buck-sido-supply
        - vdd-io-supply
        - vdd-rx-supply
        - vdd-tx-supply
    else:
      properties:
        clocks: false
        clock-names: false
        interrupts: false
        interrupt-names: false
        interrupt-controller: false
        '#interrupt-cells': false
        reset-gpios: false
        slim-ifc-dev: false
        '#sound-dai-cells': false
        vdd-buck-supply: false
        vdd-buck-sido-supply: false
        vdd-io-supply: false
        vdd-micbias-supply: false
        vdd-rx-supply: false
        vdd-tx-supply: false
        vdd-vbat-supply: false

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/qcom,rpmcc.h>
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
 
    tasha_ifd: codec@0,0 {
        compatible = "slim217,1a0";
        reg = <0 0>;
    };
 
    codec@1,0 {
        compatible = "slim217,1a0";
        reg = <1 0>;
 
        clock-names = "mclk", "slimbus";
        clocks = <&div1_mclk>, <&rpmcc RPM_SMD_BB_CLK1>;
 
        interrupt-parent = <&tlmm>;
        interrupts = <54 IRQ_TYPE_LEVEL_HIGH>,
                     <53 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "intr1", "intr2";
        interrupt-controller;
        #interrupt-cells = <1>;
 
        reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
        slim-ifc-dev = <&tasha_ifd>;
        #sound-dai-cells = <1>;
 
        vdd-buck-supply = <&vreg_s4a_1p8>;
        vdd-buck-sido-supply = <&vreg_s4a_1p8>;
        vdd-tx-supply = <&vreg_s4a_1p8>;
        vdd-rx-supply = <&vreg_s4a_1p8>;
        vdd-io-supply = <&vreg_s4a_1p8>;
    };