1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
/*
* This file is part of the coreboot project.
*
* Copyright 2018 Google LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*/
#include <arch/acpi.h>
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <commonlib/helpers.h>
static const struct pad_config gpio_table[] = {
/* SD_1P8_SEL => NC */
PAD_NC(GPP_A16, DN_20K),
/* EN_PP3300_SD_DX */
PAD_CFG_NF(GPP_A17, NONE, DEEP, NF1),
/* TRACKPAD_INT_ODL */
PAD_CFG_GPI_APIC(GPP_A21, NONE, PLTRST, LEVEL, INVERT),
/* SRCCLKREQ1 */
PAD_CFG_NF(GPP_B6, NONE, DEEP, NF1),
/* PCIE_14_WLAN_CLKREQ_ODL */
PAD_CFG_NF(GPP_B8, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_CS_L */
PAD_CFG_NF(GPP_B15, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_CLK */
PAD_CFG_NF(GPP_B16, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_MISO_R */
PAD_CFG_NF(GPP_B17, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_MOSI_R */
PAD_CFG_NF(GPP_B18, NONE, DEEP, NF1),
/* TOUCHSCREEN_DIS_L */
PAD_CFG_GPO(GPP_C4, 0, DEEP),
/* PCIE_14_WLAN_WAKE_ODL */
PAD_CFG_GPI_SCI_LOW(GPP_C1, NONE, DEEP, EDGE_SINGLE),
/* GPP_C10_TP */
PAD_NC(GPP_C10, DN_20K),
/* GPP_C11_TP */
PAD_NC(GPP_C11, DN_20K),
/* BT_DISABLE_L */
PAD_CFG_GPO(GPP_C14, 1, DEEP),
/* PCH_I2C_TRACKPAD_SDA */
PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1),
/* PCH_I2C_TRACKPAD_SCL */
PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1),
/* PCH_I2C_TOUCHSCREEN_SDA */
PAD_CFG_NF(GPP_C18, NONE, DEEP, NF1),
/* PCH_I2C_TOUCHSCREEN_SCL */
PAD_CFG_NF(GPP_C19, NONE, DEEP, NF1),
/* PCH_WP_OD */
PAD_CFG_GPI(GPP_C20, NONE, DEEP),
/* H1_PCH_INT_ODL */
PAD_CFG_GPI_APIC(GPP_C21, NONE, DEEP, LEVEL, INVERT),
/* EC_IN_RW_OD */
PAD_CFG_GPI(GPP_C22, NONE, DEEP),
/* WLAN_PE_RST# */
PAD_CFG_GPO(GPP_C23, 1, DEEP),
/* TOUCHSCREEN_RST_L */
PAD_CFG_GPO(GPP_D15, 0, DEEP),
/* TOUCHSCREEN_INT_L */
PAD_CFG_GPI_APIC(GPP_D16, NONE, DEEP, LEVEL, INVERT),
/* SATAGP1 */
PAD_CFG_NF(GPP_E1, NONE, DEEP, NF2),
/* M2_SSD_PE_WAKE_ODL */
PAD_CFG_GPI(GPP_E4, NONE, DEEP),
/* SATA_DEVSLP1 */
PAD_CFG_NF(GPP_E5, NONE, DEEP, NF1),
/* USB_C_OC_OD USB_OC2*/
PAD_CFG_NF(GPP_E11, NONE, DEEP, NF1),
/* USB_A_OC_OD USB_OC3*/
PAD_CFG_NF(GPP_E12, NONE, DEEP, NF1),
/* USB_C0_DP_HPD */
PAD_CFG_NF(GPP_E13, NONE, DEEP, NF1),
/* DDI2_HPD_ODL */
PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1),
/* DDPD_HPD2 => NC */
PAD_NC(GPP_E15, DN_20K),
/* DDPE_HPD2 => NC */
PAD_NC(GPP_E16, DN_20K),
/* EDP_HPD */
PAD_CFG_NF(GPP_E17, NONE, DEEP, NF1),
/* DDPB_CTRLCLK => NC */
PAD_NC(GPP_E18, DN_20K),
/* DDPC_CTRLCLK => NC */
PAD_NC(GPP_E20, DN_20K),
/* DDPD_CTRLCLK => NC */
PAD_NC(GPP_E22, DN_20K),
/* GPIO_WWAN_WLAN_COEX3 */
PAD_CFG_NF(GPP_F0, NONE, DEEP, NF1),
/* UART_WWANTX_WLANRX_COEX1 */
PAD_CFG_NF(GPP_F8, NONE, DEEP, NF1),
/* UART_WWANRX_WLANTX_COEX2 */
PAD_CFG_NF(GPP_F9, NONE, DEEP, NF1),
/* PCH_MEM_STRAP0 */
PAD_CFG_GPI(GPP_F20, NONE, PLTRST),
/* PCH_MEM_STRAP1 */
PAD_CFG_GPI(GPP_F21, NONE, PLTRST),
/* PCH_MEM_STRAP2 */
PAD_CFG_GPI(GPP_F11, NONE, PLTRST),
/* PCH_MEM_STRAP3 */
PAD_CFG_GPI(GPP_F22, NONE, PLTRST),
/* SD_CMD */
PAD_CFG_NF(GPP_G0, NONE, DEEP, NF1),
/* SD_DATA0 */
PAD_CFG_NF(GPP_G1, NONE, DEEP, NF1),
/* SD_DATA1 */
PAD_CFG_NF(GPP_G2, NONE, DEEP, NF1),
/* SD_DATA2 */
PAD_CFG_NF(GPP_G3, NONE, DEEP, NF1),
/* SD_DATA3 */
PAD_CFG_NF(GPP_G4, NONE, DEEP, NF1),
/* SD_CD# */
PAD_CFG_NF(GPP_G5, NONE, DEEP, NF1),
/* SD_CLK */
PAD_CFG_NF(GPP_G6, NONE, DEEP, NF1),
/* SD_WP => NC */
PAD_NC(GPP_G7, DN_20K),
};
const struct pad_config *__weak variant_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(gpio_table);
return gpio_table;
}
/* GPIOs needed prior to ramstage. */
static const struct pad_config early_gpio_table[] = {
/* H1_SLAVE_SPI_CS_L */
PAD_CFG_NF(GPP_B15, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_CLK */
PAD_CFG_NF(GPP_B16, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_MISO_R */
PAD_CFG_NF(GPP_B17, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_MOSI_R */
PAD_CFG_NF(GPP_B18, NONE, DEEP, NF1),
/* H1_PCH_INT_ODL */
PAD_CFG_GPI_APIC(GPP_C21, NONE, DEEP, LEVEL, INVERT),
/* WLAN_PE_RST# */
PAD_CFG_GPO(GPP_C23, 1, DEEP),
};
const struct pad_config *__weak variant_early_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(early_gpio_table);
return early_gpio_table;
}
static const struct cros_gpio cros_gpios[] = {
};
const struct cros_gpio *__weak variant_cros_gpios(size_t *num)
{
*num = ARRAY_SIZE(cros_gpios);
return cros_gpios;
}
|