Jon Murphy | 960fb2f | 2022-02-16 06:45:49 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #include <baseboard/gpio.h> |
Jon Murphy | af025d6 | 2022-02-16 06:44:53 -0700 | [diff] [blame] | 4 | #include <boot/coreboot_tables.h> |
| 5 | #include <bootmode.h> |
| 6 | #include <gpio.h> |
Jon Murphy | 960fb2f | 2022-02-16 06:45:49 -0700 | [diff] [blame] | 7 | #include <vendorcode/google/chromeos/chromeos.h> |
| 8 | |
Jon Murphy | af025d6 | 2022-02-16 06:44:53 -0700 | [diff] [blame] | 9 | void fill_lb_gpios(struct lb_gpios *gpios) |
| 10 | { |
| 11 | struct lb_gpio chromeos_gpios[] = { |
Jon Murphy | cbf0f98 | 2022-02-16 06:47:46 -0700 | [diff] [blame^] | 12 | {-1, ACTIVE_HIGH, get_lid_switch(), "lid"}, |
Jon Murphy | af025d6 | 2022-02-16 06:44:53 -0700 | [diff] [blame] | 13 | {-1, ACTIVE_HIGH, 0, "power"}, |
| 14 | }; |
| 15 | lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); |
| 16 | } |
| 17 | |
Jon Murphy | 960fb2f | 2022-02-16 06:45:49 -0700 | [diff] [blame] | 18 | static const struct cros_gpio cros_gpios[] = { |
| 19 | CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, GPIO_DEVICE_NAME), |
| 20 | CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME), |
| 21 | }; |
| 22 | |
| 23 | void mainboard_chromeos_acpi_generate(void) |
| 24 | { |
| 25 | chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios)); |
| 26 | } |