From 7a7db34da08cee3141d45e694428a1f28c76219c Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Fri, 3 Sep 2021 17:24:36 +0200 Subject: [PATCH] board: ti: am57xx-idk: Choose the right DTB based on detected LCD Panel The board file sets the 'idk_lcd' environment variable based on what LCD panel was detected. We just need to choose the right DTB based on that. Signed-off-by: Roger Quadros Signed-off-by: Amjad Ouled-Ameur --- include/environment/ti/boot.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index b230c555d1..dbdfeef5cc 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -209,16 +209,26 @@ "setenv fdtfile am57xx-beagle-x15-revc.dtb; fi;" \ "if test $board_name = am5729_beagleboneai; then " \ "setenv fdtfile am5729-beagleboneai.dtb; fi;" \ - "if test $board_name = am572x_idk; then " \ + "if test $board_name = am572x_idk && test $idk_lcd = no; then " \ "setenv fdtfile am572x-idk.dtb; fi;" \ - "if test $board_name = am574x_idk; then " \ + "if test $board_name = am572x_idk && test $idk_lcd = osd101t2045; then " \ + "setenv fdtfile am572x-idk-lcd-osd101t2045.dtb; fi;" \ + "if test $board_name = am572x_idk && test $idk_lcd = osd101t2587; then " \ + "setenv fdtfile am572x-idk-lcd-osd101t2587.dtb; fi;" \ + "if test $board_name = am574x_idk && test $idk_lcd = no; then " \ "setenv fdtfile am574x-idk.dtb; fi;" \ + "if test $board_name = am574x_idk && test $idk_lcd = osd101t2587; then " \ + "setenv fdtfile am574x-idk-lcd-osd101t2587.dtb; fi;" \ "if test $board_name = am57xx_evm; then " \ "setenv fdtfile am57xx-evm.dtb; fi;" \ "if test $board_name = am57xx_evm_reva3; then " \ "setenv fdtfile am57xx-evm-reva3.dtb; fi;" \ - "if test $board_name = am571x_idk; then " \ + "if test $board_name = am571x_idk && test $idk_lcd = no; then " \ "setenv fdtfile am571x-idk.dtb; fi;" \ + "if test $board_name = am571x_idk && test $idk_lcd = osd101t2045; then " \ + "setenv fdtfile am571x-idk-lcd-osd101t2045.dtb; fi;" \ + "if test $board_name = am571x_idk && test $idk_lcd = osd101t2587; then " \ + "setenv fdtfile am571x-idk-lcd-osd101t2587.dtb; fi;" \ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0"