diff options
Diffstat (limited to 'arch/arm/mach-sa1100/include/mach/simpad.h')
| -rw-r--r-- | arch/arm/mach-sa1100/include/mach/simpad.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/include/mach/simpad.h b/arch/arm/mach-sa1100/include/mach/simpad.h new file mode 100644 index 00000000000..9296c4513ce --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/simpad.h | |||
| @@ -0,0 +1,112 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-sa1100/include/mach/simpad.h | ||
| 3 | * | ||
| 4 | * based of assabet.h same as HUW_Webpanel | ||
| 5 | * | ||
| 6 | * This file contains the hardware specific definitions for SIMpad | ||
| 7 | * | ||
| 8 | * 2001/05/14 Juergen Messerer <juergen.messerer@freesurf.ch> | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __ASM_ARCH_SIMPAD_H | ||
| 12 | #define __ASM_ARCH_SIMPAD_H | ||
| 13 | |||
| 14 | |||
| 15 | #define GPIO_UART1_RTS GPIO_GPIO14 | ||
| 16 | #define GPIO_UART1_DTR GPIO_GPIO7 | ||
| 17 | #define GPIO_UART1_CTS GPIO_GPIO8 | ||
| 18 | #define GPIO_UART1_DCD GPIO_GPIO23 | ||
| 19 | #define GPIO_UART1_DSR GPIO_GPIO6 | ||
| 20 | |||
| 21 | #define GPIO_UART3_RTS GPIO_GPIO12 | ||
| 22 | #define GPIO_UART3_DTR GPIO_GPIO16 | ||
| 23 | #define GPIO_UART3_CTS GPIO_GPIO13 | ||
| 24 | #define GPIO_UART3_DCD GPIO_GPIO18 | ||
| 25 | #define GPIO_UART3_DSR GPIO_GPIO17 | ||
| 26 | |||
| 27 | #define GPIO_POWER_BUTTON GPIO_GPIO0 | ||
| 28 | #define GPIO_UCB1300_IRQ GPIO_GPIO22 /* UCB GPIO and touchscreen */ | ||
| 29 | |||
| 30 | #define IRQ_UART1_CTS IRQ_GPIO15 | ||
| 31 | #define IRQ_UART1_DCD GPIO_GPIO23 | ||
| 32 | #define IRQ_UART1_DSR GPIO_GPIO6 | ||
| 33 | #define IRQ_UART3_CTS GPIO_GPIO13 | ||
| 34 | #define IRQ_UART3_DCD GPIO_GPIO18 | ||
| 35 | #define IRQ_UART3_DSR GPIO_GPIO17 | ||
| 36 | |||
| 37 | #define IRQ_GPIO_UCB1300_IRQ IRQ_GPIO22 | ||
| 38 | #define IRQ_GPIO_POWER_BUTTON IRQ_GPIO0 | ||
| 39 | |||
| 40 | |||
| 41 | /*--- PCMCIA ---*/ | ||
| 42 | #define GPIO_CF_CD GPIO_GPIO24 | ||
| 43 | #define GPIO_CF_IRQ GPIO_GPIO1 | ||
| 44 | #define IRQ_GPIO_CF_IRQ IRQ_GPIO1 | ||
| 45 | #define IRQ_GPIO_CF_CD IRQ_GPIO24 | ||
| 46 | |||
| 47 | /*--- SmartCard ---*/ | ||
| 48 | #define GPIO_SMART_CARD GPIO_GPIO10 | ||
| 49 | #define IRQ_GPIO_SMARD_CARD IRQ_GPIO10 | ||
| 50 | |||
| 51 | // CS3 Latch is write only, a shadow is necessary | ||
| 52 | |||
| 53 | #define CS3BUSTYPE unsigned volatile long | ||
| 54 | #define CS3_BASE 0xf1000000 | ||
| 55 | |||
| 56 | #define VCC_5V_EN 0x0001 // For 5V PCMCIA | ||
| 57 | #define VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA | ||
| 58 | #define EN1 0x0004 // This is only for EPROM's | ||
| 59 | #define EN0 0x0008 // Both should be enable for 3.3V or 5V | ||
| 60 | #define DISPLAY_ON 0x0010 | ||
| 61 | #define PCMCIA_BUFF_DIS 0x0020 | ||
| 62 | #define MQ_RESET 0x0040 | ||
| 63 | #define PCMCIA_RESET 0x0080 | ||
| 64 | #define DECT_POWER_ON 0x0100 | ||
| 65 | #define IRDA_SD 0x0200 // Shutdown for powersave | ||
| 66 | #define RS232_ON 0x0400 | ||
| 67 | #define SD_MEDIAQ 0x0800 // Shutdown for powersave | ||
| 68 | #define LED2_ON 0x1000 | ||
| 69 | #define IRDA_MODE 0x2000 // Fast/Slow IrDA mode | ||
| 70 | #define ENABLE_5V 0x4000 // Enable 5V circuit | ||
| 71 | #define RESET_SIMCARD 0x8000 | ||
| 72 | |||
| 73 | #define RS232_ENABLE 0x0440 | ||
| 74 | #define PCMCIAMASK 0x402f | ||
| 75 | |||
| 76 | |||
| 77 | struct simpad_battery { | ||
| 78 | unsigned char ac_status; /* line connected yes/no */ | ||
| 79 | unsigned char status; /* battery loading yes/no */ | ||
| 80 | unsigned char percentage; /* percentage loaded */ | ||
| 81 | unsigned short life; /* life till empty */ | ||
| 82 | }; | ||
| 83 | |||
| 84 | /* These should match the apm_bios.h definitions */ | ||
| 85 | #define SIMPAD_AC_STATUS_AC_OFFLINE 0x00 | ||
| 86 | #define SIMPAD_AC_STATUS_AC_ONLINE 0x01 | ||
| 87 | #define SIMPAD_AC_STATUS_AC_BACKUP 0x02 /* What does this mean? */ | ||
| 88 | #define SIMPAD_AC_STATUS_AC_UNKNOWN 0xff | ||
| 89 | |||
| 90 | /* These bitfields are rarely "or'd" together */ | ||
| 91 | #define SIMPAD_BATT_STATUS_HIGH 0x01 | ||
| 92 | #define SIMPAD_BATT_STATUS_LOW 0x02 | ||
| 93 | #define SIMPAD_BATT_STATUS_CRITICAL 0x04 | ||
| 94 | #define SIMPAD_BATT_STATUS_CHARGING 0x08 | ||
| 95 | #define SIMPAD_BATT_STATUS_CHARGE_MAIN 0x10 | ||
| 96 | #define SIMPAD_BATT_STATUS_DEAD 0x20 /* Battery will not charge */ | ||
| 97 | #define SIMPAD_BATT_NOT_INSTALLED 0x20 /* For expansion pack batteries */ | ||
| 98 | #define SIMPAD_BATT_STATUS_FULL 0x40 /* Battery fully charged (and connected to AC) */ | ||
| 99 | #define SIMPAD_BATT_STATUS_NOBATT 0x80 | ||
| 100 | #define SIMPAD_BATT_STATUS_UNKNOWN 0xff | ||
| 101 | |||
| 102 | extern int simpad_get_battery(struct simpad_battery* ); | ||
| 103 | |||
| 104 | #endif // __ASM_ARCH_SIMPAD_H | ||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | |||
