aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/glados/variants/caroline/include/variant/acpi/mainboard.asl
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2018-07-08 19:22:05 -0500
committerMartin Roth <martinroth@google.com>2018-07-24 12:04:37 +0000
commit19e7060d7f485ae8f5860f11c7aa26235aaace06 (patch)
treed5772bcc9ded712e3747dd91d96831f8efc1c6b4 /src/mainboard/google/glados/variants/caroline/include/variant/acpi/mainboard.asl
parent57dd0733699e5994ac3481cb4913ae5cea8ac857 (diff)
google/caroline: Add as a variant of glados
Add google/caroline (Samsung Chromebook Pro) as a variant of glados Skylake reference board: - add caroline-specific DPTF, EC config, GPIO config, Kconfig, NHLT config, PEI data, VBT, SPD data, and devicetree - add caroline-specific memory-init param to romstage - adjust mainboard EC SCI events for boards with tablet function Adapted from Chromium branch firmware-glados-7820.B, commit b0c3efe54d877246d07f2467b2dff51cc30348fa [soc/intel/skylake: Enable VMX] Test: build/boot google/caroline, verify correct functionality Change-Id: I611a4e76581ba2e5b42e1bc48b0a5b8c70f3598e Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/27419 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/mainboard/google/glados/variants/caroline/include/variant/acpi/mainboard.asl')
-rw-r--r--src/mainboard/google/glados/variants/caroline/include/variant/acpi/mainboard.asl128
1 files changed, 128 insertions, 0 deletions
diff --git a/src/mainboard/google/glados/variants/caroline/include/variant/acpi/mainboard.asl b/src/mainboard/google/glados/variants/caroline/include/variant/acpi/mainboard.asl
new file mode 100644
index 0000000000..19c883483b
--- /dev/null
+++ b/src/mainboard/google/glados/variants/caroline/include/variant/acpi/mainboard.asl
@@ -0,0 +1,128 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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 <variant/gpio.h>
+
+#define BOARD_DIG_I2C_ADDR 0x09
+#define BOARD_DIG_IRQ DIG_INT_L
+#define BOARD_DIG_PDCT DIG_PDCT_L
+#define BOARD_DIG_EJECT GPE_DIG_EJECT
+
+Scope (\_SB)
+{
+ Device (PENH)
+ {
+ Name (_HID, "PRP0001")
+
+ Name (_CRS, ResourceTemplate () {
+ GpioIo (Exclusive, PullNone, 0, 0, IoRestrictionInputOnly,
+ "\\_SB.PCI0.GPIO", 0, ResourceConsumer) { GPIO_DIG_EJECT }
+ })
+
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () {
+ "compatible",
+ Package () { "gpio-keys"}
+ },
+ }
+ })
+
+ Device (EJCT)
+ {
+ Name (_ADR, Zero)
+
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ /* SW_PEN_INSERTED */
+ Package () { "linux,code", 0xf },
+ /* EV_SW type */
+ Package () { "linux,input-type", 0x5 },
+ Package () { "label", "pen_eject" },
+ Package () { "gpios",
+ Package () {
+ ^^PENH, 0, 0, 1 /* inserted active low */
+ }
+ },
+ }
+ })
+ }
+ }
+}
+
+Scope (\_SB.PCI0.I2C2)
+{
+ Name (FMCN, Package () { 87, 197, 26 })
+
+ Device (DIGI)
+ {
+ Name (_HID, "ACPI0C50")
+ Name (_CID, "PNP0C50")
+ Name (_UID, 1)
+ Name (_S0W, 4)
+ Name (_PRW, Package () { BOARD_DIG_EJECT, 3 })
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ I2cSerialBus (
+ BOARD_DIG_I2C_ADDR,
+ ControllerInitiated,
+ 400000,
+ AddressingMode7Bit,
+ "\\_SB.PCI0.I2C2",
+ )
+ Interrupt (ResourceConsumer, Level, ActiveLow)
+ {
+ BOARD_DIG_IRQ
+ }
+ })
+
+ /*
+ * Function 1 returns the offset in the I2C device register
+ * address space at which the HID descriptor can be read.
+ *
+ * Arg0 = UUID
+ * Arg1 = revision number of requested function
+ * Arg2 = requested function number
+ * Arg3 = function specific parameter
+ */
+ Method (_DSM, 4, NotSerialized)
+ {
+ If (LEqual (Arg0, ToUUID
+ ("3cdff6f7-4267-4555-ad05-b30a3d8938de"))) {
+ If (LEqual (Arg2, Zero)) {
+ /* Function 0 - Query */
+ If (LEqual (Arg1, One)) {
+ /* Revision 1 Function 1 */
+ Return (Buffer (One) { 0x03 })
+ } Else {
+ /* Revision 2+ not supported */
+ Return (Buffer (One) { 0x00 })
+ }
+ } ElseIf (LEqual (Arg2, One)) {
+ /* Function 1 - HID Descriptor Addr */
+ Return (0x0001)
+ } Else {
+ /* Function 2+ not supported */
+ Return (Buffer (One) { 0x00 })
+ }
+ } Else {
+ Return (Buffer (One) { 0x00 })
+ }
+ }
+ }
+}