summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/corori/board.c14
-rw-r--r--board/corori/board.h8
-rw-r--r--board/corori/gpio.inc8
3 files changed, 12 insertions, 18 deletions
diff --git a/board/corori/board.c b/board/corori/board.c
index 68af291660..1c0b1a3b1c 100644
--- a/board/corori/board.c
+++ b/board/corori/board.c
@@ -64,7 +64,6 @@ static uint8_t new_adc_key_state;
/* USB-A Configuration */
const int usb_port_enable[USB_PORT_COUNT] = {
GPIO_EN_USB_A0_VBUS,
- GPIO_EN_USB_A1_VBUS,
};
/* Keyboard scan setting */
@@ -251,6 +250,12 @@ void board_reset_pd_mcu(void)
*/
}
+static void set_5v_gpio(int level)
+{
+ gpio_set_level(GPIO_EN_PP5000, level);
+ gpio_set_level(GPIO_EN_USB_A0_VBUS, level);
+}
+
__override void board_power_5v_enable(int enable)
{
/*
@@ -258,12 +263,7 @@ __override void board_power_5v_enable(int enable)
* generated locally on the sub board and we need to set the comparator
* polarity on the sub board charger IC.
*/
- gpio_set_level(GPIO_EN_PP5000, !!enable);
- if (isl923x_set_comparator_inversion(1, !!enable))
- CPRINTS("Failed to %sable sub rails!", enable ? "en" : "dis");
-
- if (!enable)
- return;
+ set_5v_gpio(!!enable);
}
int board_is_sourcing_vbus(int port)
diff --git a/board/corori/board.h b/board/corori/board.h
index 70f242fe6a..af90d465bf 100644
--- a/board/corori/board.h
+++ b/board/corori/board.h
@@ -50,13 +50,7 @@
#define CONFIG_BC12_DETECT_PI3USB9201
/* Common USB-A defines */
-#define USB_PORT_COUNT 2
-#define CONFIG_USB_PORT_POWER_SMART
-#define CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY
-#define CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE USB_CHARGE_MODE_CDP
-#define CONFIG_USB_PORT_POWER_SMART_INVERTED
-#define GPIO_USB1_ILIM_SEL GPIO_USB_A0_CHARGE_EN_L
-#define GPIO_USB2_ILIM_SEL GPIO_USB_A1_CHARGE_EN_L
+#define USB_PORT_COUNT 1
/******************************************************************************/
diff --git a/board/corori/gpio.inc b/board/corori/gpio.inc
index 5c31c0b96c..f834443d38 100644
--- a/board/corori/gpio.inc
+++ b/board/corori/gpio.inc
@@ -90,10 +90,7 @@ GPIO(EC_AP_USB_C1_HDMI_HPD, PIN(9, 6), GPIO_OUT_LOW)
GPIO(EC_AP_USB_C0_HPD, PIN(9, 3), GPIO_OUT_LOW)
GPIO(HDMI_SEL_L, PIN(7, 2), GPIO_OUT_HIGH)
GPIO(EC_BATTERY_PRES_ODL, PIN(E, 1), GPIO_INPUT)
-GPIO(USB_A0_CHARGE_EN_L, PIN(3, 7), GPIO_OUT_HIGH) /* Enable A0 1.5A Charging */
-GPIO(USB_A1_CHARGE_EN_L, PIN(F, 3), GPIO_OUT_HIGH) /* Enable A1 1.5A Charging */
-GPIO(EN_USB_A0_VBUS, PIN(4, 1), GPIO_OUT_LOW) /* Enable A1 5V Charging */
-GPIO(EN_USB_A1_VBUS, PIN(F, 2), GPIO_OUT_LOW) /* Enable A1 5V Charging */
+GPIO(EN_USB_A0_VBUS, PIN(4, 1), GPIO_OUT_LOW) /* Enable A0 5V Charging */
/*
* Lalala doesn't have these physical pins coming to the EC but uses other
* logic.
@@ -142,3 +139,6 @@ GPIO(GPIOD1_NC, PIN(D, 1), GPIO_INPUT | GPIO_PULL_UP)
GPIO(GPIOD6_NC, PIN(D, 6), GPIO_INPUT | GPIO_PULL_UP)
GPIO(GPIOE0_NC, PIN(E, 0), GPIO_INPUT | GPIO_PULL_UP)
GPIO(GPIO40_NC, PIN(4, 0), GPIO_INPUT | GPIO_PULL_UP)
+GPIO(GPIO37_NC, PIN(3, 7), GPIO_INPUT | GPIO_PULL_UP)
+GPIO(GPIOF2_NC, PIN(F, 2), GPIO_INPUT | GPIO_PULL_UP)
+GPIO(GPIOF3_NC, PIN(F, 3), GPIO_INPUT | GPIO_PULL_UP)