Peter Griffin | d267688 | 2015-07-30 18:55:18 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 Linaro |
| 3 | * Peter Griffin <peter.griffin@linaro.org> |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #ifndef _HI6220_GPIO_H_ |
| 9 | #define _HI6220_GPIO_H_ |
| 10 | |
| 11 | #define HI6220_GPIO_BASE(bank) (((bank < 4) ? 0xf8011000 : \ |
| 12 | 0xf7020000 - 0x4000) + (0x1000 * bank)) |
| 13 | |
Peter Griffin | d267688 | 2015-07-30 18:55:18 +0100 | [diff] [blame] | 14 | #define HI6220_GPIO_PER_BANK 8 |
| 15 | #define HI6220_GPIO_DIR 0x400 |
| 16 | |
| 17 | struct gpio_bank { |
| 18 | u8 *base; /* address of registers in physical memory */ |
| 19 | }; |
| 20 | |
| 21 | /* Information about a GPIO bank */ |
| 22 | struct hikey_gpio_platdata { |
| 23 | int bank_index; |
Prabhakar Kushwaha | ec160b1 | 2015-10-25 13:18:12 +0530 | [diff] [blame] | 24 | ulong base; /* address of registers in physical memory */ |
Peter Griffin | d267688 | 2015-07-30 18:55:18 +0100 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | #endif /* _HI6220_GPIO_H_ */ |