Commit ae9f9aa
committed
rockchip: rk3576: Properly handle USB controller takeover from BootROM
When booting via USB download mode (Maskrom), the BootROM leaves the
USB3OTG0 controller in an active state. U-Boot must properly reset
the controller before reinitializing it for fastboot or other USB
gadget functions.
Changes:
1. Detect USB boot source using read_brom_bootsource_id()
2. When booted from USB:
- Assert USB3OTG0 reset via TOP_CRU_SOFTRST_CON47
- Wait 1ms for reset to complete
- Deassert reset
- Wait 1ms for controller to stabilize
- Configure USB_GRF for proper operation
3. When booted from other sources:
- Keep existing behavior of disabling U3 port initially
(USBDP PHY driver enables it later when needed)
Also update rk3576-evb1-v10.dts to set dr_mode = "peripheral" for
usb_drd0_dwc3 to support fastboot gadget mode by default.
Without this fix, USB fastboot fails when U-Boot is loaded via
Maskrom USB download because the controller state is inconsistent.
Change-Id: e22b349e-fdde-40e8-a991-b3a49e37e645
Signed-off-by: Anton Burticica <mouse@ya.ru>1 parent cb2e54d commit ae9f9aa
File tree
2 files changed
+16
-3
lines changed- arch/arm/mach-rockchip/rk3576
- dts/upstream/src/arm64/rockchip
2 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
193 | | - | |
194 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
195 | 208 | | |
196 | 209 | | |
197 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
917 | | - | |
| 917 | + | |
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
| |||
0 commit comments