Documentation / devicetree / bindings / sound / ti,tlv320aic32x4.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,tlv320aic32x4.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments TLV320AIC32x4 Stereo Audio codec

maintainers:
  - Alexander Stein <alexander.stein@ew.tq-group.com>

description: |
  The TLV320AIC32x4 audio codec can be accessed using I2C or SPI

properties:
  compatible:
    enum:
      - ti,tas2505
      - ti,tlv320aic32x4
      - ti,tlv320aic32x6

  reg:
    maxItems: 1

  clocks:
    items:
      - description: Master clock

  clock-names:
    items:
      - const: mclk

  av-supply:
    description: Analog core power supply

  dv-supply:
    description: Digital core power supply

  iov-supply:
    description: Digital IO power supply

  ldoin-supply:
    description: LDO power supply

  reset-gpios:
    maxItems: 1
 
  '#sound-dai-cells':
    const: 0

  aic32x4-gpio-func:
    description: |
       GPIO function configuration for pins MFP1-MFP5.
       Types are defined in include/sound/tlv320aic32x4.h
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 5
    maxItems: 5

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - iov-supply

allOf:
  - $ref: dai-common.yaml#
  - if:
      not:
        required:
          - ldoin-supply
    then:
      required:
        - av-supply
        - dv-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      audio-codec@18 {
        compatible = "ti,tlv320aic32x4";
        reg = <0x18>;
        iov-supply = <&reg_3v3>;
        ldoin-supply = <&reg_3v3>;
        clocks = <&clks 201>;
        clock-names = "mclk";
        aic32x4-gpio-func = <
          0xff /* AIC32X4_MFPX_DEFAULT_VALUE */
          0xff /* AIC32X4_MFPX_DEFAULT_VALUE */
          0x04 /* MFP3 AIC32X4_MFP3_GPIO_ENABLED */
          0xff /* AIC32X4_MFPX_DEFAULT_VALUE */
          0x08 /* MFP5 AIC32X4_MFP5_GPIO_INPUT */
        >;
      };
    };