diff options
Diffstat (limited to 'arch/arm/mach-s5pc100/mach-smdkc100.c')
-rw-r--r-- | arch/arm/mach-s5pc100/mach-smdkc100.c | 89 |
1 files changed, 88 insertions, 1 deletions
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 214093cd7632..ae3c52cd0ebb 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -27,16 +27,22 @@ | |||
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | 28 | ||
29 | #include <mach/map.h> | 29 | #include <mach/map.h> |
30 | #include <mach/regs-fb.h> | ||
31 | #include <video/platform_lcd.h> | ||
30 | 32 | ||
31 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
32 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
33 | 35 | ||
34 | #include <plat/regs-serial.h> | 36 | #include <plat/regs-serial.h> |
37 | #include <plat/gpio-cfg.h> | ||
38 | #include <plat/regs-gpio.h> | ||
35 | 39 | ||
36 | #include <plat/clock.h> | 40 | #include <plat/clock.h> |
37 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
38 | #include <plat/cpu.h> | 42 | #include <plat/cpu.h> |
39 | #include <plat/s5pc100.h> | 43 | #include <plat/s5pc100.h> |
44 | #include <plat/fb.h> | ||
45 | #include <plat/iic.h> | ||
40 | 46 | ||
41 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) | 47 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) |
42 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) | 48 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) |
@@ -73,9 +79,78 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = { | |||
73 | }, | 79 | }, |
74 | }; | 80 | }; |
75 | 81 | ||
82 | /* I2C0 */ | ||
83 | static struct i2c_board_info i2c_devs0[] __initdata = { | ||
84 | }; | ||
85 | |||
86 | /* I2C1 */ | ||
87 | static struct i2c_board_info i2c_devs1[] __initdata = { | ||
88 | }; | ||
89 | |||
90 | /* LCD power controller */ | ||
91 | static void smdkc100_lcd_power_set(struct plat_lcd_data *pd, | ||
92 | unsigned int power) | ||
93 | { | ||
94 | /* backlight */ | ||
95 | gpio_direction_output(S5PC100_GPD(0), power); | ||
96 | |||
97 | if (power) { | ||
98 | /* module reset */ | ||
99 | gpio_direction_output(S5PC100_GPH0(6), 1); | ||
100 | mdelay(100); | ||
101 | gpio_direction_output(S5PC100_GPH0(6), 0); | ||
102 | mdelay(10); | ||
103 | gpio_direction_output(S5PC100_GPH0(6), 1); | ||
104 | mdelay(10); | ||
105 | } | ||
106 | } | ||
107 | |||
108 | static struct plat_lcd_data smdkc100_lcd_power_data = { | ||
109 | .set_power = smdkc100_lcd_power_set, | ||
110 | }; | ||
111 | |||
112 | static struct platform_device smdkc100_lcd_powerdev = { | ||
113 | .name = "platform-lcd", | ||
114 | .dev.parent = &s3c_device_fb.dev, | ||
115 | .dev.platform_data = &smdkc100_lcd_power_data, | ||
116 | }; | ||
117 | |||
118 | /* Frame Buffer */ | ||
119 | static struct s3c_fb_pd_win smdkc100_fb_win0 = { | ||
120 | /* this is to ensure we use win0 */ | ||
121 | .win_mode = { | ||
122 | .refresh = 70, | ||
123 | .pixclock = (8+13+3+800)*(7+5+1+480), | ||
124 | .left_margin = 8, | ||
125 | .right_margin = 13, | ||
126 | .upper_margin = 7, | ||
127 | .lower_margin = 5, | ||
128 | .hsync_len = 3, | ||
129 | .vsync_len = 1, | ||
130 | .xres = 800, | ||
131 | .yres = 480, | ||
132 | }, | ||
133 | .max_bpp = 32, | ||
134 | .default_bpp = 16, | ||
135 | }; | ||
136 | |||
137 | static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = { | ||
138 | .win[0] = &smdkc100_fb_win0, | ||
139 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
140 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
141 | .setup_gpio = s5pc100_fb_gpio_setup_24bpp, | ||
142 | }; | ||
143 | |||
76 | static struct map_desc smdkc100_iodesc[] = {}; | 144 | static struct map_desc smdkc100_iodesc[] = {}; |
77 | 145 | ||
78 | static struct platform_device *smdkc100_devices[] __initdata = { | 146 | static struct platform_device *smdkc100_devices[] __initdata = { |
147 | &s3c_device_i2c0, | ||
148 | &s3c_device_i2c1, | ||
149 | &s3c_device_fb, | ||
150 | &s3c_device_hsmmc0, | ||
151 | &s3c_device_hsmmc1, | ||
152 | &s3c_device_hsmmc2, | ||
153 | &smdkc100_lcd_powerdev, | ||
79 | }; | 154 | }; |
80 | 155 | ||
81 | static void __init smdkc100_map_io(void) | 156 | static void __init smdkc100_map_io(void) |
@@ -87,12 +162,24 @@ static void __init smdkc100_map_io(void) | |||
87 | 162 | ||
88 | static void __init smdkc100_machine_init(void) | 163 | static void __init smdkc100_machine_init(void) |
89 | { | 164 | { |
165 | /* I2C */ | ||
166 | s3c_i2c0_set_platdata(NULL); | ||
167 | s3c_i2c1_set_platdata(NULL); | ||
168 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); | ||
169 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | ||
170 | |||
171 | s3c_fb_set_platdata(&smdkc100_lcd_pdata); | ||
172 | |||
173 | /* LCD init */ | ||
174 | gpio_request(S5PC100_GPD(0), "GPD"); | ||
175 | gpio_request(S5PC100_GPH0(6), "GPH0"); | ||
176 | smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); | ||
90 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); | 177 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); |
91 | } | 178 | } |
92 | 179 | ||
93 | MACHINE_START(SMDKC100, "SMDKC100") | 180 | MACHINE_START(SMDKC100, "SMDKC100") |
94 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ | 181 | /* Maintainer: Byungho Min <bhmin@samsung.com> */ |
95 | .phys_io = S5PC1XX_PA_UART & 0xfff00000, | 182 | .phys_io = S5PC100_PA_UART & 0xfff00000, |
96 | .io_pg_offst = (((u32)S5PC1XX_VA_UART) >> 18) & 0xfffc, | 183 | .io_pg_offst = (((u32)S5PC1XX_VA_UART) >> 18) & 0xfffc, |
97 | .boot_params = S5PC100_PA_SDRAM + 0x100, | 184 | .boot_params = S5PC100_PA_SDRAM + 0x100, |
98 | 185 | ||