mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
zoombini: Add USB-A charge control support.
BUG=None BRANCH=None TEST=make -j buildall Change-Id: I8ee0ec01d06343a158f4271e1f9ecdb3d8895659 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/634275 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
52789bd7fd
commit
88abd3ee72
@@ -100,6 +100,11 @@ const struct i2c_port_t i2c_ports[] = {
|
||||
};
|
||||
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
|
||||
|
||||
/* GPIO to enable/disable the USB Type-A port. */
|
||||
const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT] = {
|
||||
GPIO_USB_A_5V_EN,
|
||||
};
|
||||
|
||||
/* Keyboard scan setting */
|
||||
struct keyboard_scan_config keyscan_config = {
|
||||
/* Extra delay when KSO2 is tied to Cr50. */
|
||||
|
||||
@@ -79,6 +79,13 @@
|
||||
#define CONFIG_USBC_VCONN
|
||||
#define CONFIG_USBC_VCONN_SWAP
|
||||
|
||||
/* USB Type-A Port BC1.2 support */
|
||||
#define CONFIG_USB_PORT_POWER_SMART
|
||||
#undef CONFIG_USB_PORT_POWER_SMART_PORT_COUNT
|
||||
#define CONFIG_USB_PORT_POWER_SMART_PORT_COUNT 1
|
||||
#define CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY
|
||||
#define GPIO_USB1_ILIM_SEL GPIO_USB_A_HIGH_POWER_EN
|
||||
|
||||
/* Define typical operating power and max power. */
|
||||
#define PD_MAX_VOLTAGE_MV 20000
|
||||
#define PD_MAX_CURRENT_MA 3000
|
||||
|
||||
@@ -63,7 +63,8 @@ GPIO(I2C5_SDA, PIN(3, 6), GPIO_INPUT)
|
||||
GPIO(BAT_PRESENT_L, PIN(E, 5), GPIO_INPUT)
|
||||
GPIO(USB_PD_RST_L, PIN(F, 1), GPIO_ODR_HIGH)
|
||||
|
||||
GPIO(USB1_ENABLE, PIN(A, 0), GPIO_OUT_LOW)
|
||||
GPIO(USB_A_5V_EN, PIN(A, 0), GPIO_OUT_LOW)
|
||||
GPIO(USB_A_HIGH_POWER_EN, PIN(A, 2), GPIO_OUT_LOW)
|
||||
|
||||
GPIO(USB_C0_5V_EN, PIN(6, 7), GPIO_OUT_LOW)
|
||||
GPIO(USB_C1_5V_EN, PIN(7, 0), GPIO_OUT_LOW)
|
||||
|
||||
Reference in New Issue
Block a user