diff options
-rw-r--r-- | src/mainboard/google/hatch/variants/dratini/include/variant/sku.h | 8 | ||||
-rw-r--r-- | src/mainboard/google/hatch/variants/dratini/ramstage.c | 34 |
2 files changed, 33 insertions, 9 deletions
diff --git a/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h b/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h index c44e0dbdbe..89f670821e 100644 --- a/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h +++ b/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h @@ -4,6 +4,14 @@ #define __MAINBOARD_SKU_H__ enum { + SKU_1_DRATINI = 1, + SKU_2_DRATINI = 2, + SKU_3_DRATINI = 3, + SKU_4_DRATINI = 4, + SKU_5_DRATINI = 5, + SKU_6_DRATINI = 6, + SKU_7_DRATINI = 7, + SKU_8_DRATINI = 8, SKU_21_DRAGONAIR = 21, SKU_22_DRAGONAIR = 22, SKU_23_DRAGONAIR = 23, diff --git a/src/mainboard/google/hatch/variants/dratini/ramstage.c b/src/mainboard/google/hatch/variants/dratini/ramstage.c index 240bcaeb93..302ef83c55 100644 --- a/src/mainboard/google/hatch/variants/dratini/ramstage.c +++ b/src/mainboard/google/hatch/variants/dratini/ramstage.c @@ -3,16 +3,32 @@ #include <delay.h> #include <gpio.h> #include <baseboard/variants.h> +#include <variant/sku.h> +#include <ec/google/chromeec/ec.h> void variant_ramstage_init(void) { - /* - * Enable power to FPMCU, wait for power rail to stabilize, - * and then deassert FPMCU reset. - * Waiting for the power rail to stabilize can take a while, - * a minimum of 400us on Kohaku. - */ - gpio_output(GPP_C11, 1); - mdelay(4); - gpio_output(GPP_A12, 1); + uint32_t sku_id = google_chromeec_get_board_sku(); + + switch (sku_id) { + case SKU_2_DRATINI: + case SKU_4_DRATINI: + case SKU_6_DRATINI: + case SKU_8_DRATINI: + case SKU_21_DRAGONAIR: + case SKU_22_DRAGONAIR: + /* + * Enable power to FPMCU, wait for power rail to stabilize, + * and then deassert FPMCU reset. + * Waiting for the power rail to stabilize can take a while, + * a minimum of 400us on Kohaku. + */ + gpio_output(GPP_C11, 1); + mdelay(4); + gpio_output(GPP_A12, 1); + break; + default: + /* SKU does not have FP Sensor, do not enable FPMCU */ + break; + } } |