Commit | Line | Data |
---|---|---|
5d783a2d MV |
1 | /* |
2 | * linux/include/asm-arm/arch-pxa/palmtc-gpio.h | |
3 | * | |
4 | * GPIOs and interrupts for Palm Tungsten|C Handheld Computer | |
5 | * | |
6 | * Authors: Alex Osborne <bobofdoom@gmail.com> | |
7 | * Marek Vasut <marek.vasut@gmail.com> | |
8 | * Holger Bocklet <bitz.email@gmx.net> | |
9 | * | |
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. | |
13 | * | |
14 | */ | |
15 | ||
16 | #ifndef _INCLUDE_PALMTC_H_ | |
17 | #define _INCLUDE_PALMTC_H_ | |
18 | ||
9705e746 LW |
19 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ |
20 | ||
5d783a2d MV |
21 | /** HERE ARE GPIOs **/ |
22 | ||
23 | /* GPIOs */ | |
24 | #define GPIO_NR_PALMTC_EARPHONE_DETECT 2 | |
25 | #define GPIO_NR_PALMTC_CRADLE_DETECT 5 | |
26 | #define GPIO_NR_PALMTC_HOTSYNC_BUTTON 7 | |
27 | ||
28 | /* SD/MMC */ | |
29 | #define GPIO_NR_PALMTC_SD_DETECT_N 12 | |
30 | #define GPIO_NR_PALMTC_SD_POWER 32 | |
31 | #define GPIO_NR_PALMTC_SD_READONLY 54 | |
32 | ||
33 | /* WLAN */ | |
34 | #define GPIO_NR_PALMTC_PCMCIA_READY 13 | |
35 | #define GPIO_NR_PALMTC_PCMCIA_PWRREADY 14 | |
36 | #define GPIO_NR_PALMTC_PCMCIA_POWER1 15 | |
37 | #define GPIO_NR_PALMTC_PCMCIA_POWER2 33 | |
38 | #define GPIO_NR_PALMTC_PCMCIA_POWER3 55 | |
39 | #define GPIO_NR_PALMTC_PCMCIA_RESET 78 | |
40 | ||
41 | /* UDC */ | |
42 | #define GPIO_NR_PALMTC_USB_DETECT_N 4 | |
43 | #define GPIO_NR_PALMTC_USB_POWER 36 | |
44 | ||
45 | /* LCD/BACKLIGHT */ | |
46 | #define GPIO_NR_PALMTC_BL_POWER 16 | |
47 | #define GPIO_NR_PALMTC_LCD_POWER 44 | |
48 | #define GPIO_NR_PALMTC_LCD_BLANK 38 | |
49 | ||
50 | /* UART */ | |
51 | #define GPIO_NR_PALMTC_RS232_POWER 37 | |
52 | ||
53 | /* IRDA */ | |
54 | #define GPIO_NR_PALMTC_IR_DISABLE 45 | |
55 | ||
56 | /* IRQs */ | |
6384fdad HZ |
57 | #define IRQ_GPIO_PALMTC_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMTC_SD_DETECT_N) |
58 | #define IRQ_GPIO_PALMTC_WLAN_READY PXA_GPIO_TO_IRQ(GPIO_NR_PALMTC_WLAN_READY) | |
5d783a2d MV |
59 | |
60 | /* UCB1400 GPIOs */ | |
61 | #define GPIO_NR_PALMTC_POWER_DETECT (0x80 | 0x00) | |
62 | #define GPIO_NR_PALMTC_HEADPHONE_DETECT (0x80 | 0x01) | |
63 | #define GPIO_NR_PALMTC_SPEAKER_ENABLE (0x80 | 0x03) | |
64 | #define GPIO_NR_PALMTC_VIBRA_POWER (0x80 | 0x05) | |
65 | #define GPIO_NR_PALMTC_LED_POWER (0x80 | 0x07) | |
66 | ||
67 | /** HERE ARE INIT VALUES **/ | |
68 | #define PALMTC_UCB1400_GPIO_OFFSET 0x80 | |
69 | ||
70 | /* BATTERY */ | |
71 | #define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */ | |
72 | #define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */ | |
af901ca1 | 73 | #define PALMTC_BAT_MAX_CURRENT 0 /* unknown */ |
5d783a2d MV |
74 | #define PALMTC_BAT_MIN_CURRENT 0 /* unknown */ |
75 | #define PALMTC_BAT_MAX_CHARGE 1 /* unknown */ | |
76 | #define PALMTC_BAT_MIN_CHARGE 1 /* unknown */ | |
77 | #define PALMTC_MAX_LIFE_MINS 240 /* on-life in minutes */ | |
78 | ||
79 | #define PALMTC_BAT_MEASURE_DELAY (HZ * 1) | |
80 | ||
81 | /* BACKLIGHT */ | |
82 | #define PALMTC_MAX_INTENSITY 0xFE | |
83 | #define PALMTC_DEFAULT_INTENSITY 0x7E | |
84 | #define PALMTC_LIMIT_MASK 0x7F | |
85 | #define PALMTC_PRESCALER 0x3F | |
86 | #define PALMTC_PERIOD_NS 3500 | |
87 | ||
88 | #endif |