6bb563f29c
Incorporating some feedback to initial hatch mainboard checking (CL:30169) that came in after the CL merged. Updated the chromeos.fmd with the following, * SI_ALL = 3MB * SI_BIOS = 16MB BUG=b:20914069 BRANCH=None TEST=./util/abuild/abuild -p none -t google/hatch -x -a -v Change-Id: I4e311c68873f10f71314e44d3a714639a06dbee8 Signed-off-by: Shelley Chen <shchen@google.com> Signed-off-by: V Sowmya <v.sowmya@intel.com> Reviewed-on: https://review.coreboot.org/c/30296 Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com> Reviewed-by: Subrata Banik <subrata.banik@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
51 lines
1.5 KiB
C
51 lines
1.5 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright 2018 Google LLC
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; version 2 of the License.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#include <arch/acpi.h>
|
|
#include <baseboard/variants.h>
|
|
#include <boot/coreboot_tables.h>
|
|
#include <ec/google/chromeec/ec.h>
|
|
#include <gpio.h>
|
|
#include <variant/gpio.h>
|
|
#include <vendorcode/google/chromeos/chromeos.h>
|
|
|
|
void fill_lb_gpios(struct lb_gpios *gpios)
|
|
{
|
|
struct lb_gpio chromeos_gpios[] = {
|
|
{-1, ACTIVE_HIGH, get_write_protect_state(), "write protect"},
|
|
{-1, ACTIVE_HIGH, get_recovery_mode_switch(), "recovery"},
|
|
{-1, ACTIVE_HIGH, get_lid_switch(), "lid"},
|
|
{-1, ACTIVE_HIGH, 0, "power"},
|
|
{-1, ACTIVE_HIGH, gfx_get_init_done(), "oprom"},
|
|
{GPIO_EC_IN_RW, ACTIVE_HIGH, gpio_get(GPIO_EC_IN_RW),
|
|
"EC in RW"},
|
|
};
|
|
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
|
|
}
|
|
|
|
int get_write_protect_state(void)
|
|
{
|
|
return gpio_get(GPIO_PCH_WP);
|
|
}
|
|
|
|
void mainboard_chromeos_acpi_generate(void)
|
|
{
|
|
const struct cros_gpio *cros_gpios;
|
|
size_t num_gpios = 0;
|
|
|
|
cros_gpios = variant_cros_gpios(&num_gpios);
|
|
|
|
chromeos_acpi_gpio_generate(cros_gpios, num_gpios);
|
|
}
|