[coreboot-gerrit] Change in coreboot[master]: mb/google/poppy/variants/nami: Add gpio-keys ACPI node for PENH

Shelley Chen (Code Review) gerrit at coreboot.org
Wed Mar 14 19:27:22 CET 2018


Shelley Chen has uploaded this change for review. ( https://review.coreboot.org/25162


Change subject: mb/google/poppy/variants/nami: Add gpio-keys ACPI node for PENH
......................................................................

mb/google/poppy/variants/nami: Add gpio-keys ACPI node for PENH

Use gpio_keys driver to add ACPI node for pen eject event.  Also
setting gpio wake pin for wake events.

BUG=b:73121017
BRANCH=None
TEST=./util/abuild/abuild -p none -t google/poppy -x -a

Change-Id: I5d87d938ac3a4e52e676850b9d8b80e83726275d
Signed-off-by: Shelley Chen <shchen at chromium.org>
---
M src/mainboard/google/poppy/variants/nami/devicetree.cb
M src/mainboard/google/poppy/variants/nami/gpio.c
2 files changed, 13 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/25162/1

diff --git a/src/mainboard/google/poppy/variants/nami/devicetree.cb b/src/mainboard/google/poppy/variants/nami/devicetree.cb
index 602e41b..913d29e 100644
--- a/src/mainboard/google/poppy/variants/nami/devicetree.cb
+++ b/src/mainboard/google/poppy/variants/nami/devicetree.cb
@@ -282,6 +282,15 @@
                                 register "hid_desc_reg_offset" = "0x1"
                                 device i2c 0x9 on end
                         end
+			chip drivers/generic/gpio_keys
+				register "name" = ""PENH""
+				register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPP_E8)"
+				register "key.dev_name" = ""EJCT""
+				register "key.linux_code" = "SW_PEN_INSERTED"
+				register "key.linux_input_type" = "EV_SW"
+				register "key.label" = ""pen_eject""
+				device generic 0 on end
+			end
 		end # I2C #2
 		device pci 15.3 on
 			chip drivers/generic/max98357a
diff --git a/src/mainboard/google/poppy/variants/nami/gpio.c b/src/mainboard/google/poppy/variants/nami/gpio.c
index 8337e72..01204e7 100644
--- a/src/mainboard/google/poppy/variants/nami/gpio.c
+++ b/src/mainboard/google/poppy/variants/nami/gpio.c
@@ -211,8 +211,8 @@
 
 	/* E0  : SATAXPCI0 ==> H1_PCH_INT_ODL */
 	PAD_CFG_GPI_APIC_INVERT(GPP_E0, NONE, PLTRST),
-	/* E1  : SATAXPCIE1 ==> SATA_GP1 */
-	PAD_CFG_NF(GPP_E1, NONE, DEEP, NF1),
+	/* E1  : SATAXPCIE1 ==> PEN_EJECT_ODL - for wake event */
+	PAD_CFG_GPI_GPIO_DRIVER(GPP_E1, NONE, DEEP),
 	/* E2  : SATAXPCIE2 ==> NC(TP916) */
 	PAD_CFG_NC(GPP_E2),
 	/* E3  : CPU_GP0 ==> TRACKPAD_INT# */
@@ -225,8 +225,8 @@
 	PAD_CFG_NC(GPP_E6),
 	/* E7  : CPU_GP1 ==> TOUCHSCREEN_INT# */
 	PAD_CFG_GPI_APIC(GPP_E7, NONE, PLTRST),
-	/* E8  : SATALED# ==> NC */
-	PAD_CFG_NC(GPP_E8),
+	/* E8  : SATALED# ==> PEN_EJECT_ODL - for notification */
+	PAD_CFG_GPI_ACPI_SCI(GPP_E8, NONE, DEEP, NONE),
 	/* E9  : USB2_OCO# ==> USB_C0_OC# */
 	PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1),
 	/* E10 : USB2_OC1# ==> USB_C1_OC# */

-- 
To view, visit https://review.coreboot.org/25162
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d87d938ac3a4e52e676850b9d8b80e83726275d
Gerrit-Change-Number: 25162
Gerrit-PatchSet: 1
Gerrit-Owner: Shelley Chen <shchen at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180314/f8c0e470/attachment-0001.html>


More information about the coreboot-gerrit mailing list