brintos

brintos / linux-shallow public Read only

0
0
Text · 3.2 KiB · 13f09f1 Raw
132 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/sound/realtek,rt5645.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: RT5650/RT5645 audio CODEC8 9maintainers:10  - Animesh Agarwal <animeshagarwal28@gmail.com>11 12description: |13  This device supports I2C only.14 15  Pins on the device (for linking into audio routes) for RT5645/RT5650:16    * DMIC L117    * DMIC R118    * DMIC L219    * DMIC R220    * IN1P21    * IN1N22    * IN2P23    * IN2N24    * Haptic Generator25    * HPOL26    * HPOR27    * LOUTL28    * LOUTR29    * PDM1L30    * PDM1R31    * SPOL32    * SPOR33 34allOf:35  - $ref: dai-common.yaml#36 37properties:38  compatible:39    enum:40      - realtek,rt564541      - realtek,rt565042 43  reg:44    maxItems: 145 46  interrupts:47    maxItems: 148    description: The CODEC's interrupt output.49 50  avdd-supply:51    description: Power supply for AVDD, providing 1.8V.52 53  cpvdd-supply:54    description: Power supply for CPVDD, providing 3.5V.55 56  hp-detect-gpios:57    description: 58      A GPIO spec for the external headphone detect pin. If jd-mode = 0, we59      will get the JD status by getting the value of hp-detect-gpios.60    maxItems: 161 62  cbj-sleeve-gpios:63    description:64      A GPIO spec to control the external combo jack circuit to tie the65      sleeve/ring2 contacts to the ground or floating. It could avoid some66      electric noise from the active speaker jacks.67    maxItems: 168 69  realtek,in2-differential:70    description:71      Indicate MIC2 input are differential, rather than single-ended.72    type: boolean73 74  realtek,dmic1-data-pin:75    description: Specify which pin to be used as DMIC1 data pin.76    $ref: /schemas/types.yaml#/definitions/uint3277    enum:78      - 0 # dmic1 is not used79      - 1 # using IN2P pin as dmic1 data pin80      - 2 # using GPIO6 pin as dmic1 data pin81      - 3 # using GPIO10 pin as dmic1 data pin82      - 4 # using GPIO12 pin as dmic1 data pin83 84  realtek,dmic2-data-pin:85    description: Specify which pin to be used as DMIC2 data pin.86    $ref: /schemas/types.yaml#/definitions/uint3287    enum:88      - 0 # dmic2 is not used89      - 1 # using IN2N pin as dmic2 data pin90      - 2 # using GPIO5 pin as dmic2 data pin91      - 3 # using GPIO11 pin as dmic2 data pin92 93  realtek,jd-mode:94    description: The JD mode of rt5645/rt5650.95    $ref: /schemas/types.yaml#/definitions/uint3296    enum:97      - 0 # rt5645/rt5650 JD function is not used98      - 1 # Mode-0 (VDD=3.3V), two port jack detection99      - 2 # Mode-1 (VDD=3.3V), one port jack detection100      - 3 # Mode-2 (VDD=1.8V), one port jack detection101 102required:103  - compatible104  - reg105  - interrupts106  - avdd-supply107  - cpvdd-supply108 109unevaluatedProperties: false110 111examples:112  - |113    #include <dt-bindings/gpio/gpio.h>114    #include <dt-bindings/interrupt-controller/irq.h>115 116    i2c {117        #address-cells = <1>;118        #size-cells = <0>;119 120        codec@1a {121            compatible = "realtek,rt5650";122            reg = <0x1a>;123            hp-detect-gpios = <&gpio 19 0>;124            cbj-sleeve-gpios = <&gpio 20 0>;125            interrupt-parent = <&gpio>;126            interrupts = <7 IRQ_TYPE_EDGE_FALLING>;127            avdd-supply = <&avdd_reg>;128            cpvdd-supply = <&cpvdd_supply>;129            realtek,jd-mode = <3>;130        };131    };132