···33The tlv320aic32x4 serial control bus communicates through I2C protocols4455Required properties:66- - compatible: Should be "ti,tlv320aic32x4"66+ - compatible - "string" - One of:77+ "ti,tlv320aic32x4" TLV320AIC320488+ "ti,tlv320aic32x6" TLV320AIC3206, TLV320AIC325679 - reg: I2C slave address810 - supply-*: Required supply regulators are:911 "iov" - digital IO power supply···2018 - reset-gpios: Reset-GPIO phandle with args as described in gpio/gpio.txt2119 - clocks/clock-names: Clock named 'mclk' for the master clock of the codec.2220 See clock/clock-bindings.txt for information about the detailed format.2121+ - aic32x4-gpio-func - <array of 5 int>2222+ - Types are defined in include/sound/tlv320aic32x4.h232324242525Example:···3127 reg = <0x18>;3228 clocks = <&clks 201>;3329 clock-names = "mclk";3030+ aic32x4-gpio-func= <3131+ 0xff /* AIC32X4_MFPX_DEFAULT_VALUE */3232+ 0xff /* AIC32X4_MFPX_DEFAULT_VALUE */3333+ 0x04 /* MFP3 AIC32X4_MFP3_GPIO_ENABLED */3434+ 0xff /* AIC32X4_MFPX_DEFAULT_VALUE */3535+ 0x08 /* MFP5 AIC32X4_MFP5_GPIO_INPUT */3636+ >;3437};
···2626 3 - MICBIAS output is connected to AVDD,2727 If this node is not mentioned or if the value is incorrect, then MicBias2828 is powered down.2929+- ai3x-ocmv - Output Common-Mode Voltage selection:3030+ 0 - 1.35V,3131+ 1 - 1.5V,3232+ 2 - 1.65V,3333+ 3 - 1.8V2934- AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the3035 device as covered in Documentation/devicetree/bindings/regulator/regulator.txt3136
···93939494 /* Selects the micbias voltage */9595 enum aic3x_micbias_voltage micbias_vg;9696+ /* Output Common-Mode Voltage */9797+ u8 ocmv;9698};979998100static const struct reg_default aic3x_reg[] = {···15741572 break;15751573 }1576157415751575+ /* Output common-mode voltage = 1.5 V */15761576+ snd_soc_update_bits(codec, HPOUT_SC, HPOUT_SC_OCMV_MASK,15771577+ aic3x->ocmv << HPOUT_SC_OCMV_SHIFT);15781578+15771579 return 0;15781580}15791581···17051699 },17061700};1707170117021702+static void aic3x_configure_ocmv(struct i2c_client *client)17031703+{17041704+ struct device_node *np = client->dev.of_node;17051705+ struct aic3x_priv *aic3x = i2c_get_clientdata(client);17061706+ u32 value;17071707+ int dvdd, avdd;17081708+17091709+ if (np && !of_property_read_u32(np, "ai3x-ocmv", &value)) {17101710+ /* OCMV setting is forced by DT */17111711+ if (value <= 3) {17121712+ aic3x->ocmv = value;17131713+ return;17141714+ }17151715+ }17161716+17171717+ dvdd = regulator_get_voltage(aic3x->supplies[1].consumer);17181718+ avdd = regulator_get_voltage(aic3x->supplies[2].consumer);17191719+17201720+ if (avdd > 3600000 || dvdd > 1950000) {17211721+ dev_warn(&client->dev,17221722+ "Too high supply voltage(s) AVDD: %d, DVDD: %d\n",17231723+ avdd, dvdd);17241724+ } else if (avdd == 3600000 && dvdd == 1950000) {17251725+ aic3x->ocmv = HPOUT_SC_OCMV_1_8V;17261726+ } else if (avdd > 3300000 && dvdd > 1800000) {17271727+ aic3x->ocmv = HPOUT_SC_OCMV_1_65V;17281728+ } else if (avdd > 3000000 && dvdd > 1650000) {17291729+ aic3x->ocmv = HPOUT_SC_OCMV_1_5V;17301730+ } else if (avdd >= 2700000 && dvdd >= 1525000) {17311731+ aic3x->ocmv = HPOUT_SC_OCMV_1_35V;17321732+ } else {17331733+ dev_warn(&client->dev,17341734+ "Invalid supply voltage(s) AVDD: %d, DVDD: %d\n",17351735+ avdd, dvdd);17361736+ }17371737+}17381738+17081739/*17091740 * AIC3X 2 wire address can be up to 4 devices with device addresses17101741 * 0x18, 0x19, 0x1A, 0x1B···18581815 dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret);18591816 goto err_gpio;18601817 }18181818+18191819+ aic3x_configure_ocmv(i2c);1861182018621821 if (aic3x->model == AIC3X_MODEL_3007) {18631822 ret = regmap_register_patch(aic3x->regmap, aic3007_class_d,
+8
sound/soc/codecs/tlv320aic3x.h
···243243#define MICBIAS_LEVEL_SHIFT (6)244244#define MICBIAS_LEVEL_MASK (3 << 6)245245246246+/* HPOUT_SC */247247+#define HPOUT_SC_OCMV_MASK (3 << 6)248248+#define HPOUT_SC_OCMV_SHIFT (6)249249+#define HPOUT_SC_OCMV_1_35V 0250250+#define HPOUT_SC_OCMV_1_5V 1251251+#define HPOUT_SC_OCMV_1_65V 2252252+#define HPOUT_SC_OCMV_1_8V 3253253+246254/* headset detection / button API */247255248256/* The AIC3x supports detection of stereo headsets (GND + left + right signal)
+14-28
sound/soc/tegra/Kconfig
···99 Say Y or M here if you want support for SoC audio on Tegra.10101111config SND_SOC_TEGRA20_AC971212- tristate1313- depends on SND_SOC_TEGRA && ARCH_TEGRA_2x_SOC1212+ tristate "Tegra20 AC97 interface"1313+ depends on SND_SOC_TEGRA1414 select SND_SOC_AC97_BUS1515 select SND_SOC_TEGRA20_DAS1616 help···1919 machine drivers to support below.20202121config SND_SOC_TEGRA20_DAS2222- tristate2323- depends on SND_SOC_TEGRA && ARCH_TEGRA_2x_SOC2222+ tristate "Tegra20 DAS module"2323+ depends on SND_SOC_TEGRA2424 help2525 Say Y or M if you want to add support for the Tegra20 DAS module.2626 You will also need to select the individual machine drivers to2727 support below.28282929config SND_SOC_TEGRA20_I2S3030- tristate3131- depends on SND_SOC_TEGRA && ARCH_TEGRA_2x_SOC3030+ tristate "Tegra20 I2S interface"3131+ depends on SND_SOC_TEGRA3232 select SND_SOC_TEGRA20_DAS3333 help3434 Say Y or M if you want to add support for codecs attached to the···3636 machine drivers to support below.37373838config SND_SOC_TEGRA20_SPDIF3939- tristate4040- depends on SND_SOC_TEGRA && ARCH_TEGRA_2x_SOC3939+ tristate "Tegra20 SPDIF interface"4040+ depends on SND_SOC_TEGRA4141 default m4242 help4343 Say Y or M if you want to add support for the Tegra20 SPDIF interface.···4545 below.46464747config SND_SOC_TEGRA30_AHUB4848- tristate4949- depends on SND_SOC_TEGRA && ARCH_TEGRA_3x_SOC4848+ tristate "Tegra30 AHUB module"4949+ depends on SND_SOC_TEGRA5050 help5151- Say Y or M if you want to add support for the Tegra20 AHUB module.5151+ Say Y or M if you want to add support for the Tegra30 AHUB module.5252 You will also need to select the individual machine drivers to5353 support below.54545555config SND_SOC_TEGRA30_I2S5656- tristate5757- depends on SND_SOC_TEGRA && ARCH_TEGRA_3x_SOC5656+ tristate "Tegra30 I2S interface"5757+ depends on SND_SOC_TEGRA5858 select SND_SOC_TEGRA30_AHUB5959 help6060 Say Y or M if you want to add support for codecs attached to the···6464config SND_SOC_TEGRA_RT56406565 tristate "SoC Audio support for Tegra boards using an RT5640 codec"6666 depends on SND_SOC_TEGRA && I2C && GPIOLIB6767- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC6868- select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC6967 select SND_SOC_RT56407068 help7169 Say Y or M here if you want to add support for SoC audio on Tegra···7274config SND_SOC_TEGRA_WM87537375 tristate "SoC Audio support for Tegra boards using a WM8753 codec"7476 depends on SND_SOC_TEGRA && I2C && GPIOLIB7575- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC7676- select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC7777 select SND_SOC_WM87537878 help7979 Say Y or M here if you want to add support for SoC audio on Tegra···8084config SND_SOC_TEGRA_WM89038185 tristate "SoC Audio support for Tegra boards using a WM8903 codec"8286 depends on SND_SOC_TEGRA && I2C && GPIOLIB8383- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC8484- select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC8587 select SND_SOC_WM89038688 help8789 Say Y or M here if you want to add support for SoC audio on Tegra···88948995config SND_SOC_TEGRA_WM97129096 tristate "SoC Audio support for Tegra boards using a WM9712 codec"9191- depends on SND_SOC_TEGRA && ARCH_TEGRA_2x_SOC && GPIOLIB9797+ depends on SND_SOC_TEGRA && GPIOLIB9298 select SND_SOC_TEGRA20_AC979399 select SND_SOC_WM971294100 help···98104config SND_SOC_TEGRA_TRIMSLICE99105 tristate "SoC Audio support for TrimSlice board"100106 depends on SND_SOC_TEGRA && I2C101101- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC102107 select SND_SOC_TLV320AIC23_I2C103108 help104109 Say Y or M here if you want to add support for SoC audio on the···106113config SND_SOC_TEGRA_ALC5632107114 tristate "SoC Audio support for Tegra boards using an ALC5632 codec"108115 depends on SND_SOC_TEGRA && I2C && GPIOLIB109109- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC110116 select SND_SOC_ALC5632111117 help112118 Say Y or M here if you want to add support for SoC audio on the···114122config SND_SOC_TEGRA_MAX98090115123 tristate "SoC Audio support for Tegra boards using a MAX98090 codec"116124 depends on SND_SOC_TEGRA && I2C && GPIOLIB117117- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC118118- select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC119125 select SND_SOC_MAX98090120126 help121127 Say Y or M here if you want to add support for SoC audio on Tegra···122132config SND_SOC_TEGRA_RT5677123133 tristate "SoC Audio support for Tegra boards using a RT5677 codec"124134 depends on SND_SOC_TEGRA && I2C && GPIOLIB125125- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC126126- select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC127135 select SND_SOC_RT5677128136 help129137 Say Y or M here if you want to add support for SoC audio on Tegra···130142config SND_SOC_TEGRA_SGTL5000131143 tristate "SoC Audio support for Tegra boards using a SGTL5000 codec"132144 depends on SND_SOC_TEGRA && I2C && GPIOLIB133133- select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC134134- select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC135145 select SND_SOC_SGTL5000136146 help137147 Say Y or M here if you want to add support for SoC audio on Tegra
+2-2
sound/soc/tegra/tegra30_ahub.c
···544544 soc_data->mod_list_mask))545545 continue;546546547547- rst = reset_control_get(&pdev->dev,548548- configlink_mods[i].rst_name);547547+ rst = reset_control_get_exclusive(&pdev->dev,548548+ configlink_mods[i].rst_name);549549 if (IS_ERR(rst)) {550550 dev_err(&pdev->dev, "Can't get reset %s\n",551551 configlink_mods[i].rst_name);