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 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 v0.10.2 From 25752b78ee9ec8e456b307f5b795e864b2ceaf19 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 10 Aug 2012 13:03:18 +0900 Subject: ARM: S3C64XX: Register audio platform devices for Bells on Cragganmore Signed-off-by: Mark Brown Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 09cd812..a095f7f 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, }; -- cgit v0.10.2 From aaca483f765e32325f2539333c628be68a34d893 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Sat, 8 Sep 2012 10:09:03 +0900 Subject: ARM: dts: Use active low flag for gpio-keys on Origen Commit f447ed8b31d ("gpio: samsung: add flags specifier to device-tree binding") adds a flag to represent active low state for gpio line. Since gpio-keys on Origen board are active low, using this flag to represent the same. Signed-off-by: Sachin Kamat Reviewed-by: Thomas Abraham Signed-off-by: Kukjin Kim diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts index 0c49caa..c37edf0 100644 --- a/arch/arm/boot/dts/exynos4210-origen.dts +++ b/arch/arm/boot/dts/exynos4210-origen.dts @@ -62,31 +62,31 @@ up { label = "Up"; - gpios = <&gpx2 0 0 0 2>; + gpios = <&gpx2 0 0 0x10000 2>; linux,code = <103>; }; down { label = "Down"; - gpios = <&gpx2 1 0 0 2>; + gpios = <&gpx2 1 0 0x10000 2>; linux,code = <108>; }; back { label = "Back"; - gpios = <&gpx1 7 0 0 2>; + gpios = <&gpx1 7 0 0x10000 2>; linux,code = <158>; }; home { label = "Home"; - gpios = <&gpx1 6 0 0 2>; + gpios = <&gpx1 6 0 0x10000 2>; linux,code = <102>; }; menu { label = "Menu"; - gpios = <&gpx1 5 0 0 2>; + gpios = <&gpx1 5 0 0x10000 2>; linux,code = <139>; }; }; -- cgit v0.10.2 From 162b172ddd7aacc754253f97b1b1ee75344bc22c Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Sat, 8 Sep 2012 10:09:03 +0900 Subject: ARM: dts: Add heartbeat gpio-leds support to Origen Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts index c37edf0..d69a799 100644 --- a/arch/arm/boot/dts/exynos4210-origen.dts +++ b/arch/arm/boot/dts/exynos4210-origen.dts @@ -91,6 +91,14 @@ }; }; + leds { + compatible = "gpio-leds"; + status { + gpios = <&gpx1 3 0 0x10000 2>; + linux,default-trigger = "heartbeat"; + }; + }; + keypad@100A0000 { status = "disabled"; }; -- cgit v0.10.2 From 4d8cc596dd9f8dcc909ad405742099239aaa48c0 Mon Sep 17 00:00:00 2001 From: Tushar Behera Date: Thu, 13 Sep 2012 15:52:08 +0900 Subject: ARM: EXYNOS: Use generic pwm driver in Origen board Signed-off-by: Tushar Behera Signed-off-by: Sachin Kamat Reviewed-by: Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index b5b4c8c..4d198d4 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -348,6 +348,7 @@ config MACH_ORIGEN select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for ORIGEN based on Samsung EXYNOS4210 diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 5ca8030..2203664 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -613,6 +614,10 @@ static struct platform_device origen_lcd_hv070wsa = { .dev.platform_data = &origen_lcd_hv070wsa_data, }; +static struct pwm_lookup origen_pwm_lookup[] = { + PWM_LOOKUP("s3c24xx-pwm.0", 0, "pwm-backlight.0", NULL), +}; + #ifdef CONFIG_DRM_EXYNOS static struct exynos_drm_fimd_pdata drm_fimd_pdata = { .panel = { @@ -791,6 +796,7 @@ static void __init origen_machine_init(void) platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); + pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup)); samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); origen_bt_setup(); -- cgit v0.10.2 From 20aa198f4990c25f7542e4e94175c3cb41731c4f Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Thu, 13 Sep 2012 15:52:11 +0900 Subject: ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 Generic PWM framework requires that the board setup code register a static mapping that can be used to match PWM consumers to providers. Signed-off-by: Sachin Kamat Reviewed-by: Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4d198d4..bd78d5d 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -384,6 +384,7 @@ config MACH_SMDK4212 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for Samsung SMDK4212 diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index b26beb1..81bf59c 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -222,6 +223,10 @@ static struct platform_pwm_backlight_data smdk4x12_bl_data = { .pwm_period_ns = 1000, }; +static struct pwm_lookup smdk4x12_pwm_lookup[] = { + PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL), +}; + static uint32_t smdk4x12_keymap[] __initdata = { /* KEY(row, col, keycode) */ KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3), @@ -349,6 +354,7 @@ static void __init smdk4x12_machine_init(void) ARRAY_SIZE(smdk4x12_i2c_devs7)); samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data); + pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup)); samsung_keypad_set_platdata(&smdk4x12_keypad_data); -- cgit v0.10.2 From fae9659a2cabcdaa01ea5a87568677e5cb037478 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Thu, 13 Sep 2012 15:54:18 +0900 Subject: ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 Generic PWM framework requires that the board setup code register a static mapping that can be used to match PWM consumers to providers. Signed-off-by: Sachin Kamat Reviewed-by: Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index bd78d5d..7ec64c8 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -221,6 +221,7 @@ config MACH_SMDKV310 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for Samsung SMDKV310 diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 3cfa688..1ba87e9 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -354,6 +355,10 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = { .pwm_period_ns = 1000, }; +static struct pwm_lookup smdkv310_pwm_lookup[] = { + PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL), +}; + static void s5p_tv_setup(void) { /* direct HPD to HDMI chip */ @@ -392,6 +397,8 @@ static void __init smdkv310_machine_init(void) samsung_keypad_set_platdata(&smdkv310_keypad_data); samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); + pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup)); + #ifdef CONFIG_DRM_EXYNOS s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); -- cgit v0.10.2