aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2012-04-11 16:54:44 +0530
committerTushar Behera <tushar.behera@linaro.org>2012-04-12 16:10:54 +0530
commit6c36fd25ff882aaf0c7b9c242bb94778c0d1fd54 (patch)
tree66ca2d49da45a15e06de9b305bd99f05baa86a4f
parent2a1ab9828728aac28dafd815bc3e0704f73570c9 (diff)
ARM: EXYNOS: Add display support to EXYNOS4-DTsamsung-lt-v3.4-rc2-1
Suggested-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
-rw-r--r--arch/arm/mach-exynos/Kconfig2
-rw-r--r--arch/arm/mach-exynos/mach-exynos4-dt.c34
2 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index a10fcbf1fbd..02d7b2917e5 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -390,6 +390,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 = {