kmp204x.h 972 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * (C) Copyright 2013 Keymile AG
  3. * Valentin Longchamp <valentin.longchamp@keymile.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. /* QRIO GPIO ports */
  8. #define GPIO_A 0x40
  9. #define GPIO_B 0x60
  10. int qrio_get_gpio(u8 port_off, u8 gpio_nr);
  11. void qrio_set_opendrain_gpio(u8 port_off, u8 gpio_nr, u8 val);
  12. void qrio_set_gpio(u8 port_off, u8 gpio_nr, bool value);
  13. void qrio_gpio_direction_output(u8 port_off, u8 gpio_nr, bool value);
  14. void qrio_gpio_direction_input(u8 port_off, u8 gpio_nr);
  15. #define PRSTCFG_POWUP_UNIT_CORE_RST 0x0
  16. #define PRSTCFG_POWUP_UNIT_RST 0x1
  17. #define PRSTCFG_POWUP_RST 0x3
  18. void qrio_prst(u8 bit, bool en, bool wden);
  19. void qrio_wdmask(u8 bit, bool wden);
  20. void qrio_prstcfg(u8 bit, u8 mode);
  21. void qrio_set_leds(void);
  22. void qrio_enable_app_buffer(void);
  23. void qrio_cpuwd_flag(bool flag);
  24. int qrio_reset_reason(void);
  25. #define UPREQ_UNIT_RST 0x0
  26. #define UPREQ_CORE_RST 0x1
  27. void qrio_uprstreq(u8 mode);
  28. void pci_of_setup(void *blob, bd_t *bd);