blob: c1502409626259830d94e0e4eaf07a617afd72ac [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Sandeep Paulraj7f507e82009-09-29 10:02:38 -04002/*
3 * Copyright (C) 2009 Texas Instruments Incorporated
Sandeep Paulraj7f507e82009-09-29 10:02:38 -04004 */
5#ifndef _GPIO_DEFS_H_
6#define _GPIO_DEFS_H_
7
Ajay Kumar Guptabae61dd2009-12-22 10:56:12 +05308#define DAVINCI_GPIO_BINTEN 0x01E26008
9#define DAVINCI_GPIO_BANK01 0x01E26010
10#define DAVINCI_GPIO_BANK23 0x01E26038
11#define DAVINCI_GPIO_BANK45 0x01E26060
12#define DAVINCI_GPIO_BANK67 0x01E26088
Heiko Schocher8d510c52011-09-14 19:59:35 +000013#define DAVINCI_GPIO_BANK8 0x01E260B0
Ajay Kumar Guptabae61dd2009-12-22 10:56:12 +053014
Ajay Kumar Guptabae61dd2009-12-22 10:56:12 +053015#define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01)
16#define davinci_gpio_bank23 ((struct davinci_gpio *)DAVINCI_GPIO_BANK23)
17#define davinci_gpio_bank45 ((struct davinci_gpio *)DAVINCI_GPIO_BANK45)
18#define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67)
Heiko Schocher8d510c52011-09-14 19:59:35 +000019#define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8)
Ajay Kumar Guptabae61dd2009-12-22 10:56:12 +053020
Adam Ford9c286a72018-06-10 22:25:57 -050021#ifndef CONFIG_DM_GPIO
Laurence Withers3ffd9682011-07-18 09:26:01 -040022#define gpio_status() gpio_info()
Adam Ford9c286a72018-06-10 22:25:57 -050023#endif
Laurence Withers3ffd9682011-07-18 09:26:01 -040024#define GPIO_NAME_SIZE 20
25#define MAX_NUM_GPIOS 144
26#define GPIO_BANK(gp) (davinci_gpio_bank01 + ((gp) >> 5))
Laurence Withers3ffd9682011-07-18 09:26:01 -040027
28void gpio_info(void);
29
Sandeep Paulraj7f507e82009-09-29 10:02:38 -040030#endif