1*2846c905SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*2846c905SEmmanuel Vadot%YAML 1.2 3*2846c905SEmmanuel Vadot--- 4*2846c905SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/realtek,rt5682.yaml# 5*2846c905SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*2846c905SEmmanuel Vadot 7*2846c905SEmmanuel Vadottitle: Realtek rt5682 and rt5682i codecs 8*2846c905SEmmanuel Vadot 9*2846c905SEmmanuel Vadotmaintainers: 10*2846c905SEmmanuel Vadot - Bard Liao <bardliao@realtek.com> 11*2846c905SEmmanuel Vadot 12*2846c905SEmmanuel VadotallOf: 13*2846c905SEmmanuel Vadot - $ref: dai-common.yaml# 14*2846c905SEmmanuel Vadot 15*2846c905SEmmanuel Vadotproperties: 16*2846c905SEmmanuel Vadot compatible: 17*2846c905SEmmanuel Vadot enum: 18*2846c905SEmmanuel Vadot - realtek,rt5682 19*2846c905SEmmanuel Vadot - realtek,rt5682i 20*2846c905SEmmanuel Vadot 21*2846c905SEmmanuel Vadot reg: 22*2846c905SEmmanuel Vadot maxItems: 1 23*2846c905SEmmanuel Vadot description: I2C address of the device. 24*2846c905SEmmanuel Vadot 25*2846c905SEmmanuel Vadot interrupts: 26*2846c905SEmmanuel Vadot maxItems: 1 27*2846c905SEmmanuel Vadot description: The CODEC's interrupt output. 28*2846c905SEmmanuel Vadot 29*2846c905SEmmanuel Vadot realtek,dmic1-data-pin: 30*2846c905SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 31*2846c905SEmmanuel Vadot enum: 32*2846c905SEmmanuel Vadot - 0 # dmic1 data is not used 33*2846c905SEmmanuel Vadot - 1 # using GPIO2 pin as dmic1 data pin 34*2846c905SEmmanuel Vadot - 2 # using GPIO5 pin as dmic1 data pin 35*2846c905SEmmanuel Vadot description: 36*2846c905SEmmanuel Vadot Specify which GPIO pin be used as DMIC1 data pin. 37*2846c905SEmmanuel Vadot 38*2846c905SEmmanuel Vadot realtek,dmic1-clk-pin: 39*2846c905SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 40*2846c905SEmmanuel Vadot enum: 41*2846c905SEmmanuel Vadot - 0 # using GPIO1 pin as dmic1 clock pin 42*2846c905SEmmanuel Vadot - 1 # using GPIO3 pin as dmic1 clock pin 43*2846c905SEmmanuel Vadot description: 44*2846c905SEmmanuel Vadot Specify which GPIO pin be used as DMIC1 clk pin. 45*2846c905SEmmanuel Vadot 46*2846c905SEmmanuel Vadot realtek,jd-src: 47*2846c905SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 48*2846c905SEmmanuel Vadot enum: 49*2846c905SEmmanuel Vadot - 0 # No JD is used 50*2846c905SEmmanuel Vadot - 1 # using JD1 as JD source 51*2846c905SEmmanuel Vadot description: 52*2846c905SEmmanuel Vadot Specify which JD source be used. 53*2846c905SEmmanuel Vadot 54*2846c905SEmmanuel Vadot realtek,ldo1-en-gpios: 55*2846c905SEmmanuel Vadot description: 56*2846c905SEmmanuel Vadot The GPIO that controls the CODEC's LDO1_EN pin. 57*2846c905SEmmanuel Vadot 58*2846c905SEmmanuel Vadot realtek,btndet-delay: 59*2846c905SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 60*2846c905SEmmanuel Vadot description: 61*2846c905SEmmanuel Vadot The debounce delay for push button. 62*2846c905SEmmanuel Vadot The delay time is realtek,btndet-delay value multiple of 8.192 ms. 63*2846c905SEmmanuel Vadot If absent, the default is 16. 64*2846c905SEmmanuel Vadot 65*2846c905SEmmanuel Vadot realtek,dmic-clk-rate-hz: 66*2846c905SEmmanuel Vadot description: 67*2846c905SEmmanuel Vadot Set the clock rate (hz) for the requirement of the particular DMIC. 68*2846c905SEmmanuel Vadot 69*2846c905SEmmanuel Vadot realtek,dmic-delay-ms: 70*2846c905SEmmanuel Vadot description: 71*2846c905SEmmanuel Vadot Set the delay time (ms) for the requirement of the particular DMIC. 72*2846c905SEmmanuel Vadot 73*2846c905SEmmanuel Vadot realtek,dmic-clk-driving-high: 74*2846c905SEmmanuel Vadot type: boolean 75*2846c905SEmmanuel Vadot description: 76*2846c905SEmmanuel Vadot Set the high driving of the DMIC clock out. 77*2846c905SEmmanuel Vadot 78*2846c905SEmmanuel Vadot clocks: 79*2846c905SEmmanuel Vadot items: 80*2846c905SEmmanuel Vadot - description: phandle and clock specifier for codec MCLK. 81*2846c905SEmmanuel Vadot 82*2846c905SEmmanuel Vadot clock-names: 83*2846c905SEmmanuel Vadot items: 84*2846c905SEmmanuel Vadot - const: mclk 85*2846c905SEmmanuel Vadot 86*2846c905SEmmanuel Vadot "#clock-cells": 87*2846c905SEmmanuel Vadot const: 1 88*2846c905SEmmanuel Vadot 89*2846c905SEmmanuel Vadot clock-output-names: 90*2846c905SEmmanuel Vadot minItems: 2 91*2846c905SEmmanuel Vadot maxItems: 2 92*2846c905SEmmanuel Vadot description: Name given for DAI word clock and bit clock outputs. 93*2846c905SEmmanuel Vadot 94*2846c905SEmmanuel Vadot "#sound-dai-cells": 95*2846c905SEmmanuel Vadot const: 1 96*2846c905SEmmanuel Vadot 97*2846c905SEmmanuel Vadot AVDD-supply: 98*2846c905SEmmanuel Vadot description: Regulator supplying analog power through the AVDD pin. 99*2846c905SEmmanuel Vadot 100*2846c905SEmmanuel Vadot MICVDD-supply: 101*2846c905SEmmanuel Vadot description: Regulator supplying power for the microphone bias through 102*2846c905SEmmanuel Vadot the MICVDD pin. 103*2846c905SEmmanuel Vadot 104*2846c905SEmmanuel Vadot VBAT-supply: 105*2846c905SEmmanuel Vadot description: Regulator supplying battery power through the VBAT pin. 106*2846c905SEmmanuel Vadot 107*2846c905SEmmanuel Vadot DBVDD-supply: 108*2846c905SEmmanuel Vadot description: Regulator supplying I/O power through the DBVDD pin. 109*2846c905SEmmanuel Vadot 110*2846c905SEmmanuel Vadot LDO1-IN-supply: 111*2846c905SEmmanuel Vadot description: Regulator supplying power to the digital core and charge 112*2846c905SEmmanuel Vadot pump through the LDO1_IN pin. 113*2846c905SEmmanuel Vadot 114*2846c905SEmmanuel Vadotrequired: 115*2846c905SEmmanuel Vadot - compatible 116*2846c905SEmmanuel Vadot - reg 117*2846c905SEmmanuel Vadot - AVDD-supply 118*2846c905SEmmanuel Vadot - VBAT-supply 119*2846c905SEmmanuel Vadot - MICVDD-supply 120*2846c905SEmmanuel Vadot - DBVDD-supply 121*2846c905SEmmanuel Vadot - LDO1-IN-supply 122*2846c905SEmmanuel Vadot 123*2846c905SEmmanuel VadotunevaluatedProperties: false 124*2846c905SEmmanuel Vadot 125*2846c905SEmmanuel Vadotexamples: 126*2846c905SEmmanuel Vadot - | 127*2846c905SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 128*2846c905SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 129*2846c905SEmmanuel Vadot 130*2846c905SEmmanuel Vadot i2c { 131*2846c905SEmmanuel Vadot #address-cells = <1>; 132*2846c905SEmmanuel Vadot #size-cells = <0>; 133*2846c905SEmmanuel Vadot 134*2846c905SEmmanuel Vadot codec@1a { 135*2846c905SEmmanuel Vadot compatible = "realtek,rt5682"; 136*2846c905SEmmanuel Vadot reg = <0x1a>; 137*2846c905SEmmanuel Vadot interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; 138*2846c905SEmmanuel Vadot realtek,ldo1-en-gpios = 139*2846c905SEmmanuel Vadot <&gpio 2 GPIO_ACTIVE_HIGH>; 140*2846c905SEmmanuel Vadot realtek,dmic1-data-pin = <1>; 141*2846c905SEmmanuel Vadot realtek,dmic1-clk-pin = <1>; 142*2846c905SEmmanuel Vadot realtek,jd-src = <1>; 143*2846c905SEmmanuel Vadot 144*2846c905SEmmanuel Vadot #clock-cells = <1>; 145*2846c905SEmmanuel Vadot clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk"; 146*2846c905SEmmanuel Vadot 147*2846c905SEmmanuel Vadot clocks = <&osc>; 148*2846c905SEmmanuel Vadot clock-names = "mclk"; 149*2846c905SEmmanuel Vadot 150*2846c905SEmmanuel Vadot AVDD-supply = <&avdd_reg>; 151*2846c905SEmmanuel Vadot VBAT-supply = <&vbat_reg>; 152*2846c905SEmmanuel Vadot MICVDD-supply = <&micvdd_reg>; 153*2846c905SEmmanuel Vadot DBVDD-supply = <&dbvdd_reg>; 154*2846c905SEmmanuel Vadot LDO1-IN-supply = <&ldo1_in_reg>; 155*2846c905SEmmanuel Vadot }; 156*2846c905SEmmanuel Vadot }; 157