150159fdbSDerek Fang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 250159fdbSDerek Fang%YAML 1.2 350159fdbSDerek Fang--- 450159fdbSDerek Fang$id: http://devicetree.org/schemas/sound/realtek,rt5682s.yaml# 550159fdbSDerek Fang$schema: http://devicetree.org/meta-schemas/core.yaml# 650159fdbSDerek Fang 7*a612130cSKrzysztof Kozlowskititle: Realtek rt5682s codec 850159fdbSDerek Fang 950159fdbSDerek Fangmaintainers: 1050159fdbSDerek Fang - Derek Fang <derek.fang@realtek.com> 1150159fdbSDerek Fang 1250159fdbSDerek Fangdescription: | 1350159fdbSDerek Fang Rt5682s(ALC5682I-VS) is a rt5682i variant which supports I2C only. 1450159fdbSDerek Fang 1558ae9a2aSKrzysztof KozlowskiallOf: 1658ae9a2aSKrzysztof Kozlowski - $ref: dai-common.yaml# 1758ae9a2aSKrzysztof Kozlowski 1850159fdbSDerek Fangproperties: 1950159fdbSDerek Fang compatible: 2050159fdbSDerek Fang const: realtek,rt5682s 2150159fdbSDerek Fang 2250159fdbSDerek Fang reg: 2350159fdbSDerek Fang maxItems: 1 2450159fdbSDerek Fang description: I2C address of the device. 2550159fdbSDerek Fang 2650159fdbSDerek Fang interrupts: 270cfe7615SRob Herring maxItems: 1 2850159fdbSDerek Fang description: The CODEC's interrupt output. 2950159fdbSDerek Fang 3050159fdbSDerek Fang realtek,dmic1-data-pin: 31a7a18abbSKrzysztof Kozlowski $ref: /schemas/types.yaml#/definitions/uint32 3250159fdbSDerek Fang enum: 3350159fdbSDerek Fang - 0 # dmic1 data is not used 3450159fdbSDerek Fang - 1 # using GPIO2 pin as dmic1 data pin 3550159fdbSDerek Fang - 2 # using GPIO5 pin as dmic1 data pin 3691cf4559SDerek Fang description: | 3791cf4559SDerek Fang Specify which GPIO pin be used as DMIC1 data pin. 3850159fdbSDerek Fang 3950159fdbSDerek Fang realtek,dmic1-clk-pin: 40a7a18abbSKrzysztof Kozlowski $ref: /schemas/types.yaml#/definitions/uint32 4150159fdbSDerek Fang enum: 4250159fdbSDerek Fang - 0 # dmic1 clk is not used 4350159fdbSDerek Fang - 1 # using GPIO1 pin as dmic1 clock pin 4450159fdbSDerek Fang - 2 # using GPIO3 pin as dmic1 clock pin 4591cf4559SDerek Fang description: | 4691cf4559SDerek Fang Specify which GPIO pin be used as DMIC1 clk pin. 4750159fdbSDerek Fang 4850159fdbSDerek Fang realtek,jd-src: 49a7a18abbSKrzysztof Kozlowski $ref: /schemas/types.yaml#/definitions/uint32 5050159fdbSDerek Fang enum: 5150159fdbSDerek Fang - 0 # No JD is used 5250159fdbSDerek Fang - 1 # using JD1 as JD source 5391cf4559SDerek Fang description: | 5491cf4559SDerek Fang Specify which JD source be used. 5550159fdbSDerek Fang 5650159fdbSDerek Fang realtek,ldo1-en-gpios: 5750159fdbSDerek Fang description: | 5850159fdbSDerek Fang The GPIO that controls the CODEC's LDO1_EN pin. 5950159fdbSDerek Fang 6050159fdbSDerek Fang realtek,dmic-clk-rate-hz: 6150159fdbSDerek Fang description: | 6250159fdbSDerek Fang Set the clock rate (hz) for the requirement of the particular DMIC. 6350159fdbSDerek Fang 6450159fdbSDerek Fang realtek,dmic-delay-ms: 6550159fdbSDerek Fang description: | 6650159fdbSDerek Fang Set the delay time (ms) for the requirement of the particular DMIC. 6750159fdbSDerek Fang 686c7ac18cSShuming Fan realtek,amic-delay-ms: 696c7ac18cSShuming Fan description: | 706c7ac18cSShuming Fan Set the delay time (ms) for the requirement of the particular platform or AMIC. 716c7ac18cSShuming Fan 7250159fdbSDerek Fang realtek,dmic-clk-driving-high: 7350159fdbSDerek Fang type: boolean 7450159fdbSDerek Fang description: | 7550159fdbSDerek Fang Set the high driving of the DMIC clock out. 7650159fdbSDerek Fang 7750159fdbSDerek Fang clocks: 7850159fdbSDerek Fang items: 7950159fdbSDerek Fang - description: phandle and clock specifier for codec MCLK. 8050159fdbSDerek Fang 8150159fdbSDerek Fang clock-names: 8250159fdbSDerek Fang items: 83a7a18abbSKrzysztof Kozlowski - const: mclk 8450159fdbSDerek Fang 8550159fdbSDerek Fang "#clock-cells": 8650159fdbSDerek Fang const: 1 8750159fdbSDerek Fang 8850159fdbSDerek Fang clock-output-names: 8991cf4559SDerek Fang minItems: 2 9091cf4559SDerek Fang maxItems: 2 9191cf4559SDerek Fang description: Name given for DAI word clock and bit clock outputs. 9250159fdbSDerek Fang 931c448739SNícolas F. R. A. Prado "#sound-dai-cells": 941c448739SNícolas F. R. A. Prado const: 1 951c448739SNícolas F. R. A. Prado 9616346026SNícolas F. R. A. Prado AVDD-supply: 9716346026SNícolas F. R. A. Prado description: Regulator supplying analog power through the AVDD pin. 9816346026SNícolas F. R. A. Prado 9916346026SNícolas F. R. A. Prado MICVDD-supply: 10016346026SNícolas F. R. A. Prado description: Regulator supplying power for the microphone bias through the 10116346026SNícolas F. R. A. Prado MICVDD pin. 10216346026SNícolas F. R. A. Prado 103ed20a9bfSNícolas F. R. A. Prado DBVDD-supply: 104ed20a9bfSNícolas F. R. A. Prado description: Regulator supplying I/O power through the DBVDD pin. 105ed20a9bfSNícolas F. R. A. Prado 106ed20a9bfSNícolas F. R. A. Prado LDO1-IN-supply: 107ed20a9bfSNícolas F. R. A. Prado description: Regulator supplying power to the digital core and charge pump 108ed20a9bfSNícolas F. R. A. Prado through the LDO1_IN pin. 109ed20a9bfSNícolas F. R. A. Prado 11058ae9a2aSKrzysztof KozlowskiunevaluatedProperties: false 11150159fdbSDerek Fang 11250159fdbSDerek Fangrequired: 11350159fdbSDerek Fang - compatible 11450159fdbSDerek Fang - reg 11516346026SNícolas F. R. A. Prado - AVDD-supply 11616346026SNícolas F. R. A. Prado - MICVDD-supply 117ed20a9bfSNícolas F. R. A. Prado - DBVDD-supply 118ed20a9bfSNícolas F. R. A. Prado - LDO1-IN-supply 11950159fdbSDerek Fang 120a7a18abbSKrzysztof Kozlowskiexamples: 12150159fdbSDerek Fang - | 1220cfe7615SRob Herring #include <dt-bindings/gpio/gpio.h> 123a7a18abbSKrzysztof Kozlowski #include <dt-bindings/interrupt-controller/irq.h> 124a7a18abbSKrzysztof Kozlowski 125a7a18abbSKrzysztof Kozlowski i2c { 126a7a18abbSKrzysztof Kozlowski #address-cells = <1>; 127a7a18abbSKrzysztof Kozlowski #size-cells = <0>; 128a7a18abbSKrzysztof Kozlowski 129a7a18abbSKrzysztof Kozlowski codec@1a { 13050159fdbSDerek Fang compatible = "realtek,rt5682s"; 13150159fdbSDerek Fang reg = <0x1a>; 1320cfe7615SRob Herring interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; 13350159fdbSDerek Fang realtek,ldo1-en-gpios = 1340cfe7615SRob Herring <&gpio 2 GPIO_ACTIVE_HIGH>; 13550159fdbSDerek Fang realtek,dmic1-data-pin = <1>; 13650159fdbSDerek Fang realtek,dmic1-clk-pin = <1>; 13750159fdbSDerek Fang realtek,jd-src = <1>; 13850159fdbSDerek Fang 13950159fdbSDerek Fang #clock-cells = <1>; 14050159fdbSDerek Fang clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk"; 14150159fdbSDerek Fang 14250159fdbSDerek Fang clocks = <&osc>; 14350159fdbSDerek Fang clock-names = "mclk"; 14416346026SNícolas F. R. A. Prado 14516346026SNícolas F. R. A. Prado AVDD-supply = <&avdd_reg>; 14616346026SNícolas F. R. A. Prado MICVDD-supply = <&micvdd_reg>; 147ed20a9bfSNícolas F. R. A. Prado DBVDD-supply = <&dbvdd_reg>; 148ed20a9bfSNícolas F. R. A. Prado LDO1-IN-supply = <&ldo1_in_reg>; 14950159fdbSDerek Fang }; 150a7a18abbSKrzysztof Kozlowski }; 151