From b32b54842085cacf8b55a1dced643bfbaad9928d Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Mon, 29 Aug 2022 14:45:35 +0800 Subject: kinox: modify the ADP_ID value Modify the default watt to TINY 45w and the value is the real volatge, not the ADC value. And sort the TIO2 power list by max voltage. BUG=b:211806236 BRANCH=none TEST=make BOARD=kinox Signed-off-by: Matt Wang Change-Id: If22348b299363f46eb6d3ac96bd1c5e2433f0665 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3861813 Reviewed-by: Ricky Chang Commit-Queue: Ricky Chang --- board/kinox/power_detection.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/board/kinox/power_detection.c b/board/kinox/power_detection.c index 172b88b334..5e833737c2 100644 --- a/board/kinox/power_detection.c +++ b/board/kinox/power_detection.c @@ -67,15 +67,6 @@ struct adpater_id_params tio2_power[] = { .obp95 = 1080, .obp85 = 960, }, - { - .min_voltage = 531, - .max_voltage = 607, - .charge_voltage = 20000, - .charge_current = 6000, - .watt = 120, - .obp95 = 1990, - .obp85 = 1780, - }, { .min_voltage = 384, .max_voltage = 480, @@ -85,6 +76,15 @@ struct adpater_id_params tio2_power[] = { .obp95 = 2490, .obp85 = 2220, }, + { + .min_voltage = 531, + .max_voltage = 607, + .charge_voltage = 20000, + .charge_current = 6000, + .watt = 120, + .obp95 = 1990, + .obp85 = 1780, + }, { .min_voltage = 1062, .max_voltage = 1126, @@ -356,8 +356,8 @@ void adp_id_deferred(void) adp_type = TINY; } else { CPRINTS("ADP_ID mismatch anything!"); - /* Set the default 65w adaptor max ADC value */ - adp_finial_adc_value = 0x69; + /* Set the default TINY 45w adapter */ + adp_finial_adc_value = 142; adp_type = TINY; } @@ -392,9 +392,9 @@ static void barrel_jack_setting(void) struct charge_port_info pi = { 0 }; /* Check ADP_ID when barrel jack is present */ if (!gpio_get_level(GPIO_BJ_ADP_PRESENT_ODL)) { - /* Set the default 65w adaptor */ + /* Set the default TINY 45w adapter */ pi.voltage = 20000; - pi.current = 3250; + pi.current = 2250; charge_manager_update_charge(CHARGE_SUPPLIER_DEDICATED, DEDICATED_CHARGE_PORT, &pi); -- cgit v1.2.1