2 * Hardware specific definitions for SL-C7xx series of PDAs
4 * Copyright (c) 2004-2005 Richard Purdie
6 * Based on Sharp's 2.4 kernel patches
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #ifndef __ASM_ARCH_CORGI_H
14 #define __ASM_ARCH_CORGI_H 1
18 * Corgi (Non Standard) GPIO Definitions
20 #define CORGI_GPIO_KEY_INT (0) /* Keyboard Interrupt */
21 #define CORGI_GPIO_AC_IN (1) /* Charger Detection */
22 #define CORGI_GPIO_WAKEUP (3) /* System wakeup notification? */
23 #define CORGI_GPIO_AK_INT (4) /* Headphone Jack Control Interrupt */
24 #define CORGI_GPIO_TP_INT (5) /* Touch Panel Interrupt */
25 #define CORGI_GPIO_nSD_WP (7) /* SD Write Protect? */
26 #define CORGI_GPIO_nSD_DETECT (9) /* MMC/SD Card Detect */
27 #define CORGI_GPIO_nSD_INT (10) /* SD Interrupt for SDIO? */
28 #define CORGI_GPIO_MAIN_BAT_LOW (11) /* Main Battery Low Notification */
29 #define CORGI_GPIO_BAT_COVER (11) /* Battery Cover Detect */
30 #define CORGI_GPIO_LED_ORANGE (13) /* Orange LED Control */
31 #define CORGI_GPIO_CF_CD (14) /* Compact Flash Card Detect */
32 #define CORGI_GPIO_CHRG_FULL (16) /* Charging Complete Notification */
33 #define CORGI_GPIO_CF_IRQ (17) /* Compact Flash Interrupt */
34 #define CORGI_GPIO_LCDCON_CS (19) /* LCD Control Chip Select */
35 #define CORGI_GPIO_MAX1111_CS (20) /* MAX1111 Chip Select */
36 #define CORGI_GPIO_ADC_TEMP_ON (21) /* Select battery voltage or temperature */
37 #define CORGI_GPIO_IR_ON (22) /* Enable IR Transciever */
38 #define CORGI_GPIO_ADS7846_CS (24) /* ADS7846 Chip Select */
39 #define CORGI_GPIO_SD_PWR (33) /* MMC/SD Power */
40 #define CORGI_GPIO_CHRG_ON (38) /* Enable battery Charging */
41 #define CORGI_GPIO_DISCHARGE_ON (42) /* Enable battery Discharge */
42 #define CORGI_GPIO_CHRG_UKN (43) /* Unknown Charging (Bypass Control?) */
43 #define CORGI_GPIO_HSYNC (44) /* LCD HSync Pulse */
44 #define CORGI_GPIO_USB_PULLUP (45) /* USB show presence to host */
48 * Corgi Keyboard Definitions
50 #define CORGI_KEY_STROBE_NUM (12)
51 #define CORGI_KEY_SENSE_NUM (8)
52 #define CORGI_GPIO_ALL_STROBE_BIT (0x00003ffc)
53 #define CORGI_GPIO_HIGH_SENSE_BIT (0xfc000000)
54 #define CORGI_GPIO_HIGH_SENSE_RSHIFT (26)
55 #define CORGI_GPIO_LOW_SENSE_BIT (0x00000003)
56 #define CORGI_GPIO_LOW_SENSE_LSHIFT (6)
57 #define CORGI_GPIO_STROBE_BIT(a) GPIO_bit(66+(a))
58 #define CORGI_GPIO_SENSE_BIT(a) GPIO_bit(58+(a))
59 #define CORGI_GAFR_ALL_STROBE_BIT (0x0ffffff0)
60 #define CORGI_GAFR_HIGH_SENSE_BIT (0xfff00000)
61 #define CORGI_GAFR_LOW_SENSE_BIT (0x0000000f)
62 #define CORGI_GPIO_KEY_SENSE(a) (58+(a))
63 #define CORGI_GPIO_KEY_STROBE(a) (66+(a))
69 #define CORGI_IRQ_GPIO_KEY_INT IRQ_GPIO(0)
70 #define CORGI_IRQ_GPIO_AC_IN IRQ_GPIO(1)
71 #define CORGI_IRQ_GPIO_WAKEUP IRQ_GPIO(3)
72 #define CORGI_IRQ_GPIO_AK_INT IRQ_GPIO(4)
73 #define CORGI_IRQ_GPIO_TP_INT IRQ_GPIO(5)
74 #define CORGI_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9)
75 #define CORGI_IRQ_GPIO_nSD_INT IRQ_GPIO(10)
76 #define CORGI_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(11)
77 #define CORGI_IRQ_GPIO_CF_CD IRQ_GPIO(14)
78 #define CORGI_IRQ_GPIO_CHRG_FULL IRQ_GPIO(16) /* Battery fully charged */
79 #define CORGI_IRQ_GPIO_CF_IRQ IRQ_GPIO(17)
80 #define CORGI_IRQ_GPIO_KEY_SENSE(a) IRQ_GPIO(58+(a)) /* Keyboard Sense lines */
84 * Corgi SCOOP GPIOs and Config
86 #define CORGI_SCP_LED_GREEN SCOOP_GPCR_PA11
87 #define CORGI_SCP_SWA SCOOP_GPCR_PA12 /* Hinge Switch A */
88 #define CORGI_SCP_SWB SCOOP_GPCR_PA13 /* Hinge Switch B */
89 #define CORGI_SCP_MUTE_L SCOOP_GPCR_PA14
90 #define CORGI_SCP_MUTE_R SCOOP_GPCR_PA15
91 #define CORGI_SCP_AKIN_PULLUP SCOOP_GPCR_PA16
92 #define CORGI_SCP_APM_ON SCOOP_GPCR_PA17
93 #define CORGI_SCP_BACKLIGHT_CONT SCOOP_GPCR_PA18
94 #define CORGI_SCP_MIC_BIAS SCOOP_GPCR_PA19
96 #define CORGI_SCOOP_IO_DIR ( CORGI_SCP_LED_GREEN | CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R | \
97 CORGI_SCP_AKIN_PULLUP | CORGI_SCP_APM_ON | CORGI_SCP_BACKLIGHT_CONT | \
99 #define CORGI_SCOOP_IO_OUT ( CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R )
103 * Shared data structures
105 extern struct platform_device corgiscoop_device
;
106 extern struct platform_device corgissp_device
;
108 #endif /* __ASM_ARCH_CORGI_H */