WIP FPC-III support
[linux/fpc-iii.git] / arch / arm / mach-pxa / include / mach / palmtx.h
blobec88abf0fc6c5dbb1da67d34836c217ece90b893
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * GPIOs and interrupts for Palm T|X Handheld Computer
5 * Based on palmld-gpio.h by Alex Osborne
7 * Authors: Marek Vasut <marek.vasut@gmail.com>
8 * Cristiano P. <cristianop@users.sourceforge.net>
9 * Jan Herman <2hp@seznam.cz>
12 #ifndef _INCLUDE_PALMTX_H_
13 #define _INCLUDE_PALMTX_H_
15 #include "irqs.h" /* PXA_GPIO_TO_IRQ */
17 /** HERE ARE GPIOs **/
19 /* GPIOs */
20 #define GPIO_NR_PALMTX_GPIO_RESET 1
22 #define GPIO_NR_PALMTX_POWER_DETECT 12 /* 90 */
23 #define GPIO_NR_PALMTX_HOTSYNC_BUTTON_N 10
24 #define GPIO_NR_PALMTX_EARPHONE_DETECT 107
26 /* SD/MMC */
27 #define GPIO_NR_PALMTX_SD_DETECT_N 14
28 #define GPIO_NR_PALMTX_SD_POWER 114 /* probably */
29 #define GPIO_NR_PALMTX_SD_READONLY 115 /* probably */
31 /* TOUCHSCREEN */
32 #define GPIO_NR_PALMTX_WM9712_IRQ 27
34 /* IRDA - disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */
35 #define GPIO_NR_PALMTX_IR_DISABLE 40
37 /* USB */
38 #define GPIO_NR_PALMTX_USB_DETECT_N 13
39 #define GPIO_NR_PALMTX_USB_PULLUP 93
41 /* LCD/BACKLIGHT */
42 #define GPIO_NR_PALMTX_BL_POWER 84
43 #define GPIO_NR_PALMTX_LCD_POWER 96
45 /* LCD BORDER */
46 #define GPIO_NR_PALMTX_BORDER_SWITCH 98
47 #define GPIO_NR_PALMTX_BORDER_SELECT 22
49 /* BLUETOOTH */
50 #define GPIO_NR_PALMTX_BT_POWER 17
51 #define GPIO_NR_PALMTX_BT_RESET 83
53 /* PCMCIA (WiFi) */
54 #define GPIO_NR_PALMTX_PCMCIA_POWER1 94
55 #define GPIO_NR_PALMTX_PCMCIA_POWER2 108
56 #define GPIO_NR_PALMTX_PCMCIA_RESET 79
57 #define GPIO_NR_PALMTX_PCMCIA_READY 116
59 /* NAND Flash ... this GPIO may be incorrect! */
60 #define GPIO_NR_PALMTX_NAND_BUFFER_DIR 79
62 /* INTERRUPTS */
63 #define IRQ_GPIO_PALMTX_SD_DETECT_N PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_SD_DETECT_N)
64 #define IRQ_GPIO_PALMTX_WM9712_IRQ PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_WM9712_IRQ)
65 #define IRQ_GPIO_PALMTX_USB_DETECT PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_USB_DETECT)
66 #define IRQ_GPIO_PALMTX_GPIO_RESET PXA_GPIO_TO_IRQ(GPIO_NR_PALMTX_GPIO_RESET)
68 /** HERE ARE INIT VALUES **/
70 /* Various addresses */
71 #define PALMTX_PCMCIA_PHYS 0x28000000
72 #define PALMTX_PCMCIA_VIRT IOMEM(0xf0000000)
73 #define PALMTX_PCMCIA_SIZE 0x100000
75 #define PALMTX_PHYS_RAM_START 0xa0000000
76 #define PALMTX_PHYS_IO_START 0x40000000
78 #define PALMTX_STR_BASE 0xa0200000
80 #define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */
81 #define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */
83 #define PALMTX_NAND_ALE_PHYS (PALMTX_PHYS_NAND_START | (1 << 24))
84 #define PALMTX_NAND_CLE_PHYS (PALMTX_PHYS_NAND_START | (1 << 25))
85 #define PALMTX_NAND_ALE_VIRT IOMEM(0xff100000)
86 #define PALMTX_NAND_CLE_VIRT IOMEM(0xff200000)
88 /* TOUCHSCREEN */
89 #define AC97_LINK_FRAME 21
92 /* BATTERY */
93 #define PALMTX_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */
94 #define PALMTX_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */
95 #define PALMTX_BAT_MAX_CURRENT 0 /* unknown */
96 #define PALMTX_BAT_MIN_CURRENT 0 /* unknown */
97 #define PALMTX_BAT_MAX_CHARGE 1 /* unknown */
98 #define PALMTX_BAT_MIN_CHARGE 1 /* unknown */
99 #define PALMTX_MAX_LIFE_MINS 360 /* on-life in minutes */
101 #define PALMTX_BAT_MEASURE_DELAY (HZ * 1)
103 /* BACKLIGHT */
104 #define PALMTX_MAX_INTENSITY 0xFE
105 #define PALMTX_DEFAULT_INTENSITY 0x7E
106 #define PALMTX_LIMIT_MASK 0x7F
107 #define PALMTX_PRESCALER 0x3F
108 #define PALMTX_PERIOD_NS 3500
110 #endif