I've gotten the 4.0" HDMI Display (MPI4008) working on a CM4 with Raspberry Pi OS Bookworm over HDMI.
Get a copy of the display's EDID. You can use a tool like Monitor Asset Manager under Windows, or download a copy from https://edid.tv/edid/1665/ (both were identical for me). Create the /usr/lib/firmware/edid directory on your Bookworm installation if it doesn't already exist, then copy the EDID into it. Append the kernel commandline to load the EDID and set the video mode appropriately.
After a reboot, the display flickers several times, but eventually displays the end of the startup scroll and the login prompt. (I do not see the four raspberries and the start of the scroll.) No other changes were necessary to get framebuffer output at the console.
$ wget -O MPI4008_1.edid https://edid.tv/edid/1665/download/
$ sudo mkdir /usr/lib/firmware/edid
$ sudo mv MPI4008_1.edid /usr/lib/firmware/edid/
$ sudo nano /boot/firmware/cmdline.txt
drm.edid_firmware=edid/MPI4008_1.edid video=HDMI-A-1:480x800@62
$ sudo reboot
Depending on your use case, rotation can be done with panel_orientation, e.g. video=HDMI-A-1:480x800@62,panel_orientation=left_side_up; or rotate, e.g. video=HDMI-A-1:480x800@62,rotate=90 (see https://www.kernel.org/doc/html/latest/fb/modedb.html for options).
I've gotten the 4.0" HDMI Display (MPI4008) working on a CM4 with Raspberry Pi OS Bookworm over HDMI.
Get a copy of the display's EDID. You can use a tool like Monitor Asset Manager under Windows, or download a copy from https://edid.tv/edid/1665/ (both were identical for me). Create the
/usr/lib/firmware/ediddirectory on your Bookworm installation if it doesn't already exist, then copy the EDID into it. Append the kernel commandline to load the EDID and set the video mode appropriately.After a reboot, the display flickers several times, but eventually displays the end of the startup scroll and the login prompt. (I do not see the four raspberries and the start of the scroll.) No other changes were necessary to get framebuffer output at the console.
Depending on your use case, rotation can be done with
panel_orientation, e.g.video=HDMI-A-1:480x800@62,panel_orientation=left_side_up; orrotate, e.g.video=HDMI-A-1:480x800@62,rotate=90(see https://www.kernel.org/doc/html/latest/fb/modedb.html for options).