ARM: SMDK6410: Add initial support for WM1192-EV1 PMIC board
Subsystems (3)
PATCH 1/3 ARM: SMDK6410: Add initial support for WM1192-EV1 PMIC board
The Wolfson Microelectronics 1192-EV1 is a plug in module for the SMDK6410 providing power using a WM8312 PMIC. This patch provides initial hookup sufficient to initialise the board, though not all features are fully described yet.
As part of this supplies for the system that are provided as a single supply by one of the currently merged PMIC boards are factored out so they can be reused between different regulators.
--- arch/arm/mach-s3c6410/Kconfig | 15 ++ arch/arm/mach-s3c6410/mach-smdk6410.c | 256 ++++++++++++++++++++++------ arch/arm/plat-s3c64xx/include/plat/irqs.h | 2 + 3 files changed, 218 insertions(+), 55 deletions(-)
arch/arm/mach-s3c6410/Kconfig +15 -0
@@ -88,6 +88,21 @@ config SMDK6410_WM1190_EV1 detected at runtime so the the resulting kernel can be used with or without the 1190-EV1 fitted. +config SMDK6410_WM1192_EV1 + bool "Support Wolfson Microelectronics 1192-EV1 PMIC card" + depends on MACH_SMDK6410 + select REGULATOR + select REGULATOR_WM831X + select S3C24XX_GPIO_EXTRA64 + select MFD_WM831X + help + The Wolfson Microelectronics 1192-EV1 is a WM831x based PMIC + daughtercard for the Samsung SMDK6410 reference platform. + Enabling this option will build support for this module into + the kernel. The presence of the daughtercard will be + detected at runtime so the the resulting kernel can be used + with or without the 1192-EV1 fitted. + config MACH_NCP bool "NCP" select CPU_S3C6410
arch/arm/mach-s3c6410/mach-smdk6410.c +201 -55
328 lines not on this page · raw message
arch/arm/plat-s3c64xx/include/plat/irqs.h +2 -0
@@ -200,6 +200,8 @@#ifdef CONFIG_SMDK6410_WM1190_EV1 #define IRQ_BOARD_NR 64 +#elif defined(CONFIG_SMDK6410_WM1192_EV1 ) +#define IRQ_BOARD_NR 64#else #define IRQ_BOARD_NR 16#endif
Signature · 1 line
1.6.6.1
PATCH 2/3 ARM: S3C64XX: Add initial support for board specific IRQs
Follow the scheme used for IRQs. By default 16 GPIOs are allocated for board use.
--- arch/arm/mach-s3c6400/include/mach/gpio.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
arch/arm/mach-s3c6400/include/mach/gpio.h +5 -1
@@ -91,6 +91,10 @@ enum s3c_gpio_number {#define S3C_GPIO_END S3C64XX_GPIO_END/* define the number of gpios we need to the one after the GPQ() range */ -#define ARCH_NR_GPIOS (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) +#define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) + +#define BOARD_NR_GPIOS 16 + +#define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS)#include <asm-generic/gpio.h>
Signature · 1 line
1.6.6.1
PATCH 3/3 ARM: SMDK6410: Add support for PMIC LED on WM1192-EV1 PMIC module
In reply to Mark BrownThe PMIC LED on the SMDK6410 CPU board is driven by GPIO4 of the WM8312 PMIC. Provide software control of this LED.
--- arch/arm/mach-s3c6410/mach-smdk6410.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
arch/arm/mach-s3c6410/mach-smdk6410.c +30 -0
@@ -21,6 +21,7 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/i2c.h> +#include <linux/leds.h> #include <linux/fb.h> #include <linux/gpio.h> #include <linux/delay.h>
@@ -33,6 +34,7 @@#endif #ifdef CONFIG_SMDK6410_WM1192_EV1 +#include <linux/mfd/wm831x/core.h> #include <linux/mfd/wm831x/pdata.h> #endif
@@ -473,11 +475,38 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = {#endif #ifdef CONFIG_SMDK6410_WM1192_EV1 +static struct gpio_led wm1192_pmic_leds[] = { + { + .name ="PMIC:red:power" , + .gpio =GPIO_BOARD_START +3 , + .default_state =LEDS_GPIO_DEFSTATE_ON , + }, +}; + +static struct gpio_led_platform_data wm1192_pmic_led = { + .num_leds =ARRAY_SIZE (wm1192_pmic_leds), + .leds = wm1192_pmic_leds, +}; + +static struct platform_device wm1192_pmic_led_dev = { + .name ="leds-gpio" , + .id =-1 , + .dev = { + .platform_data = &wm1192_pmic_led, + }, +}; +static int wm1192_pre_init (struct wm831x *wm831x) { +int ret; +/* Configure the IRQ line */ s3c_gpio_setpull (S3C64XX_GPN (12 ),S3C_GPIO_PULL_UP ); + ret =platform_device_register (&wm1192_pmic_led_dev); +if (ret !=0 ) +dev_err (wm831x->dev,"Failed to add PMIC LED: %d\n" , ret); +return 0 ; }
@@ -524,6 +553,7 @@ static struct wm831x_pdata smdk6410_wm1192_pdata = { &smdk6410_vddint,/* DCDC2 */ &wm1192_dcdc3, }, + .gpio_base =GPIO_BOARD_START , .ldo = { &wm1192_ldo1,/* LDO1 */ &smdk6410_vdduh_mmc, /* LDO2 */
Signature · 1 line
1.6.6.1