summaryrefslogtreecommitdiff
path: root/baseboard/kalista/usb_pd_policy.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-10-24 08:51:11 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-30 01:04:58 -0700
commit7bff3d8b41741d91bdd8013b80d211fcdf738074 (patch)
treedc9f40e541053cce7882253268061556bed2cc47 /baseboard/kalista/usb_pd_policy.c
parent36190da7c5b8ac47aefc8eaa9fb581b9b77bd26b (diff)
downloadchrome-ec-7bff3d8b41741d91bdd8013b80d211fcdf738074.tar.gz
Kalista: Update baseboard directory
This patch updates Kalista as follows: - Update BJ adapter list and current limit handling - Remove unused code (mostly for Proto Fizz) - Remove unused fan configurations - Change CBI field sizes (board version:1, OEM:1, SKU:4) - Update I2C port map: charger -> backlight - Simplify board_set_active_charge_port This patch updates GPIO list as follows: - Use GPIO34 for current limit control (and remove 33 and 34) - Remove ADP_IN_L (Power source is only BJ) - Remove AC_JACK_CHARGE (Power source is only BJ) Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:111571989 BRANCH=none TEST=build karma Change-Id: I2af208df28d6e7b3472eeb8929d055b93b661af8 Reviewed-on: https://chromium-review.googlesource.com/1298318 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'baseboard/kalista/usb_pd_policy.c')
-rw-r--r--baseboard/kalista/usb_pd_policy.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/baseboard/kalista/usb_pd_policy.c b/baseboard/kalista/usb_pd_policy.c
index bac29cfa52..d6fe6ab6a3 100644
--- a/baseboard/kalista/usb_pd_policy.c
+++ b/baseboard/kalista/usb_pd_policy.c
@@ -220,43 +220,9 @@ int pd_custom_vdm(int port, int cnt, uint32_t *payload,
int board_set_active_charge_port(int port)
{
- const int active_port = charge_manager_get_active_charge_port();
-
if (port < 0 || CHARGE_PORT_COUNT <= port)
return EC_ERROR_INVAL;
-
- if (port == active_port)
- return EC_SUCCESS;
-
- /* Don't charge from a source port */
- if (board_vbus_source_enabled(port))
- return EC_ERROR_INVAL;
-
CPRINTS("New charger p%d", port);
-
- switch (port) {
- case CHARGE_PORT_TYPEC0:
- /* This is connected to TP on board version 2.2+ thus no-op */
- gpio_set_level(GPIO_USB_C0_CHARGE_L, 0);
- gpio_set_level(GPIO_AC_JACK_CHARGE_L, 1);
- gpio_enable_interrupt(GPIO_ADP_IN_L);
- break;
- case CHARGE_PORT_BARRELJACK:
- /* Make sure BJ adapter is sourcing power */
- if (gpio_get_level(GPIO_ADP_IN_L))
- return EC_ERROR_INVAL;
- /* This will cause brown out when switching from type-c on
- * board version 2.2+ thus the rest of the code is no-op. */
- gpio_set_level(GPIO_AC_JACK_CHARGE_L, 0);
- /* If type-c voltage > BJ voltage, we'll brown out due to the
- * reverse current protection of PU3 but it's intended. */
- gpio_set_level(GPIO_USB_C0_CHARGE_L, 1);
- gpio_disable_interrupt(GPIO_ADP_IN_L);
- break;
- default:
- return EC_ERROR_INVAL;
- }
-
return EC_SUCCESS;
}