···11+RT5682 audio CODEC22+33+This device supports I2C only.44+55+Required properties:66+77+- compatible : "realtek,rt5682" or "realtek,rt5682i"88+99+- reg : The I2C address of the device.1010+1111+Optional properties:1212+1313+- interrupts : The CODEC's interrupt output.1414+1515+- realtek,dmic1-data-pin1616+ 0: dmic1 is not used1717+ 1: using GPIO2 pin as dmic1 data pin1818+ 2: using GPIO5 pin as dmic1 data pin1919+2020+- realtek,dmic1-clk-pin2121+ 0: using GPIO1 pin as dmic1 clock pin2222+ 1: using GPIO3 pin as dmic1 clock pin2323+2424+- realtek,jd-src2525+ 0: No JD is used2626+ 1: using JD1 as JD source2727+2828+- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.2929+3030+Pins on the device (for linking into audio routes) for RT5682:3131+3232+ * DMIC L13333+ * DMIC R13434+ * IN1P3535+ * HPOL3636+ * HPOR3737+3838+Example:3939+4040+rt5682 {4141+ compatible = "realtek,rt5682i";4242+ reg = <0x1a>;4343+ interrupt-parent = <&gpio>;4444+ interrupts = <TEGRA_GPIO(U, 6) GPIO_ACTIVE_HIGH>;4545+ realtek,ldo1-en-gpios =4646+ <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;4747+ realtek,dmic1-data-pin = <1>;4848+ realtek,dmic1-clk-pin = <1>;4949+ realtek,jd-src = <1>;5050+};
+40
include/sound/rt5682.h
···11+/*22+ * linux/sound/rt5682.h -- Platform data for RT568233+ *44+ * Copyright 2018 Realtek Microelectronics55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License version 2 as88+ * published by the Free Software Foundation.99+ */1010+1111+#ifndef __LINUX_SND_RT5682_H1212+#define __LINUX_SND_RT5682_H1313+1414+enum rt5682_dmic1_data_pin {1515+ RT5682_DMIC1_NULL,1616+ RT5682_DMIC1_DATA_GPIO2,1717+ RT5682_DMIC1_DATA_GPIO5,1818+};1919+2020+enum rt5682_dmic1_clk_pin {2121+ RT5682_DMIC1_CLK_GPIO1,2222+ RT5682_DMIC1_CLK_GPIO3,2323+};2424+2525+enum rt5682_jd_src {2626+ RT5682_JD_NULL,2727+ RT5682_JD1,2828+};2929+3030+struct rt5682_platform_data {3131+3232+ int ldo1_en; /* GPIO for LDO1_EN */3333+3434+ enum rt5682_dmic1_data_pin dmic1_data_pin;3535+ enum rt5682_dmic1_clk_pin dmic1_clk_pin;3636+ enum rt5682_jd_src jd_src;3737+};3838+3939+#endif4040+
+6
sound/soc/codecs/Kconfig
···141141 select SND_SOC_RT5668 if I2C142142 select SND_SOC_RT5670 if I2C143143 select SND_SOC_RT5677 if I2C && SPI_MASTER144144+ select SND_SOC_RT5682 if I2C144145 select SND_SOC_SGTL5000 if I2C145146 select SND_SOC_SI476X if MFD_SI476X_CORE146147 select SND_SOC_SIRF_AUDIO_CODEC···779778 default y if SND_SOC_RT5668=y780779 default y if SND_SOC_RT5670=y781780 default y if SND_SOC_RT5677=y781781+ default y if SND_SOC_RT5682=y782782 default y if SND_SOC_RT1305=y783783 default m if SND_SOC_RT5514=m784784 default m if SND_SOC_RT5616=m···793791 default m if SND_SOC_RT5668=m794792 default m if SND_SOC_RT5670=m795793 default m if SND_SOC_RT5677=m794794+ default m if SND_SOC_RT5682=m796795 default m if SND_SOC_RT1305=m797796798797config SND_SOC_RL6347A···873870config SND_SOC_RT5677_SPI874871 tristate875872 default SND_SOC_RT5677 && SPI873873+874874+config SND_SOC_RT5682875875+ tristate876876877877#Freescale sgtl5000 codec878878config SND_SOC_SGTL5000