ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Subsystems (3)
PATCH 1/2 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.
--- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 35 ++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-)
arch/arm/mach-s3c64xx/mach-crag6410-module.c +30 -5
@@ -192,9 +192,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[] = {
@@ -234,8 +258,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,
Signature · 1 line
1.7.10.4
PATCH 2/2 ARM: S3C64XX: Register audio platform devices for Bells on Cragganmore
--- arch/arm/mach-s3c64xx/mach-crag6410.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-s3c64xx/mach-crag6410.c +12 -0
@@ -287,6 +287,16 @@ static struct platform_device littlemill_device = { .id = -1, }; +static struct platform_device bells_wm5102_device = { + .name ="bells" , + .id =0 , +}; + +static struct platform_device bells_wm5110_device = { + .name ="bells" , + .id =1 , +}; +static struct regulator_consumer_supply wallvdd_consumers[] = {REGULATOR_SUPPLY ("SPKVDD" ,"1-001a" ),REGULATOR_SUPPLY ("SPKVDD1" ,"1-001a" ),
@@ -359,6 +369,8 @@ static struct platform_device *crag6410_devices[] __initdata = { &tobermory_device, &littlemill_device, &lowland_device, + &bells_wm5102_device, + &bells_wm5110_device, &wallvdd_device, };
Signature · 1 line
1.7.10.4
PATCH 1/2 ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
In reply to Mark BrownQuoted 22 lines · Mark Brown
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 <[email protected]>--- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 35 ++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-)arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-crag6410-module.c +0
-0
s3c64xx/mach-crag6410-module.c
index f81f089..22dd77b 100644arch/arm/mach-s3c64xx/mach-crag6410-module.c +0
-3@@ -192,9 +192,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 , },
arch/arm/mach-s3c64xx/mach-crag6410-module.c static const struct i2c_board_info wm1277_devs[] = { · line 204
Quoted 10 lines
arch/arm/mach-s3c64xx/mach-crag6410-module.c +10
-0+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 */ + }, +};
Mark, happens error.
arch/arm/mach-s3c64xx/mach-crag6410-module.c:184: error: variable 'wm5102_pdata' has initializer but incomplete type arch/arm/mach-s3c64xx/mach-crag6410-module.c:185: error: unknown field 'ldoena' specified in initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:185: warning: excess elements in struct initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:185: warning: (near initialization for 'wm5102_pdata') arch/arm/mach-s3c64xx/mach-crag6410-module.c:186: error: unknown field 'gpio_base' specified in initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:186: warning: excess elements in struct initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:186: warning: (near initialization for 'wm5102_pdata') arch/arm/mach-s3c64xx/mach-crag6410-module.c:187: error: unknown field 'irq_active_high' specified in initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:187: warning: excess elements in struct initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:187: warning: (near initialization for 'wm5102_pdata') arch/arm/mach-s3c64xx/mach-crag6410-module.c:188: error: unknown field 'micd_pol_gpio' specified in initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:188: warning: excess elements in struct initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:188: warning: (near initialization for 'wm5102_pdata') arch/arm/mach-s3c64xx/mach-crag6410-module.c:189: error: unknown field 'gpio_defaults' specified in initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:189: error: extra brace group at end of initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:189: error: (near initialization for 'wm5102_pdata') arch/arm/mach-s3c64xx/mach-crag6410-module.c:192: warning: excess elements in struct initializer arch/arm/mach-s3c64xx/mach-crag6410-module.c:192: warning: (near initialization for 'wm5102_pdata')
make[1]: *** [arch/arm/mach-s3c64xx/mach-crag6410-module.o] Error 1
make: *** [arch/arm/mach-s3c64xx] Error 2
make: *** Waiting for unfinished jobs....
Probably, this patch needs following?
--
(quoted diff) +0 -0
b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index c148384..7f4f9eb 100644
arch/arm/mach-s3c64xx/mach-crag6410-module.c +1 -1
@@ -16,6 +16,7 @@#include <linux/mfd/wm831x/irq.h> #include <linux/mfd/wm831x/gpio.h> #include <linux/mfd/wm8994/pdata.h> +#include <linux/mfd/arizona/pdata.h> #include <linux/regulator/machine.h> --
If you're ok, I will fix build error by above when I apply.
[...]
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/2 ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Quoted 3 lines · Kukjin Kim
Probably, this patch needs following?
If you're ok, I will fix build error by above when I apply.
Yes, thanks.
Kukjin Kim
AppliedPATCH 1/2 ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Quoted 8 lines · Mark Brown
Quoted 3 lines · Kukjin Kim
Probably, this patch needs following?
If you're ok, I will fix build error by above when I apply.
Yes, thanks.
Applied.
BTW, don't you need to enable your Cragganmore board in the defconfig?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
From: Kukjin Kim <[email protected]>
Subject: [PATCH] ARM: s3c6400_defconfig: enable more boards in defconfig
This enables all of s3c64xx boards in the s3c6400_defconfig. In this time, MINI6410, REAL6410, and WLF_CRAGG_6410 are added in the defconfig.
--- arch/arm/configs/s3c6400_defconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
(quoted diff) +0 -0
b/arch/arm/configs/s3c6400_defconfig
index ba6a515..3a186d6 100644
arch/arm/configs/s3c6400_defconfig +3 -0
@@ -9,11 +9,14 @@ CONFIG_ARCH_S3C64XX=y CONFIG_S3C_BOOT_ERROR_RESET=y CONFIG_MACH_SMDK6400=y CONFIG_MACH_ANW6410=y +CONFIG_MACH_MINI6410=y +CONFIG_MACH_REAL6410=y CONFIG_MACH_SMDK6410=y CONFIG_MACH_NCP=y CONFIG_MACH_HMT=y CONFIG_MACH_SMARTQ5=y CONFIG_MACH_SMARTQ7=y +CONFIG_MACH_WLF_CRAGG_6410=y CONFIG_CPU_32v6K=y CONFIG_AEABI=y CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc
initrd=0x51000000,6M ramdisk_size=6144"
Signature · 1 line
1.7.4.1
PATCH 1/2 ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Quoted 1 line · Kukjin Kim
BTW, don't you need to enable your Cragganmore board in the defconfig?
Well, it doesn't really matter that much to us - it's more a question for whoever uses the defconfig.
PATCH 1/2 ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Quoted 7 lines · Mark Brown
Quoted 1 line · Kukjin Kim
BTW, don't you need to enable your Cragganmore board in the defconfig?
Well, it doesn't really matter that much to us - it's more a question for whoever uses the defconfig.
Yeah, actually SoC defconfig in mainline doesn't cover _real_ requirements for (mass) product. But I think, it's time we need to sort out the defconfigs so that we could use them efficiently on product. BTW, if enabling board in defconfig, at least, unexpected build breakages could be detected by testing defconfig before merge for mainline...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/2 ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Quoted 5 lines · Kukjin Kim
Yeah, actually SoC defconfig in mainline doesn't cover _real_ requirements for (mass) product. But I think, it's time we need to sort out the defconfigs so that we could use them efficiently on product. BTW, if enabling board in defconfig, at least, unexpected build breakages could be detected by testing defconfig before merge for mainline...
Right, sure. I guess the main thing I'm saying here is that I don't
mind what happens here, it's certainly no problem for me turn them on in
the build if that's what people wants.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120823/0be86153/attachment.sig>
PATCH 1/2 ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
Quoted 8 lines · Mark Brown
Quoted 5 lines · Kukjin Kim
Yeah, actually SoC defconfig in mainline doesn't cover _real_ requirements for (mass) product. But I think, it's time we need to sort out the defconfigs so that we could use them efficiently on product. BTW, if enabling board in defconfig, at least, unexpected build breakages could be detected by testing defconfig before merge for mainline...
Quoted 4 lines
Right, sure. I guess the main thing I'm saying here is that I don't mind what happens here, it's certainly no problem for me turn them on in the build if that's what people wants.
Hmm...I want? :)
--->
From: Kukjin Kim <[email protected]>
Subject: [PATCH] ARM: s3c6400_defconfig: enable more boards in defconfig
This enables all of s3c64xx boards in the s3c6400_defconfig. In this time, MINI6410, REAL6410, and WLF_CRAGG_6410 are added in the defconfig.
--- arch/arm/configs/s3c6400_defconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
(quoted diff) +0 -0
b/arch/arm/configs/s3c6400_defconfig
index ba6a515..3a186d6 100644
arch/arm/configs/s3c6400_defconfig +3 -0
@@ -9,11 +9,14 @@ CONFIG_ARCH_S3C64XX=y CONFIG_S3C_BOOT_ERROR_RESET=y CONFIG_MACH_SMDK6400=y CONFIG_MACH_ANW6410=y +CONFIG_MACH_MINI6410=y +CONFIG_MACH_REAL6410=y CONFIG_MACH_SMDK6410=y CONFIG_MACH_NCP=y CONFIG_MACH_HMT=y CONFIG_MACH_SMARTQ5=y CONFIG_MACH_SMARTQ7=y +CONFIG_MACH_WLF_CRAGG_6410=y CONFIG_CPU_32v6K=y CONFIG_AEABI=y CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc
initrd=0x51000000,6M ramdisk_size=6144"
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.