diff options
Diffstat (limited to 'src/mainboard')
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; } |