Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / mach-pxa / include / mach / palmtc.h
blob3f9dd3fd4638e03a103b54f16a87d3da74fd2047
1 /*
2 * linux/include/asm-arm/arch-pxa/palmtc-gpio.h
4 * GPIOs and interrupts for Palm Tungsten|C Handheld Computer
6 * Authors: Alex Osborne <bobofdoom@gmail.com>
7 * Marek Vasut <marek.vasut@gmail.com>
8 * Holger Bocklet <bitz.email@gmx.net>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #ifndef _INCLUDE_PALMTC_H_
17 #define _INCLUDE_PALMTC_H_
19 /** HERE ARE GPIOs **/
21 /* GPIOs */
22 #define GPIO_NR_PALMTC_EARPHONE_DETECT 2
23 #define GPIO_NR_PALMTC_CRADLE_DETECT 5
24 #define GPIO_NR_PALMTC_HOTSYNC_BUTTON 7
26 /* SD/MMC */
27 #define GPIO_NR_PALMTC_SD_DETECT_N 12
28 #define GPIO_NR_PALMTC_SD_POWER 32
29 #define GPIO_NR_PALMTC_SD_READONLY 54
31 /* WLAN */
32 #define GPIO_NR_PALMTC_PCMCIA_READY 13
33 #define GPIO_NR_PALMTC_PCMCIA_PWRREADY 14
34 #define GPIO_NR_PALMTC_PCMCIA_POWER1 15
35 #define GPIO_NR_PALMTC_PCMCIA_POWER2 33
36 #define GPIO_NR_PALMTC_PCMCIA_POWER3 55
37 #define GPIO_NR_PALMTC_PCMCIA_RESET 78
39 /* UDC */
40 #define GPIO_NR_PALMTC_USB_DETECT_N 4
41 #define GPIO_NR_PALMTC_USB_POWER 36
43 /* LCD/BACKLIGHT */
44 #define GPIO_NR_PALMTC_BL_POWER 16
45 #define GPIO_NR_PALMTC_LCD_POWER 44
46 #define GPIO_NR_PALMTC_LCD_BLANK 38
48 /* UART */
49 #define GPIO_NR_PALMTC_RS232_POWER 37
51 /* IRDA */
52 #define GPIO_NR_PALMTC_IR_DISABLE 45
54 /* IRQs */
55 #define IRQ_GPIO_PALMTC_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTC_SD_DETECT_N)
56 #define IRQ_GPIO_PALMTC_WLAN_READY IRQ_GPIO(GPIO_NR_PALMTC_WLAN_READY)
58 /* UCB1400 GPIOs */
59 #define GPIO_NR_PALMTC_POWER_DETECT (0x80 | 0x00)
60 #define GPIO_NR_PALMTC_HEADPHONE_DETECT (0x80 | 0x01)
61 #define GPIO_NR_PALMTC_SPEAKER_ENABLE (0x80 | 0x03)
62 #define GPIO_NR_PALMTC_VIBRA_POWER (0x80 | 0x05)
63 #define GPIO_NR_PALMTC_LED_POWER (0x80 | 0x07)
65 /** HERE ARE INIT VALUES **/
66 #define PALMTC_UCB1400_GPIO_OFFSET 0x80
68 /* BATTERY */
69 #define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
70 #define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
71 #define PALMTC_BAT_MAX_CURRENT 0 /* unknown */
72 #define PALMTC_BAT_MIN_CURRENT 0 /* unknown */
73 #define PALMTC_BAT_MAX_CHARGE 1 /* unknown */
74 #define PALMTC_BAT_MIN_CHARGE 1 /* unknown */
75 #define PALMTC_MAX_LIFE_MINS 240 /* on-life in minutes */
77 #define PALMTC_BAT_MEASURE_DELAY (HZ * 1)
79 /* BACKLIGHT */
80 #define PALMTC_MAX_INTENSITY 0xFE
81 #define PALMTC_DEFAULT_INTENSITY 0x7E
82 #define PALMTC_LIMIT_MASK 0x7F
83 #define PALMTC_PRESCALER 0x3F
84 #define PALMTC_PERIOD_NS 3500
86 #endif