Furquan Shaikh has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31428 )
Change subject: mb/google/laser: Disable touch screen device that according to SKU ID ......................................................................
mb/google/laser: Disable touch screen device that according to SKU ID
We need disable touch screen device on laser SKU ID 6.
BUG=none TEST=according to sku_id (Laser(convertible): 5, Laser14(clamshell): 6, Laser14(clamshell + touch):7) distinguish whether disable touch screen device.
Signed-off-by: peichao.wang peichao.wang@bitland.corp-partner.google.com Change-Id: I6953c35a5e8c93d88fe63362156faa351e8ee71f Reviewed-on: https://review.coreboot.org/c/31428 Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h M src/mainboard/google/octopus/variants/phaser/gpio.c M src/mainboard/google/octopus/variants/phaser/variant.c 3 files changed, 14 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Peichao Li: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h index 04f8796..9638118 100644 --- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h @@ -46,4 +46,7 @@ struct device; void variant_update_devtree(struct device *dev);
+/* Get no touchscreen SKU ID. */ +bool no_touchscreen_sku(uint32_t sku_id); + #endif /* BASEBOARD_VARIANTS_H */ diff --git a/src/mainboard/google/octopus/variants/phaser/gpio.c b/src/mainboard/google/octopus/variants/phaser/gpio.c index 322b44b..6883ab0 100644 --- a/src/mainboard/google/octopus/variants/phaser/gpio.c +++ b/src/mainboard/google/octopus/variants/phaser/gpio.c @@ -68,13 +68,21 @@ PAD_NC(GPIO_214, DN_20K), };
+bool no_touchscreen_sku(uint32_t sku_id) +{ + if ((sku_id == 1) || (sku_id == 6)) + return true; + else + return false; +} + const struct pad_config *variant_override_gpio_table(size_t *num) { const struct pad_config *c; uint32_t sku_id = SKU_UNKNOWN;
google_chromeec_cbi_get_sku_id(&sku_id); - if (sku_id == 1) { + if (no_touchscreen_sku(sku_id)) { c = sku1_default_override_table; *num = ARRAY_SIZE(sku1_default_override_table); } else { diff --git a/src/mainboard/google/octopus/variants/phaser/variant.c b/src/mainboard/google/octopus/variants/phaser/variant.c index 22f4f71..eb080f0 100644 --- a/src/mainboard/google/octopus/variants/phaser/variant.c +++ b/src/mainboard/google/octopus/variants/phaser/variant.c @@ -30,8 +30,8 @@ if (touchscreen_i2c_host == NULL) return;
- /* SKU ID 1 does not have a touchscreen device, hence disable it. */ + /* SKU ID 1, 6 does not have a touchscreen device, hence disable it. */ google_chromeec_cbi_get_sku_id(&sku_id); - if (sku_id == 1) + if (no_touchscreen_sku(sku_id)) touchscreen_i2c_host->enabled = 0; }