From 2a7f9ef0cfb016ba610919c07bb80ea2c573e4f8 Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Mon, 23 Sep 2024 23:57:56 +0800 Subject: [PATCH] usb: Skip USB init for now on A7-A11 SoCs. We do not support the USB controller on A7-A11 SoCs yet, but still do not try to init dwc3 on them. Signed-off-by: Nick Chan --- src/usb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/usb.c b/src/usb.c index 86eedc603..49d27674f 100644 --- a/src/usb.c +++ b/src/usb.c @@ -253,6 +253,16 @@ void usb_init(void) return; } + /* + * A7-A11 uses a custom internal otg controller with the peripheral part + * being dwc2. + */ + if (adt_path_offset(adt, "/arm-io/otgphyctrl") > 0 && + adt_path_offset(adt, "/arm-io/usb-complex") > 0) { + /* We do not support the custom controller and dwc2 (yet). */ + return; + } + i2c_dev_t *i2c = i2c_init("/arm-io/i2c0"); if (!i2c) { printf("usb: i2c init failed.\n");