We have followed the example described Custom Boot panel on TEZI dedicated web page but boot.scr file doen not seem to work. Our goal is to enabled touchscreen using LVDS channel and USB TS (through USB OTG port). The script is placed on root of sdCard and this is its content :
# Set timings for 10" multitouch
setenv bootargs console=ttymxc0,115200 quiet video=mxcfb0:dev=ldb,if=LVDS888 rootfstype=squashfs root=/dev/ram autoinstall fullscreen ${teziargs}
# Reenable fdt relocation since in place fdt edits corrupt the ramdisk
# in a FIT image...
setenv fdt_high
# Load FIT image from location as detected by distroboot
load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}tezi.itb
bootm start ${ramdisk_addr_r} && bootm loados && bootm ramdisk && bootm fdt
# Enable and set touchscreen parameter
#backlight
fdt set /backlight default-brightness-level 7
fdt set /backlight enable-gpios &gpio3 13 GPIO_ACTIVE_HIGH
#fb@0
fdt set /fb@0 interface_pix_fmt RGB24
fdt set /fb@0 mode_str LDB-WXGA
fdt set /fb@0 default_bpp 32
bootm prep && bootm go
When I use cat command on interface_pix_fmt parameter for examle it returns RGB666 (default value).
What could be wrong ?
Is there a way to put the boot.scr script on USB stick instead of SDcard ?
I’ve noticed that I made some mistakes, I’m currently working on them and post here in some hours/days to bring some answers or other questions with more details.
So, it appears that it’s not possible to set direclty node property like this :
fdt set /backlight pwms <&pwm4 0 1000000>
those commands work from uboot prompt and from boot.scr :
fdt set /fb@0 interface_pix_fmt RGB24
fdt set /fb@0 mode_str LDB-WXGA
fdt set /fb@0 default_bpp 32
When I try this way directly in uboot after loaded devicetree from tezi.itb I have this error :
fdt set /backlight pwms <&pwm4 0 1000000>
syntax error
Apalis iMX6 #
Apalis iMX6 # fdt set /backlight pwms '<&pwm4 0 1000000>'
Sorry, I could not convert "&pwm4 0 1000000>"
But when I use this syntax it works :
fdt set /backlight pwms <0 0 1000000>
So, it appears that fdt set command from uboot does not understand “alias” value but need to be set with hexadecimal value (at least for array variable cause status variable understands “okay” or “disabled” value).
Is there a way to get hexadecimal value for example &pwm4 value ? I don’t find it… Maybe the customisation of device tree is limited by this way.
Could I try by compiling a brand new device tree from 4.1 kernel used for tezi image and replace it in uboot with fdt commands and bootm arguments ?
Hi Vincent,
You cannot indeed use phandles in a dtb in this way, as the dt compiler has already done its work with them. You have to manually add the phandle and/or linux,phandle property in the pwm node with a value of your own and then use that value in the pwms property of the backlight node. Here’s how I did it in a colibri imx6:
fdt resize 0x100
fdt set /soc/aips-bus@02000000/pwm@02080000 linux,phandle <0x00001000>
fdt set /backlight pwms <0x00001000 0 10000000 0>
Thanks for the files.
In boot.scr, you did not have setup the output to LVDS screen. And additonally in U-boot Environment you need to add ldb=sin0 to the vidargs variable.
dtb file is compiled under linux toradex_4.1-2.0.x-imx branch. Apalis toradex easy installer is 1.8 version.
dtb file is packaged in itb file using .its file from meta-tezi. Both tezi.itb and boot.scr files are placed on USB file. Under u-boot, we run “run distro_bootcmd” and TEZI correctly starts.
Result :
[ 0.268429] /backlight: arguments longer than property
[ 0.268446] pwm-ba[link text][1]cklight backlight: unable to request PWM, trying legacy API