blob: c25cb25bdcce95808b453d0fccceba2d17558ac0 [file] [log] [blame]
Eric Lai5c027792022-05-23 16:21:36 +08001/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3#include <baseboard/gpio.h>
4#include <baseboard/variants.h>
Subrata Banik7c5a9c72022-07-06 08:58:21 +00005#include <boardid.h>
Eric Lai5c027792022-05-23 16:21:36 +08006#include <soc/gpio.h>
7
8/* Pad configuration in ramstage */
9static const struct pad_config gpio_table[] = {
10 /* ToDo: Fill gpio configuration */
Kapil Porwal75817302022-07-08 14:37:05 +000011 /* 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 Lai5c027792022-05-23 16:21:36 +080015};
16
17/* Early pad configuration in bootblock */
18static const struct pad_config early_gpio_table[] = {
19 /* ToDo: Fill early gpio configuration */
Kapil Porwal75817302022-07-08 14:37:05 +000020 /* 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 Lai5c027792022-05-23 16:21:36 +080024};
25
Subrata Banik7c5a9c72022-07-06 08:58:21 +000026static const struct pad_config romstage_gpio_table[] = {
27 /* ToDo: Fill romstage gpio configuration */
28};
29
30const struct pad_config *variant_gpio_table(size_t *num)
Eric Lai5c027792022-05-23 16:21:36 +080031{
32 *num = ARRAY_SIZE(gpio_table);
33 return gpio_table;
34}
35
Subrata Banik7c5a9c72022-07-06 08:58:21 +000036const struct pad_config *variant_early_gpio_table(size_t *num)
Eric Lai5c027792022-05-23 16:21:36 +080037{
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 Banik7c5a9c72022-07-06 08:58:21 +000043const struct pad_config *variant_romstage_gpio_table(size_t *num)
Eric Lai5c027792022-05-23 16:21:36 +080044{
Subrata Banik7c5a9c72022-07-06 08:58:21 +000045 *num = ARRAY_SIZE(romstage_gpio_table);
46 return romstage_gpio_table;
Eric Lai5c027792022-05-23 16:21:36 +080047}
Eric Lai366fba22022-05-24 09:25:57 +080048
49static const struct cros_gpio cros_gpios[] = {
50};
51
52DECLARE_WEAK_CROS_GPIOS(cros_gpios);