mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
rambi: Add config option for simplified USB power control
It will be used by all variants of Rambi, so #ifdef BOARD_RAMBI is too restrictive. BUG=chrome-os-partner:24864 BRANCH=rambi TEST=boot rambi 1.5 board; plug in USB mouse Change-Id: I0ff02077388a6c6621c5746a693dde894cf8ad77 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/181682 Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
9ccbedda19
commit
07fa71e7cc
@@ -35,6 +35,7 @@
|
||||
#define CONFIG_TEMP_SENSOR
|
||||
#define CONFIG_TEMP_SENSOR_TMP432
|
||||
#define CONFIG_USB_PORT_POWER_SMART
|
||||
#define CONFIG_USB_PORT_POWER_SMART_SIMPLE
|
||||
#define CONFIG_WIRELESS
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
@@ -32,11 +32,11 @@ static uint8_t charge_mode[USB_CHARGE_PORT_COUNT];
|
||||
|
||||
static void usb_charge_set_control_mode(int port_id, int mode)
|
||||
{
|
||||
#ifdef BOARD_RAMBI
|
||||
#ifdef CONFIG_USB_PORT_POWER_SMART_SIMPLE
|
||||
/*
|
||||
* Rambi has only a single shared control signal, so the last mode set
|
||||
* to either port wins. Also, only CTL1 can be set; the other pins
|
||||
* are hard-wired.
|
||||
* One single shared control signal, so the last mode set to either
|
||||
* port wins. Also, only CTL1 can be set; the other pins are
|
||||
* hard-wired.
|
||||
*/
|
||||
gpio_set_level(GPIO_USB_CTL1, mode & 0x4);
|
||||
#else
|
||||
@@ -62,8 +62,8 @@ static void usb_charge_set_enabled(int port_id, int en)
|
||||
|
||||
static void usb_charge_set_ilim(int port_id, int sel)
|
||||
{
|
||||
#ifdef BOARD_RAMBI
|
||||
/* Rambi has a shared ILIM_SEL signal too */
|
||||
#ifdef CONFIG_USB_PORT_POWER_SMART_SIMPLE
|
||||
/* ILIM_SEL signal is shared too */
|
||||
gpio_set_level(GPIO_USB_ILIM_SEL, sel);
|
||||
#else
|
||||
if (port_id == 0)
|
||||
|
||||
@@ -734,6 +734,12 @@
|
||||
*/
|
||||
#undef CONFIG_USB_PORT_POWER_SMART
|
||||
|
||||
/*
|
||||
* Smart USB power control can use a full set of control signals to the USB
|
||||
* port power chip, or a reduced set. If this is defined, use the reduced set.
|
||||
*/
|
||||
#undef CONFIG_USB_PORT_POWER_SMART_SIMPLE
|
||||
|
||||
/* Support the TSU6721 I2C smart switch */
|
||||
#undef CONFIG_USB_SWITCH_TSU6721
|
||||
|
||||
|
||||
Reference in New Issue
Block a user