Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 2 | /* |
| 3 | * arch/arm/mach-sa1100/include/mach/collie.h |
| 4 | * |
Paul Gortmaker | beca98c9 | 2012-04-02 18:17:17 -0400 | [diff] [blame] | 5 | * This file contains the hardware specific definitions for Collie |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 6 | * Only include this file from SA1100-specific files. |
| 7 | * |
| 8 | * ChangeLog: |
| 9 | * 04-06-2001 Lineo Japan, Inc. |
| 10 | * 04-16-2001 SHARP Corporation |
| 11 | * 07-07-2002 Chris Larson <clarson@digi.com> |
| 12 | * |
| 13 | */ |
| 14 | #ifndef __ASM_ARCH_COLLIE_H |
| 15 | #define __ASM_ARCH_COLLIE_H |
| 16 | |
Linus Walleij | 052450f | 2014-02-25 22:41:41 +0100 | [diff] [blame] | 17 | #include "hardware.h" /* Gives GPIO_MAX */ |
| 18 | |
Paul Gortmaker | beca98c9 | 2012-04-02 18:17:17 -0400 | [diff] [blame] | 19 | extern void locomolcd_power(int on); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 20 | |
Dmitry Baryshkov | 224be09 | 2009-03-25 10:14:25 +0100 | [diff] [blame] | 21 | #define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1) |
Dmitry Baryshkov | 8cb52f7 | 2009-03-25 10:15:28 +0100 | [diff] [blame] | 22 | #define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE + 0) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 23 | #define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12 |
| 24 | #define COLLIE_SCP_DIAG_BOOT2 SCOOP_GPCR_PA13 |
| 25 | #define COLLIE_SCP_MUTE_L SCOOP_GPCR_PA14 |
| 26 | #define COLLIE_SCP_MUTE_R SCOOP_GPCR_PA15 |
| 27 | #define COLLIE_SCP_5VON SCOOP_GPCR_PA16 |
| 28 | #define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17 |
Dmitry Baryshkov | 224be09 | 2009-03-25 10:14:25 +0100 | [diff] [blame] | 29 | #define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 30 | #define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19 |
| 31 | |
Thomas Kunze | f7177c8 | 2009-02-10 14:12:02 +0100 | [diff] [blame] | 32 | #define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ |
Dmitry Baryshkov | 224be09 | 2009-03-25 10:14:25 +0100 | [diff] [blame] | 33 | COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \ |
Thomas Kunze | f7177c8 | 2009-02-10 14:12:02 +0100 | [diff] [blame] | 34 | COLLIE_SCP_LB_VOL_CHG) |
| 35 | #define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 36 | |
Thomas Kunze | 1d0ad84 | 2009-10-05 22:05:38 +0200 | [diff] [blame] | 37 | /* GPIOs for gpiolib */ |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 38 | |
Thomas Kunze | 1d0ad84 | 2009-10-05 22:05:38 +0200 | [diff] [blame] | 39 | #define COLLIE_GPIO_ON_KEY (0) |
| 40 | #define COLLIE_GPIO_AC_IN (1) |
| 41 | #define COLLIE_GPIO_SDIO_INT (11) |
| 42 | #define COLLIE_GPIO_CF_IRQ (14) |
| 43 | #define COLLIE_GPIO_nREMOCON_INT (15) |
| 44 | #define COLLIE_GPIO_UCB1x00_RESET (16) |
| 45 | #define COLLIE_GPIO_nMIC_ON (17) |
| 46 | #define COLLIE_GPIO_nREMOCON_ON (18) |
| 47 | #define COLLIE_GPIO_CO (20) |
| 48 | #define COLLIE_GPIO_MCP_CLK (21) |
| 49 | #define COLLIE_GPIO_CF_CD (22) |
| 50 | #define COLLIE_GPIO_UCB1x00_IRQ (23) |
| 51 | #define COLLIE_GPIO_WAKEUP (24) |
| 52 | #define COLLIE_GPIO_GA_INT (25) |
| 53 | #define COLLIE_GPIO_MAIN_BAT_LOW (26) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 54 | |
Thomas Kunze | 1d0ad84 | 2009-10-05 22:05:38 +0200 | [diff] [blame] | 55 | /* GPIO definitions for direct register access */ |
| 56 | |
| 57 | #define _COLLIE_GPIO_ON_KEY GPIO_GPIO(0) |
| 58 | #define _COLLIE_GPIO_AC_IN GPIO_GPIO(1) |
| 59 | #define _COLLIE_GPIO_nREMOCON_INT GPIO_GPIO(15) |
| 60 | #define _COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO(16) |
| 61 | #define _COLLIE_GPIO_nMIC_ON GPIO_GPIO(17) |
| 62 | #define _COLLIE_GPIO_nREMOCON_ON GPIO_GPIO(18) |
| 63 | #define _COLLIE_GPIO_CO GPIO_GPIO(20) |
| 64 | #define _COLLIE_GPIO_WAKEUP GPIO_GPIO(24) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 65 | /* Interrupts */ |
| 66 | |
| 67 | #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 |
| 68 | #define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1 |
| 69 | #define COLLIE_IRQ_GPIO_SDIO_IRQ IRQ_GPIO11 |
| 70 | #define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14 |
| 71 | #define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15 |
| 72 | #define COLLIE_IRQ_GPIO_CO IRQ_GPIO20 |
| 73 | #define COLLIE_IRQ_GPIO_CF_CD IRQ_GPIO22 |
| 74 | #define COLLIE_IRQ_GPIO_UCB1x00_IRQ IRQ_GPIO23 |
| 75 | #define COLLIE_IRQ_GPIO_WAKEUP IRQ_GPIO24 |
| 76 | #define COLLIE_IRQ_GPIO_GA_INT IRQ_GPIO25 |
| 77 | #define COLLIE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO26 |
| 78 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 79 | /* GPIO's on the TC35143AF (Toshiba Analog Frontend) */ |
Thomas Kunze | f7177c8 | 2009-02-10 14:12:02 +0100 | [diff] [blame] | 80 | #define COLLIE_TC35143_GPIO_BASE (GPIO_MAX + 13) |
| 81 | #define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 |
| 82 | #define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 |
| 83 | #define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 |
Dmitry Eremin-Solenikov | 287d4d5 | 2014-01-09 13:32:18 +0100 | [diff] [blame] | 84 | #define COLLIE_GPIO_IR_ON (COLLIE_TC35143_GPIO_BASE + 3) |
Thomas Kunze | f7177c8 | 2009-02-10 14:12:02 +0100 | [diff] [blame] | 85 | #define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 |
| 86 | #define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 |
| 87 | #define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 |
| 88 | #define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 |
| 89 | #define COLLIE_GPIO_MBAT_ON (COLLIE_TC35143_GPIO_BASE + 7) |
| 90 | #define COLLIE_GPIO_BBAT_ON (COLLIE_TC35143_GPIO_BASE + 8) |
| 91 | #define COLLIE_GPIO_TMP_ON (COLLIE_TC35143_GPIO_BASE + 9) |
| 92 | #define COLLIE_TC35143_GPIO_IN (UCB_IO_0 | UCB_IO_2 | UCB_IO_5) |
| 93 | #define COLLIE_TC35143_GPIO_OUT (UCB_IO_1 | UCB_IO_3 | UCB_IO_4 \ |
| 94 | | UCB_IO_6) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 95 | |
| 96 | #endif |