From aef03587a37c62e0858bd893c4fa934e18f21749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Fri, 17 Jul 2020 10:28:51 +0200 Subject: [PATCH] Add TFT LCD and FAN control support (#2095) --- config/bootscripts/boot-odroid-xu4.ini | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/config/bootscripts/boot-odroid-xu4.ini b/config/bootscripts/boot-odroid-xu4.ini index 6f730e317..a44f38d69 100644 --- a/config/bootscripts/boot-odroid-xu4.ini +++ b/config/bootscripts/boot-odroid-xu4.ini @@ -20,7 +20,7 @@ setenv verbosity "1" # To update boot loader on your eMMC use the nand-sata-install tool # run copy_uboot_sd2emmc -if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi +if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=null"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttySAC2,115200n8 ${consoleargs}"; fi if test "${bootlogo}" = "true"; then setenv consoleargs "bootsplash.bootfile=bootsplash.armbian ${consoleargs}"; fi @@ -149,6 +149,22 @@ setenv governor "performance" # Supported values: 933 825 728 633 (MHZ) setenv ddr_freq 825 +#------------------------------------------------------------------------------ +# +# Use Hardware Add-On +# +#------------------------------------------------------------------------------ +# +# If you are using your odroidxu4 in a CloudShell2 enclosure set this to true to +# enable TFT LCD and FAN control via i2c bus +# false : disabled +# true : TFT LCD and i2c bus enabled +# +# default : false +# +#------------------------------------------------------------------------------ +setenv cs2enable "false" + #------------------------------------------------------------------------------ # # HDMI Hot Plug detection @@ -254,6 +270,16 @@ ext4load mmc 0:1 0x44000000 /boot/dtb/${fdtfile} || fatload mmc 0:1 0x44000000 d # set FDT address fdt addr 0x44000000 +if test "${cs2enable}" = "true"; then + fdt resize 8192 + + setenv overlays "i2c0 i2c1 hktft-cs-ogst" + for overlay in ${overlays}; do + ext4load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo + fdt apply 0x60000000 + done +fi + if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi # final boot args