From 853b1eb8303753be72052140023528854cba29dd Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 10 Aug 2012 13:03:16 +0900 Subject: ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore SPI is also connected on the board, use that instead of I2C as it's much faster. Also define platform data now the core driver is in mainline. Signed-off-by: Mark Brown [kgene.kim@samsung.com: fixed build error by inclusion missed header] Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 36 ++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'arch/arm/mach-s3c64xx') diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index 9e382e7..7f4f9eb 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -181,9 +182,33 @@ static const struct i2c_board_info wm1277_devs[] = { }, }; -static const struct i2c_board_info wm5102_devs[] = { - { I2C_BOARD_INFO("wm5102", 0x1a), - .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, }, +static struct arizona_pdata wm5102_pdata = { + .ldoena = S3C64XX_GPN(7), + .gpio_base = CODEC_GPIO_BASE, + .irq_active_high = true, + .micd_pol_gpio = CODEC_GPIO_BASE + 4, + .gpio_defaults = { + [2] = 0x10000, /* AIF3TXLRCLK */ + [3] = 0x4, /* OPCLK */ + }, +}; + +static struct s3c64xx_spi_csinfo wm5102_spi_csinfo = { + .line = S3C64XX_GPN(5), +}; + +static struct spi_board_info wm5102_spi_devs[] = { + [0] = { + .modalias = "wm5102", + .max_speed_hz = 10 * 1000 * 1000, + .bus_num = 0, + .chip_select = 0, + .mode = SPI_MODE_0, + .irq = GLENFARCLAS_PMIC_IRQ_BASE + + WM831X_IRQ_GPIO_2, + .controller_data = &wm5102_spi_csinfo, + .platform_data = &wm5102_pdata, + }, }; static const struct i2c_board_info wm6230_i2c_devs[] = { @@ -223,8 +248,9 @@ static __devinitdata const struct { { .id = 0x3c, .name = "1273-EV1 Longmorn" }, { .id = 0x3d, .name = "1277-EV1 Littlemill", .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) }, - { .id = 0x3e, .name = "WM5102-6271-EV1-CS127", - .i2c_devs = wm5102_devs, .num_i2c_devs = ARRAY_SIZE(wm5102_devs) }, + { .id = 0x3e, .name = "WM5102-6271-EV1-CS127 Amrut", + .spi_devs = wm5102_spi_devs, + .num_spi_devs = ARRAY_SIZE(wm5102_spi_devs) }, }; static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, -- cgit v1.1