1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/device.h>
6 #include <variant/onboard.h>
11 static void mainboard_init(struct device
*dev
)
14 #if CONFIG(BOARD_GOOGLE_NINJA) || CONFIG(BOARD_GOOGLE_SUMO)
19 static int mainboard_smbios_data(struct device
*dev
, int *handle
,
20 unsigned long *current
)
23 #ifdef BOARD_TRACKPAD_NAME
24 len
+= smbios_write_type41(
26 BOARD_TRACKPAD_NAME
, /* name */
27 BOARD_TRACKPAD_IRQ
, /* instance */
28 BOARD_TRACKPAD_I2C_BUS
, /* segment */
29 BOARD_TRACKPAD_I2C_ADDR
, /* bus */
32 SMBIOS_DEVICE_TYPE_OTHER
); /* device type */
34 #ifdef BOARD_TOUCHSCREEN_NAME
35 len
+= smbios_write_type41(
37 BOARD_TOUCHSCREEN_NAME
, /* name */
38 BOARD_TOUCHSCREEN_IRQ
, /* instance */
39 BOARD_TOUCHSCREEN_I2C_BUS
, /* segment */
40 BOARD_TOUCHSCREEN_I2C_ADDR
, /* bus */
43 SMBIOS_DEVICE_TYPE_OTHER
); /* device type */
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
);