summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorpeichao.wang <peichao.wang@bitland.corp-partner.google.com>2019-02-15 10:15:23 +0800
committerFurquan Shaikh <furquan@google.com>2019-02-18 03:05:14 +0000
commit67100b414799c7b90c42d506de4ababdfb47119b (patch)
treec95caad3771f8d95d8b3383dc18a47a858384ca5 /src/mainboard/google
parent3ce88e1fa0f4470b75bfa31a33fee45fa6333321 (diff)
downloadcoreboot-67100b414799c7b90c42d506de4ababdfb47119b.tar.xz
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>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h3
-rw-r--r--src/mainboard/google/octopus/variants/phaser/gpio.c10
-rw-r--r--src/mainboard/google/octopus/variants/phaser/variant.c4
3 files changed, 14 insertions, 3 deletions
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 04f87968d0..96381183b8 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 @@ void variant_nhlt_init(struct nhlt *nhlt);
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 322b44b205..6883ab0831 100644
--- a/src/mainboard/google/octopus/variants/phaser/gpio.c
+++ b/src/mainboard/google/octopus/variants/phaser/gpio.c
@@ -68,13 +68,21 @@ static const struct pad_config sku1_default_override_table[] = {
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 22f4f71b92..eb080f025f 100644
--- a/src/mainboard/google/octopus/variants/phaser/variant.c
+++ b/src/mainboard/google/octopus/variants/phaser/variant.c
@@ -30,8 +30,8 @@ void variant_update_devtree(struct device *dev)
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;
}