Skip to content

Commit

Permalink
usb: Skip USB init for now on A7-A11 SoCs.
Browse files Browse the repository at this point in the history
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 <towinchenmi@gmail.com>
  • Loading branch information
asdfugil committed Sep 26, 2024
1 parent 8b09fb3 commit 22fe601
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 22fe601

Please sign in to comment.