diff --git a/chip/g/usb.c b/chip/g/usb.c index 32b347e3ab..2562461b2e 100644 --- a/chip/g/usb.c +++ b/chip/g/usb.c @@ -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) { diff --git a/include/config.h b/include/config.h index 9248b5185c..90f13b3dcc 100644 --- a/include/config.h +++ b/include/config.h @@ -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