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