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

Display not recognized if not powered up when booting

Thu Sep 08, 2022 7:15 pm

I have designed a CM4 board called Pi-Head which is not quite the same as Raspberry Pi's own CM4IO board. If I plug the display into Disp1 port on CM4IO and power it up, it works. On mine it doesn't. The reason is that Pi-Head has separate power, controlled by GPIO pins, for the display. These are pulled low on power up so when the processor looks for the display it does not find it and it chooses to send the output to HDMI instead.
I have tried setting the GPIO pins in config.txt, but it is too late then. I am wondering if I can set the pins early enough in the boot sequence so that the display is selected. Alternatively, can I just ask the processor to use the display once it has booted?
Any help would be appreciated.

aBUGSworstnightmare
Posts: 6043
Joined: Tue Jun 30, 2015 1:35 pm

Re: Display not recognized if not powered up when booting

Thu Sep 08, 2022 10:08 pm

From your explanation the easiest fix seems to modify the overlay and change the regulator GPIO to the one used on your board.

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

Re: Display not recognized if not powered up when booting

Fri Sep 09, 2022 12:44 pm

Well, I have been trying what you suggested. I can fire up the display by powering it externally and I can list the active overlays using the dtoverlay -l command. It turns out that "no overlays are loaded". I guess that the dt-blob.bin file has all that is needed for the display. I thought I would decompile it to a dts file using the Raspberry Pi Documentation instructions

"Similarly, a .dtb file can be converted back to a .dts file, if required."

dtc -I dtb -O dts -o dt-blob.dts /boot/dt-blob.bin


Actually lots of warnings and a FATAL ERROR - permission denied.

I would like to open a fresh dts file in a windows text editor, add the pin@pinname pull-up resistors, compile it to a dtb, drop it on a usb stick and transfer it to the boot partition. Is there a windows compiler to do this? Is this sensible?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13546
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Display not recognized if not powered up when booting

Fri Sep 09, 2022 1:49 pm

You need to be a little more specific in how you are configuring things.

dt-blob.bin configures the firmware only. If the firmware finds a DSI display based on that configuration on boot it will enable it. It is NEVER probed again, so if the display isn't detected it is game over. Likewise if the display is powered down, it will only be reinitialised by the firmware on the next boot.
If display_auto_detect=1 is set, a display is found, and dtoverlay=vc4-kms-v3d is also found in config.txt, then it will also enable dtoverlay=vc4-kms-dsi-7inch automatically, HOWEVER it does not update the overlay based on any GPIO configuration of the overlay.

"dtoverlay=vc4-kms-v3d" and "dtoverlay=vc4-kms-dsi-7inch" in config.txt will explicitly enable the DSI display. However even then it is not a hotpluggable display, and it will be probed at boot time as part of the rpi_panel_attiny_regulatordriver, and if not found will fail to load.

With the DSI panel, the driver PCB is expected to be constantly powered, and the microcontroller on it can then control power to the display. Externally controlling the power is a recipe for issues.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

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

Re: Display not recognized if not powered up when booting

Sun Sep 11, 2022 11:47 am

Being a hardware engineer, I thought you could do anything in software. Apparently not! If there is no way to access GPIOs prior to the display being probed then I need to make sure that the display is always on during boot. I can do this by changing or omitting a component on the board. Most users will not use the display, in which case they can choose to switch the power off themselves. I recommend this if they have a battery powered application, because a regulator will draw a quiescent current even when there is no load.

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

Re: Display not recognized if not powered up when booting

Sun Sep 11, 2022 12:00 pm

Btw we are Raspberry Pi design partners for housing Pi-based products and I would love to meet anyone on this forum who is going to the 2022 Partner Event. I am on the Lincoln Binns stand.

Return to “Official Display”