···11+RT5659/RT5658 audio CODEC22+33+This device supports I2C only.44+55+Required properties:66+77+- compatible : One of "realtek,rt5659" or "realtek,rt5658".88+99+- reg : The I2C address of the device.1010+1111+- interrupts : The CODEC's interrupt output.1212+1313+Optional properties:1414+1515+- realtek,in1-differential1616+- realtek,in3-differential1717+- realtek,in4-differential1818+ Boolean. Indicate MIC1/3/4 input are differential, rather than single-ended.1919+2020+- realtek,dmic1-data-pin2121+ 0: dmic1 is not used2222+ 1: using IN2N pin as dmic1 data pin2323+ 2: using GPIO5 pin as dmic1 data pin2424+ 3: using GPIO9 pin as dmic1 data pin2525+ 4: using GPIO11 pin as dmic1 data pin2626+2727+- realtek,dmic2-data-pin2828+ 0: dmic2 is not used2929+ 1: using IN2P pin as dmic2 data pin3030+ 2: using GPIO6 pin as dmic2 data pin3131+ 3: using GPIO10 pin as dmic2 data pin3232+ 4: using GPIO12 pin as dmic2 data pin3333+3434+- realtek,jd-src3535+ 0: No JD is used3636+ 1: using JD3 as JD source3737+3838+- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.3939+- realtek,reset-gpios : The GPIO that controls the CODEC's RESET pin.4040+4141+Pins on the device (for linking into audio routes) for RT5659/RT5658:4242+4343+ * DMIC L14444+ * DMIC R14545+ * DMIC L24646+ * DMIC R24747+ * IN1P4848+ * IN1N4949+ * IN2P5050+ * IN2N5151+ * IN3P5252+ * IN3N5353+ * IN4P5454+ * IN4N5555+ * HPOL5656+ * HPOR5757+ * SPOL5858+ * SPOR5959+ * LOUTL6060+ * LOUTR6161+ * MONOOUT6262+ * PDML6363+ * PDMR6464+ * SPDIF6565+6666+Example:6767+6868+rt5659 {6969+ compatible = "realtek,rt5659";7070+ reg = <0x1b>;7171+ interrupt-parent = <&gpio>;7272+ interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_HIGH>;7373+ realtek,ldo1-en-gpios =7474+ <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;7575+};
+49
include/sound/rt5659.h
···11+/*22+ * linux/sound/rt5659.h -- Platform data for RT565933+ *44+ * Copyright 2013 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_RT5659_H1212+#define __LINUX_SND_RT5659_H1313+1414+enum rt5659_dmic1_data_pin {1515+ RT5659_DMIC1_NULL,1616+ RT5659_DMIC1_DATA_IN2N,1717+ RT5659_DMIC1_DATA_GPIO5,1818+ RT5659_DMIC1_DATA_GPIO9,1919+ RT5659_DMIC1_DATA_GPIO11,2020+};2121+2222+enum rt5659_dmic2_data_pin {2323+ RT5659_DMIC2_NULL,2424+ RT5659_DMIC2_DATA_IN2P,2525+ RT5659_DMIC2_DATA_GPIO6,2626+ RT5659_DMIC2_DATA_GPIO10,2727+ RT5659_DMIC2_DATA_GPIO12,2828+};2929+3030+enum rt5659_jd_src {3131+ RT5659_JD_NULL,3232+ RT5659_JD3,3333+};3434+3535+struct rt5659_platform_data {3636+ bool in1_diff;3737+ bool in3_diff;3838+ bool in4_diff;3939+4040+ int ldo1_en; /* GPIO for LDO1_EN */4141+ int reset; /* GPIO for RESET */4242+4343+ enum rt5659_dmic1_data_pin dmic1_data_pin;4444+ enum rt5659_dmic2_data_pin dmic2_data_pin;4545+ enum rt5659_jd_src jd_src;4646+};4747+4848+#endif4949+
+6
sound/soc/codecs/Kconfig
···9393 select SND_SOC_RT5640 if I2C9494 select SND_SOC_RT5645 if I2C9595 select SND_SOC_RT5651 if I2C9696+ select SND_SOC_RT5659 if I2C9697 select SND_SOC_RT5670 if I2C9798 select SND_SOC_RT5677 if I2C && SPI_MASTER9899 select SND_SOC_SGTL5000 if I2C···527526 default y if SND_SOC_RT5640=y528527 default y if SND_SOC_RT5645=y529528 default y if SND_SOC_RT5651=y529529+ default y if SND_SOC_RT5659=y530530 default y if SND_SOC_RT5670=y531531 default y if SND_SOC_RT5677=y532532 default m if SND_SOC_RT5640=m533533 default m if SND_SOC_RT5645=m534534 default m if SND_SOC_RT5651=m535535+ default m if SND_SOC_RT5659=m535536 default m if SND_SOC_RT5670=m536537 default m if SND_SOC_RT5677=m537538···563560 tristate564561565562config SND_SOC_RT5651563563+ tristate564564+565565+config SND_SOC_RT5659566566 tristate567567568568config SND_SOC_RT5670