Documentation / devicetree / bindings / sound / wlf,wm8962.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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8962.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Wolfson WM8962 Ultra-Low Power Stereo CODEC

maintainers:
  - patches@opensource.cirrus.com

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    const: wlf,wm8962

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  interrupts:
    maxItems: 1
 
  "#sound-dai-cells":
    const: 0

  AVDD-supply:
    description: Analogue supply.

  CPVDD-supply:
    description: Charge pump power supply.

  DBVDD-supply:
    description: Digital Buffer Supply.

  DCVDD-supply:
    description: Digital Core Supply.

  MICVDD-supply:
    description: Microphone bias amp supply.

  PLLVDD-supply:
    description: PLL Supply

  SPKVDD1-supply:
    description: Supply for left speaker drivers.

  SPKVDD2-supply:
    description: Supply for right speaker drivers.

  spk-mono:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      If present, the SPK_MONO bit of R51 (Class D Control 2) gets set,
      indicating that the speaker is in mono mode.

  mic-cfg:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Default register value for R48 (Additional Control 4).
      If absent, the default should be the register default.

  gpio-cfg:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 6
    maxItems: 6
    description:
      A list of GPIO configuration register values.  If absent, no
      configuration of these registers is performed.  Note that only values
      within [0x0, 0xffff] are valid.  Any other value is regarded as setting
      the GPIO register to its reset value 0x0.

  port:
    $ref: audio-graph-port.yaml#
    unevaluatedProperties: false

required:
  - compatible
  - reg
  - AVDD-supply
  - CPVDD-supply
  - DBVDD-supply
  - DCVDD-supply
  - MICVDD-supply
  - PLLVDD-supply
  - SPKVDD1-supply
  - SPKVDD2-supply

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/imx6qdl-clock.h>
 
    i2c {
          #address-cells = <1>;
          #size-cells = <0>;
 
          wm8962: codec@1a {
                  compatible = "wlf,wm8962";
                  reg = <0x1a>;
                  clocks = <&clks IMX6QDL_CLK_CKO>;
                  DCVDD-supply = <&reg_audio>;
                  DBVDD-supply = <&reg_audio>;
                  AVDD-supply = <&reg_audio>;
                  CPVDD-supply = <&reg_audio>;
                  MICVDD-supply = <&reg_audio>;
                  PLLVDD-supply = <&reg_audio>;
                  SPKVDD1-supply = <&reg_audio>;
                  SPKVDD2-supply = <&reg_audio>;
                  gpio-cfg = <
                          0x0000 /* 0:Default */
                          0x0000 /* 1:Default */
                          0x0013 /* 2:FN_DMICCLK */
                          0x0000 /* 3:Default */
                          0x8014 /* 4:FN_DMICCDAT */
                          0x0000 /* 5:Default */
                  >;
          };
    };