2 * This file is part of the coreboot project.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
16 * This file is created based on Intel Tiger Lake Processor PCH Datasheet
17 * Document number: 575857
21 #include <intelblocks/sd.h>
22 #include <soc/soc_chip.h>
24 int sd_fill_soc_gpio_info(struct acpi_gpio
*gpio
, struct device
*dev
)
26 config_t
*config
= config_of(dev
);
28 if (!config
->sdcard_cd_gpio
)
31 gpio
->type
= ACPI_GPIO_TYPE_INTERRUPT
;
32 gpio
->pull
= ACPI_GPIO_PULL_NONE
;
33 gpio
->irq
.mode
= ACPI_IRQ_EDGE_TRIGGERED
;
34 gpio
->irq
.polarity
= ACPI_IRQ_ACTIVE_BOTH
;
35 gpio
->irq
.shared
= ACPI_IRQ_SHARED
;
36 gpio
->irq
.wake
= ACPI_IRQ_WAKE
;
37 gpio
->interrupt_debounce_timeout
= 10000; /* 100ms */
39 gpio
->pins
[0] = config
->sdcard_cd_gpio
;