Marek Vasut | 0f6ff0f | 2008-11-20 00:58:38 +0100 | [diff] [blame] | 1 | /* |
| 2 | * GPIOs and interrupts for Palm Tungsten|T5 Handheld Computer |
| 3 | * |
| 4 | * Authors: Ales Snuparek <snuparek@atlas.cz> |
| 5 | * Marek Vasut <marek.vasut@gmail.com> |
| 6 | * Justin Kendrick <twilightsentry@gmail.com> |
| 7 | * RichardT5 <richard_t5@users.sourceforge.net> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | #ifndef _INCLUDE_PALMT5_H_ |
| 16 | #define _INCLUDE_PALMT5_H_ |
| 17 | |
| 18 | /** HERE ARE GPIOs **/ |
| 19 | |
| 20 | /* GPIOs */ |
| 21 | #define GPIO_NR_PALMT5_GPIO_RESET 1 |
| 22 | |
| 23 | #define GPIO_NR_PALMT5_POWER_DETECT 90 |
| 24 | #define GPIO_NR_PALMT5_HOTSYNC_BUTTON_N 10 |
| 25 | #define GPIO_NR_PALMT5_EARPHONE_DETECT 107 |
| 26 | |
| 27 | /* SD/MMC */ |
| 28 | #define GPIO_NR_PALMT5_SD_DETECT_N 14 |
| 29 | #define GPIO_NR_PALMT5_SD_POWER 114 |
| 30 | #define GPIO_NR_PALMT5_SD_READONLY 115 |
| 31 | |
| 32 | /* TOUCHSCREEN */ |
| 33 | #define GPIO_NR_PALMT5_WM9712_IRQ 27 |
| 34 | |
| 35 | /* IRDA - disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */ |
| 36 | #define GPIO_NR_PALMT5_IR_DISABLE 40 |
| 37 | |
| 38 | /* USB */ |
| 39 | #define GPIO_NR_PALMT5_USB_DETECT_N 15 |
Marek Vasut | 0f6ff0f | 2008-11-20 00:58:38 +0100 | [diff] [blame] | 40 | #define GPIO_NR_PALMT5_USB_PULLUP 93 |
| 41 | |
| 42 | /* LCD/BACKLIGHT */ |
| 43 | #define GPIO_NR_PALMT5_BL_POWER 84 |
| 44 | #define GPIO_NR_PALMT5_LCD_POWER 96 |
| 45 | |
| 46 | /* BLUETOOTH */ |
| 47 | #define GPIO_NR_PALMT5_BT_POWER 17 |
| 48 | #define GPIO_NR_PALMT5_BT_RESET 83 |
| 49 | |
| 50 | /* INTERRUPTS */ |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 51 | #define IRQ_GPIO_PALMT5_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMT5_SD_DETECT_N) |
| 52 | #define IRQ_GPIO_PALMT5_WM9712_IRQ PXA_GPIO_TO_IRQ(GPIO_NR_PALMT5_WM9712_IRQ) |
| 53 | #define IRQ_GPIO_PALMT5_USB_DETECT PXA_GPIO_TO_IRQ(GPIO_NR_PALMT5_USB_DETECT) |
| 54 | #define IRQ_GPIO_PALMT5_GPIO_RESET PXA_GPIO_TO_IRQ(GPIO_NR_PALMT5_GPIO_RESET) |
Marek Vasut | 0f6ff0f | 2008-11-20 00:58:38 +0100 | [diff] [blame] | 55 | |
| 56 | /** HERE ARE INIT VALUES **/ |
| 57 | |
| 58 | /* Various addresses */ |
| 59 | #define PALMT5_PHYS_RAM_START 0xa0000000 |
| 60 | #define PALMT5_PHYS_IO_START 0x40000000 |
Marek Vasut | 81854f8 | 2009-03-28 12:37:42 +0100 | [diff] [blame] | 61 | #define PALMT5_STR_BASE 0xa0200000 |
Marek Vasut | 0f6ff0f | 2008-11-20 00:58:38 +0100 | [diff] [blame] | 62 | |
| 63 | /* TOUCHSCREEN */ |
| 64 | #define AC97_LINK_FRAME 21 |
| 65 | |
| 66 | /* BATTERY */ |
| 67 | #define PALMT5_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */ |
| 68 | #define PALMT5_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */ |
André Goddard Rosa | af901ca | 2009-11-14 13:09:05 -0200 | [diff] [blame] | 69 | #define PALMT5_BAT_MAX_CURRENT 0 /* unknown */ |
Marek Vasut | 0f6ff0f | 2008-11-20 00:58:38 +0100 | [diff] [blame] | 70 | #define PALMT5_BAT_MIN_CURRENT 0 /* unknown */ |
| 71 | #define PALMT5_BAT_MAX_CHARGE 1 /* unknown */ |
| 72 | #define PALMT5_BAT_MIN_CHARGE 1 /* unknown */ |
| 73 | #define PALMT5_MAX_LIFE_MINS 360 /* on-life in minutes */ |
| 74 | |
| 75 | #define PALMT5_BAT_MEASURE_DELAY (HZ * 1) |
| 76 | |
| 77 | /* BACKLIGHT */ |
| 78 | #define PALMT5_MAX_INTENSITY 0xFE |
| 79 | #define PALMT5_DEFAULT_INTENSITY 0x7E |
| 80 | #define PALMT5_LIMIT_MASK 0x7F |
| 81 | #define PALMT5_PRESCALER 0x3F |
| 82 | #define PALMT5_PERIOD_NS 3500 |
| 83 | |
| 84 | #endif |