blob: 1a6d1b14662d4508e606293a7ea5fd33dfaebd9f [file] [log] [blame]
Dinesh Gehlot0368e432024-04-02 11:50:46 +05301/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3#include <baseboard/gpio.h>
4#include <baseboard/variants.h>
5#include <soc/gpio.h>
6#include <types.h>
7#include <vendorcode/google/chromeos/chromeos.h>
8
9/* Pad configuration in ramstage */
10static const struct pad_config gpio_table[] = {
Pranava Y N3303b362024-05-24 14:20:14 +053011 /* A14 : USB_OC1# ==> USB_A0_FAULT_ODL */
12 PAD_CFG_NF_LOCK(GPP_A14, NONE, NF1, LOCK_CONFIG),
13 /* A15 : USB_OC2# ==> USB_A1_FAULT_ODL */
14 PAD_CFG_NF_LOCK(GPP_A15, NONE, NF1, LOCK_CONFIG),
Dinesh Gehlot0368e432024-04-02 11:50:46 +053015};
16
17/* Early pad configuration in bootblock */
18static const struct pad_config early_gpio_table[] = {
19 /* TODO */
20};
21
Subrata Banik4050ef02024-05-24 01:40:27 +053022/* Fill romstage gpio configuration */
23static const struct pad_config romstage_gpio_table[] = {
24 /* TODO */
25};
26
27const struct pad_config *variant_gpio_table(size_t *num)
Dinesh Gehlot0368e432024-04-02 11:50:46 +053028{
29 *num = ARRAY_SIZE(gpio_table);
30 return gpio_table;
31}
32
Subrata Banik4050ef02024-05-24 01:40:27 +053033const struct pad_config *variant_gpio_override_table(size_t *num)
Dinesh Gehlot0368e432024-04-02 11:50:46 +053034{
35 *num = 0;
36 return NULL;
37}
38
Subrata Banik4050ef02024-05-24 01:40:27 +053039const struct pad_config *variant_early_gpio_table(size_t *num)
Dinesh Gehlot0368e432024-04-02 11:50:46 +053040{
41 *num = ARRAY_SIZE(early_gpio_table);
42 return early_gpio_table;
43}
44
45static const struct cros_gpio cros_gpios[] = {
46 /* TODO */
47};
48DECLARE_CROS_GPIOS(cros_gpios);
49
Subrata Banik4050ef02024-05-24 01:40:27 +053050const struct pad_config *variant_romstage_gpio_table(size_t *num)
Dinesh Gehlot0368e432024-04-02 11:50:46 +053051{
Subrata Banik4050ef02024-05-24 01:40:27 +053052 *num = ARRAY_SIZE(romstage_gpio_table);
53 return romstage_gpio_table;
Dinesh Gehlot0368e432024-04-02 11:50:46 +053054}