1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*0e8011faSEmmanuel Vadot%YAML 1.2 3*0e8011faSEmmanuel Vadot--- 4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/realtek,rt5645.yaml# 5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*0e8011faSEmmanuel Vadot 7*0e8011faSEmmanuel Vadottitle: RT5650/RT5645 audio CODEC 8*0e8011faSEmmanuel Vadot 9*0e8011faSEmmanuel Vadotmaintainers: 10*0e8011faSEmmanuel Vadot - Animesh Agarwal <animeshagarwal28@gmail.com> 11*0e8011faSEmmanuel Vadot 12*0e8011faSEmmanuel Vadotdescription: | 13*0e8011faSEmmanuel Vadot This device supports I2C only. 14*0e8011faSEmmanuel Vadot 15*0e8011faSEmmanuel Vadot Pins on the device (for linking into audio routes) for RT5645/RT5650: 16*0e8011faSEmmanuel Vadot * DMIC L1 17*0e8011faSEmmanuel Vadot * DMIC R1 18*0e8011faSEmmanuel Vadot * DMIC L2 19*0e8011faSEmmanuel Vadot * DMIC R2 20*0e8011faSEmmanuel Vadot * IN1P 21*0e8011faSEmmanuel Vadot * IN1N 22*0e8011faSEmmanuel Vadot * IN2P 23*0e8011faSEmmanuel Vadot * IN2N 24*0e8011faSEmmanuel Vadot * Haptic Generator 25*0e8011faSEmmanuel Vadot * HPOL 26*0e8011faSEmmanuel Vadot * HPOR 27*0e8011faSEmmanuel Vadot * LOUTL 28*0e8011faSEmmanuel Vadot * LOUTR 29*0e8011faSEmmanuel Vadot * PDM1L 30*0e8011faSEmmanuel Vadot * PDM1R 31*0e8011faSEmmanuel Vadot * SPOL 32*0e8011faSEmmanuel Vadot * SPOR 33*0e8011faSEmmanuel Vadot 34*0e8011faSEmmanuel VadotallOf: 35*0e8011faSEmmanuel Vadot - $ref: dai-common.yaml# 36*0e8011faSEmmanuel Vadot 37*0e8011faSEmmanuel Vadotproperties: 38*0e8011faSEmmanuel Vadot compatible: 39*0e8011faSEmmanuel Vadot enum: 40*0e8011faSEmmanuel Vadot - realtek,rt5645 41*0e8011faSEmmanuel Vadot - realtek,rt5650 42*0e8011faSEmmanuel Vadot 43*0e8011faSEmmanuel Vadot reg: 44*0e8011faSEmmanuel Vadot maxItems: 1 45*0e8011faSEmmanuel Vadot 46*0e8011faSEmmanuel Vadot interrupts: 47*0e8011faSEmmanuel Vadot maxItems: 1 48*0e8011faSEmmanuel Vadot description: The CODEC's interrupt output. 49*0e8011faSEmmanuel Vadot 50*0e8011faSEmmanuel Vadot avdd-supply: 51*0e8011faSEmmanuel Vadot description: Power supply for AVDD, providing 1.8V. 52*0e8011faSEmmanuel Vadot 53*0e8011faSEmmanuel Vadot cpvdd-supply: 54*0e8011faSEmmanuel Vadot description: Power supply for CPVDD, providing 3.5V. 55*0e8011faSEmmanuel Vadot 56*0e8011faSEmmanuel Vadot hp-detect-gpios: 57*0e8011faSEmmanuel Vadot description: 58*0e8011faSEmmanuel Vadot A GPIO spec for the external headphone detect pin. If jd-mode = 0, we 59*0e8011faSEmmanuel Vadot will get the JD status by getting the value of hp-detect-gpios. 60*0e8011faSEmmanuel Vadot maxItems: 1 61*0e8011faSEmmanuel Vadot 62*0e8011faSEmmanuel Vadot cbj-sleeve-gpios: 63*0e8011faSEmmanuel Vadot description: 64*0e8011faSEmmanuel Vadot A GPIO spec to control the external combo jack circuit to tie the 65*0e8011faSEmmanuel Vadot sleeve/ring2 contacts to the ground or floating. It could avoid some 66*0e8011faSEmmanuel Vadot electric noise from the active speaker jacks. 67*0e8011faSEmmanuel Vadot maxItems: 1 68*0e8011faSEmmanuel Vadot 69*0e8011faSEmmanuel Vadot realtek,in2-differential: 70*0e8011faSEmmanuel Vadot description: 71*0e8011faSEmmanuel Vadot Indicate MIC2 input are differential, rather than single-ended. 72*0e8011faSEmmanuel Vadot type: boolean 73*0e8011faSEmmanuel Vadot 74*0e8011faSEmmanuel Vadot realtek,dmic1-data-pin: 75*0e8011faSEmmanuel Vadot description: Specify which pin to be used as DMIC1 data pin. 76*0e8011faSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 77*0e8011faSEmmanuel Vadot enum: 78*0e8011faSEmmanuel Vadot - 0 # dmic1 is not used 79*0e8011faSEmmanuel Vadot - 1 # using IN2P pin as dmic1 data pin 80*0e8011faSEmmanuel Vadot - 2 # using GPIO6 pin as dmic1 data pin 81*0e8011faSEmmanuel Vadot - 3 # using GPIO10 pin as dmic1 data pin 82*0e8011faSEmmanuel Vadot - 4 # using GPIO12 pin as dmic1 data pin 83*0e8011faSEmmanuel Vadot 84*0e8011faSEmmanuel Vadot realtek,dmic2-data-pin: 85*0e8011faSEmmanuel Vadot description: Specify which pin to be used as DMIC2 data pin. 86*0e8011faSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 87*0e8011faSEmmanuel Vadot enum: 88*0e8011faSEmmanuel Vadot - 0 # dmic2 is not used 89*0e8011faSEmmanuel Vadot - 1 # using IN2N pin as dmic2 data pin 90*0e8011faSEmmanuel Vadot - 2 # using GPIO5 pin as dmic2 data pin 91*0e8011faSEmmanuel Vadot - 3 # using GPIO11 pin as dmic2 data pin 92*0e8011faSEmmanuel Vadot 93*0e8011faSEmmanuel Vadot realtek,jd-mode: 94*0e8011faSEmmanuel Vadot description: The JD mode of rt5645/rt5650. 95*0e8011faSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 96*0e8011faSEmmanuel Vadot enum: 97*0e8011faSEmmanuel Vadot - 0 # rt5645/rt5650 JD function is not used 98*0e8011faSEmmanuel Vadot - 1 # Mode-0 (VDD=3.3V), two port jack detection 99*0e8011faSEmmanuel Vadot - 2 # Mode-1 (VDD=3.3V), one port jack detection 100*0e8011faSEmmanuel Vadot - 3 # Mode-2 (VDD=1.8V), one port jack detection 101*0e8011faSEmmanuel Vadot 102*0e8011faSEmmanuel Vadotrequired: 103*0e8011faSEmmanuel Vadot - compatible 104*0e8011faSEmmanuel Vadot - reg 105*0e8011faSEmmanuel Vadot - interrupts 106*0e8011faSEmmanuel Vadot - avdd-supply 107*0e8011faSEmmanuel Vadot - cpvdd-supply 108*0e8011faSEmmanuel Vadot 109*0e8011faSEmmanuel VadotunevaluatedProperties: false 110*0e8011faSEmmanuel Vadot 111*0e8011faSEmmanuel Vadotexamples: 112*0e8011faSEmmanuel Vadot - | 113*0e8011faSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 114*0e8011faSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 115*0e8011faSEmmanuel Vadot 116*0e8011faSEmmanuel Vadot i2c { 117*0e8011faSEmmanuel Vadot #address-cells = <1>; 118*0e8011faSEmmanuel Vadot #size-cells = <0>; 119*0e8011faSEmmanuel Vadot 120*0e8011faSEmmanuel Vadot codec@1a { 121*0e8011faSEmmanuel Vadot compatible = "realtek,rt5650"; 122*0e8011faSEmmanuel Vadot reg = <0x1a>; 123*0e8011faSEmmanuel Vadot hp-detect-gpios = <&gpio 19 0>; 124*0e8011faSEmmanuel Vadot cbj-sleeve-gpios = <&gpio 20 0>; 125*0e8011faSEmmanuel Vadot interrupt-parent = <&gpio>; 126*0e8011faSEmmanuel Vadot interrupts = <7 IRQ_TYPE_EDGE_FALLING>; 127*0e8011faSEmmanuel Vadot avdd-supply = <&avdd_reg>; 128*0e8011faSEmmanuel Vadot cpvdd-supply = <&cpvdd_supply>; 129*0e8011faSEmmanuel Vadot realtek,jd-mode = <3>; 130*0e8011faSEmmanuel Vadot }; 131*0e8011faSEmmanuel Vadot }; 132