linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
@ 2012-08-09 18:05 Mark Brown
  2012-08-09 18:05 ` [PATCH 2/2] ARM: S3C64XX: Register audio platform devices for Bells " Mark Brown
  2012-08-10  4:56 ` [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module " Kukjin Kim
  0 siblings, 2 replies; 9+ messages in thread
From: Mark Brown @ 2012-08-09 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

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 <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/mach-s3c64xx/mach-crag6410-module.c |   35 ++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index f81f089..22dd77b 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -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,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: S3C64XX: Register audio platform devices for Bells on Cragganmore
  2012-08-09 18:05 [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore Mark Brown
@ 2012-08-09 18:05 ` Mark Brown
  2012-08-10  4:56 ` [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module " Kukjin Kim
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-08-09 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/mach-s3c64xx/mach-crag6410.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index ab8dbbe4..4103ed3 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -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,
 };
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  2012-08-09 18:05 [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore Mark Brown
  2012-08-09 18:05 ` [PATCH 2/2] ARM: S3C64XX: Register audio platform devices for Bells " Mark Brown
@ 2012-08-10  4:56 ` Kukjin Kim
  2012-08-10 10:07   ` Mark Brown
  1 sibling, 1 reply; 9+ messages in thread
From: Kukjin Kim @ 2012-08-10  4:56 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Brown wrote:
> 
> 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 <broonie@opensource.wolfsonmicro.com>
> ---
>  arch/arm/mach-s3c64xx/mach-crag6410-module.c |   35
> ++++++++++++++++++++++----
>  1 file changed, 30 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-
> s3c64xx/mach-crag6410-module.c
> index f81f089..22dd77b 100644
> --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
> +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
> @@ -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 */
> +	},
> +};

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?

--
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index c148384..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 <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 <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  2012-08-10  4:56 ` [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module " Kukjin Kim
@ 2012-08-10 10:07   ` Mark Brown
  2012-08-11  5:08     ` Kukjin Kim
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2012-08-10 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 10, 2012 at 01:56:23PM +0900, Kukjin Kim wrote:

> Probably, this patch needs following?

> If you're ok, I will fix build error by above when I apply.

Yes, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  2012-08-10 10:07   ` Mark Brown
@ 2012-08-11  5:08     ` Kukjin Kim
  2012-08-13 12:24       ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Kukjin Kim @ 2012-08-11  5:08 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Brown wrote:
> 
> On Fri, Aug 10, 2012 at 01:56:23PM +0900, Kukjin Kim wrote:
> 
> > 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 <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


From: Kukjin Kim <kgene.kim@samsung.com>
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.

Cc: Darius Augulis <augulis.darius@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/configs/s3c6400_defconfig |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/s3c6400_defconfig
b/arch/arm/configs/s3c6400_defconfig
index ba6a515..3a186d6 100644
--- a/arch/arm/configs/s3c6400_defconfig
+++ b/arch/arm/configs/s3c6400_defconfig
@@ -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"
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  2012-08-11  5:08     ` Kukjin Kim
@ 2012-08-13 12:24       ` Mark Brown
  2012-08-23  9:45         ` Kukjin Kim
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2012-08-13 12:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Aug 11, 2012 at 02:08:09PM +0900, Kukjin Kim wrote:

> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  2012-08-13 12:24       ` Mark Brown
@ 2012-08-23  9:45         ` Kukjin Kim
  2012-08-23 15:20           ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Kukjin Kim @ 2012-08-23  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Brown wrote:
> 
> On Sat, Aug 11, 2012 at 02:08:09PM +0900, Kukjin Kim wrote:
> 
> > 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 <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  2012-08-23  9:45         ` Kukjin Kim
@ 2012-08-23 15:20           ` Mark Brown
  2012-08-28 23:30             ` Kukjin Kim
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2012-08-23 15:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 23, 2012 at 06:45:19PM +0900, Kukjin Kim wrote:

> 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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  2012-08-23 15:20           ` Mark Brown
@ 2012-08-28 23:30             ` Kukjin Kim
  0 siblings, 0 replies; 9+ messages in thread
From: Kukjin Kim @ 2012-08-28 23:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/23/12 08:20, Mark Brown wrote:
> On Thu, Aug 23, 2012 at 06:45:19PM +0900, Kukjin Kim wrote:
>
>> 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.
>
Hmm...I want? :)

--->

From: Kukjin Kim <kgene.kim@samsung.com>
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.

Cc: Darius Augulis <augulis.darius@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
  arch/arm/configs/s3c6400_defconfig |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/s3c6400_defconfig 
b/arch/arm/configs/s3c6400_defconfig
index ba6a515..3a186d6 100644
--- a/arch/arm/configs/s3c6400_defconfig
+++ b/arch/arm/configs/s3c6400_defconfig
@@ -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"
-- 

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-08-28 23:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-09 18:05 [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore Mark Brown
2012-08-09 18:05 ` [PATCH 2/2] ARM: S3C64XX: Register audio platform devices for Bells " Mark Brown
2012-08-10  4:56 ` [PATCH 1/2] ARM: S3C64XX: Update configuration for WM5102 module " Kukjin Kim
2012-08-10 10:07   ` Mark Brown
2012-08-11  5:08     ` Kukjin Kim
2012-08-13 12:24       ` Mark Brown
2012-08-23  9:45         ` Kukjin Kim
2012-08-23 15:20           ` Mark Brown
2012-08-28 23:30             ` Kukjin Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).