Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel

Conflicts:

arch/arm/mach-pxa/am200epd.c
arch/arm/mach-pxa/ezx.c

authored by

Russell King and committed by
Russell King
40321fd2 d83a12a4

+1830 -168
+19 -12
arch/arm/mach-pxa/Kconfig
··· 27 27 endif 28 28 29 29 config ARCH_GUMSTIX 30 - bool "Gumstix XScale boards" 31 - help 32 - Say Y here if you intend to run this kernel on a 33 - Gumstix Full Function Minature Computer. 34 - 35 - config MACH_GUMSTIX_F 36 - bool "Basix, Connex, ws-200ax, ws-400ax systems" 37 - depends on ARCH_GUMSTIX 30 + bool "Gumstix XScale 255 boards" 38 31 select PXA25x 32 + help 33 + Say Y here if you intend to run this kernel on 34 + Basix, Connex, ws-200ax, ws-400ax systems 35 + 36 + choice 37 + prompt "Gumstix Carrier/Expansion Board" 38 + depends on ARCH_GUMSTIX 39 + 40 + config GUMSTIX_AM200EPD 41 + bool "Enable AM200EPD board support" 42 + 43 + endchoice 44 + 45 + config MACH_INTELMOTE2 46 + bool "Intel Mote 2 Platform" 47 + select PXA27x 48 + select IWMMXT 49 + select PXA_HAVE_BOARD_IRQS 39 50 40 51 config ARCH_LUBBOCK 41 52 bool "Intel DBPXA250 Development Platform" ··· 358 347 bool "no display" 359 348 360 349 endchoice 361 - 362 - config MACH_AM200EPD 363 - depends on MACH_GUMSTIX_F 364 - bool "Enable AM200EPD board support" 365 350 366 351 config PXA_EZX 367 352 bool "Motorola EZX Platform"
+3 -1
arch/arm/mach-pxa/Makefile
··· 27 27 28 28 # Specific board support 29 29 obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o 30 - obj-$(CONFIG_MACH_AM200EPD) += am200epd.o 30 + obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o 31 31 obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o 32 32 obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o 33 33 obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o ··· 69 69 obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o 70 70 obj-$(CONFIG_MACH_CM_X300) += cm-x300.o 71 71 obj-$(CONFIG_PXA_EZX) += ezx.o 72 + 73 + obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o 72 74 73 75 # Support for blinky lights 74 76 led-y := leds.o
+1 -3
arch/arm/mach-pxa/am200epd.c
··· 344 344 GPIO16_GPIO, 345 345 }; 346 346 347 - static int __init am200_init(void) 347 + int __init am200_init(void) 348 348 { 349 349 int ret; 350 350 ··· 381 381 382 382 module_param(panel_type, uint, 0); 383 383 MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97"); 384 - 385 - module_init(am200_init); 386 384 387 385 MODULE_DESCRIPTION("board driver for am200 metronome epd kit"); 388 386 MODULE_AUTHOR("Jaya Kumar");
+8 -21
arch/arm/mach-pxa/cm-x2xx.c
··· 210 210 static struct pxafb_mach_info generic_stn_320x240 = { 211 211 .modes = &generic_stn_320x240_mode, 212 212 .num_modes = 1, 213 - .lccr0 = 0, 214 - .lccr3 = (LCCR3_PixClkDiv(0x03) | 215 - LCCR3_Acb(0xff) | 216 - LCCR3_PCP), 213 + .lcd_conn = LCD_COLOR_STN_8BPP | LCD_PCLK_EDGE_FALL |\ 214 + LCD_AC_BIAS_FREQ(0xff), 217 215 .cmap_inverse = 0, 218 216 .cmap_static = 0, 219 217 }; ··· 234 236 static struct pxafb_mach_info generic_tft_640x480 = { 235 237 .modes = &generic_tft_640x480_mode, 236 238 .num_modes = 1, 237 - .lccr0 = (LCCR0_PAS), 238 - .lccr3 = (LCCR3_PixClkDiv(0x01) | 239 - LCCR3_Acb(0xff) | 240 - LCCR3_PCP), 239 + .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_PCLK_EDGE_FALL |\ 240 + LCD_AC_BIAS_FREQ(0xff), 241 241 .cmap_inverse = 0, 242 242 .cmap_static = 0, 243 243 }; ··· 259 263 static struct pxafb_mach_info generic_crt_640x480 = { 260 264 .modes = &generic_crt_640x480_mode, 261 265 .num_modes = 1, 262 - .lccr0 = (LCCR0_PAS), 263 - .lccr3 = (LCCR3_PixClkDiv(0x01) | 264 - LCCR3_Acb(0xff)), 266 + .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_AC_BIAS_FREQ(0xff), 265 267 .cmap_inverse = 0, 266 268 .cmap_static = 0, 267 269 }; ··· 283 289 static struct pxafb_mach_info generic_crt_800x600 = { 284 290 .modes = &generic_crt_800x600_mode, 285 291 .num_modes = 1, 286 - .lccr0 = (LCCR0_PAS), 287 - .lccr3 = (LCCR3_PixClkDiv(0x02) | 288 - LCCR3_Acb(0xff)), 292 + .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_AC_BIAS_FREQ(0xff), 289 293 .cmap_inverse = 0, 290 294 .cmap_static = 0, 291 295 }; ··· 306 314 static struct pxafb_mach_info generic_tft_320x240 = { 307 315 .modes = &generic_tft_320x240_mode, 308 316 .num_modes = 1, 309 - .lccr0 = (LCCR0_PAS), 310 - .lccr3 = (LCCR3_PixClkDiv(0x06) | 311 - LCCR3_Acb(0xff) | 312 - LCCR3_PCP), 317 + .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_AC_BIAS_FREQ(0xff), 313 318 .cmap_inverse = 0, 314 319 .cmap_static = 0, 315 320 }; ··· 330 341 static struct pxafb_mach_info generic_stn_640x480 = { 331 342 .modes = &generic_stn_640x480_mode, 332 343 .num_modes = 1, 333 - .lccr0 = 0, 334 - .lccr3 = (LCCR3_PixClkDiv(0x02) | 335 - LCCR3_Acb(0xff)), 344 + .lcd_conn = LCD_COLOR_STN_8BPP | LCD_AC_BIAS_FREQ(0xff), 336 345 .cmap_inverse = 0, 337 346 .cmap_static = 0, 338 347 };
+1 -1
arch/arm/mach-pxa/e400.c
··· 52 52 static struct pxafb_mach_info e400_pxafb_mach_info = { 53 53 .modes = &e400_pxafb_mode_info, 54 54 .num_modes = 1, 55 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 55 + .lcd_conn = LCD_COLOR_TFT_16BPP, 56 56 .lccr3 = 0, 57 57 .pxafb_backlight_power = NULL, 58 58 };
+655 -45
arch/arm/mach-pxa/ezx.c
··· 16 16 #include <linux/platform_device.h> 17 17 #include <linux/delay.h> 18 18 #include <linux/pwm_backlight.h> 19 + #include <linux/input.h> 19 20 20 21 #include <asm/setup.h> 21 22 #include <mach/pxafb.h> 22 23 #include <mach/ohci.h> 23 24 #include <mach/i2c.h> 24 25 #include <mach/hardware.h> 26 + #include <mach/pxa27x_keypad.h> 25 27 26 28 #include <mach/mfp-pxa27x.h> 27 29 #include <mach/pxa-regs.h> ··· 104 102 GPIO44_BTUART_CTS, 105 103 GPIO45_BTUART_RTS, 106 104 107 - /* STUART */ 108 - GPIO46_STUART_RXD, 109 - GPIO47_STUART_TXD, 110 - 111 - /* For A780 support (connected with Neptune GSM chip) */ 112 - GPIO30_USB_P3_2, /* ICL_TXENB */ 113 - GPIO31_USB_P3_6, /* ICL_VPOUT */ 114 - GPIO90_USB_P3_5, /* ICL_VPIN */ 115 - GPIO91_USB_P3_1, /* ICL_XRXD */ 116 - GPIO56_USB_P3_4, /* ICL_VMOUT */ 117 - GPIO113_USB_P3_3, /* /ICL_VMIN */ 118 - 119 105 /* I2C */ 120 106 GPIO117_I2C_SCL, 121 107 GPIO118_I2C_SDA, 108 + 109 + /* PCAP SSP */ 110 + GPIO29_SSP1_SCLK, 111 + GPIO25_SSP1_TXD, 112 + GPIO26_SSP1_RXD, 113 + GPIO24_GPIO, /* pcap chip select */ 114 + GPIO1_GPIO, /* pcap interrupt */ 115 + GPIO4_GPIO, /* WDI_AP */ 116 + GPIO55_GPIO, /* SYS_RESTART */ 117 + 118 + /* MMC */ 119 + GPIO32_MMC_CLK, 120 + GPIO92_MMC_DAT_0, 121 + GPIO109_MMC_DAT_1, 122 + GPIO110_MMC_DAT_2, 123 + GPIO111_MMC_DAT_3, 124 + GPIO112_MMC_CMD, 125 + GPIO11_GPIO, /* mmc detect */ 126 + 127 + /* usb to external transceiver */ 128 + GPIO34_USB_P2_2, 129 + GPIO35_USB_P2_1, 130 + GPIO36_USB_P2_4, 131 + GPIO39_USB_P2_6, 132 + GPIO40_USB_P2_5, 133 + GPIO53_USB_P2_3, 134 + 135 + /* usb to Neptune GSM chip */ 136 + GPIO30_USB_P3_2, 137 + GPIO31_USB_P3_6, 138 + GPIO90_USB_P3_5, 139 + GPIO91_USB_P3_1, 140 + GPIO56_USB_P3_4, 141 + GPIO113_USB_P3_3, 122 142 }; 123 143 124 - static void __init ezx_init(void) 144 + #if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680) 145 + static unsigned long gen1_pin_config[] __initdata = { 146 + /* flip / lockswitch */ 147 + GPIO12_GPIO, 148 + 149 + /* bluetooth (bcm2035) */ 150 + GPIO14_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ 151 + GPIO48_GPIO, /* RESET */ 152 + GPIO28_GPIO, /* WAKEUP */ 153 + 154 + /* Neptune handshake */ 155 + GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ 156 + GPIO57_GPIO, /* AP_RDY */ 157 + GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ 158 + GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI2 */ 159 + GPIO82_GPIO, /* RESET */ 160 + GPIO99_GPIO, /* TC_MM_EN */ 161 + 162 + /* sound */ 163 + GPIO52_SSP3_SCLK, 164 + GPIO83_SSP3_SFRM, 165 + GPIO81_SSP3_TXD, 166 + GPIO89_SSP3_RXD, 167 + 168 + /* ssp2 pins to in */ 169 + GPIO22_GPIO, /* SSP2_SCLK */ 170 + GPIO37_GPIO, /* SSP2_SFRM */ 171 + GPIO38_GPIO, /* SSP2_TXD */ 172 + GPIO88_GPIO, /* SSP2_RXD */ 173 + 174 + /* camera */ 175 + GPIO23_CIF_MCLK, 176 + GPIO54_CIF_PCLK, 177 + GPIO85_CIF_LV, 178 + GPIO84_CIF_FV, 179 + GPIO27_CIF_DD_0, 180 + GPIO114_CIF_DD_1, 181 + GPIO51_CIF_DD_2, 182 + GPIO115_CIF_DD_3, 183 + GPIO95_CIF_DD_4, 184 + GPIO94_CIF_DD_5, 185 + GPIO17_CIF_DD_6, 186 + GPIO108_CIF_DD_7, 187 + GPIO50_GPIO, /* CAM_EN */ 188 + GPIO19_GPIO, /* CAM_RST */ 189 + 190 + /* EMU */ 191 + GPIO120_GPIO, /* EMU_MUX1 */ 192 + GPIO119_GPIO, /* EMU_MUX2 */ 193 + GPIO86_GPIO, /* SNP_INT_CTL */ 194 + GPIO87_GPIO, /* SNP_INT_IN */ 195 + }; 196 + #endif 197 + 198 + #if defined(CONFIG_MACH_EZX_A1200) || defined(CONFIG_MACH_EZX_A910) || \ 199 + defined(CONFIG_MACH_EZX_E2) || defined(CONFIG_MACH_EZX_E6) 200 + static unsigned long gen2_pin_config[] __initdata = { 201 + /* flip / lockswitch */ 202 + GPIO15_GPIO, 203 + 204 + /* EOC */ 205 + GPIO10_GPIO, 206 + 207 + /* bluetooth (bcm2045) */ 208 + GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ 209 + GPIO37_GPIO, /* RESET */ 210 + GPIO57_GPIO, /* WAKEUP */ 211 + 212 + /* Neptune handshake */ 213 + GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ 214 + GPIO96_GPIO, /* AP_RDY */ 215 + GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ 216 + GPIO116_GPIO, /* RESET */ 217 + GPIO41_GPIO, /* BP_FLASH */ 218 + 219 + /* sound */ 220 + GPIO52_SSP3_SCLK, 221 + GPIO83_SSP3_SFRM, 222 + GPIO81_SSP3_TXD, 223 + GPIO82_SSP3_RXD, 224 + 225 + /* ssp2 pins to in */ 226 + GPIO22_GPIO, /* SSP2_SCLK */ 227 + GPIO14_GPIO, /* SSP2_SFRM */ 228 + GPIO38_GPIO, /* SSP2_TXD */ 229 + GPIO88_GPIO, /* SSP2_RXD */ 230 + 231 + /* camera */ 232 + GPIO23_CIF_MCLK, 233 + GPIO54_CIF_PCLK, 234 + GPIO85_CIF_LV, 235 + GPIO84_CIF_FV, 236 + GPIO27_CIF_DD_0, 237 + GPIO114_CIF_DD_1, 238 + GPIO51_CIF_DD_2, 239 + GPIO115_CIF_DD_3, 240 + GPIO95_CIF_DD_4, 241 + GPIO48_CIF_DD_5, 242 + GPIO93_CIF_DD_6, 243 + GPIO12_CIF_DD_7, 244 + GPIO50_GPIO, /* CAM_EN */ 245 + GPIO28_GPIO, /* CAM_RST */ 246 + GPIO17_GPIO, /* CAM_FLASH */ 247 + }; 248 + #endif 249 + 250 + #ifdef CONFIG_MACH_EZX_A780 251 + static unsigned long a780_pin_config[] __initdata = { 252 + /* keypad */ 253 + GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, 254 + GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 255 + GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, 256 + GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, 257 + GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, 258 + GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, 259 + GPIO103_KP_MKOUT_0, 260 + GPIO104_KP_MKOUT_1, 261 + GPIO105_KP_MKOUT_2, 262 + GPIO106_KP_MKOUT_3, 263 + GPIO107_KP_MKOUT_4, 264 + 265 + /* attenuate sound */ 266 + GPIO96_GPIO, 267 + }; 268 + #endif 269 + 270 + #ifdef CONFIG_MACH_EZX_E680 271 + static unsigned long e680_pin_config[] __initdata = { 272 + /* keypad */ 273 + GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, 274 + GPIO96_KP_DKIN_3 | WAKEUP_ON_LEVEL_HIGH, 275 + GPIO97_KP_DKIN_4 | WAKEUP_ON_LEVEL_HIGH, 276 + GPIO98_KP_DKIN_5 | WAKEUP_ON_LEVEL_HIGH, 277 + GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 278 + GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, 279 + GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, 280 + GPIO103_KP_MKOUT_0, 281 + GPIO104_KP_MKOUT_1, 282 + GPIO105_KP_MKOUT_2, 283 + GPIO106_KP_MKOUT_3, 284 + 285 + /* MIDI */ 286 + GPIO79_GPIO, /* VA_SEL_BUL */ 287 + GPIO80_GPIO, /* FLT_SEL_BUL */ 288 + GPIO78_GPIO, /* MIDI_RESET */ 289 + GPIO33_GPIO, /* MIDI_CS */ 290 + GPIO15_GPIO, /* MIDI_IRQ */ 291 + GPIO49_GPIO, /* MIDI_NPWE */ 292 + GPIO18_GPIO, /* MIDI_RDY */ 293 + 294 + /* leds */ 295 + GPIO46_GPIO, 296 + GPIO47_GPIO, 297 + }; 298 + #endif 299 + 300 + #ifdef CONFIG_MACH_EZX_A1200 301 + static unsigned long a1200_pin_config[] __initdata = { 302 + /* keypad */ 303 + GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 304 + GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, 305 + GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, 306 + GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, 307 + GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, 308 + GPIO103_KP_MKOUT_0, 309 + GPIO104_KP_MKOUT_1, 310 + GPIO105_KP_MKOUT_2, 311 + GPIO106_KP_MKOUT_3, 312 + GPIO107_KP_MKOUT_4, 313 + GPIO108_KP_MKOUT_5, 314 + }; 315 + #endif 316 + 317 + #ifdef CONFIG_MACH_EZX_A910 318 + static unsigned long a910_pin_config[] __initdata = { 319 + /* keypad */ 320 + GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 321 + GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, 322 + GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, 323 + GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, 324 + GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, 325 + GPIO103_KP_MKOUT_0, 326 + GPIO104_KP_MKOUT_1, 327 + GPIO105_KP_MKOUT_2, 328 + GPIO106_KP_MKOUT_3, 329 + GPIO107_KP_MKOUT_4, 330 + GPIO108_KP_MKOUT_5, 331 + 332 + /* WLAN */ 333 + GPIO89_GPIO, /* RESET */ 334 + GPIO33_GPIO, /* WAKEUP */ 335 + GPIO94_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ 336 + 337 + /* MMC CS */ 338 + GPIO20_GPIO, 339 + }; 340 + #endif 341 + 342 + #ifdef CONFIG_MACH_EZX_E2 343 + static unsigned long e2_pin_config[] __initdata = { 344 + /* keypad */ 345 + GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 346 + GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, 347 + GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, 348 + GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, 349 + GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, 350 + GPIO103_KP_MKOUT_0, 351 + GPIO104_KP_MKOUT_1, 352 + GPIO105_KP_MKOUT_2, 353 + GPIO106_KP_MKOUT_3, 354 + GPIO107_KP_MKOUT_4, 355 + GPIO108_KP_MKOUT_5, 356 + }; 357 + #endif 358 + 359 + #ifdef CONFIG_MACH_EZX_E6 360 + static unsigned long e6_pin_config[] __initdata = { 361 + /* keypad */ 362 + GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 363 + GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, 364 + GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, 365 + GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, 366 + GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, 367 + GPIO103_KP_MKOUT_0, 368 + GPIO104_KP_MKOUT_1, 369 + GPIO105_KP_MKOUT_2, 370 + GPIO106_KP_MKOUT_3, 371 + GPIO107_KP_MKOUT_4, 372 + GPIO108_KP_MKOUT_5, 373 + }; 374 + #endif 375 + 376 + /* KEYPAD */ 377 + #ifdef CONFIG_MACH_EZX_A780 378 + static unsigned int a780_key_map[] = { 379 + KEY(0, 0, KEY_SEND), 380 + KEY(0, 1, KEY_BACK), 381 + KEY(0, 2, KEY_END), 382 + KEY(0, 3, KEY_PAGEUP), 383 + KEY(0, 4, KEY_UP), 384 + 385 + KEY(1, 0, KEY_NUMERIC_1), 386 + KEY(1, 1, KEY_NUMERIC_2), 387 + KEY(1, 2, KEY_NUMERIC_3), 388 + KEY(1, 3, KEY_SELECT), 389 + KEY(1, 4, KEY_KPENTER), 390 + 391 + KEY(2, 0, KEY_NUMERIC_4), 392 + KEY(2, 1, KEY_NUMERIC_5), 393 + KEY(2, 2, KEY_NUMERIC_6), 394 + KEY(2, 3, KEY_RECORD), 395 + KEY(2, 4, KEY_LEFT), 396 + 397 + KEY(3, 0, KEY_NUMERIC_7), 398 + KEY(3, 1, KEY_NUMERIC_8), 399 + KEY(3, 2, KEY_NUMERIC_9), 400 + KEY(3, 3, KEY_HOME), 401 + KEY(3, 4, KEY_RIGHT), 402 + 403 + KEY(4, 0, KEY_NUMERIC_STAR), 404 + KEY(4, 1, KEY_NUMERIC_0), 405 + KEY(4, 2, KEY_NUMERIC_POUND), 406 + KEY(4, 3, KEY_PAGEDOWN), 407 + KEY(4, 4, KEY_DOWN), 408 + }; 409 + 410 + static struct pxa27x_keypad_platform_data a780_keypad_platform_data = { 411 + .matrix_key_rows = 5, 412 + .matrix_key_cols = 5, 413 + .matrix_key_map = a780_key_map, 414 + .matrix_key_map_size = ARRAY_SIZE(a780_key_map), 415 + 416 + .direct_key_map = { KEY_CAMERA }, 417 + .direct_key_num = 1, 418 + 419 + .debounce_interval = 30, 420 + }; 421 + #endif /* CONFIG_MACH_EZX_A780 */ 422 + 423 + #ifdef CONFIG_MACH_EZX_E680 424 + static unsigned int e680_key_map[] = { 425 + KEY(0, 0, KEY_UP), 426 + KEY(0, 1, KEY_RIGHT), 427 + KEY(0, 2, KEY_RESERVED), 428 + KEY(0, 3, KEY_SEND), 429 + 430 + KEY(1, 0, KEY_DOWN), 431 + KEY(1, 1, KEY_LEFT), 432 + KEY(1, 2, KEY_PAGEUP), 433 + KEY(1, 3, KEY_PAGEDOWN), 434 + 435 + KEY(2, 0, KEY_RESERVED), 436 + KEY(2, 1, KEY_RESERVED), 437 + KEY(2, 2, KEY_RESERVED), 438 + KEY(2, 3, KEY_KPENTER), 439 + }; 440 + 441 + static struct pxa27x_keypad_platform_data e680_keypad_platform_data = { 442 + .matrix_key_rows = 3, 443 + .matrix_key_cols = 4, 444 + .matrix_key_map = e680_key_map, 445 + .matrix_key_map_size = ARRAY_SIZE(e680_key_map), 446 + 447 + .direct_key_map = { 448 + KEY_CAMERA, 449 + KEY_RESERVED, 450 + KEY_RESERVED, 451 + KEY_F1, 452 + KEY_CANCEL, 453 + KEY_F2, 454 + }, 455 + .direct_key_num = 6, 456 + 457 + .debounce_interval = 30, 458 + }; 459 + #endif /* CONFIG_MACH_EZX_E680 */ 460 + 461 + #ifdef CONFIG_MACH_EZX_A1200 462 + static unsigned int a1200_key_map[] = { 463 + KEY(0, 0, KEY_RESERVED), 464 + KEY(0, 1, KEY_RIGHT), 465 + KEY(0, 2, KEY_PAGEDOWN), 466 + KEY(0, 3, KEY_RESERVED), 467 + KEY(0, 4, KEY_RESERVED), 468 + KEY(0, 5, KEY_RESERVED), 469 + 470 + KEY(1, 0, KEY_RESERVED), 471 + KEY(1, 1, KEY_DOWN), 472 + KEY(1, 2, KEY_CAMERA), 473 + KEY(1, 3, KEY_RESERVED), 474 + KEY(1, 4, KEY_RESERVED), 475 + KEY(1, 5, KEY_RESERVED), 476 + 477 + KEY(2, 0, KEY_RESERVED), 478 + KEY(2, 1, KEY_KPENTER), 479 + KEY(2, 2, KEY_RECORD), 480 + KEY(2, 3, KEY_RESERVED), 481 + KEY(2, 4, KEY_RESERVED), 482 + KEY(2, 5, KEY_SELECT), 483 + 484 + KEY(3, 0, KEY_RESERVED), 485 + KEY(3, 1, KEY_UP), 486 + KEY(3, 2, KEY_SEND), 487 + KEY(3, 3, KEY_RESERVED), 488 + KEY(3, 4, KEY_RESERVED), 489 + KEY(3, 5, KEY_RESERVED), 490 + 491 + KEY(4, 0, KEY_RESERVED), 492 + KEY(4, 1, KEY_LEFT), 493 + KEY(4, 2, KEY_PAGEUP), 494 + KEY(4, 3, KEY_RESERVED), 495 + KEY(4, 4, KEY_RESERVED), 496 + KEY(4, 5, KEY_RESERVED), 497 + }; 498 + 499 + static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = { 500 + .matrix_key_rows = 5, 501 + .matrix_key_cols = 6, 502 + .matrix_key_map = a1200_key_map, 503 + .matrix_key_map_size = ARRAY_SIZE(a1200_key_map), 504 + 505 + .debounce_interval = 30, 506 + }; 507 + #endif /* CONFIG_MACH_EZX_A1200 */ 508 + 509 + #ifdef CONFIG_MACH_EZX_E6 510 + static unsigned int e6_key_map[] = { 511 + KEY(0, 0, KEY_RESERVED), 512 + KEY(0, 1, KEY_RIGHT), 513 + KEY(0, 2, KEY_PAGEDOWN), 514 + KEY(0, 3, KEY_RESERVED), 515 + KEY(0, 4, KEY_RESERVED), 516 + KEY(0, 5, KEY_NEXTSONG), 517 + 518 + KEY(1, 0, KEY_RESERVED), 519 + KEY(1, 1, KEY_DOWN), 520 + KEY(1, 2, KEY_PROG1), 521 + KEY(1, 3, KEY_RESERVED), 522 + KEY(1, 4, KEY_RESERVED), 523 + KEY(1, 5, KEY_RESERVED), 524 + 525 + KEY(2, 0, KEY_RESERVED), 526 + KEY(2, 1, KEY_ENTER), 527 + KEY(2, 2, KEY_CAMERA), 528 + KEY(2, 3, KEY_RESERVED), 529 + KEY(2, 4, KEY_RESERVED), 530 + KEY(2, 5, KEY_WWW), 531 + 532 + KEY(3, 0, KEY_RESERVED), 533 + KEY(3, 1, KEY_UP), 534 + KEY(3, 2, KEY_SEND), 535 + KEY(3, 3, KEY_RESERVED), 536 + KEY(3, 4, KEY_RESERVED), 537 + KEY(3, 5, KEY_PLAYPAUSE), 538 + 539 + KEY(4, 0, KEY_RESERVED), 540 + KEY(4, 1, KEY_LEFT), 541 + KEY(4, 2, KEY_PAGEUP), 542 + KEY(4, 3, KEY_RESERVED), 543 + KEY(4, 4, KEY_RESERVED), 544 + KEY(4, 5, KEY_PREVIOUSSONG), 545 + }; 546 + 547 + static struct pxa27x_keypad_platform_data e6_keypad_platform_data = { 548 + .matrix_key_rows = 5, 549 + .matrix_key_cols = 6, 550 + .matrix_key_map = e6_key_map, 551 + .matrix_key_map_size = ARRAY_SIZE(e6_key_map), 552 + 553 + .debounce_interval = 30, 554 + }; 555 + #endif /* CONFIG_MACH_EZX_E6 */ 556 + 557 + #ifdef CONFIG_MACH_EZX_A910 558 + static unsigned int a910_key_map[] = { 559 + KEY(0, 0, KEY_NUMERIC_6), 560 + KEY(0, 1, KEY_RIGHT), 561 + KEY(0, 2, KEY_PAGEDOWN), 562 + KEY(0, 3, KEY_KPENTER), 563 + KEY(0, 4, KEY_NUMERIC_5), 564 + KEY(0, 5, KEY_CAMERA), 565 + 566 + KEY(1, 0, KEY_NUMERIC_8), 567 + KEY(1, 1, KEY_DOWN), 568 + KEY(1, 2, KEY_RESERVED), 569 + KEY(1, 3, KEY_F1), /* Left SoftKey */ 570 + KEY(1, 4, KEY_NUMERIC_STAR), 571 + KEY(1, 5, KEY_RESERVED), 572 + 573 + KEY(2, 0, KEY_NUMERIC_7), 574 + KEY(2, 1, KEY_NUMERIC_9), 575 + KEY(2, 2, KEY_RECORD), 576 + KEY(2, 3, KEY_F2), /* Right SoftKey */ 577 + KEY(2, 4, KEY_BACK), 578 + KEY(2, 5, KEY_SELECT), 579 + 580 + KEY(3, 0, KEY_NUMERIC_2), 581 + KEY(3, 1, KEY_UP), 582 + KEY(3, 2, KEY_SEND), 583 + KEY(3, 3, KEY_NUMERIC_0), 584 + KEY(3, 4, KEY_NUMERIC_1), 585 + KEY(3, 5, KEY_RECORD), 586 + 587 + KEY(4, 0, KEY_NUMERIC_4), 588 + KEY(4, 1, KEY_LEFT), 589 + KEY(4, 2, KEY_PAGEUP), 590 + KEY(4, 3, KEY_NUMERIC_POUND), 591 + KEY(4, 4, KEY_NUMERIC_3), 592 + KEY(4, 5, KEY_RESERVED), 593 + }; 594 + 595 + static struct pxa27x_keypad_platform_data a910_keypad_platform_data = { 596 + .matrix_key_rows = 5, 597 + .matrix_key_cols = 6, 598 + .matrix_key_map = a910_key_map, 599 + .matrix_key_map_size = ARRAY_SIZE(a910_key_map), 600 + 601 + .debounce_interval = 30, 602 + }; 603 + #endif /* CONFIG_MACH_EZX_A910 */ 604 + 605 + #ifdef CONFIG_MACH_EZX_E2 606 + static unsigned int e2_key_map[] = { 607 + KEY(0, 0, KEY_NUMERIC_6), 608 + KEY(0, 1, KEY_RIGHT), 609 + KEY(0, 2, KEY_NUMERIC_9), 610 + KEY(0, 3, KEY_NEXTSONG), 611 + KEY(0, 4, KEY_NUMERIC_5), 612 + KEY(0, 5, KEY_F1), /* Left SoftKey */ 613 + 614 + KEY(1, 0, KEY_NUMERIC_8), 615 + KEY(1, 1, KEY_DOWN), 616 + KEY(1, 2, KEY_RESERVED), 617 + KEY(1, 3, KEY_PAGEUP), 618 + KEY(1, 4, KEY_NUMERIC_STAR), 619 + KEY(1, 5, KEY_F2), /* Right SoftKey */ 620 + 621 + KEY(2, 0, KEY_NUMERIC_7), 622 + KEY(2, 1, KEY_KPENTER), 623 + KEY(2, 2, KEY_RECORD), 624 + KEY(2, 3, KEY_PAGEDOWN), 625 + KEY(2, 4, KEY_BACK), 626 + KEY(2, 5, KEY_NUMERIC_0), 627 + 628 + KEY(3, 0, KEY_NUMERIC_2), 629 + KEY(3, 1, KEY_UP), 630 + KEY(3, 2, KEY_SEND), 631 + KEY(3, 3, KEY_PLAYPAUSE), 632 + KEY(3, 4, KEY_NUMERIC_1), 633 + KEY(3, 5, KEY_SOUND), /* Music SoftKey */ 634 + 635 + KEY(4, 0, KEY_NUMERIC_4), 636 + KEY(4, 1, KEY_LEFT), 637 + KEY(4, 2, KEY_NUMERIC_POUND), 638 + KEY(4, 3, KEY_PREVIOUSSONG), 639 + KEY(4, 4, KEY_NUMERIC_3), 640 + KEY(4, 5, KEY_RESERVED), 641 + }; 642 + 643 + static struct pxa27x_keypad_platform_data e2_keypad_platform_data = { 644 + .matrix_key_rows = 5, 645 + .matrix_key_cols = 6, 646 + .matrix_key_map = e2_key_map, 647 + .matrix_key_map_size = ARRAY_SIZE(e2_key_map), 648 + 649 + .debounce_interval = 30, 650 + }; 651 + #endif /* CONFIG_MACH_EZX_E2 */ 652 + 653 + #ifdef CONFIG_MACH_EZX_A780 654 + static void __init a780_init(void) 125 655 { 126 656 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); 657 + pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); 658 + pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config)); 659 + 127 660 pxa_set_i2c_info(NULL); 128 - if (machine_is_ezx_a780() || machine_is_ezx_e680()) 129 - set_pxa_fb_info(&ezx_fb_info_1); 130 - else 131 - set_pxa_fb_info(&ezx_fb_info_2); 661 + 662 + set_pxa_fb_info(&ezx_fb_info_1); 663 + 664 + pxa_set_keypad_info(&a780_keypad_platform_data); 132 665 133 666 platform_add_devices(devices, ARRAY_SIZE(devices)); 134 667 } 135 668 136 - static void __init ezx_fixup(struct machine_desc *desc, struct tag *tags, 137 - char **cmdline, struct meminfo *mi) 138 - { 139 - /* We have two ram chips. First one with 32MB at 0xA0000000 and a second 140 - * 16MB one at 0xAC000000 141 - */ 142 - mi->nr_banks = 2; 143 - mi->bank[0].start = 0xa0000000; 144 - mi->bank[0].node = 0; 145 - mi->bank[0].size = (32*1024*1024); 146 - mi->bank[1].start = 0xac000000; 147 - mi->bank[1].node = 1; 148 - mi->bank[1].size = (16*1024*1024); 149 - } 150 - 151 - #ifdef CONFIG_MACH_EZX_A780 152 669 MACHINE_START(EZX_A780, "Motorola EZX A780") 153 670 .phys_io = 0x40000000, 154 671 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 155 - .fixup = ezx_fixup, 156 672 .boot_params = 0xa0000100, 157 673 .map_io = pxa_map_io, 158 674 .init_irq = pxa27x_init_irq, 159 675 .timer = &pxa_timer, 160 - .init_machine = &ezx_init, 676 + .init_machine = a780_init, 161 677 MACHINE_END 162 678 #endif 163 679 164 680 #ifdef CONFIG_MACH_EZX_E680 681 + static struct i2c_board_info __initdata e680_i2c_board_info[] = { 682 + { I2C_BOARD_INFO("tea5767", 0x81) }, 683 + }; 684 + 685 + static void __init e680_init(void) 686 + { 687 + pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); 688 + pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); 689 + pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config)); 690 + 691 + pxa_set_i2c_info(NULL); 692 + i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); 693 + 694 + set_pxa_fb_info(&ezx_fb_info_1); 695 + 696 + pxa_set_keypad_info(&e680_keypad_platform_data); 697 + 698 + platform_add_devices(devices, ARRAY_SIZE(devices)); 699 + } 700 + 165 701 MACHINE_START(EZX_E680, "Motorola EZX E680") 166 702 .phys_io = 0x40000000, 167 703 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 168 - .fixup = ezx_fixup, 169 704 .boot_params = 0xa0000100, 170 705 .map_io = pxa_map_io, 171 706 .init_irq = pxa27x_init_irq, 172 707 .timer = &pxa_timer, 173 - .init_machine = &ezx_init, 708 + .init_machine = e680_init, 174 709 MACHINE_END 175 710 #endif 176 711 177 712 #ifdef CONFIG_MACH_EZX_A1200 713 + static struct i2c_board_info __initdata a1200_i2c_board_info[] = { 714 + { I2C_BOARD_INFO("tea5767", 0x81) }, 715 + }; 716 + 717 + static void __init a1200_init(void) 718 + { 719 + pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); 720 + pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 721 + pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config)); 722 + 723 + pxa_set_i2c_info(NULL); 724 + i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); 725 + 726 + set_pxa_fb_info(&ezx_fb_info_2); 727 + 728 + pxa_set_keypad_info(&a1200_keypad_platform_data); 729 + 730 + platform_add_devices(devices, ARRAY_SIZE(devices)); 731 + } 732 + 178 733 MACHINE_START(EZX_A1200, "Motorola EZX A1200") 179 734 .phys_io = 0x40000000, 180 735 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 181 - .fixup = ezx_fixup, 182 736 .boot_params = 0xa0000100, 183 737 .map_io = pxa_map_io, 184 738 .init_irq = pxa27x_init_irq, 185 739 .timer = &pxa_timer, 186 - .init_machine = &ezx_init, 740 + .init_machine = a1200_init, 187 741 MACHINE_END 188 742 #endif 189 743 190 744 #ifdef CONFIG_MACH_EZX_A910 745 + static void __init a910_init(void) 746 + { 747 + pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); 748 + pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 749 + pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config)); 750 + 751 + pxa_set_i2c_info(NULL); 752 + 753 + set_pxa_fb_info(&ezx_fb_info_2); 754 + 755 + pxa_set_keypad_info(&a910_keypad_platform_data); 756 + 757 + platform_add_devices(devices, ARRAY_SIZE(devices)); 758 + } 759 + 191 760 MACHINE_START(EZX_A910, "Motorola EZX A910") 192 761 .phys_io = 0x40000000, 193 762 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 194 - .fixup = ezx_fixup, 195 763 .boot_params = 0xa0000100, 196 764 .map_io = pxa_map_io, 197 765 .init_irq = pxa27x_init_irq, 198 766 .timer = &pxa_timer, 199 - .init_machine = &ezx_init, 767 + .init_machine = a910_init, 200 768 MACHINE_END 201 769 #endif 202 770 203 771 #ifdef CONFIG_MACH_EZX_E6 772 + static struct i2c_board_info __initdata e6_i2c_board_info[] = { 773 + { I2C_BOARD_INFO("tea5767", 0x81) }, 774 + }; 775 + 776 + static void __init e6_init(void) 777 + { 778 + pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); 779 + pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 780 + pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config)); 781 + 782 + pxa_set_i2c_info(NULL); 783 + i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); 784 + 785 + set_pxa_fb_info(&ezx_fb_info_2); 786 + 787 + pxa_set_keypad_info(&e6_keypad_platform_data); 788 + 789 + platform_add_devices(devices, ARRAY_SIZE(devices)); 790 + } 791 + 204 792 MACHINE_START(EZX_E6, "Motorola EZX E6") 205 793 .phys_io = 0x40000000, 206 794 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 207 - .fixup = ezx_fixup, 208 795 .boot_params = 0xa0000100, 209 796 .map_io = pxa_map_io, 210 797 .init_irq = pxa27x_init_irq, 211 798 .timer = &pxa_timer, 212 - .init_machine = &ezx_init, 799 + .init_machine = e6_init, 213 800 MACHINE_END 214 801 #endif 215 802 216 803 #ifdef CONFIG_MACH_EZX_E2 804 + static struct i2c_board_info __initdata e2_i2c_board_info[] = { 805 + { I2C_BOARD_INFO("tea5767", 0x81) }, 806 + }; 807 + 808 + static void __init e2_init(void) 809 + { 810 + pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); 811 + pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 812 + pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config)); 813 + 814 + pxa_set_i2c_info(NULL); 815 + i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); 816 + 817 + set_pxa_fb_info(&ezx_fb_info_2); 818 + 819 + pxa_set_keypad_info(&e2_keypad_platform_data); 820 + 821 + platform_add_devices(devices, ARRAY_SIZE(devices)); 822 + } 823 + 217 824 MACHINE_START(EZX_E2, "Motorola EZX E2") 218 825 .phys_io = 0x40000000, 219 826 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 220 - .fixup = ezx_fixup, 221 827 .boot_params = 0xa0000100, 222 828 .map_io = pxa_map_io, 223 829 .init_irq = pxa27x_init_irq, 224 830 .timer = &pxa_timer, 225 - .init_machine = &ezx_init, 831 + .init_machine = e2_init, 226 832 MACHINE_END 227 833 #endif
+15
arch/arm/mach-pxa/gumstix.c
··· 186 186 GPIO8_MMC_CS0, 187 187 }; 188 188 189 + int __attribute__((weak)) am200_init(void) 190 + { 191 + return 0; 192 + } 193 + 194 + static void __init carrier_board_init(void) 195 + { 196 + /* 197 + * put carrier/expansion board init here if 198 + * they cannot be detected programatically 199 + */ 200 + am200_init(); 201 + } 202 + 189 203 static void __init gumstix_init(void) 190 204 { 191 205 pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config)); ··· 208 194 gumstix_udc_init(); 209 195 gumstix_mmc_init(); 210 196 (void) platform_add_devices(devices, ARRAY_SIZE(devices)); 197 + carrier_board_init(); 211 198 } 212 199 213 200 MACHINE_START(GUMSTIX, "Gumstix")
+575
arch/arm/mach-pxa/imote2.c
··· 1 + /* 2 + * linux/arch/arm/mach-pxa/imote2.c 3 + * 4 + * Author: Ed C. Epp 5 + * Created: Nov 05, 2002 6 + * Copyright: Intel Corp. 7 + * 8 + * Modified 2008: Jonathan Cameron 9 + * 10 + * The Imote2 is a wireless sensor node platform sold 11 + * by Crossbow (www.xbow.com). 12 + */ 13 + 14 + #include <linux/init.h> 15 + #include <linux/device.h> 16 + #include <linux/mtd/mtd.h> 17 + #include <linux/mtd/partitions.h> 18 + #include <linux/platform_device.h> 19 + #include <linux/regulator/machine.h> 20 + #include <linux/gpio.h> 21 + #include <linux/leds.h> 22 + #include <linux/spi/spi.h> 23 + #include <linux/i2c.h> 24 + #include <linux/mfd/da903x.h> 25 + 26 + #include <asm/mach-types.h> 27 + #include <asm/mach/arch.h> 28 + #include <asm/mach/map.h> 29 + #include <asm/mach/flash.h> 30 + 31 + #include <mach/i2c.h> 32 + #include <mach/pxa-regs.h> 33 + #include <mach/pxa2xx-regs.h> 34 + #include <mach/mfp-pxa27x.h> 35 + #include <mach/regs-ssp.h> 36 + #include <mach/udc.h> 37 + #include <mach/mmc.h> 38 + #include <mach/pxa2xx_spi.h> 39 + #include <mach/pxa27x-udc.h> 40 + 41 + #include "devices.h" 42 + #include "generic.h" 43 + 44 + static unsigned long imote2_pin_config[] __initdata = { 45 + 46 + /* Device Identification for wakeup*/ 47 + GPIO102_GPIO, 48 + 49 + /* Button */ 50 + GPIO91_GPIO, 51 + 52 + /* DA9030 */ 53 + GPIO1_GPIO, 54 + 55 + /* MMC */ 56 + GPIO32_MMC_CLK, 57 + GPIO112_MMC_CMD, 58 + GPIO92_MMC_DAT_0, 59 + GPIO109_MMC_DAT_1, 60 + GPIO110_MMC_DAT_2, 61 + GPIO111_MMC_DAT_3, 62 + 63 + /* 802.15.4 radio - driver out of mainline */ 64 + GPIO22_GPIO, /* CC_RSTN */ 65 + GPIO114_GPIO, /* CC_FIFO */ 66 + GPIO116_GPIO, /* CC_CCA */ 67 + GPIO0_GPIO, /* CC_FIFOP */ 68 + GPIO16_GPIO, /* CCSFD */ 69 + GPIO39_GPIO, /* CSn */ 70 + GPIO115_GPIO, /* Power enable */ 71 + 72 + /* I2C */ 73 + GPIO117_I2C_SCL, 74 + GPIO118_I2C_SDA, 75 + 76 + /* SSP 3 - 802.15.4 radio */ 77 + GPIO39_GPIO, /* Chip Select */ 78 + GPIO34_SSP3_SCLK, 79 + GPIO35_SSP3_TXD, 80 + GPIO41_SSP3_RXD, 81 + 82 + /* SSP 2 - to daughter boards */ 83 + GPIO37_GPIO, /* Chip Select */ 84 + GPIO36_SSP2_SCLK, 85 + GPIO38_SSP2_TXD, 86 + GPIO11_SSP2_RXD, 87 + 88 + /* SSP 1 - to daughter boards */ 89 + GPIO24_GPIO, /* Chip Select */ 90 + GPIO23_SSP1_SCLK, 91 + GPIO25_SSP1_TXD, 92 + GPIO26_SSP1_RXD, 93 + 94 + /* BTUART Basic Connector*/ 95 + GPIO42_BTUART_RXD, 96 + GPIO43_BTUART_TXD, 97 + GPIO44_BTUART_CTS, 98 + GPIO45_BTUART_RTS, 99 + 100 + /* STUART Serial console via debug board*/ 101 + GPIO46_STUART_RXD, 102 + GPIO47_STUART_TXD, 103 + 104 + /* Basic sensor board */ 105 + GPIO96_GPIO, /* accelerometer interrupt */ 106 + GPIO99_GPIO, /* ADC interrupt */ 107 + 108 + /* Connector pins specified as gpios */ 109 + GPIO94_GPIO, /* large basic connector pin 14 */ 110 + GPIO10_GPIO, /* large basic connector pin 23 */ 111 + 112 + /* LEDS */ 113 + GPIO103_GPIO, /* red led */ 114 + GPIO104_GPIO, /* green led */ 115 + GPIO105_GPIO, /* blue led */ 116 + }; 117 + 118 + static struct gpio_led imote2_led_pins[] = { 119 + { 120 + .name = "imote2:red", 121 + .gpio = 103, 122 + .active_low = 1, 123 + }, { 124 + .name = "imote2:green", 125 + .gpio = 104, 126 + .active_low = 1, 127 + }, { 128 + .name = "imote2:blue", 129 + .gpio = 105, 130 + .active_low = 1, 131 + }, 132 + }; 133 + 134 + static struct gpio_led_platform_data imote2_led_data = { 135 + .num_leds = ARRAY_SIZE(imote2_led_pins), 136 + .leds = imote2_led_pins, 137 + }; 138 + 139 + static struct platform_device imote2_leds = { 140 + .name = "leds-gpio", 141 + .id = -1, 142 + .dev = { 143 + .platform_data = &imote2_led_data, 144 + }, 145 + }; 146 + 147 + /* Reverse engineered partly from Platformx drivers */ 148 + enum imote2_ldos{ 149 + vcc_vref, 150 + vcc_cc2420, 151 + vcc_mica, 152 + vcc_bt, 153 + /* The two voltages available to sensor boards */ 154 + vcc_sensor_1_8, 155 + vcc_sensor_3, 156 + 157 + vcc_sram_ext, /* directly connected to the pxa271 */ 158 + vcc_pxa_pll, 159 + vcc_pxa_usim, /* Reference voltage for certain gpios */ 160 + vcc_pxa_mem, 161 + vcc_pxa_flash, 162 + vcc_pxa_core, /*Dc-Dc buck not yet supported */ 163 + vcc_lcd, 164 + vcc_bb, 165 + vcc_bbio, 166 + vcc_io, /* cc2420 802.15.4 radio and pxa vcc_io ?*/ 167 + }; 168 + 169 + /* The values of the various regulator constraints are obviously dependent 170 + * on exactly what is wired to each ldo. Unfortunately this information is 171 + * not generally available. More information has been requested from Xbow 172 + * but as of yet they haven't been forthcoming. 173 + * 174 + * Some of these are clearly Stargate 2 related (no way of plugging 175 + * in an lcd on the IM2 for example!). 176 + */ 177 + static struct regulator_init_data imote2_ldo_init_data[] = { 178 + [vcc_bbio] = { 179 + .constraints = { /* board default 1.8V */ 180 + .name = "vcc_bbio", 181 + .min_uV = 1800000, 182 + .max_uV = 1800000, 183 + }, 184 + }, 185 + [vcc_bb] = { 186 + .constraints = { /* board default 2.8V */ 187 + .name = "vcc_bb", 188 + .min_uV = 2700000, 189 + .max_uV = 3000000, 190 + }, 191 + }, 192 + [vcc_pxa_flash] = { 193 + .constraints = {/* default is 1.8V */ 194 + .name = "vcc_pxa_flash", 195 + .min_uV = 1800000, 196 + .max_uV = 1800000, 197 + }, 198 + }, 199 + [vcc_cc2420] = { /* also vcc_io */ 200 + .constraints = { 201 + /* board default is 2.8V */ 202 + .name = "vcc_cc2420", 203 + .min_uV = 2700000, 204 + .max_uV = 3300000, 205 + }, 206 + }, 207 + [vcc_vref] = { /* Reference for what? */ 208 + .constraints = { /* default 1.8V */ 209 + .name = "vcc_vref", 210 + .min_uV = 1800000, 211 + .max_uV = 1800000, 212 + }, 213 + }, 214 + [vcc_sram_ext] = { 215 + .constraints = { /* default 2.8V */ 216 + .name = "vcc_sram_ext", 217 + .min_uV = 2800000, 218 + .max_uV = 2800000, 219 + }, 220 + }, 221 + [vcc_mica] = { 222 + .constraints = { /* default 2.8V */ 223 + .name = "vcc_mica", 224 + .min_uV = 2800000, 225 + .max_uV = 2800000, 226 + }, 227 + }, 228 + [vcc_bt] = { 229 + .constraints = { /* default 2.8V */ 230 + .name = "vcc_bt", 231 + .min_uV = 2800000, 232 + .max_uV = 2800000, 233 + }, 234 + }, 235 + [vcc_lcd] = { 236 + .constraints = { /* default 2.8V */ 237 + .name = "vcc_lcd", 238 + .min_uV = 2700000, 239 + .max_uV = 3300000, 240 + }, 241 + }, 242 + [vcc_io] = { /* Same or higher than everything 243 + * bar vccbat and vccusb */ 244 + .constraints = { /* default 2.8V */ 245 + .name = "vcc_io", 246 + .min_uV = 2692000, 247 + .max_uV = 3300000, 248 + }, 249 + }, 250 + [vcc_sensor_1_8] = { 251 + .constraints = { /* default 1.8V */ 252 + .name = "vcc_sensor_1_8", 253 + .min_uV = 1800000, 254 + .max_uV = 1800000, 255 + }, 256 + }, 257 + [vcc_sensor_3] = { /* curiously default 2.8V */ 258 + .constraints = { 259 + .name = "vcc_sensor_3", 260 + .min_uV = 2800000, 261 + .max_uV = 3000000, 262 + }, 263 + }, 264 + [vcc_pxa_pll] = { /* 1.17V - 1.43V, default 1.3V*/ 265 + .constraints = { 266 + .name = "vcc_pxa_pll", 267 + .min_uV = 1170000, 268 + .max_uV = 1430000, 269 + }, 270 + }, 271 + [vcc_pxa_usim] = { 272 + .constraints = { /* default 1.8V */ 273 + .name = "vcc_pxa_usim", 274 + .min_uV = 1710000, 275 + .max_uV = 2160000, 276 + }, 277 + }, 278 + [vcc_pxa_mem] = { 279 + .constraints = { /* default 1.8V */ 280 + .name = "vcc_pxa_mem", 281 + .min_uV = 1800000, 282 + .max_uV = 1800000, 283 + }, 284 + }, 285 + }; 286 + 287 + static struct da903x_subdev_info imote2_da9030_subdevs[] = { 288 + { 289 + .name = "da903x-regulator", 290 + .id = DA9030_ID_LDO2, 291 + .platform_data = &imote2_ldo_init_data[vcc_bbio], 292 + }, { 293 + .name = "da903x-regulator", 294 + .id = DA9030_ID_LDO3, 295 + .platform_data = &imote2_ldo_init_data[vcc_bb], 296 + }, { 297 + .name = "da903x-regulator", 298 + .id = DA9030_ID_LDO4, 299 + .platform_data = &imote2_ldo_init_data[vcc_pxa_flash], 300 + }, { 301 + .name = "da903x-regulator", 302 + .id = DA9030_ID_LDO5, 303 + .platform_data = &imote2_ldo_init_data[vcc_cc2420], 304 + }, { 305 + .name = "da903x-regulator", 306 + .id = DA9030_ID_LDO6, 307 + .platform_data = &imote2_ldo_init_data[vcc_vref], 308 + }, { 309 + .name = "da903x-regulator", 310 + .id = DA9030_ID_LDO7, 311 + .platform_data = &imote2_ldo_init_data[vcc_sram_ext], 312 + }, { 313 + .name = "da903x-regulator", 314 + .id = DA9030_ID_LDO8, 315 + .platform_data = &imote2_ldo_init_data[vcc_mica], 316 + }, { 317 + .name = "da903x-regulator", 318 + .id = DA9030_ID_LDO9, 319 + .platform_data = &imote2_ldo_init_data[vcc_bt], 320 + }, { 321 + .name = "da903x-regulator", 322 + .id = DA9030_ID_LDO10, 323 + .platform_data = &imote2_ldo_init_data[vcc_sensor_1_8], 324 + }, { 325 + .name = "da903x-regulator", 326 + .id = DA9030_ID_LDO11, 327 + .platform_data = &imote2_ldo_init_data[vcc_sensor_3], 328 + }, { 329 + .name = "da903x-regulator", 330 + .id = DA9030_ID_LDO12, 331 + .platform_data = &imote2_ldo_init_data[vcc_lcd], 332 + }, { 333 + .name = "da903x-regulator", 334 + .id = DA9030_ID_LDO15, 335 + .platform_data = &imote2_ldo_init_data[vcc_pxa_pll], 336 + }, { 337 + .name = "da903x-regulator", 338 + .id = DA9030_ID_LDO17, 339 + .platform_data = &imote2_ldo_init_data[vcc_pxa_usim], 340 + }, { 341 + .name = "da903x-regulator", 342 + .id = DA9030_ID_LDO18, 343 + .platform_data = &imote2_ldo_init_data[vcc_io], 344 + }, { 345 + .name = "da903x-regulator", 346 + .id = DA9030_ID_LDO19, 347 + .platform_data = &imote2_ldo_init_data[vcc_pxa_mem], 348 + }, 349 + }; 350 + 351 + static struct da903x_platform_data imote2_da9030_pdata = { 352 + .num_subdevs = ARRAY_SIZE(imote2_da9030_subdevs), 353 + .subdevs = imote2_da9030_subdevs, 354 + }; 355 + 356 + /* As the the imote2 doesn't currently have a conventional SD slot 357 + * there is no option to hotplug cards, making all this rather simple 358 + */ 359 + static int imote2_mci_get_ro(struct device *dev) 360 + { 361 + return 0; 362 + } 363 + 364 + /* Rather simple case as hotplugging not possible */ 365 + static struct pxamci_platform_data imote2_mci_platform_data = { 366 + .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */ 367 + .get_ro = imote2_mci_get_ro, 368 + }; 369 + 370 + static struct mtd_partition imote2flash_partitions[] = { 371 + { 372 + .name = "Bootloader", 373 + .size = 0x00040000, 374 + .offset = 0, 375 + .mask_flags = MTD_WRITEABLE, 376 + }, { 377 + .name = "Kernel", 378 + .size = 0x00200000, 379 + .offset = 0x00040000, 380 + .mask_flags = 0, 381 + }, { 382 + .name = "Filesystem", 383 + .size = 0x01DC0000, 384 + .offset = 0x00240000, 385 + .mask_flags = 0, 386 + }, 387 + }; 388 + 389 + static struct resource flash_resources = { 390 + .start = PXA_CS0_PHYS, 391 + .end = PXA_CS0_PHYS + SZ_32M - 1, 392 + .flags = IORESOURCE_MEM, 393 + }; 394 + 395 + static struct flash_platform_data imote2_flash_data = { 396 + .map_name = "cfi_probe", 397 + .parts = imote2flash_partitions, 398 + .nr_parts = ARRAY_SIZE(imote2flash_partitions), 399 + .name = "PXA27xOnChipROM", 400 + .width = 2, 401 + }; 402 + 403 + static struct platform_device imote2_flash_device = { 404 + .name = "pxa2xx-flash", 405 + .id = 0, 406 + .dev = { 407 + .platform_data = &imote2_flash_data, 408 + }, 409 + .resource = &flash_resources, 410 + .num_resources = 1, 411 + }; 412 + 413 + /* Some of the drivers here are out of kernel at the moment (parts of IIO) 414 + * and it may be a while before they are in the mainline. 415 + */ 416 + static struct i2c_board_info __initdata imote2_i2c_board_info[] = { 417 + { /* UCAM sensor board */ 418 + .type = "max1238", 419 + .addr = 0x35, 420 + }, { /* ITS400 Sensor board only */ 421 + .type = "max1363", 422 + .addr = 0x34, 423 + /* Through a nand gate - Also beware, on V2 sensor board the 424 + * pull up resistors are missing. 425 + */ 426 + .irq = IRQ_GPIO(99), 427 + }, { /* ITS400 Sensor board only */ 428 + .type = "tsl2561", 429 + .addr = 0x49, 430 + /* Through a nand gate - Also beware, on V2 sensor board the 431 + * pull up resistors are missing. 432 + */ 433 + .irq = IRQ_GPIO(99), 434 + }, { /* ITS400 Sensor board only */ 435 + .type = "tmp175", 436 + .addr = 0x4A, 437 + .irq = IRQ_GPIO(96), 438 + }, 439 + }; 440 + 441 + static struct i2c_board_info __initdata imote2_pwr_i2c_board_info[] = { 442 + { 443 + .type = "da9030", 444 + .addr = 0x49, 445 + .platform_data = &imote2_da9030_pdata, 446 + .irq = gpio_to_irq(1), 447 + }, 448 + }; 449 + 450 + static struct pxa2xx_spi_master pxa_ssp_master_0_info = { 451 + .num_chipselect = 1, 452 + }; 453 + 454 + static struct pxa2xx_spi_master pxa_ssp_master_1_info = { 455 + .num_chipselect = 1, 456 + }; 457 + 458 + static struct pxa2xx_spi_master pxa_ssp_master_2_info = { 459 + .num_chipselect = 1, 460 + }; 461 + 462 + /* Patch posted by Eric Miao <eric.miao@marvell.com> will remove 463 + * the need for these functions. 464 + */ 465 + static void spi1control(u32 command) 466 + { 467 + gpio_set_value(24, command & PXA2XX_CS_ASSERT ? 0 : 1); 468 + }; 469 + 470 + static void spi3control(u32 command) 471 + { 472 + gpio_set_value(39, command & PXA2XX_CS_ASSERT ? 0 : 1); 473 + }; 474 + 475 + static struct pxa2xx_spi_chip staccel_chip_info = { 476 + .tx_threshold = 8, 477 + .rx_threshold = 8, 478 + .dma_burst_size = 8, 479 + .timeout = 235, 480 + .cs_control = spi1control, 481 + }; 482 + 483 + static struct pxa2xx_spi_chip cc2420_info = { 484 + .tx_threshold = 8, 485 + .rx_threshold = 8, 486 + .dma_burst_size = 8, 487 + .timeout = 235, 488 + .cs_control = spi3control, 489 + }; 490 + 491 + static struct spi_board_info spi_board_info[] __initdata = { 492 + { /* Driver in IIO */ 493 + .modalias = "lis3l02dq", 494 + .max_speed_hz = 8000000,/* 8MHz max spi frequency at 3V */ 495 + .bus_num = 1, 496 + .chip_select = 0, 497 + .controller_data = &staccel_chip_info, 498 + .irq = IRQ_GPIO(96), 499 + }, { /* Driver out of kernel as it needs considerable rewriting */ 500 + .modalias = "cc2420", 501 + .max_speed_hz = 6500000, 502 + .bus_num = 3, 503 + .chip_select = 0, 504 + .controller_data = &cc2420_info, 505 + }, 506 + }; 507 + 508 + static void im2_udc_command(int cmd) 509 + { 510 + switch (cmd) { 511 + case PXA2XX_UDC_CMD_CONNECT: 512 + UP2OCR |= UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE; 513 + break; 514 + case PXA2XX_UDC_CMD_DISCONNECT: 515 + UP2OCR &= ~(UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE); 516 + break; 517 + } 518 + } 519 + 520 + static struct pxa2xx_udc_mach_info imote2_udc_info __initdata = { 521 + .udc_command = im2_udc_command, 522 + }; 523 + 524 + static struct platform_device *imote2_devices[] = { 525 + &imote2_flash_device, 526 + &imote2_leds, 527 + }; 528 + 529 + static struct i2c_pxa_platform_data i2c_pwr_pdata = { 530 + .fast_mode = 1, 531 + }; 532 + 533 + static struct i2c_pxa_platform_data i2c_pdata = { 534 + .fast_mode = 1, 535 + }; 536 + 537 + static void __init imote2_init(void) 538 + { 539 + 540 + pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config)); 541 + /* SPI chip select directions - all other directions should 542 + * be handled by drivers.*/ 543 + gpio_direction_output(37, 0); 544 + gpio_direction_output(24, 0); 545 + gpio_direction_output(39, 0); 546 + 547 + platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); 548 + 549 + pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); 550 + pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info); 551 + pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info); 552 + 553 + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); 554 + 555 + i2c_register_board_info(0, imote2_i2c_board_info, 556 + ARRAY_SIZE(imote2_i2c_board_info)); 557 + i2c_register_board_info(1, imote2_pwr_i2c_board_info, 558 + ARRAY_SIZE(imote2_pwr_i2c_board_info)); 559 + 560 + pxa27x_set_i2c_power_info(&i2c_pwr_pdata); 561 + pxa_set_i2c_info(&i2c_pdata); 562 + 563 + pxa_set_mci_info(&imote2_mci_platform_data); 564 + pxa_set_udc_info(&imote2_udc_info); 565 + } 566 + 567 + MACHINE_START(INTELMOTE2, "IMOTE 2") 568 + .phys_io = 0x40000000, 569 + .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 570 + .map_io = pxa_map_io, 571 + .init_irq = pxa27x_init_irq, 572 + .timer = &pxa_timer, 573 + .init_machine = imote2_init, 574 + .boot_params = 0xA0000100, 575 + MACHINE_END
+4
arch/arm/mach-pxa/include/mach/gumstix.h
··· 94 94 #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) 95 95 #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) 96 96 #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) 97 + 98 + /* for expansion boards that can't be programatically detected */ 99 + extern int am200_init(void); 100 +
+8 -3
arch/arm/mach-pxa/include/mach/littleton.h
··· 1 - #ifndef __ASM_ARCH_ZYLONITE_H 2 - #define __ASM_ARCH_ZYLONITE_H 1 + #ifndef __ASM_ARCH_LITTLETON_H 2 + #define __ASM_ARCH_LITTLETON_H 3 + 4 + #include <mach/gpio.h> 3 5 4 6 #define LITTLETON_ETH_PHYS 0x30000000 5 7 6 8 #define LITTLETON_GPIO_LCD_CS (17) 7 9 8 - #endif /* __ASM_ARCH_ZYLONITE_H */ 10 + #define EXT0_GPIO_BASE (NR_BUILTIN_GPIO) 11 + #define EXT0_GPIO(x) (EXT0_GPIO_BASE + (x)) 12 + 13 + #endif /* __ASM_ARCH_LITTLETON_H */
+5
arch/arm/mach-pxa/include/mach/pxafb.h
··· 48 48 #define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN) 49 49 #define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN) 50 50 #define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN) 51 + #define LCD_COLOR_TFT_8BPP ((8 << 4) | LCD_TYPE_COLOR_TFT) 51 52 #define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT) 52 53 #define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT) 53 54 #define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL) ··· 95 94 * in pxa27x and pxa3xx, initialize them to the same value or 96 95 * the larger one will be used 97 96 * 3. same to {rd,wr}_pulse_width 97 + * 98 + * 4. LCD_PCLK_EDGE_{RISE,FALL} controls the L_PCLK_WR polarity 99 + * 5. sync & FB_SYNC_HOR_HIGH_ACT controls the L_LCLK_A0 100 + * 6. sync & FB_SYNC_VERT_HIGH_ACT controls the L_LCLK_RD 98 101 */ 99 102 unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */ 100 103 unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */
+7
arch/arm/mach-pxa/include/mach/regs-lcd.h
··· 177 177 178 178 #define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) 179 179 #define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) 180 + 181 + /* SMART_DELAY() is introduced for software controlled delay primitive which 182 + * can be inserted between command sequences, unused command 0x6 is used here 183 + * and delay ranges from 0ms ~ 255ms 184 + */ 185 + #define SMART_CMD_DELAY (0x6 << 9) 186 + #define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff)) 180 187 #endif /* __ASM_ARCH_REGS_LCD_H */
+1 -1
arch/arm/mach-pxa/include/mach/uncompress.h
··· 35 35 36 36 static inline void arch_decomp_setup(void) 37 37 { 38 - if (machine_is_littleton()) 38 + if (machine_is_littleton() || machine_is_intelmote2()) 39 39 UART = STUART; 40 40 } 41 41
+73
arch/arm/mach-pxa/littleton.c
··· 23 23 #include <linux/gpio.h> 24 24 #include <linux/spi/spi.h> 25 25 #include <linux/smc91x.h> 26 + #include <linux/i2c.h> 27 + #include <linux/leds.h> 28 + #include <linux/mfd/da903x.h> 29 + #include <linux/i2c/max732x.h> 26 30 27 31 #include <asm/types.h> 28 32 #include <asm/setup.h> ··· 44 40 #include <mach/pxafb.h> 45 41 #include <mach/ssp.h> 46 42 #include <mach/pxa2xx_spi.h> 43 + #include <mach/i2c.h> 47 44 #include <mach/pxa27x_keypad.h> 48 45 #include <mach/pxa3xx_nand.h> 49 46 #include <mach/littleton.h> ··· 319 314 static inline void littleton_init_nand(void) {} 320 315 #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ 321 316 317 + #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) 318 + static struct led_info littleton_da9034_leds[] = { 319 + [0] = { 320 + .name = "littleton:keypad1", 321 + .flags = DA9034_LED_RAMP, 322 + }, 323 + [1] = { 324 + .name = "littleton:keypad2", 325 + .flags = DA9034_LED_RAMP, 326 + }, 327 + [2] = { 328 + .name = "littleton:vibra", 329 + .flags = 0, 330 + }, 331 + }; 332 + 333 + static struct da903x_subdev_info littleton_da9034_subdevs[] = { 334 + { 335 + .name = "da903x-led", 336 + .id = DA9034_ID_LED_1, 337 + .platform_data = &littleton_da9034_leds[0], 338 + }, { 339 + .name = "da903x-led", 340 + .id = DA9034_ID_LED_2, 341 + .platform_data = &littleton_da9034_leds[1], 342 + }, { 343 + .name = "da903x-led", 344 + .id = DA9034_ID_VIBRA, 345 + .platform_data = &littleton_da9034_leds[2], 346 + }, { 347 + .name = "da903x-backlight", 348 + .id = DA9034_ID_WLED, 349 + }, 350 + }; 351 + 352 + static struct da903x_platform_data littleton_da9034_info = { 353 + .num_subdevs = ARRAY_SIZE(littleton_da9034_subdevs), 354 + .subdevs = littleton_da9034_subdevs, 355 + }; 356 + 357 + static struct max732x_platform_data littleton_max7320_info = { 358 + .gpio_base = EXT0_GPIO_BASE, 359 + }; 360 + 361 + static struct i2c_board_info littleton_i2c_info[] = { 362 + [0] = { 363 + .type = "da9034", 364 + .addr = 0x34, 365 + .platform_data = &littleton_da9034_info, 366 + .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO18)), 367 + }, 368 + [1] = { 369 + .type = "max7320", 370 + .addr = 0x50, 371 + .platform_data = &littleton_max7320_info, 372 + }, 373 + }; 374 + 375 + static void __init littleton_init_i2c(void) 376 + { 377 + pxa_set_i2c_info(NULL); 378 + i2c_register_board_info(0, ARRAY_AND_SIZE(littleton_i2c_info)); 379 + } 380 + #else 381 + static inline void littleton_init_i2c(void) {} 382 + #endif /* CONFIG_I2C_PXA || CONFIG_I2C_PXA_MODULE */ 383 + 322 384 static void __init littleton_init(void) 323 385 { 324 386 /* initialize MFP configurations */ ··· 398 326 platform_device_register(&smc91x_device); 399 327 400 328 littleton_init_spi(); 329 + littleton_init_i2c(); 401 330 littleton_init_lcd(); 402 331 littleton_init_keypad(); 403 332 littleton_init_nand();
+3 -4
arch/arm/mach-pxa/magician.c
··· 336 336 .modes = toppoly_modes, 337 337 .num_modes = 1, 338 338 .fixed_modes = 1, 339 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 340 - .lccr3 = LCCR3_PixRsEdg, 339 + .lcd_conn = LCD_COLOR_TFT_16BPP, 341 340 .pxafb_lcd_power = toppoly_lcd_power, 342 341 }; 343 342 ··· 344 345 .modes = samsung_modes, 345 346 .num_modes = 1, 346 347 .fixed_modes = 1, 347 - .lccr0 = LCCR0_LDDALT | LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 348 - .lccr3 = LCCR3_PixFlEdg, 348 + .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |\ 349 + LCD_ALTERNATE_MAPPING, 349 350 .pxafb_lcd_power = samsung_lcd_power, 350 351 }; 351 352
+2 -4
arch/arm/mach-pxa/pcm990-baseboard.c
··· 104 104 static struct pxafb_mach_info pcm990_fbinfo __initdata = { 105 105 .modes = &fb_info_sharp_lq084v1dg21, 106 106 .num_modes = 1, 107 - .lccr0 = LCCR0_PAS, 108 - .lccr3 = LCCR3_PCP, 107 + .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, 109 108 .pxafb_lcd_power = pcm990_lcd_power, 110 109 }; 111 110 #elif defined(CONFIG_PCM990_DISPLAY_NEC) ··· 126 127 static struct pxafb_mach_info pcm990_fbinfo __initdata = { 127 128 .modes = &fb_info_nec_nl6448bc20_18d, 128 129 .num_modes = 1, 129 - .lccr0 = LCCR0_Act, 130 - .lccr3 = LCCR3_PixFlEdg, 130 + .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, 131 131 .pxafb_lcd_power = pcm990_lcd_power, 132 132 }; 133 133 #endif
+421
arch/arm/mach-pxa/saar.c
··· 17 17 #include <linux/platform_device.h> 18 18 #include <linux/clk.h> 19 19 #include <linux/gpio.h> 20 + #include <linux/delay.h> 21 + #include <linux/fb.h> 22 + #include <linux/i2c.h> 20 23 #include <linux/smc91x.h> 24 + #include <linux/mfd/da903x.h> 21 25 22 26 #include <asm/mach-types.h> 23 27 #include <asm/mach/arch.h> 24 28 #include <mach/hardware.h> 25 29 #include <mach/pxa3xx-regs.h> 26 30 #include <mach/mfp-pxa930.h> 31 + #include <mach/i2c.h> 32 + #include <mach/regs-lcd.h> 33 + #include <mach/pxafb.h> 27 34 28 35 #include "devices.h" 29 36 #include "generic.h" 30 37 38 + #define GPIO_LCD_RESET (16) 39 + 31 40 /* SAAR MFP configurations */ 32 41 static mfp_cfg_t saar_mfp_cfg[] __initdata = { 42 + /* LCD */ 43 + GPIO23_LCD_DD0, 44 + GPIO24_LCD_DD1, 45 + GPIO25_LCD_DD2, 46 + GPIO26_LCD_DD3, 47 + GPIO27_LCD_DD4, 48 + GPIO28_LCD_DD5, 49 + GPIO29_LCD_DD6, 50 + GPIO44_LCD_DD7, 51 + GPIO21_LCD_CS, 52 + GPIO22_LCD_VSYNC, 53 + GPIO17_LCD_FCLK_RD, 54 + GPIO18_LCD_LCLK_A0, 55 + GPIO19_LCD_PCLK_WR, 56 + GPIO16_GPIO, /* LCD reset */ 57 + 33 58 /* Ethernet */ 34 59 DF_nCS1_nCS3, 35 60 GPIO97_GPIO, ··· 89 64 }, 90 65 }; 91 66 67 + #if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULE) 68 + static uint16_t lcd_power_on[] = { 69 + /* single frame */ 70 + SMART_CMD_NOOP, 71 + SMART_CMD(0x00), 72 + SMART_DELAY(0), 73 + 74 + SMART_CMD_NOOP, 75 + SMART_CMD(0x00), 76 + SMART_DELAY(0), 77 + 78 + SMART_CMD_NOOP, 79 + SMART_CMD(0x00), 80 + SMART_DELAY(0), 81 + 82 + SMART_CMD_NOOP, 83 + SMART_CMD(0x00), 84 + SMART_DELAY(10), 85 + 86 + /* calibration control */ 87 + SMART_CMD(0x00), 88 + SMART_CMD(0xA4), 89 + SMART_DAT(0x80), 90 + SMART_DAT(0x01), 91 + SMART_DELAY(150), 92 + 93 + /*Power-On Init sequence*/ 94 + SMART_CMD(0x00), /* output ctrl */ 95 + SMART_CMD(0x01), 96 + SMART_DAT(0x01), 97 + SMART_DAT(0x00), 98 + SMART_CMD(0x00), /* wave ctrl */ 99 + SMART_CMD(0x02), 100 + SMART_DAT(0x07), 101 + SMART_DAT(0x00), 102 + SMART_CMD(0x00), 103 + SMART_CMD(0x03), /* entry mode */ 104 + SMART_DAT(0xD0), 105 + SMART_DAT(0x30), 106 + SMART_CMD(0x00), 107 + SMART_CMD(0x08), /* display ctrl 2 */ 108 + SMART_DAT(0x08), 109 + SMART_DAT(0x08), 110 + SMART_CMD(0x00), 111 + SMART_CMD(0x09), /* display ctrl 3 */ 112 + SMART_DAT(0x04), 113 + SMART_DAT(0x2F), 114 + SMART_CMD(0x00), 115 + SMART_CMD(0x0A), /* display ctrl 4 */ 116 + SMART_DAT(0x00), 117 + SMART_DAT(0x08), 118 + SMART_CMD(0x00), 119 + SMART_CMD(0x0D), /* Frame Marker position */ 120 + SMART_DAT(0x00), 121 + SMART_DAT(0x08), 122 + SMART_CMD(0x00), 123 + SMART_CMD(0x60), /* Driver output control */ 124 + SMART_DAT(0x27), 125 + SMART_DAT(0x00), 126 + SMART_CMD(0x00), 127 + SMART_CMD(0x61), /* Base image display control */ 128 + SMART_DAT(0x00), 129 + SMART_DAT(0x01), 130 + SMART_CMD(0x00), 131 + SMART_CMD(0x30), /* Y settings 30h-3Dh */ 132 + SMART_DAT(0x07), 133 + SMART_DAT(0x07), 134 + SMART_CMD(0x00), 135 + SMART_CMD(0x31), 136 + SMART_DAT(0x00), 137 + SMART_DAT(0x07), 138 + SMART_CMD(0x00), 139 + SMART_CMD(0x32), /* Timing(3), ASW HOLD=0.5CLK */ 140 + SMART_DAT(0x04), 141 + SMART_DAT(0x00), 142 + SMART_CMD(0x00), 143 + SMART_CMD(0x33), /* Timing(4), CKV ST=0CLK, CKV ED=1CLK */ 144 + SMART_DAT(0x03), 145 + SMART_DAT(0x03), 146 + SMART_CMD(0x00), 147 + SMART_CMD(0x34), 148 + SMART_DAT(0x00), 149 + SMART_DAT(0x00), 150 + SMART_CMD(0x00), 151 + SMART_CMD(0x35), 152 + SMART_DAT(0x02), 153 + SMART_DAT(0x05), 154 + SMART_CMD(0x00), 155 + SMART_CMD(0x36), 156 + SMART_DAT(0x1F), 157 + SMART_DAT(0x1F), 158 + SMART_CMD(0x00), 159 + SMART_CMD(0x37), 160 + SMART_DAT(0x07), 161 + SMART_DAT(0x07), 162 + SMART_CMD(0x00), 163 + SMART_CMD(0x38), 164 + SMART_DAT(0x00), 165 + SMART_DAT(0x07), 166 + SMART_CMD(0x00), 167 + SMART_CMD(0x39), 168 + SMART_DAT(0x04), 169 + SMART_DAT(0x00), 170 + SMART_CMD(0x00), 171 + SMART_CMD(0x3A), 172 + SMART_DAT(0x03), 173 + SMART_DAT(0x03), 174 + SMART_CMD(0x00), 175 + SMART_CMD(0x3B), 176 + SMART_DAT(0x00), 177 + SMART_DAT(0x00), 178 + SMART_CMD(0x00), 179 + SMART_CMD(0x3C), 180 + SMART_DAT(0x02), 181 + SMART_DAT(0x05), 182 + SMART_CMD(0x00), 183 + SMART_CMD(0x3D), 184 + SMART_DAT(0x1F), 185 + SMART_DAT(0x1F), 186 + SMART_CMD(0x00), /* Display control 1 */ 187 + SMART_CMD(0x07), 188 + SMART_DAT(0x00), 189 + SMART_DAT(0x01), 190 + SMART_CMD(0x00), /* Power control 5 */ 191 + SMART_CMD(0x17), 192 + SMART_DAT(0x00), 193 + SMART_DAT(0x01), 194 + SMART_CMD(0x00), /* Power control 1 */ 195 + SMART_CMD(0x10), 196 + SMART_DAT(0x10), 197 + SMART_DAT(0xB0), 198 + SMART_CMD(0x00), /* Power control 2 */ 199 + SMART_CMD(0x11), 200 + SMART_DAT(0x01), 201 + SMART_DAT(0x30), 202 + SMART_CMD(0x00), /* Power control 3 */ 203 + SMART_CMD(0x12), 204 + SMART_DAT(0x01), 205 + SMART_DAT(0x9E), 206 + SMART_CMD(0x00), /* Power control 4 */ 207 + SMART_CMD(0x13), 208 + SMART_DAT(0x17), 209 + SMART_DAT(0x00), 210 + SMART_CMD(0x00), /* Power control 3 */ 211 + SMART_CMD(0x12), 212 + SMART_DAT(0x01), 213 + SMART_DAT(0xBE), 214 + SMART_DELAY(100), 215 + 216 + /* display mode : 240*320 */ 217 + SMART_CMD(0x00), /* RAM address set(H) 0*/ 218 + SMART_CMD(0x20), 219 + SMART_DAT(0x00), 220 + SMART_DAT(0x00), 221 + SMART_CMD(0x00), /* RAM address set(V) 4*/ 222 + SMART_CMD(0x21), 223 + SMART_DAT(0x00), 224 + SMART_DAT(0x00), 225 + SMART_CMD(0x00), /* Start of Window RAM address set(H) 8*/ 226 + SMART_CMD(0x50), 227 + SMART_DAT(0x00), 228 + SMART_DAT(0x00), 229 + SMART_CMD(0x00), /* End of Window RAM address set(H) 12*/ 230 + SMART_CMD(0x51), 231 + SMART_DAT(0x00), 232 + SMART_DAT(0xEF), 233 + SMART_CMD(0x00), /* Start of Window RAM address set(V) 16*/ 234 + SMART_CMD(0x52), 235 + SMART_DAT(0x00), 236 + SMART_DAT(0x00), 237 + SMART_CMD(0x00), /* End of Window RAM address set(V) 20*/ 238 + SMART_CMD(0x53), 239 + SMART_DAT(0x01), 240 + SMART_DAT(0x3F), 241 + SMART_CMD(0x00), /* Panel interface control 1 */ 242 + SMART_CMD(0x90), 243 + SMART_DAT(0x00), 244 + SMART_DAT(0x1A), 245 + SMART_CMD(0x00), /* Panel interface control 2 */ 246 + SMART_CMD(0x92), 247 + SMART_DAT(0x04), 248 + SMART_DAT(0x00), 249 + SMART_CMD(0x00), /* Panel interface control 3 */ 250 + SMART_CMD(0x93), 251 + SMART_DAT(0x00), 252 + SMART_DAT(0x05), 253 + SMART_DELAY(20), 254 + }; 255 + 256 + static uint16_t lcd_panel_on[] = { 257 + SMART_CMD(0x00), 258 + SMART_CMD(0x07), 259 + SMART_DAT(0x00), 260 + SMART_DAT(0x21), 261 + SMART_DELAY(1), 262 + 263 + SMART_CMD(0x00), 264 + SMART_CMD(0x07), 265 + SMART_DAT(0x00), 266 + SMART_DAT(0x61), 267 + SMART_DELAY(100), 268 + 269 + SMART_CMD(0x00), 270 + SMART_CMD(0x07), 271 + SMART_DAT(0x01), 272 + SMART_DAT(0x73), 273 + SMART_DELAY(1), 274 + }; 275 + 276 + static uint16_t lcd_panel_off[] = { 277 + SMART_CMD(0x00), 278 + SMART_CMD(0x07), 279 + SMART_DAT(0x00), 280 + SMART_DAT(0x72), 281 + SMART_DELAY(40), 282 + 283 + SMART_CMD(0x00), 284 + SMART_CMD(0x07), 285 + SMART_DAT(0x00), 286 + SMART_DAT(0x01), 287 + SMART_DELAY(1), 288 + 289 + SMART_CMD(0x00), 290 + SMART_CMD(0x07), 291 + SMART_DAT(0x00), 292 + SMART_DAT(0x00), 293 + SMART_DELAY(1), 294 + }; 295 + 296 + static uint16_t lcd_power_off[] = { 297 + SMART_CMD(0x00), 298 + SMART_CMD(0x10), 299 + SMART_DAT(0x00), 300 + SMART_DAT(0x80), 301 + 302 + SMART_CMD(0x00), 303 + SMART_CMD(0x11), 304 + SMART_DAT(0x01), 305 + SMART_DAT(0x60), 306 + 307 + SMART_CMD(0x00), 308 + SMART_CMD(0x12), 309 + SMART_DAT(0x01), 310 + SMART_DAT(0xAE), 311 + SMART_DELAY(40), 312 + 313 + SMART_CMD(0x00), 314 + SMART_CMD(0x10), 315 + SMART_DAT(0x00), 316 + SMART_DAT(0x00), 317 + }; 318 + 319 + static uint16_t update_framedata[] = { 320 + /* set display ram: 240*320 */ 321 + SMART_CMD(0x00), /* RAM address set(H) 0*/ 322 + SMART_CMD(0x20), 323 + SMART_DAT(0x00), 324 + SMART_DAT(0x00), 325 + SMART_CMD(0x00), /* RAM address set(V) 4*/ 326 + SMART_CMD(0x21), 327 + SMART_DAT(0x00), 328 + SMART_DAT(0x00), 329 + SMART_CMD(0x00), /* Start of Window RAM address set(H) 8 */ 330 + SMART_CMD(0x50), 331 + SMART_DAT(0x00), 332 + SMART_DAT(0x00), 333 + SMART_CMD(0x00), /* End of Window RAM address set(H) 12 */ 334 + SMART_CMD(0x51), 335 + SMART_DAT(0x00), 336 + SMART_DAT(0xEF), 337 + SMART_CMD(0x00), /* Start of Window RAM address set(V) 16 */ 338 + SMART_CMD(0x52), 339 + SMART_DAT(0x00), 340 + SMART_DAT(0x00), 341 + SMART_CMD(0x00), /* End of Window RAM address set(V) 20 */ 342 + SMART_CMD(0x53), 343 + SMART_DAT(0x01), 344 + SMART_DAT(0x3F), 345 + 346 + /* wait for vsync cmd before transferring frame data */ 347 + SMART_CMD_WAIT_FOR_VSYNC, 348 + 349 + /* write ram */ 350 + SMART_CMD(0x00), 351 + SMART_CMD(0x22), 352 + 353 + /* write frame data */ 354 + SMART_CMD_WRITE_FRAME, 355 + }; 356 + 357 + static void ltm022a97a_lcd_power(int on, struct fb_var_screeninfo *var) 358 + { 359 + static int pin_requested = 0; 360 + struct fb_info *info = container_of(var, struct fb_info, var); 361 + int err; 362 + 363 + if (!pin_requested) { 364 + err = gpio_request(GPIO_LCD_RESET, "lcd reset"); 365 + if (err) { 366 + pr_err("failed to request gpio for LCD reset\n"); 367 + return; 368 + } 369 + 370 + gpio_direction_output(GPIO_LCD_RESET, 0); 371 + pin_requested = 1; 372 + } 373 + 374 + if (on) { 375 + gpio_set_value(GPIO_LCD_RESET, 0); msleep(100); 376 + gpio_set_value(GPIO_LCD_RESET, 1); msleep(10); 377 + 378 + pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_power_on)); 379 + pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_panel_on)); 380 + } else { 381 + pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_panel_off)); 382 + pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_power_off)); 383 + } 384 + 385 + err = pxafb_smart_flush(info); 386 + if (err) 387 + pr_err("%s: timed out\n", __func__); 388 + } 389 + 390 + static void ltm022a97a_update(struct fb_info *info) 391 + { 392 + pxafb_smart_queue(info, ARRAY_AND_SIZE(update_framedata)); 393 + pxafb_smart_flush(info); 394 + } 395 + 396 + static struct pxafb_mode_info toshiba_ltm022a97a_modes[] = { 397 + [0] = { 398 + .xres = 240, 399 + .yres = 320, 400 + .bpp = 16, 401 + .a0csrd_set_hld = 30, 402 + .a0cswr_set_hld = 30, 403 + .wr_pulse_width = 30, 404 + .rd_pulse_width = 30, 405 + .op_hold_time = 30, 406 + .cmd_inh_time = 60, 407 + 408 + /* L_LCLK_A0 and L_LCLK_RD active low */ 409 + .sync = FB_SYNC_HOR_HIGH_ACT | 410 + FB_SYNC_VERT_HIGH_ACT, 411 + }, 412 + }; 413 + 414 + static struct pxafb_mach_info saar_lcd_info = { 415 + .modes = toshiba_ltm022a97a_modes, 416 + .num_modes = 1, 417 + .lcd_conn = LCD_SMART_PANEL_8BPP | LCD_PCLK_EDGE_FALL, 418 + .pxafb_lcd_power = ltm022a97a_lcd_power, 419 + .smart_update = ltm022a97a_update, 420 + }; 421 + 422 + static void __init saar_init_lcd(void) 423 + { 424 + set_pxa_fb_info(&saar_lcd_info); 425 + } 426 + #else 427 + static inline void saar_init_lcd(void) {} 428 + #endif 429 + 430 + #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) 431 + static struct da903x_subdev_info saar_da9034_subdevs[] = { 432 + [0] = { 433 + .name = "da903x-backlight", 434 + .id = DA9034_ID_WLED, 435 + }, 436 + }; 437 + 438 + static struct da903x_platform_data saar_da9034_info = { 439 + .num_subdevs = ARRAY_SIZE(saar_da9034_subdevs), 440 + .subdevs = saar_da9034_subdevs, 441 + }; 442 + 443 + static struct i2c_board_info saar_i2c_info[] = { 444 + [0] = { 445 + .type = "da9034", 446 + .addr = 0x34, 447 + .platform_data = &saar_da9034_info, 448 + .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)), 449 + }, 450 + }; 451 + 452 + static void __init saar_init_i2c(void) 453 + { 454 + pxa_set_i2c_info(NULL); 455 + i2c_register_board_info(0, ARRAY_AND_SIZE(saar_i2c_info)); 456 + } 457 + #else 458 + static inline void saar_init_i2c(void) {} 459 + #endif 92 460 static void __init saar_init(void) 93 461 { 94 462 /* initialize MFP configurations */ 95 463 pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg)); 96 464 97 465 platform_device_register(&smc91x_device); 466 + 467 + saar_init_i2c(); 468 + saar_init_lcd(); 98 469 } 99 470 100 471 MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
+29 -73
drivers/video/pxafb.c
··· 50 50 #include <asm/irq.h> 51 51 #include <asm/div64.h> 52 52 #include <mach/pxa-regs.h> 53 - #include <mach/pxa2xx-gpio.h> 54 53 #include <mach/bitfield.h> 55 54 #include <mach/pxafb.h> 56 55 ··· 723 724 int i; 724 725 struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); 725 726 726 - /* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */ 727 - for (i = 0; i < n_cmds; i++) { 727 + for (i = 0; i < n_cmds; i++, cmds++) { 728 + /* if it is a software delay, flush and delay */ 729 + if ((*cmds & 0xff00) == SMART_CMD_DELAY) { 730 + pxafb_smart_flush(info); 731 + mdelay(*cmds & 0xff); 732 + continue; 733 + } 734 + 735 + /* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */ 728 736 if (fbi->n_smart_cmds == CMD_BUFF_SIZE - 8) 729 737 pxafb_smart_flush(info); 730 738 731 - fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds++; 739 + fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds; 732 740 } 733 741 734 742 return 0; ··· 767 761 LCCR1_HorSnchWdth(__smart_timing(t3, lclk)); 768 762 769 763 fbi->reg_lccr2 = LCCR2_DisHght(var->yres); 770 - fbi->reg_lccr3 = LCCR3_PixClkDiv(__smart_timing(t4, lclk)); 764 + fbi->reg_lccr3 = fbi->lccr3 | LCCR3_PixClkDiv(__smart_timing(t4, lclk)); 765 + fbi->reg_lccr3 |= (var->sync & FB_SYNC_HOR_HIGH_ACT) ? LCCR3_HSP : 0; 766 + fbi->reg_lccr3 |= (var->sync & FB_SYNC_VERT_HIGH_ACT) ? LCCR3_VSP : 0; 771 767 772 768 /* FIXME: make this configurable */ 773 769 fbi->reg_cmdcr = 1; ··· 794 786 if (try_to_freeze()) 795 787 continue; 796 788 789 + mutex_lock(&fbi->ctrlr_lock); 790 + 797 791 if (fbi->state == C_ENABLE) { 798 792 inf->smart_update(&fbi->fb); 799 793 complete(&fbi->refresh_done); 800 794 } 795 + 796 + mutex_unlock(&fbi->ctrlr_lock); 801 797 802 798 set_current_state(TASK_INTERRUPTIBLE); 803 799 schedule_timeout(30 * HZ / 1000); ··· 813 801 814 802 static int pxafb_smart_init(struct pxafb_info *fbi) 815 803 { 816 - if (!(fbi->lccr0 | LCCR0_LCDT)) 804 + if (!(fbi->lccr0 & LCCR0_LCDT)) 817 805 return 0; 806 + 807 + fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; 808 + fbi->n_smart_cmds = 0; 809 + 810 + init_completion(&fbi->command_done); 811 + init_completion(&fbi->refresh_done); 818 812 819 813 fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, 820 814 "lcd_refresh"); 821 815 if (IS_ERR(fbi->smart_thread)) { 822 - printk(KERN_ERR "%s: unable to create kernel thread\n", 823 - __func__); 816 + pr_err("%s: unable to create kernel thread\n", __func__); 824 817 return PTR_ERR(fbi->smart_thread); 825 818 } 826 819 ··· 841 824 { 842 825 return 0; 843 826 } 844 - #endif /* CONFIG_FB_SMART_PANEL */ 827 + 828 + static inline int pxafb_smart_init(struct pxafb_info *fbi) { return 0; } 829 + #endif /* CONFIG_FB_PXA_SMARTPANEL */ 845 830 846 831 static void setup_parallel_timing(struct pxafb_info *fbi, 847 832 struct fb_var_screeninfo *var) ··· 1005 986 fbi->lcd_power(on, &fbi->fb.var); 1006 987 } 1007 988 1008 - static void pxafb_setup_gpio(struct pxafb_info *fbi) 1009 - { 1010 - int gpio, ldd_bits; 1011 - unsigned int lccr0 = fbi->lccr0; 1012 - 1013 - /* 1014 - * setup is based on type of panel supported 1015 - */ 1016 - 1017 - /* 4 bit interface */ 1018 - if ((lccr0 & LCCR0_CMS) == LCCR0_Mono && 1019 - (lccr0 & LCCR0_SDS) == LCCR0_Sngl && 1020 - (lccr0 & LCCR0_DPD) == LCCR0_4PixMono) 1021 - ldd_bits = 4; 1022 - 1023 - /* 8 bit interface */ 1024 - else if (((lccr0 & LCCR0_CMS) == LCCR0_Mono && 1025 - ((lccr0 & LCCR0_SDS) == LCCR0_Dual || 1026 - (lccr0 & LCCR0_DPD) == LCCR0_8PixMono)) || 1027 - ((lccr0 & LCCR0_CMS) == LCCR0_Color && 1028 - (lccr0 & LCCR0_PAS) == LCCR0_Pas && 1029 - (lccr0 & LCCR0_SDS) == LCCR0_Sngl)) 1030 - ldd_bits = 8; 1031 - 1032 - /* 16 bit interface */ 1033 - else if ((lccr0 & LCCR0_CMS) == LCCR0_Color && 1034 - ((lccr0 & LCCR0_SDS) == LCCR0_Dual || 1035 - (lccr0 & LCCR0_PAS) == LCCR0_Act)) 1036 - ldd_bits = 16; 1037 - 1038 - else { 1039 - printk(KERN_ERR "pxafb_setup_gpio: unable to determine " 1040 - "bits per pixel\n"); 1041 - return; 1042 - } 1043 - 1044 - for (gpio = 58; ldd_bits; gpio++, ldd_bits--) 1045 - pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT); 1046 - /* 18 bit interface */ 1047 - if (fbi->fb.var.bits_per_pixel > 16) { 1048 - pxa_gpio_mode(86 | GPIO_ALT_FN_2_OUT); 1049 - pxa_gpio_mode(87 | GPIO_ALT_FN_2_OUT); 1050 - } 1051 - pxa_gpio_mode(GPIO74_LCD_FCLK_MD); 1052 - pxa_gpio_mode(GPIO75_LCD_LCLK_MD); 1053 - pxa_gpio_mode(GPIO76_LCD_PCLK_MD); 1054 - 1055 - if ((lccr0 & LCCR0_PAS) == 0) 1056 - pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD); 1057 - } 1058 - 1059 989 static void pxafb_enable_controller(struct pxafb_info *fbi) 1060 990 { 1061 991 pr_debug("pxafb: Enabling LCD controller\n"); ··· 1147 1179 if (old_state == C_ENABLE) { 1148 1180 __pxafb_lcd_power(fbi, 0); 1149 1181 pxafb_disable_controller(fbi); 1150 - pxafb_setup_gpio(fbi); 1151 1182 pxafb_enable_controller(fbi); 1152 1183 __pxafb_lcd_power(fbi, 1); 1153 1184 } ··· 1169 1202 */ 1170 1203 if (old_state != C_ENABLE) { 1171 1204 fbi->state = C_ENABLE; 1172 - pxafb_setup_gpio(fbi); 1173 1205 pxafb_enable_controller(fbi); 1174 1206 __pxafb_lcd_power(fbi, 1); 1175 1207 __pxafb_backlight_power(fbi, 1); ··· 1306 1340 fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; 1307 1341 1308 1342 pr_debug("pxafb: palette_mem_size = 0x%08x\n", fbi->palette_size*sizeof(u16)); 1309 - 1310 - #ifdef CONFIG_FB_PXA_SMARTPANEL 1311 - fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; 1312 - fbi->n_smart_cmds = 0; 1313 - #endif 1314 1343 } 1315 1344 1316 1345 return fbi->map_cpu ? 0 : -ENOMEM; ··· 1427 1466 INIT_WORK(&fbi->task, pxafb_task); 1428 1467 mutex_init(&fbi->ctrlr_lock); 1429 1468 init_completion(&fbi->disable_done); 1430 - #ifdef CONFIG_FB_PXA_SMARTPANEL 1431 - init_completion(&fbi->command_done); 1432 - init_completion(&fbi->refresh_done); 1433 - #endif 1434 1469 1435 1470 return fbi; 1436 1471 } ··· 1758 1801 goto failed_free_mem; 1759 1802 } 1760 1803 1761 - #ifdef CONFIG_FB_PXA_SMARTPANEL 1762 1804 ret = pxafb_smart_init(fbi); 1763 1805 if (ret) { 1764 1806 dev_err(&dev->dev, "failed to initialize smartpanel\n"); 1765 1807 goto failed_free_irq; 1766 1808 } 1767 - #endif 1809 + 1768 1810 /* 1769 1811 * This makes sure that our colour bitfield 1770 1812 * descriptors are correctly initialised.