Cragganmore updates for 3.3
Subsystems (3)
cover Cragganmore updates for 3.3
This patch series is all the pending updates for Cragganmore for 3.3. With the exception of the final patch for Littlemill they've all been posted before, some a while ago now, but I've not seen any feedback yet. They're all available on a git branch in case it's helpful to pull them:
The following changes since commit caca6a03d365883564885f2c1da3e88dcf65d139:
Linux 3.2-rc3 (2011-11-23 20:20:28 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git updates/cragganmore
Mark Brown (7):
ARM: S3C64XX: Raise the frequency of the second I2C bus on Cragganmore
ARM: S3C64XX: Use software initiated powerdown for Cragganmore
ARM: S3C64XX: Configure WM1250 EV1 GPIOs on Cragganmore
ARM: S3C64XX: Improve logging of unknown Cragganmore module types
ARM: S3C64XX: Run Tobermory interrupts in the default mode
ARM: S3C64XX: Hook up platform data for Kilchomin module on Cragganmore
ARM: S3C64XX: Hook up Littlemill audio card on Cragganmore
arch/arm/mach-s3c64xx/include/mach/crag6410.h | 6 ++- arch/arm/mach-s3c64xx/include/mach/irqs.h | 2 +- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 56 +++++++++++++++++++++++- arch/arm/mach-s3c64xx/mach-crag6410.c | 30 ++++++++++++- 4 files changed, 86 insertions(+), 8 deletions(-)
PATCH 1/7 ARM: S3C64XX: Raise the frequency of the second I2C bus on Cragganmore
The S3C I2C driver defaults to a rather low 66kHz, ask for 400kHz for a bit of a speed boost.
--- arch/arm/mach-s3c64xx/mach-crag6410.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/mach-s3c64xx/mach-crag6410.c +6 -1
@@ -634,6 +634,11 @@ static struct i2c_board_info i2c_devs1[] __initdata = { { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, }; +static struct s3c2410_platform_i2c i2c1_pdata = { + .frequency =400000 , + .bus_num =1 , +}; +static void __init crag6410_map_io (void ) {s3c64xx_init_io (NULL ,0 );
@@ -692,7 +697,7 @@ static void __init crag6410_machine_init(void)s3c_sdhci2_set_platdata (&crag6410_hsmmc2_pdata);s3c_i2c0_set_platdata (&i2c0_pdata); -s3c_i2c1_set_platdata (NULL ); +s3c_i2c1_set_platdata (&i2c1_pdata);s3c_fb_set_platdata (&crag6410_lcd_pdata);i2c_register_board_info (0 , i2c_devs0,ARRAY_SIZE (i2c_devs0));
Signature · 1 line
1.7.7.3
PATCH 2/7 ARM: S3C64XX: Use software initiated powerdown for Cragganmore
Since the two PMICs are independent we initiate a shutdown on each.
--- arch/arm/mach-s3c64xx/mach-crag6410.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/mach-crag6410.c +2 -0
@@ -501,6 +501,7 @@ static struct wm831x_pdata crag_pmic_pdata __initdata = { .wm831x_num = 1, .irq_base = BANFF_PMIC_IRQ_BASE, .gpio_base = GPIO_BOARD_START + 8, + .soft_shutdown = true, .backup = &banff_backup_pdata,
@@ -605,6 +606,7 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = { .wm831x_num = 2, .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, + .soft_shutdown = true, .gpio_defaults = {/* GPIO1-3: IRQ inputs, rising edge triggered, CMOS */
Signature · 1 line
1.7.7.3
PATCH 3/7 ARM: S3C64XX: Configure WM1250 EV1 GPIOs on Cragganmore
In reply to Mark Brown--- arch/arm/mach-s3c64xx/mach-crag6410.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-)
arch/arm/mach-s3c64xx/mach-crag6410.c +14 -1
@@ -37,6 +37,8 @@#include <linux/mfd/wm831x/irq.h> #include <linux/mfd/wm831x/gpio.h> +#include <sound/wm1250-ev1.h> +#include <asm/mach/arch.h> #include <asm/mach-types.h>
@@ -624,6 +626,16 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = { .disable_touch = true, }; +static struct wm1250_ev1_pdata wm1250_ev1_pdata = { + .gpios = { + [WM1250_EV1_GPIO_CLK_ENA ] =S3C64XX_GPN (12 ), + [WM1250_EV1_GPIO_CLK_SEL0 ] =S3C64XX_GPL (12 ), + [WM1250_EV1_GPIO_CLK_SEL1 ] =S3C64XX_GPL (13 ), + [WM1250_EV1_GPIO_OSR ] =S3C64XX_GPL (14 ), + [WM1250_EV1_GPIO_MASTER ] =S3C64XX_GPL (8 ), + }, +}; +static struct i2c_board_info i2c_devs1[]__initdata = { {I2C_BOARD_INFO ("wm8311" ,0x34 ), .irq =S3C_EINT (0 ),
@@ -633,7 +645,8 @@ static struct i2c_board_info i2c_devs1[] __initdata = { { I2C_BOARD_INFO("wlf-gf-module", 0x25) }, { I2C_BOARD_INFO("wlf-gf-module", 0x26) }, - { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, + { I2C_BOARD_INFO("wm1250-ev1", 0x27), + .platform_data = &wm1250_ev1_pdata }, }; static struct s3c2410_platform_i2c i2c1_pdata = {
Signature · 1 line
1.7.7.3
PATCH 4/7 ARM: S3C64XX: Improve logging of unknown Cragganmore module types
In reply to Mark BrownAs our ID table is populated with hexidecimal values it makes sense to log unknown module IDs in hexidecimal. It's also helpful to display board revisions as 1 based rather than 0 based as that's the numbering system used for the hardware (and what we do when announcing known modules).
--- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-s3c64xx/mach-crag6410-module.c +2 -2
@@ -154,8 +154,8 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, "Failed to register dev: %d\n", ret); } }else { -dev_warn (&i2c->dev,"Unknown module ID %d revision %d\n" , - id, rev); +dev_warn (&i2c->dev,"Unknown module ID 0x%x revision %d\n" , + id, rev +1 ); }return 0 ;
Signature · 1 line
1.7.7.3
PATCH 5/7 ARM: S3C64XX: Run Tobermory interrupts in the default mode
In reply to Mark BrownNo need not to now that generic emulation is provided for the PMIC IRQ controller.
--- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-s3c64xx/mach-crag6410-module.c +0 -1
@@ -72,7 +72,6 @@ static struct wm8962_pdata wm8962_pdata __initdata = {0x8000 |WM8962_GPIO_FN_DMICDAT , WM8962_GPIO_FN_IRQ, /* Open drain mode */ }, - .irq_active_low = true, }; static struct wm9081_pdata wm9081_pdata __initdata = {
Signature · 1 line
1.7.7.3
PATCH 6/7 ARM: S3C64XX: Hook up platform data for Kilchomin module on Cragganmore
In reply to Mark BrownNow that the WM5100 driver is merged add some initial platform data for the WM5100 on Kilchomin.
--- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 30 ++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/mach-crag6410-module.c +30 -0
@@ -15,12 +15,41 @@#include <linux/mfd/wm831x/irq.h> #include <linux/mfd/wm831x/gpio.h> +#include <sound/wm5100.h> #include <sound/wm8996.h> #include <sound/wm8962.h> #include <sound/wm9081.h> #include <mach/crag6410.h> +static struct wm5100_pdata wm5100_pdata = { + .ldo_ena =S3C64XX_GPN (7 ), + .irq_flags =IRQF_TRIGGER_HIGH , + .gpio_base =CODEC_GPIO_BASE , + + .in_mode = { +WM5100_IN_DIFF , +WM5100_IN_DIFF , +WM5100_IN_DIFF , +WM5100_IN_SE , + }, + + .hp_pol =CODEC_GPIO_BASE +3 , + .jack_modes = { + {WM5100_MICDET_MICBIAS3 ,0 ,0 }, + {WM5100_MICDET_MICBIAS2 ,1 ,1 }, + }, + + .gpio_defaults = { +0 , +0 , +0 , +0 , +0x2 ,/* IRQ: CMOS output */ +0x3 ,/* CLKOUT: CMOS output */ + }, +}; +static struct wm8996_retune_mobile_config wm8996_retune[] = { { .name ="Sub LPF" ,
@@ -90,6 +119,7 @@ static const struct i2c_board_info wm1254_devs[] = {static const struct i2c_board_info wm1255_devs[] = { {I2C_BOARD_INFO ("wm5100" ,0x1a ), + .platform_data = &wm5100_pdata, .irq =GLENFARCLAS_PMIC_IRQ_BASE +WM831X_IRQ_GPIO_2 , }, {I2C_BOARD_INFO ("wm9081" ,0x6c ),
Signature · 1 line
1.7.7.3
PATCH 7/7 ARM: S3C64XX: Hook up Littlemill audio card on Cragganmore
In reply to Mark BrownThe Littlemill audio card is an adaptor card which can take any 6220-EV1 CODEC daughtercard. Provide standard support for the use of WM8994 class devices on the Littlemill card, configuring the MFD for WM8958 usage as this part is a superset of all others and the driver will use runtime detection to identify the actually fitted part given the configuration for the superset.
--- arch/arm/mach-s3c64xx/include/mach/crag6410.h | 6 ++++-- arch/arm/mach-s3c64xx/include/mach/irqs.h | 2 +- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 21 +++++++++++++++++++++ arch/arm/mach-s3c64xx/mach-crag6410.c | 6 ++++++ 4 files changed, 32 insertions(+), 3 deletions(-)
arch/arm/mach-s3c64xx/include/mach/crag6410.h +4 -2
@@ -15,9 +15,11 @@#define BANFF_PMIC_IRQ_BASE IRQ_BOARD_START#define GLENFARCLAS_PMIC_IRQ_BASE (IRQ_BOARD_START + 64) +#define CODEC_IRQ_BASE (IRQ_BOARD_START + 128)#define PCA935X_GPIO_BASE GPIO_BOARD_START -#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) -#define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) +#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) +#define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 32) +#define BANFF_PMIC_GPIO_BASE (GPIO_BOARD_START + 64)#endif
arch/arm/mach-s3c64xx/include/mach/irqs.h +1 -1
@@ -169,7 +169,7 @@#define IRQ_BOARD_START (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1)#ifdef CONFIG_MACH_WLF_CRAGG_6410 -#define IRQ_BOARD_NR 128 +#define IRQ_BOARD_NR 160#elif defined(CONFIG_SMDK6410_WM1190_EV1 )#define IRQ_BOARD_NR 64#elif defined(CONFIG_SMDK6410_WM1192_EV1 )
arch/arm/mach-s3c64xx/mach-crag6410-module.c +21 -0
@@ -14,6 +14,7 @@#include <linux/mfd/wm831x/irq.h> #include <linux/mfd/wm831x/gpio.h> +#include <linux/mfd/wm8994/pdata.h> #include <sound/wm5100.h> #include <sound/wm8996.h>
@@ -133,6 +134,24 @@ static const struct i2c_board_info wm1259_devs[] = { }, }; +static struct wm8994_pdata wm8994_pdata = { + .gpio_base =CODEC_GPIO_BASE , + .gpio_defaults = { +0x3 ,/* IRQ out, active high, CMOS */ + }, + .irq_base =CODEC_IRQ_BASE , + .ldo = { + { .supply ="WALLVDD" }, + { .supply ="WALLVDD" }, + }, +}; + +static const struct i2c_board_info wm1277_devs[] = { + {I2C_BOARD_INFO ("wm8958" ,0x1a ),/* WM8958 is the superset */ + .platform_data = &wm8994_pdata, + .irq =GLENFARCLAS_PMIC_IRQ_BASE +WM831X_IRQ_GPIO_2 , + }, +}; static __devinitdata const struct { u8 id;
@@ -154,6 +173,8 @@ static __devinitdata const struct { { .id = 0x3b, .name = "1255-EV1 Kilchoman", .i2c_devs = wm1255_devs, .num_i2c_devs = ARRAY_SIZE(wm1255_devs) }, { .id = 0x3c, .name = "1273-EV1 Longmorn" }, + { .id = 0x3d, .name = "1277-EV1 Littlemill", + .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) }, }; static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
arch/arm/mach-s3c64xx/mach-crag6410.c +6 -0
@@ -289,6 +289,11 @@ static struct platform_device speyside_wm8962_device = { .id = -1, }; +static struct platform_device littlemill_device = { + .name ="littlemill" , + .id =-1 , +}; +static struct regulator_consumer_supply wallvdd_consumers[] = {REGULATOR_SUPPLY ("SPKVDD1" ,"1-001a" ),REGULATOR_SUPPLY ("SPKVDD2" ,"1-001a" ),
@@ -341,6 +346,7 @@ static struct platform_device *crag6410_devices[] __initdata = { &crag6410_backlight_device, &speyside_device, &speyside_wm8962_device, + &littlemill_device, &lowland_device, &wallvdd_device, };
Signature · 1 line
1.7.7.3
cover Cragganmore updates for 3.3
In reply to Mark BrownQuoted 26 lines · Mark Brown
This patch series is all the pending updates for Cragganmore for 3.3. With the exception of the final patch for Littlemill they've all been posted before, some a while ago now, but I've not seen any feedback yet. They're all available on a git branch in case it's helpful to pull them:
The following changes since commit
caca6a03d365883564885f2c1da3e88dcf65d139:Linux 3.2-rc3 (2011-11-23 20:20:28 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
updates/cragganmoreMark Brown (7):
ARM: S3C64XX: Raise the frequency of the second I2C bus on
Cragganmore
ARM: S3C64XX: Use software initiated powerdown for Cragganmore
ARM: S3C64XX: Configure WM1250 EV1 GPIOs on Cragganmore
ARM: S3C64XX: Improve logging of unknown Cragganmore module types
ARM: S3C64XX: Run Tobermory interrupts in the default mode
ARM: S3C64XX: Hook up platform data for Kilchomin module on
Cragganmore
ARM: S3C64XX: Hook up Littlemill audio card on Cragganmore
Quoted 6 lines
arch/arm/mach-s3c64xx/include/mach/crag6410.h | 6 ++- arch/arm/mach-s3c64xx/include/mach/irqs.h | 2 +- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 56 +++++++++++++++++++++++- arch/arm/mach-s3c64xx/mach-crag6410.c | 30 ++++++++++++- 4 files changed, 86 insertions(+), 8 deletions(-)
Looks ok, will apply this series.
And as a note, I'm thinking about the handling of different IRQ_BOARD_NR...but I'm not sure it is really needed or not :)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
cover Cragganmore updates for 3.3
Quoted 2 lines · Kukjin Kim
And as a note, I'm thinking about the handling of different IRQ_BOARD_NR...but I'm not sure it is really needed or not :)
Yeah, it's annoying. I believe that converting to sparse IRQs would avoid the issue.