Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #include <baseboard/gpio.h> |
| 4 | #include <baseboard/variants.h> |
Subrata Banik | 7c5a9c7 | 2022-07-06 08:58:21 +0000 | [diff] [blame] | 5 | #include <boardid.h> |
Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 6 | #include <soc/gpio.h> |
| 7 | |
| 8 | /* Pad configuration in ramstage */ |
| 9 | static const struct pad_config gpio_table[] = { |
| 10 | /* ToDo: Fill gpio configuration */ |
Kapil Porwal | 7581730 | 2022-07-08 14:37:05 +0000 | [diff] [blame] | 11 | /* H08 : UART0_RXD ==> UART_DBG_TX_SOC_RX */ |
| 12 | PAD_CFG_NF(GPP_H08, NONE, DEEP, NF1), |
| 13 | /* H09 : UART0_TXD ==> UART_DBG_RX_SOC_TX */ |
| 14 | PAD_CFG_NF(GPP_H09, NONE, DEEP, NF1), |
Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 15 | }; |
| 16 | |
| 17 | /* Early pad configuration in bootblock */ |
| 18 | static const struct pad_config early_gpio_table[] = { |
| 19 | /* ToDo: Fill early gpio configuration */ |
Kapil Porwal | 7581730 | 2022-07-08 14:37:05 +0000 | [diff] [blame] | 20 | /* H08 : UART0_RXD ==> UART_DBG_TX_SOC_RX */ |
| 21 | PAD_CFG_NF(GPP_H08, NONE, DEEP, NF1), |
| 22 | /* H09 : UART0_TXD ==> UART_DBG_RX_SOC_TX */ |
| 23 | PAD_CFG_NF(GPP_H09, NONE, DEEP, NF1), |
Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 24 | }; |
| 25 | |
Subrata Banik | 7c5a9c7 | 2022-07-06 08:58:21 +0000 | [diff] [blame] | 26 | static const struct pad_config romstage_gpio_table[] = { |
| 27 | /* ToDo: Fill romstage gpio configuration */ |
| 28 | }; |
| 29 | |
| 30 | const struct pad_config *variant_gpio_table(size_t *num) |
Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 31 | { |
| 32 | *num = ARRAY_SIZE(gpio_table); |
| 33 | return gpio_table; |
| 34 | } |
| 35 | |
Subrata Banik | 7c5a9c7 | 2022-07-06 08:58:21 +0000 | [diff] [blame] | 36 | const struct pad_config *variant_early_gpio_table(size_t *num) |
Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 37 | { |
| 38 | *num = ARRAY_SIZE(early_gpio_table); |
| 39 | return early_gpio_table; |
| 40 | } |
| 41 | |
| 42 | /* Create the stub for romstage gpio, typically use for power sequence */ |
Subrata Banik | 7c5a9c7 | 2022-07-06 08:58:21 +0000 | [diff] [blame] | 43 | const struct pad_config *variant_romstage_gpio_table(size_t *num) |
Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 44 | { |
Subrata Banik | 7c5a9c7 | 2022-07-06 08:58:21 +0000 | [diff] [blame] | 45 | *num = ARRAY_SIZE(romstage_gpio_table); |
| 46 | return romstage_gpio_table; |
Eric Lai | 5c02779 | 2022-05-23 16:21:36 +0800 | [diff] [blame] | 47 | } |
Eric Lai | 366fba2 | 2022-05-24 09:25:57 +0800 | [diff] [blame] | 48 | |
| 49 | static const struct cros_gpio cros_gpios[] = { |
| 50 | }; |
| 51 | |
| 52 | DECLARE_WEAK_CROS_GPIOS(cros_gpios); |