gpio.h 593 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2015 Linaro
  4. * Peter Griffin <peter.griffin@linaro.org>
  5. */
  6. #ifndef _HI6220_GPIO_H_
  7. #define _HI6220_GPIO_H_
  8. #define HI6220_GPIO_BASE(bank) (((bank < 4) ? 0xf8011000 : \
  9. 0xf7020000 - 0x4000) + (0x1000 * bank))
  10. #define HI6220_GPIO_PER_BANK 8
  11. #define HI6220_GPIO_DIR 0x400
  12. struct gpio_bank {
  13. u8 *base; /* address of registers in physical memory */
  14. };
  15. /* Information about a GPIO bank */
  16. struct hikey_gpio_plat {
  17. int bank_index;
  18. ulong base; /* address of registers in physical memory */
  19. };
  20. #endif /* _HI6220_GPIO_H_ */