mb/google/nissa/var/gothrax: Add probe and GPIO config for HDMI and
[coreboot2.git] / src / soc / mediatek / mt8195 / gpio.c
blob610cf056a34a28cc32a7253a2d30f5187d871dc8
1 /* SPDX-License-Identifier: GPL-2.0-only OR MIT */
3 #include <device/mmio.h>
4 #include <gpio.h>
6 void *gpio_find_reg_addr(gpio_t gpio)
8 void *reg_addr;
9 switch (gpio.base & 0x0f) {
10 case 0:
11 reg_addr = (void *)IOCFG_BL_BASE;
12 break;
13 case 1:
14 reg_addr = (void *)IOCFG_BM_BASE;
15 break;
16 case 2:
17 reg_addr = (void *)IOCFG_BR_BASE;
18 break;
19 case 3:
20 reg_addr = (void *)IOCFG_LM_BASE;
21 break;
22 case 4:
23 reg_addr = (void *)IOCFG_RB_BASE;
24 break;
25 case 5:
26 reg_addr = (void *)IOCFG_TL_BASE;
27 break;
28 default:
29 reg_addr = NULL;
30 break;
33 return reg_addr;