1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2877bfe37SValentin Longchamp /* 3877bfe37SValentin Longchamp * (C) Copyright 2013 Keymile AG 4877bfe37SValentin Longchamp * Valentin Longchamp <valentin.longchamp@keymile.com> 5877bfe37SValentin Longchamp */ 6877bfe37SValentin Longchamp 787ea2c0fSValentin Longchamp /* QRIO GPIO ports */ 887ea2c0fSValentin Longchamp #define GPIO_A 0x40 987ea2c0fSValentin Longchamp #define GPIO_B 0x60 1087ea2c0fSValentin Longchamp 1187ea2c0fSValentin Longchamp int qrio_get_gpio(u8 port_off, u8 gpio_nr); 1287ea2c0fSValentin Longchamp void qrio_set_opendrain_gpio(u8 port_off, u8 gpio_nr, u8 val); 1387ea2c0fSValentin Longchamp void qrio_set_gpio(u8 port_off, u8 gpio_nr, bool value); 1487ea2c0fSValentin Longchamp void qrio_gpio_direction_output(u8 port_off, u8 gpio_nr, bool value); 1587ea2c0fSValentin Longchamp void qrio_gpio_direction_input(u8 port_off, u8 gpio_nr); 1687ea2c0fSValentin Longchamp 17877bfe37SValentin Longchamp #define PRSTCFG_POWUP_UNIT_CORE_RST 0x0 18877bfe37SValentin Longchamp #define PRSTCFG_POWUP_UNIT_RST 0x1 19877bfe37SValentin Longchamp #define PRSTCFG_POWUP_RST 0x3 20877bfe37SValentin Longchamp 21877bfe37SValentin Longchamp void qrio_prst(u8 bit, bool en, bool wden); 22af47faf6SValentin Longchamp void qrio_wdmask(u8 bit, bool wden); 23877bfe37SValentin Longchamp void qrio_prstcfg(u8 bit, u8 mode); 24a53e65d0SStefan Bigler void qrio_set_leds(void); 254921a149SStefan Bigler void qrio_enable_app_buffer(void); 26807d93d6SBoschung, Rainer void qrio_cpuwd_flag(bool flag); 27807d93d6SBoschung, Rainer int qrio_reset_reason(void); 28877bfe37SValentin Longchamp 296caa185aSBoschung, Rainer #define UPREQ_UNIT_RST 0x0 306caa185aSBoschung, Rainer #define UPREQ_CORE_RST 0x1 316caa185aSBoschung, Rainer 326caa185aSBoschung, Rainer void qrio_uprstreq(u8 mode); 336caa185aSBoschung, Rainer 34877bfe37SValentin Longchamp void pci_of_setup(void *blob, bd_t *bd); 35