blob: b7bc23ffd3c696284d0d75423e747d7e3879f771 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Russell Kinga09e64f2008-08-05 16:14:15 +01002/*
3 * arch/arm/mach-sa1100/include/mach/collie.h
4 *
Paul Gortmakerbeca98c92012-04-02 18:17:17 -04005 * This file contains the hardware specific definitions for Collie
Russell Kinga09e64f2008-08-05 16:14:15 +01006 * 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 Walleij052450f2014-02-25 22:41:41 +010017#include "hardware.h" /* Gives GPIO_MAX */
18
Paul Gortmakerbeca98c92012-04-02 18:17:17 -040019extern void locomolcd_power(int on);
Russell Kinga09e64f2008-08-05 16:14:15 +010020
Dmitry Baryshkov224be092009-03-25 10:14:25 +010021#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1)
Dmitry Baryshkov8cb52f72009-03-25 10:15:28 +010022#define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE + 0)
Russell Kinga09e64f2008-08-05 16:14:15 +010023#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 Baryshkov224be092009-03-25 10:14:25 +010029#define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7)
Russell Kinga09e64f2008-08-05 16:14:15 +010030#define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19
31
Thomas Kunzef7177c82009-02-10 14:12:02 +010032#define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
Dmitry Baryshkov224be092009-03-25 10:14:25 +010033 COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \
Thomas Kunzef7177c82009-02-10 14:12:02 +010034 COLLIE_SCP_LB_VOL_CHG)
35#define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R)
Russell Kinga09e64f2008-08-05 16:14:15 +010036
Thomas Kunze1d0ad842009-10-05 22:05:38 +020037/* GPIOs for gpiolib */
Russell Kinga09e64f2008-08-05 16:14:15 +010038
Thomas Kunze1d0ad842009-10-05 22:05:38 +020039#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 Kinga09e64f2008-08-05 16:14:15 +010054
Thomas Kunze1d0ad842009-10-05 22:05:38 +020055/* 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 Kinga09e64f2008-08-05 16:14:15 +010065/* 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 Kinga09e64f2008-08-05 16:14:15 +010079/* GPIO's on the TC35143AF (Toshiba Analog Frontend) */
Thomas Kunzef7177c82009-02-10 14:12:02 +010080#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-Solenikov287d4d52014-01-09 13:32:18 +010084#define COLLIE_GPIO_IR_ON (COLLIE_TC35143_GPIO_BASE + 3)
Thomas Kunzef7177c82009-02-10 14:12:02 +010085#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 Kinga09e64f2008-08-05 16:14:15 +010095
96#endif