From c1b5095aa8404709bb447bd7a58f262d7d471a01 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Thu, 28 Jan 2021 16:21:30 -0700 Subject: Dedede: Add RAA489000 output current setting Boards using the RAA489000 TCPC should set output current on their ports through the TCPC driver. This commit adds a board function to do this for every dedede board currently using the RAA489000. BRANCH=None BUG=b:178064507 TEST=on madoo, verify OCP occurs if more than 1.5A is drawn on a non-PD port, verify register is set to allow 3.0A for port partners requesting that current in their sink capabilities Signed-off-by: Diana Z Change-Id: Ieb7df916c122d5de1adaa7371a58ad5cf2954ee4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2658377 Reviewed-by: Aseda Aboagye --- board/madoo/board.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'board/madoo') diff --git a/board/madoo/board.c b/board/madoo/board.c index 7c81d18ba8..9ecdd3f407 100644 --- a/board/madoo/board.c +++ b/board/madoo/board.c @@ -327,6 +327,14 @@ void board_set_charge_limit(int port, int supplier, int charge_ma, charge_set_input_current_limit(icl, charge_mv); } +__override void typec_set_source_current_limit(int port, enum tcpc_rp_value rp) +{ + if (port < 0 || port > board_get_usb_pd_port_count()) + return; + + raa489000_set_output_current(port, rp); +} + /* Sensors */ static struct mutex g_lid_mutex; static struct mutex g_base_mutex; -- cgit v1.2.1