diff options
Diffstat (limited to 'src/mainboard/google/fizz/mainboard.c')
-rw-r--r-- | src/mainboard/google/fizz/mainboard.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainboard/google/fizz/mainboard.c b/src/mainboard/google/fizz/mainboard.c index daf9da4388..9f35411c24 100644 --- a/src/mainboard/google/fizz/mainboard.c +++ b/src/mainboard/google/fizz/mainboard.c @@ -104,8 +104,9 @@ static void mainboard_set_power_limits(config_t *conf) { enum usb_chg_type type; u32 watts; + u16 volts_mv, current_ma; u32 pl2, psyspl2; - int rv = google_chromeec_get_usb_pd_power_info(&type, &watts); + int rv = google_chromeec_get_usb_pd_power_info(&type, ¤t_ma, &volts_mv); uint8_t sku = board_sku_id(); const uint32_t u42_mask = (1 << FIZZ_SKU_ID_I7_U42) | (1 << FIZZ_SKU_ID_I5_U42) | @@ -126,6 +127,7 @@ static void mainboard_set_power_limits(config_t *conf) psyspl2 = FIZZ_PSYSPL2_U42; } else { /* Detected TypeC. Base on max value of adapter */ + watts = ((u32)volts_mv * current_ma) / 1000000; psyspl2 = watts; conf->tdp_psyspl3 = SET_PSYSPL2(psyspl2); /* set max possible time window */ |