mb/google/brya: Create rull variant
[coreboot2.git] / src / mainboard / google / slippy / mainboard.c
blob8d470f4ba6d4db049422020098df8539c54812a4
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <smbios.h>
4 #include <cpu/x86/smm.h>
5 #include <device/device.h>
6 #include <drivers/intel/gma/int15.h>
7 #include <acpi/acpi.h>
8 #include <southbridge/intel/lynxpoint/pch.h>
9 #include "ec.h"
10 #include "onboard.h"
12 void mainboard_suspend_resume(void)
14 /* Call SMM finalize() handlers before resume */
15 apm_control(APM_CNT_FINALIZE);
18 static void mainboard_init(struct device *dev)
20 mainboard_ec_init();
23 static int mainboard_smbios_data(struct device *dev, int *handle,
24 unsigned long *current)
26 int len = 0;
28 len += smbios_write_type41(
29 current, handle,
30 BOARD_LIGHTSENSOR_NAME, /* name */
31 BOARD_LIGHTSENSOR_IRQ, /* instance */
32 BOARD_LIGHTSENSOR_I2C_BUS, /* segment */
33 BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */
34 0, /* device */
35 0, /* function */
36 SMBIOS_DEVICE_TYPE_OTHER); /* device type */
38 len += smbios_write_type41(
39 current, handle,
40 BOARD_TRACKPAD_NAME, /* name */
41 BOARD_TRACKPAD_IRQ, /* instance */
42 BOARD_TRACKPAD_I2C_BUS, /* segment */
43 BOARD_TRACKPAD_I2C_ADDR, /* bus */
44 0, /* device */
45 0, /* function */
46 SMBIOS_DEVICE_TYPE_OTHER); /* device type */
48 len += smbios_write_type41(
49 current, handle,
50 BOARD_TOUCHSCREEN_NAME, /* name */
51 BOARD_TOUCHSCREEN_IRQ, /* instance */
52 BOARD_TOUCHSCREEN_I2C_BUS, /* segment */
53 BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
54 0, /* device */
55 0, /* function */
56 SMBIOS_DEVICE_TYPE_OTHER); /* device type */
58 return len;
61 static void mainboard_enable(struct device *dev)
63 dev->ops->init = mainboard_init;
64 dev->ops->get_smbios_data = mainboard_smbios_data;
65 install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
68 struct chip_operations mainboard_ops = {
69 .enable_dev = mainboard_enable,