mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / getac / p470 / mainboard.c
blob75f736a6b8d678ff437959499bcbb6672491f4b3
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/device.h>
4 #include <device/pci_ops.h>
5 #include <drivers/intel/gma/int15.h>
8 #include "ec_oem.c"
10 #include "mainboard.h"
12 #define MAX_LCD_BRIGHTNESS 0xd8
14 static void ec_enable(void)
16 u16 keymap;
17 /* Enable Hotkey SCI */
19 /* Fn key map; F1 = [0] ... F12 = [11] */
20 keymap = 0x5f1;
21 send_ec_oem_command(0x45);
22 send_ec_oem_data(0x09); // SCI
23 // send_ec_oem_data(0x08); // SMI#
24 send_ec_oem_data(keymap >> 8);
25 send_ec_oem_data(keymap & 0xff);
27 /* Enable Backlight */
28 ec_write(0x17, MAX_LCD_BRIGHTNESS);
30 /* Notify EC system is in ACPI mode */
31 send_ec_oem_command(0x5e);
32 send_ec_oem_data(0xea);
33 send_ec_oem_data(0x0c);
34 send_ec_oem_data(0x01);
37 static void mainboard_init(struct device *dev)
39 ec_enable();
40 install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_TXT_STRETCH, 0, 3);
43 static void mainboard_enable(struct device *dev)
45 dev->ops->init = mainboard_init;
46 dev->ops->write_acpi_tables = mainboard_write_acpi_tables;
49 struct chip_operations mainboard_ops = {
50 .enable_dev = mainboard_enable,