diff options
author | Alan Tull <r80115@freescale.com> | 2009-11-02 19:44:22 -0600 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-02-12 17:19:31 +0100 |
commit | fa012c4c0927fe862397110c7c23d3a6b516374e (patch) | |
tree | 29f2ef3da1bb4122f76e0a05ab68ca831564dfa3 /arch/arm/mach-mx37 | |
parent | 90f3c1e8f3b63ae6a7aca35b17740e48b8055167 (diff) |
ENGR00118016-1 ASoC : upgrade audio support to 2.6.31
Move regulator control into codec drivers.
Move codec platform data to machine layer.
Remove unused fields from mxc_audio_platform_data.
soc multiple audio cards support:
dai_list is a list for all registered codec/cpu dais.
One codec/cpu dais can't be registered twice, so move the
cpu dai registering into imx-ssi.c/imx-esai.c
Fix ak4647_read_reg error.
Put ssi/esai mode in the cpu_dai private_data.
sgtl5000: Fix the power for MX35
1. MX35 vddio and vddd are directly connected to
external 3V3. It has no regulator control.
2. sgtl5000 needs some time to be ready after vdda
is switched on so msleep(1) is added before regiter
read/write.
3. On MX35 platform, vdda is from VCAM.
Signed-off-by: Alan Tull <r80115@freescale.com>
Signed-off-by: Wallace Wang <r59996@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx37')
-rw-r--r-- | arch/arm/mach-mx37/mx37_3stack.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c | 42 |
2 files changed, 38 insertions, 9 deletions
diff --git a/arch/arm/mach-mx37/mx37_3stack.c b/arch/arm/mach-mx37/mx37_3stack.c index b62b2b8f179c..acd36bc2cd9e 100644 --- a/arch/arm/mach-mx37/mx37_3stack.c +++ b/arch/arm/mach-mx37/mx37_3stack.c @@ -755,12 +755,7 @@ static struct mxc_audio_platform_data sgtl5000_data = { .ext_port = 5, .hp_irq = IOMUX_TO_IRQ(MX37_PIN_AUD5_RXFS), .hp_status = headphone_det_status, - .vddio_reg = "SW3", - .vdda_reg = "VAUDIO", .amp_enable = mxc_sgtl5000_amp_enable, - .vddio = 1850000, - .vdda = 2775000, - .vddd = 0, .init = mxc_sgtl5000_plat_init, .finit = mxc_sgtl5000_plat_finit, }; diff --git a/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c b/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c index 0ab86ff29a3f..f80a61cf00e1 100644 --- a/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c +++ b/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c @@ -20,6 +20,7 @@ #include <linux/i2c.h> #include <linux/err.h> #include <linux/regulator/machine.h> +#include <linux/mfd/wm8350/audio.h> #include <linux/mfd/wm8350/core.h> #include <linux/mfd/wm8350/pmic.h> #include <linux/mfd/wm8350/gpio.h> @@ -35,6 +36,17 @@ static struct regulator_consumer_supply dcdc1_consumers[] = { } }; +static struct regulator_consumer_supply dcdc3_consumers[] = { + { + .supply = "AVDD", + .dev_name = "1-001a", + }, + { + .supply = "HPVDD", + .dev_name = "1-001a", + }, +}; + static struct regulator_init_data dcdc1_data = { .constraints = { .name = "DCDC1", @@ -107,6 +119,8 @@ static struct regulator_init_data dcdc3_data = { .valid_modes_mask = REGULATOR_MODE_NORMAL, .apply_uV = 1, }, + .num_consumer_supplies = ARRAY_SIZE(dcdc3_consumers), + .consumer_supplies = dcdc3_consumers, }; static struct regulator_init_data ldo1_data = { @@ -217,12 +231,30 @@ static struct platform_device mxc_wm8350_devices[] = { }, }; +static struct wm8350_audio_platform_data imx_3stack_wm8350_setup = { + .vmid_discharge_msecs = 1000, + .drain_msecs = 30, + .cap_discharge_msecs = 700, + .vmid_charge_msecs = 700, + .vmid_s_curve = WM8350_S_CURVE_SLOW, + .dis_out4 = WM8350_DISCHARGE_SLOW, + .dis_out3 = WM8350_DISCHARGE_SLOW, + .dis_out2 = WM8350_DISCHARGE_SLOW, + .dis_out1 = WM8350_DISCHARGE_SLOW, + .vroi_out4 = WM8350_TIE_OFF_500R, + .vroi_out3 = WM8350_TIE_OFF_500R, + .vroi_out2 = WM8350_TIE_OFF_500R, + .vroi_out1 = WM8350_TIE_OFF_500R, + .vroi_enable = 0, + .codec_current_on = WM8350_CODEC_ISEL_1_0, + .codec_current_standby = WM8350_CODEC_ISEL_0_5, + .codec_current_charge = WM8350_CODEC_ISEL_1_5, +}; + struct mxc_audio_platform_data imx_3stack_audio_platform_data = { .ssi_num = 2, .src_port = 2, .ext_port = 5, - .regulator1 = "DCDC6", - .regulator2 = "DCDC3", }; static struct platform_device *imx_snd_device; @@ -271,6 +303,8 @@ static int mx37_wm8350_init(struct wm8350 *wm8350) /* register sound */ pr_info("Registering imx37_snd_device"); + wm8350->codec.platform_data = &imx_3stack_wm8350_setup; + imx_snd_device = platform_device_alloc("wm8350-imx-3stack-audio", -1); if (!imx_snd_device) { ret = -ENOMEM; @@ -334,10 +368,10 @@ static __init int wm8350_regulator_init(void) wm8350_global_regulator [i])))) { regulator_enable(regulator); - if (wm8350_global_regulator[i] == "DCDC4") + if (strcmp(wm8350_global_regulator[i], "DCDC4") == 0) ret = regulator_set_voltage(regulator, 1250000, 1250000); - else if (wm8350_global_regulator[i] == "DCDC1") { + else if (strcmp(wm8350_global_regulator[i], "DCDC1") == 0) { ret = regulator_set_voltage(regulator, 1050000, 1050000); regulator_set_mode(regulator, REGULATOR_MODE_FAST); |