mb/google/nissa/var/rull: Add 6W and 15W DPTF parameters
[coreboot2.git] / src / mainboard / google / rambi / mainboard.c
blobdf27e39724a7bbacec5a11940573f18cd79df034
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/device.h>
4 #include <smbios.h>
5 #include "ec.h"
6 #include <variant/onboard.h>
7 #include <soc/gpio.h>
8 #include <soc/int15.h>
9 #include <bootstate.h>
11 static void mainboard_init(struct device *dev)
13 mainboard_ec_init();
14 #if CONFIG(BOARD_GOOGLE_NINJA) || CONFIG(BOARD_GOOGLE_SUMO)
15 lan_init();
16 #endif
19 static int mainboard_smbios_data(struct device *dev, int *handle,
20 unsigned long *current)
22 int len = 0;
23 #ifdef BOARD_TRACKPAD_NAME
24 len += smbios_write_type41(
25 current, handle,
26 BOARD_TRACKPAD_NAME, /* name */
27 BOARD_TRACKPAD_IRQ, /* instance */
28 BOARD_TRACKPAD_I2C_BUS, /* segment */
29 BOARD_TRACKPAD_I2C_ADDR, /* bus */
30 0, /* device */
31 0, /* function */
32 SMBIOS_DEVICE_TYPE_OTHER); /* device type */
33 #endif
34 #ifdef BOARD_TOUCHSCREEN_NAME
35 len += smbios_write_type41(
36 current, handle,
37 BOARD_TOUCHSCREEN_NAME, /* name */
38 BOARD_TOUCHSCREEN_IRQ, /* instance */
39 BOARD_TOUCHSCREEN_I2C_BUS, /* segment */
40 BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
41 0, /* device */
42 0, /* function */
43 SMBIOS_DEVICE_TYPE_OTHER); /* device type */
44 #endif
45 return len;
48 static void mainboard_enable(struct device *dev)
50 dev->ops->init = mainboard_init;
51 dev->ops->get_smbios_data = mainboard_smbios_data;
53 /* Install custom int15 handler for VGA OPROM */
54 if (CONFIG(VGA_ROM_RUN))
55 install_baytrail_vga_int15_handler();
58 struct chip_operations mainboard_ops = {
59 .enable_dev = mainboard_enable,
62 static void edp_vdden_cb(void *unused)
64 ncore_select_func(SOC_DDI1_VDDEN_PAD, PAD_FUNC2);
67 BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, edp_vdden_cb, NULL);