18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/realtek,rt5682s.yaml# 58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68cc087a1SEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: Realtek rt5682s codec 88cc087a1SEmmanuel Vadot 98cc087a1SEmmanuel Vadotmaintainers: 108cc087a1SEmmanuel Vadot - Derek Fang <derek.fang@realtek.com> 118cc087a1SEmmanuel Vadot 128cc087a1SEmmanuel Vadotdescription: | 138cc087a1SEmmanuel Vadot Rt5682s(ALC5682I-VS) is a rt5682i variant which supports I2C only. 148cc087a1SEmmanuel Vadot 15*8bab661aSEmmanuel VadotallOf: 16*8bab661aSEmmanuel Vadot - $ref: dai-common.yaml# 17*8bab661aSEmmanuel Vadot 188cc087a1SEmmanuel Vadotproperties: 198cc087a1SEmmanuel Vadot compatible: 208cc087a1SEmmanuel Vadot const: realtek,rt5682s 218cc087a1SEmmanuel Vadot 228cc087a1SEmmanuel Vadot reg: 238cc087a1SEmmanuel Vadot maxItems: 1 248cc087a1SEmmanuel Vadot description: I2C address of the device. 258cc087a1SEmmanuel Vadot 268cc087a1SEmmanuel Vadot interrupts: 27c9ccf3a3SEmmanuel Vadot maxItems: 1 288cc087a1SEmmanuel Vadot description: The CODEC's interrupt output. 298cc087a1SEmmanuel Vadot 308cc087a1SEmmanuel Vadot realtek,dmic1-data-pin: 318cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 328cc087a1SEmmanuel Vadot enum: 338cc087a1SEmmanuel Vadot - 0 # dmic1 data is not used 348cc087a1SEmmanuel Vadot - 1 # using GPIO2 pin as dmic1 data pin 358cc087a1SEmmanuel Vadot - 2 # using GPIO5 pin as dmic1 data pin 368cc087a1SEmmanuel Vadot description: | 378cc087a1SEmmanuel Vadot Specify which GPIO pin be used as DMIC1 data pin. 388cc087a1SEmmanuel Vadot 398cc087a1SEmmanuel Vadot realtek,dmic1-clk-pin: 408cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 418cc087a1SEmmanuel Vadot enum: 428cc087a1SEmmanuel Vadot - 0 # dmic1 clk is not used 438cc087a1SEmmanuel Vadot - 1 # using GPIO1 pin as dmic1 clock pin 448cc087a1SEmmanuel Vadot - 2 # using GPIO3 pin as dmic1 clock pin 458cc087a1SEmmanuel Vadot description: | 468cc087a1SEmmanuel Vadot Specify which GPIO pin be used as DMIC1 clk pin. 478cc087a1SEmmanuel Vadot 488cc087a1SEmmanuel Vadot realtek,jd-src: 498cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 508cc087a1SEmmanuel Vadot enum: 518cc087a1SEmmanuel Vadot - 0 # No JD is used 528cc087a1SEmmanuel Vadot - 1 # using JD1 as JD source 538cc087a1SEmmanuel Vadot description: | 548cc087a1SEmmanuel Vadot Specify which JD source be used. 558cc087a1SEmmanuel Vadot 568cc087a1SEmmanuel Vadot realtek,ldo1-en-gpios: 578cc087a1SEmmanuel Vadot description: | 588cc087a1SEmmanuel Vadot The GPIO that controls the CODEC's LDO1_EN pin. 598cc087a1SEmmanuel Vadot 608cc087a1SEmmanuel Vadot realtek,dmic-clk-rate-hz: 618cc087a1SEmmanuel Vadot description: | 628cc087a1SEmmanuel Vadot Set the clock rate (hz) for the requirement of the particular DMIC. 638cc087a1SEmmanuel Vadot 648cc087a1SEmmanuel Vadot realtek,dmic-delay-ms: 658cc087a1SEmmanuel Vadot description: | 668cc087a1SEmmanuel Vadot Set the delay time (ms) for the requirement of the particular DMIC. 678cc087a1SEmmanuel Vadot 68e67e8565SEmmanuel Vadot realtek,amic-delay-ms: 69e67e8565SEmmanuel Vadot description: | 70e67e8565SEmmanuel Vadot Set the delay time (ms) for the requirement of the particular platform or AMIC. 71e67e8565SEmmanuel Vadot 728cc087a1SEmmanuel Vadot realtek,dmic-clk-driving-high: 738cc087a1SEmmanuel Vadot type: boolean 748cc087a1SEmmanuel Vadot description: | 758cc087a1SEmmanuel Vadot Set the high driving of the DMIC clock out. 768cc087a1SEmmanuel Vadot 778cc087a1SEmmanuel Vadot clocks: 788cc087a1SEmmanuel Vadot items: 798cc087a1SEmmanuel Vadot - description: phandle and clock specifier for codec MCLK. 808cc087a1SEmmanuel Vadot 818cc087a1SEmmanuel Vadot clock-names: 828cc087a1SEmmanuel Vadot items: 838cc087a1SEmmanuel Vadot - const: mclk 848cc087a1SEmmanuel Vadot 858cc087a1SEmmanuel Vadot "#clock-cells": 868cc087a1SEmmanuel Vadot const: 1 878cc087a1SEmmanuel Vadot 888cc087a1SEmmanuel Vadot clock-output-names: 898cc087a1SEmmanuel Vadot minItems: 2 908cc087a1SEmmanuel Vadot maxItems: 2 918cc087a1SEmmanuel Vadot description: Name given for DAI word clock and bit clock outputs. 928cc087a1SEmmanuel Vadot 93*8bab661aSEmmanuel Vadot "#sound-dai-cells": 94*8bab661aSEmmanuel Vadot const: 1 95*8bab661aSEmmanuel Vadot 96*8bab661aSEmmanuel Vadot AVDD-supply: 97*8bab661aSEmmanuel Vadot description: Regulator supplying analog power through the AVDD pin. 98*8bab661aSEmmanuel Vadot 99*8bab661aSEmmanuel Vadot MICVDD-supply: 100*8bab661aSEmmanuel Vadot description: Regulator supplying power for the microphone bias through the 101*8bab661aSEmmanuel Vadot MICVDD pin. 102*8bab661aSEmmanuel Vadot 103*8bab661aSEmmanuel Vadot DBVDD-supply: 104*8bab661aSEmmanuel Vadot description: Regulator supplying I/O power through the DBVDD pin. 105*8bab661aSEmmanuel Vadot 106*8bab661aSEmmanuel Vadot LDO1-IN-supply: 107*8bab661aSEmmanuel Vadot description: Regulator supplying power to the digital core and charge pump 108*8bab661aSEmmanuel Vadot through the LDO1_IN pin. 109*8bab661aSEmmanuel Vadot 110*8bab661aSEmmanuel VadotunevaluatedProperties: false 1118cc087a1SEmmanuel Vadot 1128cc087a1SEmmanuel Vadotrequired: 1138cc087a1SEmmanuel Vadot - compatible 1148cc087a1SEmmanuel Vadot - reg 115*8bab661aSEmmanuel Vadot - AVDD-supply 116*8bab661aSEmmanuel Vadot - MICVDD-supply 117*8bab661aSEmmanuel Vadot - DBVDD-supply 118*8bab661aSEmmanuel Vadot - LDO1-IN-supply 1198cc087a1SEmmanuel Vadot 1208cc087a1SEmmanuel Vadotexamples: 1218cc087a1SEmmanuel Vadot - | 122c9ccf3a3SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 1238cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1248cc087a1SEmmanuel Vadot 1258cc087a1SEmmanuel Vadot i2c { 1268cc087a1SEmmanuel Vadot #address-cells = <1>; 1278cc087a1SEmmanuel Vadot #size-cells = <0>; 1288cc087a1SEmmanuel Vadot 1298cc087a1SEmmanuel Vadot codec@1a { 1308cc087a1SEmmanuel Vadot compatible = "realtek,rt5682s"; 1318cc087a1SEmmanuel Vadot reg = <0x1a>; 132c9ccf3a3SEmmanuel Vadot interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; 1338cc087a1SEmmanuel Vadot realtek,ldo1-en-gpios = 134c9ccf3a3SEmmanuel Vadot <&gpio 2 GPIO_ACTIVE_HIGH>; 1358cc087a1SEmmanuel Vadot realtek,dmic1-data-pin = <1>; 1368cc087a1SEmmanuel Vadot realtek,dmic1-clk-pin = <1>; 1378cc087a1SEmmanuel Vadot realtek,jd-src = <1>; 1388cc087a1SEmmanuel Vadot 1398cc087a1SEmmanuel Vadot #clock-cells = <1>; 1408cc087a1SEmmanuel Vadot clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk"; 1418cc087a1SEmmanuel Vadot 1428cc087a1SEmmanuel Vadot clocks = <&osc>; 1438cc087a1SEmmanuel Vadot clock-names = "mclk"; 144*8bab661aSEmmanuel Vadot 145*8bab661aSEmmanuel Vadot AVDD-supply = <&avdd_reg>; 146*8bab661aSEmmanuel Vadot MICVDD-supply = <&micvdd_reg>; 147*8bab661aSEmmanuel Vadot DBVDD-supply = <&dbvdd_reg>; 148*8bab661aSEmmanuel Vadot LDO1-IN-supply = <&ldo1_in_reg>; 1498cc087a1SEmmanuel Vadot }; 1508cc087a1SEmmanuel Vadot }; 151