diff options
-rw-r--r-- | baseboard/kukui/usb_pd_policy.c | 12 | ||||
-rw-r--r-- | board/damu/board.c | 6 | ||||
-rw-r--r-- | board/jacuzzi/board.c | 6 | ||||
-rw-r--r-- | board/kappa/board.c | 6 |
4 files changed, 10 insertions, 20 deletions
diff --git a/baseboard/kukui/usb_pd_policy.c b/baseboard/kukui/usb_pd_policy.c index b88f85219e..95fbdf0163 100644 --- a/baseboard/kukui/usb_pd_policy.c +++ b/baseboard/kukui/usb_pd_policy.c @@ -3,6 +3,7 @@ * found in the LICENSE file. */ +#include "charge_state_v2.h" #include "charger.h" #include "console.h" #include "gpio.h" @@ -49,7 +50,10 @@ int pd_set_power_supply_ready(int port) /* Provide VBUS */ vbus_en = 1; - charger_enable_otg_power(1); + if (IS_ENABLED(VARIANT_KUKUI_CHARGER_ISL9238)) + charge_set_output_current_limit(3300, 5000); + else + charger_enable_otg_power(1); gpio_set_level(GPIO_EN_USBC_CHARGE_L, 1); gpio_set_level(GPIO_EN_PP5000_USBC, 1); @@ -74,7 +78,11 @@ void pd_power_supply_reset(int port) if (prev_en) pd_set_vbus_discharge(port, 1); - charger_enable_otg_power(0); + if (IS_ENABLED(VARIANT_KUKUI_CHARGER_ISL9238)) + charge_set_output_current_limit(0, 0); + else + charger_enable_otg_power(0); + gpio_set_level(GPIO_EN_PP5000_USBC, 0); /* notify host of power info change */ diff --git a/board/damu/board.c b/board/damu/board.c index 946f925081..4639a23e50 100644 --- a/board/damu/board.c +++ b/board/damu/board.c @@ -257,12 +257,6 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); #endif /* SECTION_IS_RW */ -/* TODO(b:138640167): config charger correctly */ -int charger_is_sourcing_otg_power(int port) -{ - return 0; -} - /* Called on AP S5 -> S3 transition */ static void board_chipset_startup(void) { diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c index 123a378f6f..7199f9ce12 100644 --- a/board/jacuzzi/board.c +++ b/board/jacuzzi/board.c @@ -417,12 +417,6 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); #endif /* !VARIANT_KUKUI_NO_SENSORS */ -/* TODO(b:138640167): config charger correctly */ -int charger_is_sourcing_otg_power(int port) -{ - return 0; -} - /* Called on AP S5 -> S3 transition */ static void board_chipset_startup(void) { diff --git a/board/kappa/board.c b/board/kappa/board.c index 51ea4de1ef..8ebd0ee349 100644 --- a/board/kappa/board.c +++ b/board/kappa/board.c @@ -271,12 +271,6 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); #endif /* SECTION_IS_RW */ -/* TODO(b:138640167): config charger correctly */ -int charger_is_sourcing_otg_power(int port) -{ - return 0; -} - /* Called on AP S5 -> S3 transition */ static void board_chipset_startup(void) { |