Configuring the iMX6 to use the 800x480 24bpp New Haven display

I’m trying to configure the device tree to support the 800x480 24bpp New Haven display. I’m not sure if vidargs is flexible enough to allow the specification of all the timings, so to keep things simple I keep vidargs blank and only alter the device tree. I added the following to imx6dl-colibri-eval-v3.dts:

&lcd {
    status = "okay";
    default_ifmt = "RGB24";
};
        
&lcdif {
    display = <&display0>;
    status = "okay";
    
    display0: lcd-display {
        bits-per-pixel = <32>;
        bus-width = <24>;
        
        display-timings {
            native-mode = <&timing0>;
            
            timing0: 800x480 {
                clock-frequency = <33260000>;
                hactive = <800>;
                vactive = <480>;
                hback-porch = <88>;
                hfront-porch = <40>;
                vback-porch = <32>;
                vfront-porch = <13>;
                hsync-len = <48>;
                vsync-len = <3>;
                
                de-active = <1>;
                hsync-active = <0>;
                vsync-active = <0>;
                pixelclk-active = <0>;
            };
        };
    };
};

&mxcfb1 {
    status = "okay";
    interface_pix_fmt = "RGB24";
    mode_str ="800x480";
    default_bpp = <32>;
};

Here is the output of fbset after it boots:

root@b2qt-colibri-imx6:~# fbset

mode "1024x600-59"
        # D: 45.000 MHz, H: 38.266 kHz, V: 58.961 Hz
        geometry 1024 600 1024 1200 32
        timings 22222 104 43 24 20 5 5
        accel false
        rgba 8/16,8/8,8/0,8/24
endmode

Interestingly, if I change mode_str to “800x480M@60”, the output of fbset becomes:

root@b2qt-colibri-imx6:~# fbset

mode "800x480-59"
        # D: 29.500 MHz, H: 29.738 kHz, V: 59.476 Hz
        geometry 800 480 800 960 32
        timings 33898 96 24 10 3 72 7
        accel false
        rgba 8/16,8/8,8/0,8/24
endmode

I’ve tried searching all .c,.h,*.dts and *.dtsi files in the kernel source repository for 800x400M@60, but nothing comes up. Why does that particular mode string get recognised? How do I get it to use the mode as described in my lcdif block?

I’ve tried searching all .c,.h,.dts and .dtsi files in the kernel source repository for 800x400M@60, but nothing comes up. Why does that particular mode string get recognised?

That is really generic modedb parsing functionality.

How do I get it to use the mode as described in my lcdif block?

I don’t think the downstream i.MX 6 stuff makes use of that lcdif block. You probably confused it with the i.MX 6ULL or i.MX 7.