diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2012-04-11 16:54:44 +0530 |
---|---|---|
committer | Tushar Behera <tushar.behera@linaro.org> | 2012-04-18 13:13:58 +0530 |
commit | 6cb23e3e2b56dadcfdeb2d4880694f3a7b672d97 (patch) | |
tree | a39ecdf562919422237aed9edb7b5f0bd32fa929 | |
parent | 2c55aa73a5db7e72c7bbce708f1c551279c59bf7 (diff) |
ARM: EXYNOS: Add display support to EXYNOS4-DTtracking-samslt-dt-3.4-rc3-2012.04-0
Suggested-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
-rw-r--r-- | arch/arm/mach-exynos/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-exynos4-dt.c | 34 |
2 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e81c35f936b..9a0c0e3a9a2 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -373,6 +373,8 @@ config MACH_EXYNOS4_DT select USE_OF select ARM_AMBA select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD + select SAMSUNG_DEV_BACKLIGHT + select SAMSUNG_DEV_PWM help Machine support for Samsung Exynos4 machine with device tree enabled. Select this if a fdt blob is available for the Exynos4 SoC based board. diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index 8245f1c761d..b7252ad07ae 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -14,6 +14,16 @@ #include <linux/of_platform.h> #include <linux/serial_core.h> +#include <linux/pwm_backlight.h> +#include <plat/backlight.h> +#include <plat/gpio-cfg.h> +#include <linux/gpio.h> +#include <plat/regs-fb-v4.h> +#include <linux/fb.h> +#include <plat/fb.h> +#include <linux/lcd.h> +#include <plat/devs.h> + #include <asm/mach/arch.h> #include <asm/hardware/gic.h> #include <mach/map.h> @@ -23,6 +33,17 @@ #include "common.h" +/* LCD Backlight data */ +static struct samsung_bl_gpio_info origen_bl_gpio_info = { + .no = EXYNOS4_GPD0(0), + .func = S3C_GPIO_SFN(2), +}; + +static struct platform_pwm_backlight_data origen_bl_data = { + .pwm_id = 0, + .pwm_period_ns = 1000, +}; + /* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable @@ -57,6 +78,8 @@ static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = { "s3c2440-i2c.0", NULL), OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), + OF_DEV_AUXDATA("samsung,exynos4210-fimd", EXYNOS4_PA_FIMD0, + "exynos4-fb.0", NULL), {}, }; @@ -66,10 +89,21 @@ static void __init exynos4210_dt_map_io(void) s3c24xx_init_clocks(24000000); } +static void __init exynos4_setup_fimd(void) +{ + unsigned int reg; + + reg = __raw_readl(S3C_VA_SYS + 0x0210); + reg |= (1 << 1); + __raw_writel(reg, S3C_VA_SYS + 0x0210); +} + static void __init exynos4210_dt_machine_init(void) { of_platform_populate(NULL, of_default_bus_match_table, exynos4210_auxdata_lookup, NULL); + samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); + exynos4_setup_fimd(); } static char const *exynos4210_dt_compat[] __initdata = { |