Attention is currently required from: Hung-Te Lin, Paul Menzel, Wentao Qin, Yang Wu, Yu-Ping Wu.
4 comments:
Patchset:
@Mingjin, is it expected to run through USB3 settings for USB2 configuration ?
File src/mainboard/google/corsola/devicetree.cb:
Patch Set #4, Line 3: USB2_PORT
SUPPORT_SECONDARY_USB
Patch Set #4, Line 4: USB2_PORT1
option SECONDARY_USB_DISABLED 0
option SECONDARY_USB_ENABLED 1
File src/soc/mediatek/common/usb.c:
#ifdef SOC_MEDIATEK_MT8186_USB_H
void switch_usb_port0_host(void)
{
ippc_regs = (void *)(SSUSB_IPPC_BASE_P0);
phy_ports = (void *)(SSUSB_SIF_BASE_P0);
}
#endif
Please consider the following approach.
common/usb.c
```
void update_usb_base_regs(uintptr_t ippc_base, uintptr_t sif_base)
{
ippc_regs = (void *)ippc_base;
phy_ports = (void *)sif_base;
}
```
common/usb_secondary.c
```
void setup_usb_secondary_host(void)
{
/* We always consider USB2 port as the secondary UBS host regardless of the register naming */
update_usb_base_regs(SSUSB_IPPC_BASE_P0, SSUSB_SIF_BASE_P0);
setup_usb_host();
}
```
mt8186/Makeifle.mk
```
ramstage-y += ../common/usb.c ../common/usb_secondary.c usb.c
```
corsola/mainboard.c
```
if (fw_config_probe(FW_CONFIG(SUPPORT_SECONDARY_USB, SECONDARY_USB_ENABLED))) {
setup_usb_secondary_host();
}
```
To view, visit change 82089. To unsubscribe, or for help writing mail filters, visit settings.