[coreboot-gerrit] Change in coreboot[master]: mb/google/eve: Add power controls to touchscreen device

Duncan Laurie (Code Review) gerrit at coreboot.org
Wed May 31 01:26:22 CEST 2017


Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/19946 )

Change subject: mb/google/eve: Add power controls to touchscreen device
......................................................................


mb/google/eve: Add power controls to touchscreen device

Instead of having the SMI handler power off the touchscreen on the
way into suspend add power resource controls to the ACPI device so
the power is managed by the kernel instead of the BIOS.

BUG=b:35581264
TEST=manual testing on Eve to ensure that the touchscreen is still
functional at boot and after suspend/resume, and that it does not
draw power in suspend.

Change-Id: Id9a98807d24bbc7dff32408f3d113f6fad5bc023
Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
Reviewed-on: https://review.coreboot.org/19946
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
M src/mainboard/google/eve/devicetree.cb
M src/mainboard/google/eve/gpio.h
M src/mainboard/google/eve/smihandler.c
3 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Aaron Durbin: Looks good to me, approved
  build bot (Jenkins): Verified



diff --git a/src/mainboard/google/eve/devicetree.cb b/src/mainboard/google/eve/devicetree.cb
index 487dda3..e255a7a 100644
--- a/src/mainboard/google/eve/devicetree.cb
+++ b/src/mainboard/google/eve/devicetree.cb
@@ -233,6 +233,10 @@
 				register "generic.desc" = ""WCOM Digitizer""
 				register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E7_IRQ)"
 				register "generic.speed" = "I2C_SPEED_FAST_PLUS"
+				register "generic.has_power_resource" = "1"
+				register "generic.disable_gpio_export_in_crs" = "1"
+				register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C22)"
+				register "generic.enable_delay_ms" = "250"
 				register "hid_desc_reg_offset" = "0x1"
 				device i2c 0a on end
 			end
diff --git a/src/mainboard/google/eve/gpio.h b/src/mainboard/google/eve/gpio.h
index b5c2694..f174d9c 100644
--- a/src/mainboard/google/eve/gpio.h
+++ b/src/mainboard/google/eve/gpio.h
@@ -38,7 +38,6 @@
 #define EC_SCI_GPI		GPE0_ESPI
 
 /* Power rail control signals */
-#define EN_PP3300_DX_TOUCH	GPP_C22
 #define EN_PP3300_DX_CAM	GPP_D12
 
 #ifndef __ACPI__
@@ -117,7 +116,7 @@
 /* I2C1_SCL */		PAD_CFG_NF(GPP_C19, NONE, DEEP, NF1), /* TPM */
 /* UART2_RXD */		PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), /* SERVO */
 /* UART2_TXD */		PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), /* SERVO */
-/* UART2_RTS# */	PAD_CFG_GPO(GPP_C22, 1, DEEP), /* EN_PP3300_DX_TOUCHSCREEN */
+/* UART2_RTS# */	PAD_CFG_GPO(GPP_C22, 0, DEEP), /* EN_PP3300_DX_TOUCHSCREEN */
 /* UART2_CTS# */	PAD_CFG_GPI(GPP_C23, 20K_PU, DEEP), /* PCH_WP */
 
 /* SPI1_CS# */		PAD_CFG_GPO(GPP_D0, 0, DEEP), /* TOUCHPAD_BOOT */
diff --git a/src/mainboard/google/eve/smihandler.c b/src/mainboard/google/eve/smihandler.c
index 879131c..493a334 100644
--- a/src/mainboard/google/eve/smihandler.c
+++ b/src/mainboard/google/eve/smihandler.c
@@ -29,7 +29,6 @@
 static void mainboard_gpio_smi_sleep(u8 slp_typ)
 {
 	/* Power down the rails on any sleep type */
-	gpio_set(EN_PP3300_DX_TOUCH, 0);
 	gpio_set(EN_PP3300_DX_CAM, 0);
 }
 

-- 
To view, visit https://review.coreboot.org/19946
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9a98807d24bbc7dff32408f3d113f6fad5bc023
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>



More information about the coreboot-gerrit mailing list