blob: 12717a96aab0d62598521abca2fa70d2fdd7d606 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peter Griffind2676882015-07-30 18:55:18 +01002/*
3 * Copyright (C) 2015 Linaro
4 * Peter Griffin <peter.griffin@linaro.org>
Peter Griffind2676882015-07-30 18:55:18 +01005 */
6
7#ifndef _HI6220_GPIO_H_
8#define _HI6220_GPIO_H_
9
10#define HI6220_GPIO_BASE(bank) (((bank < 4) ? 0xf8011000 : \
11 0xf7020000 - 0x4000) + (0x1000 * bank))
12
Peter Griffind2676882015-07-30 18:55:18 +010013#define HI6220_GPIO_PER_BANK 8
14#define HI6220_GPIO_DIR 0x400
15
16struct gpio_bank {
17 u8 *base; /* address of registers in physical memory */
18};
19
20/* Information about a GPIO bank */
Simon Glassb75b15b2020-12-03 16:55:23 -070021struct hikey_gpio_plat {
Peter Griffind2676882015-07-30 18:55:18 +010022 int bank_index;
Prabhakar Kushwahaec160b12015-10-25 13:18:12 +053023 ulong base; /* address of registers in physical memory */
Peter Griffind2676882015-07-30 18:55:18 +010024};
25
26#endif /* _HI6220_GPIO_H_ */