blob: dd6295e1251dbb0161c044fe335fa088c44aa91e [file] [log] [blame]
Marek Szyprowskiacc84702010-05-20 07:51:08 +02001/* linux/arch/arm/plat-s5pc100/include/plat/regs-gpio.h
Kyungmin Parkb0d52172009-11-17 08:41:16 +01002 *
3 * Copyright 2009 Samsung Electronics Co.
4 * Byungho Min <bhmin@samsung.com>
5 *
Marek Szyprowskic8bb9632010-05-18 12:38:42 +02006 * S5PC100 - GPIO register definitions
Kyungmin Parkb0d52172009-11-17 08:41:16 +01007 */
8
Marek Szyprowskic8bb9632010-05-18 12:38:42 +02009#ifndef __ASM_MACH_S5PC100_REGS_GPIO_H
10#define __ASM_MACH_S5PC100_REGS_GPIO_H __FILE__
Kyungmin Parkb0d52172009-11-17 08:41:16 +010011
12#include <mach/map.h>
13
14/* S5PC100 */
Marek Szyprowskiacc84702010-05-20 07:51:08 +020015#define S5PC100_GPIO_BASE S5P_VA_GPIO
Kyungmin Parkb0d52172009-11-17 08:41:16 +010016#define S5PC100_GPA0_BASE (S5PC100_GPIO_BASE + 0x0000)
17#define S5PC100_GPA1_BASE (S5PC100_GPIO_BASE + 0x0020)
18#define S5PC100_GPB_BASE (S5PC100_GPIO_BASE + 0x0040)
19#define S5PC100_GPC_BASE (S5PC100_GPIO_BASE + 0x0060)
20#define S5PC100_GPD_BASE (S5PC100_GPIO_BASE + 0x0080)
21#define S5PC100_GPE0_BASE (S5PC100_GPIO_BASE + 0x00A0)
22#define S5PC100_GPE1_BASE (S5PC100_GPIO_BASE + 0x00C0)
23#define S5PC100_GPF0_BASE (S5PC100_GPIO_BASE + 0x00E0)
24#define S5PC100_GPF1_BASE (S5PC100_GPIO_BASE + 0x0100)
25#define S5PC100_GPF2_BASE (S5PC100_GPIO_BASE + 0x0120)
26#define S5PC100_GPF3_BASE (S5PC100_GPIO_BASE + 0x0140)
27#define S5PC100_GPG0_BASE (S5PC100_GPIO_BASE + 0x0160)
28#define S5PC100_GPG1_BASE (S5PC100_GPIO_BASE + 0x0180)
29#define S5PC100_GPG2_BASE (S5PC100_GPIO_BASE + 0x01A0)
30#define S5PC100_GPG3_BASE (S5PC100_GPIO_BASE + 0x01C0)
31#define S5PC100_GPH0_BASE (S5PC100_GPIO_BASE + 0x0C00)
32#define S5PC100_GPH1_BASE (S5PC100_GPIO_BASE + 0x0C20)
33#define S5PC100_GPH2_BASE (S5PC100_GPIO_BASE + 0x0C40)
34#define S5PC100_GPH3_BASE (S5PC100_GPIO_BASE + 0x0C60)
35#define S5PC100_GPI_BASE (S5PC100_GPIO_BASE + 0x01E0)
36#define S5PC100_GPJ0_BASE (S5PC100_GPIO_BASE + 0x0200)
37#define S5PC100_GPJ1_BASE (S5PC100_GPIO_BASE + 0x0220)
38#define S5PC100_GPJ2_BASE (S5PC100_GPIO_BASE + 0x0240)
39#define S5PC100_GPJ3_BASE (S5PC100_GPIO_BASE + 0x0260)
40#define S5PC100_GPJ4_BASE (S5PC100_GPIO_BASE + 0x0280)
41#define S5PC100_GPK0_BASE (S5PC100_GPIO_BASE + 0x02A0)
42#define S5PC100_GPK1_BASE (S5PC100_GPIO_BASE + 0x02C0)
43#define S5PC100_GPK2_BASE (S5PC100_GPIO_BASE + 0x02E0)
44#define S5PC100_GPK3_BASE (S5PC100_GPIO_BASE + 0x0300)
45#define S5PC100_GPL0_BASE (S5PC100_GPIO_BASE + 0x0320)
46#define S5PC100_GPL1_BASE (S5PC100_GPIO_BASE + 0x0340)
47#define S5PC100_GPL2_BASE (S5PC100_GPIO_BASE + 0x0360)
48#define S5PC100_GPL3_BASE (S5PC100_GPIO_BASE + 0x0380)
49#define S5PC100_GPL4_BASE (S5PC100_GPIO_BASE + 0x03A0)
Kyungmin Parkb0d52172009-11-17 08:41:16 +010050
Marek Szyprowski80dfd952010-05-20 07:51:10 +020051#define S5PC100EINT30CON (S5P_VA_GPIO + 0xE00)
52#define S5P_EINT_CON(x) (S5PC100EINT30CON + ((x) * 0x4))
Kyungmin Parkb0d52172009-11-17 08:41:16 +010053
Marek Szyprowski80dfd952010-05-20 07:51:10 +020054#define S5PC100EINT30FLTCON0 (S5P_VA_GPIO + 0xE80)
55#define S5P_EINT_FLTCON(x) (S5PC100EINT30FLTCON0 + ((x) * 0x4))
Kyungmin Parkb0d52172009-11-17 08:41:16 +010056
Marek Szyprowski80dfd952010-05-20 07:51:10 +020057#define S5PC100EINT30MASK (S5P_VA_GPIO + 0xF00)
58#define S5P_EINT_MASK(x) (S5PC100EINT30MASK + ((x) * 0x4))
Kyungmin Parkb0d52172009-11-17 08:41:16 +010059
Marek Szyprowski80dfd952010-05-20 07:51:10 +020060#define S5PC100EINT30PEND (S5P_VA_GPIO + 0xF40)
61#define S5P_EINT_PEND(x) (S5PC100EINT30PEND + ((x) * 0x4))
62
Ben Dooks459f2a32010-05-25 18:19:34 +090063#define EINT_REG_NR(x) (EINT_OFFSET(x) >> 3)
Marek Szyprowski80dfd952010-05-20 07:51:10 +020064
Ben Dooks459f2a32010-05-25 18:19:34 +090065#define eint_irq_to_bit(irq) (1 << (EINT_OFFSET(irq) & 0x7))
Marek Szyprowski80dfd952010-05-20 07:51:10 +020066
67/* values for S5P_EXTINT0 */
68#define S5P_EXTINT_LOWLEV (0x00)
69#define S5P_EXTINT_HILEV (0x01)
70#define S5P_EXTINT_FALLEDGE (0x02)
71#define S5P_EXTINT_RISEEDGE (0x03)
72#define S5P_EXTINT_BOTHEDGE (0x04)
Kyungmin Parkb0d52172009-11-17 08:41:16 +010073
Marek Szyprowskic8bb9632010-05-18 12:38:42 +020074#endif /* __ASM_MACH_S5PC100_REGS_GPIO_H */
Kyungmin Parkb0d52172009-11-17 08:41:16 +010075