From 5cd435b4ab881280fb0b8ce6686cfceb005d98c8 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Mon, 28 Feb 2011 23:02:32 +0530 Subject: ARM: SAMSUNG: Add PWM backlight support on Samsung S5PV210 This patch adds support for LCD backlight control using PWM timer for Samsung's SMDKV210 board. Signed-off-by: Banajit Goswami Signed-off-by: Kukjin Kim --- arch/arm/mach-s5pv210/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-s5pv210/Kconfig') diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 53aabef1e9ce..d7fd031f6015 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig @@ -130,6 +130,7 @@ config MACH_SMDKV210 select SAMSUNG_DEV_ADC select SAMSUNG_DEV_IDE select SAMSUNG_DEV_KEYPAD + select SAMSUNG_DEV_PWM select SAMSUNG_DEV_TS select S5PV210_SETUP_FB_24BPP select S5PV210_SETUP_I2C1 -- cgit v1.2.3 From 0048a17348645f18cf209483e1f8e46a6dbec971 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 10 Mar 2011 21:49:31 +0900 Subject: ARM: S5P: Add platform helpers for camera GPIO configuration Add functions for configuration of the parallel camera bus pins on S5PV210 and Exynos4 SoC. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos4/Kconfig | 5 ++++ arch/arm/mach-exynos4/Makefile | 1 + arch/arm/mach-exynos4/setup-fimc.c | 44 ++++++++++++++++++++++++++++++++ arch/arm/mach-s5pv210/Kconfig | 5 ++++ arch/arm/mach-s5pv210/Makefile | 1 + arch/arm/mach-s5pv210/setup-fimc.c | 43 +++++++++++++++++++++++++++++++ arch/arm/plat-s5p/include/plat/camport.h | 28 ++++++++++++++++++++ 7 files changed, 127 insertions(+) create mode 100644 arch/arm/mach-exynos4/setup-fimc.c create mode 100644 arch/arm/mach-s5pv210/setup-fimc.c create mode 100644 arch/arm/plat-s5p/include/plat/camport.h (limited to 'arch/arm/mach-s5pv210/Kconfig') diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 82195a9a4c61..8d7398fdd05c 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -76,6 +76,11 @@ config EXYNOS4_SETUP_SDHCI_GPIO help Common setup code for SDHCI gpio. +config EXYNOS4_SETUP_FIMC + bool + help + Common setup code for the camera interfaces. + # machine support menu "EXYNOS4 Machines" diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile index 56e367b48fbb..69a4a28dc95e 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile @@ -41,6 +41,7 @@ obj-y += dev-audio.o obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o +obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_EXYNOS4_SETUP_I2C2) += setup-i2c2.o obj-$(CONFIG_EXYNOS4_SETUP_I2C3) += setup-i2c3.o diff --git a/arch/arm/mach-exynos4/setup-fimc.c b/arch/arm/mach-exynos4/setup-fimc.c new file mode 100644 index 000000000000..6a45078d9d12 --- /dev/null +++ b/arch/arm/mach-exynos4/setup-fimc.c @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2011 Samsung Electronics Co., Ltd. + * + * Exynos4 camera interface GPIO configuration. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +int exynos4_fimc_setup_gpio(enum s5p_camport_id id) +{ + u32 gpio8, gpio5; + u32 sfn; + int ret; + + switch (id) { + case S5P_CAMPORT_A: + gpio8 = EXYNOS4_GPJ0(0); /* PCLK, VSYNC, HREF, DATA[0:4] */ + gpio5 = EXYNOS4_GPJ1(0); /* DATA[5:7], CLKOUT, FIELD */ + sfn = S3C_GPIO_SFN(2); + break; + + case S5P_CAMPORT_B: + gpio8 = EXYNOS4_GPE0(0); /* DATA[0:7] */ + gpio5 = EXYNOS4_GPE1(0); /* PCLK, VSYNC, HREF, CLKOUT, FIELD */ + sfn = S3C_GPIO_SFN(3); + break; + + default: + WARN(1, "Wrong camport id: %d\n", id); + return -EINVAL; + } + + ret = s3c_gpio_cfgall_range(gpio8, 8, sfn, S3C_GPIO_PULL_UP); + if (ret) + return ret; + + return s3c_gpio_cfgall_range(gpio5, 5, sfn, S3C_GPIO_PULL_UP); +} diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index d7fd031f6015..7f015bbba853 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig @@ -53,6 +53,11 @@ config S5PV210_SETUP_SDHCI_GPIO help Common setup code for SDHCI gpio. +config S5PV210_SETUP_FIMC + bool + help + Common setup code for the camera interfaces. + menu "S5PC110 Machines" config MACH_AQUILA diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile index ff1a0db57a2f..11f17907b4e8 100644 --- a/arch/arm/mach-s5pv210/Makefile +++ b/arch/arm/mach-s5pv210/Makefile @@ -31,6 +31,7 @@ obj-y += dev-audio.o obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o +obj-$(CONFIG_S5PV210_SETUP_FIMC) += setup-fimc.o obj-$(CONFIG_S5PV210_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5PV210_SETUP_I2C2) += setup-i2c2.o obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o diff --git a/arch/arm/mach-s5pv210/setup-fimc.c b/arch/arm/mach-s5pv210/setup-fimc.c new file mode 100644 index 000000000000..54cc5b11be0b --- /dev/null +++ b/arch/arm/mach-s5pv210/setup-fimc.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2011 Samsung Electronics Co., Ltd. + * + * S5PV210 camera interface GPIO configuration. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +int s5pv210_fimc_setup_gpio(enum s5p_camport_id id) +{ + u32 gpio8, gpio5; + int ret; + + switch (id) { + case S5P_CAMPORT_A: + gpio8 = S5PV210_GPE0(0); + gpio5 = S5PV210_GPE1(0); + break; + + case S5P_CAMPORT_B: + gpio8 = S5PV210_GPJ0(0); + gpio5 = S5PV210_GPJ1(0); + break; + + default: + WARN(1, "Wrong camport id: %d\n", id); + return -EINVAL; + } + + ret = s3c_gpio_cfgall_range(gpio8, 8, S3C_GPIO_SFN(2), + S3C_GPIO_PULL_UP); + if (ret) + return ret; + + return s3c_gpio_cfgall_range(gpio5, 5, S3C_GPIO_SFN(2), + S3C_GPIO_PULL_UP); +} diff --git a/arch/arm/plat-s5p/include/plat/camport.h b/arch/arm/plat-s5p/include/plat/camport.h new file mode 100644 index 000000000000..71688c8ba288 --- /dev/null +++ b/arch/arm/plat-s5p/include/plat/camport.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2011 Samsung Electronics Co., Ltd. + * + * S5P series camera interface helper functions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef PLAT_S5P_CAMPORT_H_ +#define PLAT_S5P_CAMPORT_H_ __FILE__ + +enum s5p_camport_id { + S5P_CAMPORT_A, + S5P_CAMPORT_B, +}; + +/* + * The helper functions to configure GPIO for the camera parallel bus. + * The camera port can be multiplexed with any FIMC entity, even multiple + * FIMC entities are allowed to be attached to a single port simultaneously. + * These functions are to be used in the board setup code. + */ +int s5pv210_fimc_setup_gpio(enum s5p_camport_id id); +int exynos4_fimc_setup_gpio(enum s5p_camport_id id); + +#endif -- cgit v1.2.3 From 9e65bbf21371ea6705acd88229c8a7439f46e25e Mon Sep 17 00:00:00 2001 From: Sangbeom Kim Date: Sat, 12 Mar 2011 08:05:19 +0900 Subject: ARM: S5P: Update defconfig for HRT support This patch updates s5pv210_defconfig and s5p64x0_defconfig for HRT support and CONFIG_S5P_HRT is used for its configuration. Signed-off-by: Sangbeom Kim Signed-off-by: Kukjin Kim --- arch/arm/Kconfig | 6 ++++-- arch/arm/configs/s5p64x0_defconfig | 2 ++ arch/arm/configs/s5pv210_defconfig | 2 ++ arch/arm/mach-s5p64x0/Kconfig | 2 ++ arch/arm/mach-s5pv210/Kconfig | 1 + arch/arm/plat-s5p/Kconfig | 5 +++++ 6 files changed, 16 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-s5pv210/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b4db99bb4f85..eed07eac3a5f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -715,7 +715,8 @@ config ARCH_S5P64X0 select GENERIC_GPIO select HAVE_CLK select HAVE_S3C2410_WATCHDOG if WATCHDOG - select ARCH_USES_GETTIMEOFFSET + select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK select HAVE_S3C2410_I2C if I2C select HAVE_S3C_RTC if RTC_CLASS help @@ -753,7 +754,8 @@ config ARCH_S5PV210 select HAVE_CLK select ARM_L1_CACHE_SHIFT_6 select ARCH_HAS_CPUFREQ - select ARCH_USES_GETTIMEOFFSET + select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK select HAVE_S3C2410_I2C if I2C select HAVE_S3C_RTC if RTC_CLASS select HAVE_S3C2410_WATCHDOG if WATCHDOG diff --git a/arch/arm/configs/s5p64x0_defconfig b/arch/arm/configs/s5p64x0_defconfig index 2993ecd35145..ad6b61b0bd11 100644 --- a/arch/arm/configs/s5p64x0_defconfig +++ b/arch/arm/configs/s5p64x0_defconfig @@ -10,6 +10,8 @@ CONFIG_S3C_BOOT_ERROR_RESET=y CONFIG_S3C_LOWLEVEL_UART_PORT=1 CONFIG_MACH_SMDK6440=y CONFIG_MACH_SMDK6450=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y CONFIG_CPU_32v6K=y CONFIG_AEABI=y CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc" diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig index 0488a1eb4d7d..fa989902236d 100644 --- a/arch/arm/configs/s5pv210_defconfig +++ b/arch/arm/configs/s5pv210_defconfig @@ -13,6 +13,8 @@ CONFIG_MACH_AQUILA=y CONFIG_MACH_GONI=y CONFIG_MACH_SMDKC110=y CONFIG_MACH_SMDKV210=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y CONFIG_VMSPLIT_2G=y CONFIG_PREEMPT=y CONFIG_AEABI=y diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig index 08b0a5bf1d60..017af4c4293c 100644 --- a/arch/arm/mach-s5p64x0/Kconfig +++ b/arch/arm/mach-s5p64x0/Kconfig @@ -10,12 +10,14 @@ if ARCH_S5P64X0 config CPU_S5P6440 bool select S3C_PL330_DMA + select S5P_HRT help Enable S5P6440 CPU support config CPU_S5P6450 bool select S3C_PL330_DMA + select S5P_HRT help Enable S5P6450 CPU support diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 7f015bbba853..37b5a97594a5 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig @@ -13,6 +13,7 @@ config CPU_S5PV210 bool select S3C_PL330_DMA select S5P_EXT_INT + select S5P_HRT select S5PV210_PM if PM help Enable S5PV210 CPU support diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 463d3aac83e4..0e4144771240 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig @@ -37,6 +37,11 @@ config S5P_GPIO_INT help Common code for the GPIO interrupts (other than external interrupts.) +config S5P_HRT + bool + help + Use the High Resolution timer support + comment "System MMU" config S5P_SYSTEM_MMU -- cgit v1.2.3