drivers/mipi: Add support for KD_KD110N11_51IE panel
[coreboot2.git] / src / mainboard / google / brya / variants / marasov / fw_config.c
blob73ae600df9b9ced4ae8d5930333048e337144f9b
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootstate.h>
4 #include <console/console.h>
5 #include <fw_config.h>
6 #include <gpio.h>
8 static const struct pad_config touch_enable_pads[] = {
9 /* C0 : SMBCLK ==> EN_PP3300_TCHSCR */
10 PAD_CFG_GPO(GPP_C0, 1, DEEP),
13 static const struct pad_config touch_disable_pads[] = {
14 /* C0 : SMBCLK ==> NC */
15 PAD_NC(GPP_C0, NONE),
18 static void fw_config_handle(void *unused)
20 if (fw_config_probe(FW_CONFIG(TOUCH, TOUCH_ELAN0001))) {
21 printk(BIOS_INFO, "Configure Touch GPIO GPP_C0 to GPO_H.\n");
22 gpio_configure_pads(touch_enable_pads, ARRAY_SIZE(touch_enable_pads));
23 } else {
24 printk(BIOS_INFO, "Configure Touch GPIO GPP_C0 to NC.\n");
25 gpio_configure_pads(touch_disable_pads, ARRAY_SIZE(touch_disable_pads));
28 BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);