diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2010-11-25 23:19:49 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-12-29 19:37:13 -0500 |
commit | 8f49720d5afb42dc7c0ced2cd94d561fbe9560d9 (patch) | |
tree | 63d97f6c7326b274c2a4a84cfe22e4382bd115f7 | |
parent | 387c31c7e5c9805b0aef8833d1731a5fe7bdea14 (diff) |
ARM: S5PV210: Add frame buffer display support for SMDKV210
Enable frame buffer display support for SMDKV210 board.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/mach-s5pv210/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkv210.c | 74 |
2 files changed, 76 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 862f239a0fdb..53aabef1e9ce 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -118,6 +118,7 @@ menu "S5PV210 Machines" | |||
118 | config MACH_SMDKV210 | 118 | config MACH_SMDKV210 |
119 | bool "SMDKV210" | 119 | bool "SMDKV210" |
120 | select CPU_S5PV210 | 120 | select CPU_S5PV210 |
121 | select S3C_DEV_FB | ||
121 | select S3C_DEV_HSMMC | 122 | select S3C_DEV_HSMMC |
122 | select S3C_DEV_HSMMC1 | 123 | select S3C_DEV_HSMMC1 |
123 | select S3C_DEV_HSMMC2 | 124 | select S3C_DEV_HSMMC2 |
@@ -130,6 +131,7 @@ config MACH_SMDKV210 | |||
130 | select SAMSUNG_DEV_IDE | 131 | select SAMSUNG_DEV_IDE |
131 | select SAMSUNG_DEV_KEYPAD | 132 | select SAMSUNG_DEV_KEYPAD |
132 | select SAMSUNG_DEV_TS | 133 | select SAMSUNG_DEV_TS |
134 | select S5PV210_SETUP_FB_24BPP | ||
133 | select S5PV210_SETUP_I2C1 | 135 | select S5PV210_SETUP_I2C1 |
134 | select S5PV210_SETUP_I2C2 | 136 | select S5PV210_SETUP_I2C2 |
135 | select S5PV210_SETUP_IDE | 137 | select S5PV210_SETUP_IDE |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 1fbc45b2a432..2196c231cfd2 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -14,14 +14,20 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | #include <linux/fb.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/delay.h> | ||
17 | 20 | ||
18 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
20 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
21 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
22 | 25 | ||
26 | #include <video/platform_lcd.h> | ||
27 | |||
23 | #include <mach/map.h> | 28 | #include <mach/map.h> |
24 | #include <mach/regs-clock.h> | 29 | #include <mach/regs-clock.h> |
30 | #include <mach/regs-fb.h> | ||
25 | 31 | ||
26 | #include <plat/regs-serial.h> | 32 | #include <plat/regs-serial.h> |
27 | #include <plat/s5pv210.h> | 33 | #include <plat/s5pv210.h> |
@@ -33,6 +39,7 @@ | |||
33 | #include <plat/iic.h> | 39 | #include <plat/iic.h> |
34 | #include <plat/keypad.h> | 40 | #include <plat/keypad.h> |
35 | #include <plat/pm.h> | 41 | #include <plat/pm.h> |
42 | #include <plat/fb.h> | ||
36 | 43 | ||
37 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 44 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
38 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 45 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -102,12 +109,76 @@ static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = { | |||
102 | .cols = 8, | 109 | .cols = 8, |
103 | }; | 110 | }; |
104 | 111 | ||
112 | static void smdkv210_lte480wv_set_power(struct plat_lcd_data *pd, | ||
113 | unsigned int power) | ||
114 | { | ||
115 | if (power) { | ||
116 | #if !defined(CONFIG_BACKLIGHT_PWM) | ||
117 | gpio_request(S5PV210_GPD0(3), "GPD0"); | ||
118 | gpio_direction_output(S5PV210_GPD0(3), 1); | ||
119 | gpio_free(S5PV210_GPD0(3)); | ||
120 | #endif | ||
121 | |||
122 | /* fire nRESET on power up */ | ||
123 | gpio_request(S5PV210_GPH0(6), "GPH0"); | ||
124 | |||
125 | gpio_direction_output(S5PV210_GPH0(6), 1); | ||
126 | |||
127 | gpio_set_value(S5PV210_GPH0(6), 0); | ||
128 | mdelay(10); | ||
129 | |||
130 | gpio_set_value(S5PV210_GPH0(6), 1); | ||
131 | mdelay(10); | ||
132 | |||
133 | gpio_free(S5PV210_GPH0(6)); | ||
134 | } else { | ||
135 | #if !defined(CONFIG_BACKLIGHT_PWM) | ||
136 | gpio_request(S5PV210_GPD0(3), "GPD0"); | ||
137 | gpio_direction_output(S5PV210_GPD0(3), 0); | ||
138 | gpio_free(S5PV210_GPD0(3)); | ||
139 | #endif | ||
140 | } | ||
141 | } | ||
142 | |||
143 | static struct plat_lcd_data smdkv210_lcd_lte480wv_data = { | ||
144 | .set_power = smdkv210_lte480wv_set_power, | ||
145 | }; | ||
146 | |||
147 | static struct platform_device smdkv210_lcd_lte480wv = { | ||
148 | .name = "platform-lcd", | ||
149 | .dev.parent = &s3c_device_fb.dev, | ||
150 | .dev.platform_data = &smdkv210_lcd_lte480wv_data, | ||
151 | }; | ||
152 | |||
153 | static struct s3c_fb_pd_win smdkv210_fb_win0 = { | ||
154 | .win_mode = { | ||
155 | .left_margin = 13, | ||
156 | .right_margin = 8, | ||
157 | .upper_margin = 7, | ||
158 | .lower_margin = 5, | ||
159 | .hsync_len = 3, | ||
160 | .vsync_len = 1, | ||
161 | .xres = 800, | ||
162 | .yres = 480, | ||
163 | }, | ||
164 | .max_bpp = 32, | ||
165 | .default_bpp = 24, | ||
166 | }; | ||
167 | |||
168 | static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = { | ||
169 | .win[0] = &smdkv210_fb_win0, | ||
170 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
171 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
172 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | ||
173 | }; | ||
174 | |||
105 | static struct platform_device *smdkv210_devices[] __initdata = { | 175 | static struct platform_device *smdkv210_devices[] __initdata = { |
106 | &s5pv210_device_iis0, | 176 | &s5pv210_device_iis0, |
107 | &s5pv210_device_ac97, | 177 | &s5pv210_device_ac97, |
108 | &s5pv210_device_spdif, | 178 | &s5pv210_device_spdif, |
109 | &s3c_device_adc, | 179 | &s3c_device_adc, |
110 | &s3c_device_cfcon, | 180 | &s3c_device_cfcon, |
181 | &s3c_device_fb, | ||
111 | &s3c_device_hsmmc0, | 182 | &s3c_device_hsmmc0, |
112 | &s3c_device_hsmmc1, | 183 | &s3c_device_hsmmc1, |
113 | &s3c_device_hsmmc2, | 184 | &s3c_device_hsmmc2, |
@@ -119,6 +190,7 @@ static struct platform_device *smdkv210_devices[] __initdata = { | |||
119 | &s3c_device_rtc, | 190 | &s3c_device_rtc, |
120 | &s3c_device_ts, | 191 | &s3c_device_ts, |
121 | &s3c_device_wdt, | 192 | &s3c_device_wdt, |
193 | &smdkv210_lcd_lte480wv, | ||
122 | }; | 194 | }; |
123 | 195 | ||
124 | static struct i2c_board_info smdkv210_i2c_devs0[] __initdata = { | 196 | static struct i2c_board_info smdkv210_i2c_devs0[] __initdata = { |
@@ -165,6 +237,8 @@ static void __init smdkv210_machine_init(void) | |||
165 | 237 | ||
166 | s3c_ide_set_platdata(&smdkv210_ide_pdata); | 238 | s3c_ide_set_platdata(&smdkv210_ide_pdata); |
167 | 239 | ||
240 | s3c_fb_set_platdata(&smdkv210_lcd0_pdata); | ||
241 | |||
168 | platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); | 242 | platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); |
169 | } | 243 | } |
170 | 244 | ||