mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 10:31:02 +00:00
g: allow to select the default USB PHY at startup.
When (USB-)resuming from deep-sleep, ensure that we avoid switching back and forth the selected USB PHY at boot, in order to avoid having a short disconnection at resume. To achieve this, allow the board configuration to select the PHY it is really using with the CONFIG_USB_SELECT_PHY_DEFAULT configuration variable, still keep the default USB_SEL_PHY1 as before. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=b:38160821 TEST=manual: build 'proto2' firmware with CONFIG_LOW_POWER_IDLE defined, with the chip connected to the host on PHY A, make the host issue a USB Suspend then resume and see no disconnection. Change-Id: I7abd5e338e5c688c2dd486293f520049cdfd273b Reviewed-on: https://chromium-review.googlesource.com/501947 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Marius Schilder <mschilder@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
fb6b933def
commit
4ecdf78793
@@ -331,8 +331,12 @@ static enum {
|
||||
} device_state;
|
||||
static uint8_t configuration_value;
|
||||
|
||||
#ifndef CONFIG_USB_SELECT_PHY_DEFAULT
|
||||
#define CONFIG_USB_SELECT_PHY_DEFAULT USB_SEL_PHY1
|
||||
#endif
|
||||
|
||||
/* Default PHY to use */
|
||||
static uint32_t which_phy = USB_SEL_PHY1;
|
||||
static uint32_t which_phy = CONFIG_USB_SELECT_PHY_DEFAULT;
|
||||
|
||||
void usb_select_phy(uint32_t phy)
|
||||
{
|
||||
|
||||
@@ -2483,6 +2483,8 @@
|
||||
|
||||
/* Support control of multiple PHY */
|
||||
#undef CONFIG_USB_SELECT_PHY
|
||||
/* Select which USB PHY will be used at startup */
|
||||
#undef CONFIG_USB_SELECT_PHY_DEFAULT
|
||||
|
||||
/* Support simple control of power to the device's USB ports */
|
||||
#undef CONFIG_USB_PORT_POWER_DUMB
|
||||
|
||||
Reference in New Issue
Block a user