dp11
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 526
Joined: Thu Dec 29, 2011 5:46 pm

Re: Pi 4: how to disable DWC USB controller

Mon Apr 26, 2021 10:36 am

Gavinmc42 wrote:
Mon Apr 26, 2021 10:25 am
Can you post your config.txt file where "dtoverlay=dwc2,dr_mode=host" doesn't work. Also just to confirm that you do still have the dtoverlays on the boot image?
There nothing that has changed from the Raspberry Pi OS 5.10.17 or the PiCore 13.0.3 (Kernel 5.10.16)images.
Been using these on many Pi's recently.
Pi4 doesn't use dwc2 . There is no reason that I know of why dwc2 should have stopped working except the line on the config.txt file is wrong somehow or the dtoverlays are missing from the boot image.

User avatar
Gavinmc42
Posts: 5690
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 4: how to disable DWC USB controller

Mon Apr 26, 2021 11:11 am

Pi4 doesn't use dwc2 . There is no reason that I know of why dwc2 should have stopped working except the line on the config.txt file is wrong somehow or the dtoverlays are missing from the boot image.
I have only tried this on a CM4 on the official CM I/O board.
Got the RPI Imager to download the latest Lite image.
I didn't check the overlay folder today but I did previously.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Red Sun
Posts: 13
Joined: Sun Jan 03, 2021 2:15 pm

Re: Pi 4: how to disable DWC USB controller

Sun May 09, 2021 6:07 am

Can I flip this question? How do I enable the USB controller? I have downloaded the the recommended image into the CM4 , fired it up and got the pretty picture, but the keyboard and mouse don't work. If they don't work, how can I edit the config.txt file? I downloaded from a Windows 10 computer. I am a hardware engineer btw, so be gentle.

User avatar
Gavinmc42
Posts: 5690
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 4: how to disable DWC USB controller

Sun May 09, 2021 8:02 am

You put Raspberry Pi OS on it, SSH is disabled by default/
PiCore has it enable so you can edit via Ethernet.

If you put Raspberry Pi OS on then you need to go back to USBboot mode.
You link the jumper and boot into USB MSD boot using the Window/Linux/Pi USBboot app.
Once the CM4 fires up as a USB drive you can then just edit config.txt on the MSD/eMMC drive.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Red Sun
Posts: 13
Joined: Sun Jan 03, 2021 2:15 pm

Re: Pi 4: how to disable DWC USB controller

Sun May 09, 2021 5:26 pm

Well Gavinmc42,
You got me sorted out, and on a Sunday morning, as well.
The secret is that you have to run the USB boot app every time you want to make the drive visible. I had thought that you ran it once only.
Many thanks

cleverca22
Posts: 3792
Joined: Sat Aug 18, 2012 2:33 pm

Re: Pi 4: how to disable DWC USB controller

Sun May 09, 2021 5:30 pm

Red Sun wrote:
Sun May 09, 2021 5:26 pm
Well Gavinmc42,
You got me sorted out, and on a Sunday morning, as well.
The secret is that you have to run the USB boot app every time you want to make the drive visible. I had thought that you ran it once only.
Many thanks
there is an alternative

https://github.com/raspberrypi/firmware/issues/1076

Code: Select all

[all]
gpio=5=ip,pu

[gpio5=0]
start_file=msd.elf

[gpio5=1]
start_file=start.elf
(that example was from a pi0)

if you adjust it, to use msd4.elf and start4.elf, and then rename usbboot/msd/start4.elf to msd4.elf, you can repeat the same trick on a CM4

once configured properly, you just put the chosen gpio pin into the right state, and the CM4 will put itself into MSD mode, without involving usbboot!
but it only works if the fat32 partition is intact (config.txt and msd4.elf are readable)

Return to “Compute Module”