Neo DTB for 800x480p/hdmi

Discussion in 'UDOO NEO' started by jaxx, Nov 29, 2015.

  1. jaxx

    jaxx New Member

    Joined:
    Nov 3, 2013
    Messages:
    4
    Likes Received:
    0
    Hi,
    Managed to compile a nearly functionnal DTB to display 800x480p over HDMI

    I decompiled the original imx6sx-udoo-neo-hdmi-m4.dtb using dtc ( sudo apt-get install device-tree-compiler ) :
    Code:
    dtc -I dtb imx6sx-udoo-neo-hdmi-m4.dtb -O dts -o imx6sx-udoo-neo-hdmi-m4.dts
    Edited around lines 1519 :
    Code:
                        display {
                            bits-per-pixel = <16>;
                            bus-width = <24>;
                            linux,phandle = <0x2e>;
                            phandle = <0x2e>;
    
                            display-timings {
                                native-mode = <0x2f>;
    
                                timing0 {
                                    clock-frequency = <33660000>;
                                    hactive = <800>;
                                    vactive = <480>;
                                    hback-porch = <66>;
                                    hfront-porch = <40>;
                                    vback-porch = <24>;
                                    vfront-porch = <19>;
                                    hsync-len = <10>;
                                    vsync-len = <10>;
                                    hsync-active = <150>;
                                    vsync-active = <2>;
    
                                    de-active = <1>;
                                    pixelclk-active = <0>;
                                    linux,phandle = <0x2f>;
                                    phandle = <0x2f>;
                                };
                            };
                        };
    Saved it under imx6sx-udoo-neo-hdmi-m4-800x480p16b.dts.
    Then generated the blob version directly to the /boot
    Code:
    dtc -O dtb -o /media/jaxx/boot/dts/imx6sx-udoo-neo-hdmi-m4-800x480p16b.dtb imx6sx-udoo-neo-hdmi-m4-800x480p16b.dts
    And, finally, edited uEnv.txt before rebooting:
    Code:
    fdt_file=dts/imx6sx-udoo-neo-hdmi-m4-800x480p16b.dtb
    Even saving tweaked values after adjusting using fbset (like fbset -move right ) it's still a bit shifted on the left after boot (a fbset fixes it temporarily), got the vertical timings right though... Your Mileage May Vary of course, using a cheap 7" lcd with a hdmi/vga/rca driver board.
    My Manga Screen simply refuses it, but it could also be due to the depth and extra timing issues...

    Gonna try making the 32b counterpart, I'm no good at timing calculations, but if this gets someone started, or UDOO to make other variations, that's cool !

    (files attached for convenience)
     

    Attached Files:

  2. jaxx

    jaxx New Member

    Joined:
    Nov 3, 2013
    Messages:
    4
    Likes Received:
    0
    bits-per-pixel = <32> does thr 32b trick actually, was looking for something way more complicated... still shifted after reboot, manually need to fbset -move right... but well :) getting to some result!
     
  3. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    dtsi file is here so no need to decompile it.

    FYI the best way to get monitor timings is to read the EDID for your monitor using windows/linux/mac and decode those values. Alternatively CEA modes are documented in this file , search for the variable mxc_cea_mode.
     
    Last edited: Nov 29, 2015
  4. jaxx

    jaxx New Member

    Joined:
    Nov 3, 2013
    Messages:
    4
    Likes Received:
    0
    Ah, didn't know it was that easy from the dtsi... but well, wanted to do the least possible editions to it.

    Yep, for the EDID, was gonna get to that point just before being pulled out to the shopping mall :) will check later :)
     
  5. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    You need kernel sources to compile dts (with dtsi) to dtb. But if you decompile dtb and compile back you don't need them.
     
  6. Grimepoch

    Grimepoch New Member

    Joined:
    Jun 4, 2017
    Messages:
    8
    Likes Received:
    2
    I know this is an old thread, but the correct fix is flipping the hsync signal when I was doing this, then it doesn't need to be moved to the right, everything lined up properly.
     

Share This Page