Kernel FDT (3.14.28): Multiple display definitions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kernel FDT (3.14.28): Multiple display definitions

Jump to solution
818 Views
grim
Contributor III

We have a couple of different systems that we offer. Each has a different display.

One of the displays is split-mode, dual channel LVDS.

The other display is single-channel LVDS.

Both systems have the same kernel. Each has a different DTB (just because of the display).

I would like to have one kernel and one DTB that would run on either system but I'm having trouble wrapping my brain around how to accomplish this.

I use one device tree source file and I just comment out the display that I don't want for each DTB.

My display declaration looks like this.....

&ldb {
    status = "okay";
    /* AUO */
    split-mode = <1>;
    status = "okay";    
    lvds-channel@0 {
        crtc = "ipu1-di1";
        fsl,data-mapping = "spwg";
        fsl,data-width = <24>;
        status = "okay";
        primary;
        display-timings {
            t_lvds: t_lvds_default {
                clock-frequency = <107991360>;
                hactive = <1280>;
                vactive = <1024>;
                hback-porch = <102>;
                hfront-porch = <100>;
                vback-porch = <20>;
                vfront-porch = <20>;
                hsync-len = <2>;
                vsync-len = <2>;
            };
        };
    };
    lvds-channel@1 {
        crtc = "ipu1-di0";
        fsl,data-mapping = "spwg";
        fsl,data-width = <24>;
        status = "okay";
        split-mode;
        display-timings {
            
            
        };
    };
    
    /* Kyocera
    lvds-channel@0 {
        fsl,data-mapping = "spwg";
        fsl,data-width = <18>;
        status = "okay";
        primary;
        display-timings {
            native-mode = <&timing0>;
            timing0: hsd100pxn1 {
                clock-frequency = <78939059>;
                hactive = <1280>;
                vactive = <800>;
                hback-porch = <80>;
                hfront-porch = <80>;
                vback-porch = <11>;
                vfront-porch = <12>;
                hsync-len = <2>;
                vsync-len = <2>;
            };
        };
    };*/
};

As i said, I currently just comment out the display that's not being used when I generate my DTB file.

Can anybody offer guidance on how I can break this up into two different declarations?

I plan to have U-Boot detect the current environment and set the kernel variables accordingly before booting.

Any advice or insight would be appreciated!

Thank you.

Labels (4)
0 Kudos
1 Solution
621 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Bob

You can find in our BSPs that you can build dtb files for different hardware.

Please check these post: https://community.nxp.com/message/843604?commentID=843604#comment-843604

 So, you can take this for reference to create different dtb for different display.

You may need a a way to identify the board you are using. so uboot can know which board is being used, this could be a gpio.

 

And this is an example how to write a script in u-boot bootargs to load different dtb once you identify which board is being used.

https://www.element14.com/community/community/designcenter/single-board-computers/riotboard/blog/201...

 

Hope this can help you.

Regards,

Carlos

View solution in original post

2 Replies
622 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Bob

You can find in our BSPs that you can build dtb files for different hardware.

Please check these post: https://community.nxp.com/message/843604?commentID=843604#comment-843604

 So, you can take this for reference to create different dtb for different display.

You may need a a way to identify the board you are using. so uboot can know which board is being used, this could be a gpio.

 

And this is an example how to write a script in u-boot bootargs to load different dtb once you identify which board is being used.

https://www.element14.com/community/community/designcenter/single-board-computers/riotboard/blog/201...

 

Hope this can help you.

Regards,

Carlos

621 Views
grim
Contributor III

Thanks Carlos.

I had the plan to have two separate FDTs in my back pocket. Was hoping to move forward with one FDT but I can't see how that could be done.

Thanks again. I'm moving forward with two FDTs.

0 Kudos