18c2ecf20Sopenharmony_ciRT5682 audio CODEC
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis device supports I2C only.
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciRequired properties:
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci- compatible : "realtek,rt5682" or "realtek,rt5682i"
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci- reg : The I2C address of the device.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciOptional properties:
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci- interrupts : The CODEC's interrupt output.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci- realtek,dmic1-data-pin
168c2ecf20Sopenharmony_ci  0: dmic1 is not used
178c2ecf20Sopenharmony_ci  1: using GPIO2 pin as dmic1 data pin
188c2ecf20Sopenharmony_ci  2: using GPIO5 pin as dmic1 data pin
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci- realtek,dmic1-clk-pin
218c2ecf20Sopenharmony_ci  0: using GPIO1 pin as dmic1 clock pin
228c2ecf20Sopenharmony_ci  1: using GPIO3 pin as dmic1 clock pin
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci- realtek,jd-src
258c2ecf20Sopenharmony_ci  0: No JD is used
268c2ecf20Sopenharmony_ci  1: using JD1 as JD source
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci- realtek,btndet-delay
318c2ecf20Sopenharmony_ci  The debounce delay for push button.
328c2ecf20Sopenharmony_ci  The delay time is realtek,btndet-delay value multiple of 8.192 ms.
338c2ecf20Sopenharmony_ci  If absent, the default is 16.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci- #clock-cells : Should be set to '<1>',  wclk and bclk sources provided.
368c2ecf20Sopenharmony_ci- clock-output-names : Name given for DAI clocks output.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci- clocks : phandle and clock specifier for codec MCLK.
398c2ecf20Sopenharmony_ci- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci- realtek,dmic-clk-rate-hz : Set the clock rate (hz) for the requirement of
428c2ecf20Sopenharmony_ci  the particular DMIC.
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci- realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of
458c2ecf20Sopenharmony_ci  the particular DMIC.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ciPins on the device (for linking into audio routes) for RT5682:
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci  * DMIC L1
508c2ecf20Sopenharmony_ci  * DMIC R1
518c2ecf20Sopenharmony_ci  * IN1P
528c2ecf20Sopenharmony_ci  * HPOL
538c2ecf20Sopenharmony_ci  * HPOR
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciExample:
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_cirt5682 {
588c2ecf20Sopenharmony_ci	compatible = "realtek,rt5682i";
598c2ecf20Sopenharmony_ci	reg = <0x1a>;
608c2ecf20Sopenharmony_ci	interrupt-parent = <&gpio>;
618c2ecf20Sopenharmony_ci	interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
628c2ecf20Sopenharmony_ci	realtek,ldo1-en-gpios =
638c2ecf20Sopenharmony_ci		<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
648c2ecf20Sopenharmony_ci	realtek,dmic1-data-pin = <1>;
658c2ecf20Sopenharmony_ci	realtek,dmic1-clk-pin = <1>;
668c2ecf20Sopenharmony_ci	realtek,jd-src = <1>;
678c2ecf20Sopenharmony_ci	realtek,btndet-delay = <16>;
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci	#clock-cells = <1>;
708c2ecf20Sopenharmony_ci	clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci	clocks = <&osc>;
738c2ecf20Sopenharmony_ci	clock-names = "mclk";
748c2ecf20Sopenharmony_ci};
75