Valentin Longchamp | 877bfe3 | 2013-10-18 11:47:24 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2013 Keymile AG |
| 3 | * Valentin Longchamp <valentin.longchamp@keymile.com> |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
Valentin Longchamp | 87ea2c0 | 2014-01-27 11:49:05 +0100 | [diff] [blame] | 8 | /* QRIO GPIO ports */ |
| 9 | #define GPIO_A 0x40 |
| 10 | #define GPIO_B 0x60 |
| 11 | |
| 12 | int qrio_get_gpio(u8 port_off, u8 gpio_nr); |
| 13 | void qrio_set_opendrain_gpio(u8 port_off, u8 gpio_nr, u8 val); |
| 14 | void qrio_set_gpio(u8 port_off, u8 gpio_nr, bool value); |
| 15 | void qrio_gpio_direction_output(u8 port_off, u8 gpio_nr, bool value); |
| 16 | void qrio_gpio_direction_input(u8 port_off, u8 gpio_nr); |
| 17 | |
Valentin Longchamp | 877bfe3 | 2013-10-18 11:47:24 +0200 | [diff] [blame] | 18 | #define PRSTCFG_POWUP_UNIT_CORE_RST 0x0 |
| 19 | #define PRSTCFG_POWUP_UNIT_RST 0x1 |
| 20 | #define PRSTCFG_POWUP_RST 0x3 |
| 21 | |
| 22 | void qrio_prst(u8 bit, bool en, bool wden); |
Valentin Longchamp | af47faf | 2014-04-30 15:01:46 +0200 | [diff] [blame] | 23 | void qrio_wdmask(u8 bit, bool wden); |
Valentin Longchamp | 877bfe3 | 2013-10-18 11:47:24 +0200 | [diff] [blame] | 24 | void qrio_prstcfg(u8 bit, u8 mode); |
Stefan Bigler | a53e65d | 2014-05-02 10:48:41 +0200 | [diff] [blame] | 25 | void qrio_set_leds(void); |
Stefan Bigler | 4921a14 | 2014-05-02 10:49:27 +0200 | [diff] [blame] | 26 | void qrio_enable_app_buffer(void); |
Valentin Longchamp | 877bfe3 | 2013-10-18 11:47:24 +0200 | [diff] [blame] | 27 | |
| 28 | void pci_of_setup(void *blob, bd_t *bd); |