sst
November 21, 2017, 11:47am
1
I try to change an int value in the device tree in U-Boot, but the system resets:
Hit any key to stop autoboot: 0
Apalis iMX6 # run emmcdtbload
reading imx6q-apalis-eval.dtb
50394 bytes read in 18 ms (2.7 MiB/s)
Apalis iMX6 # fdt addr ${fdt_addr_r}
Apalis iMX6 # fdt resize
Apalis iMX6 # fdt set /soc/aips-bus/ldb/lvds-channel@0/display-timings/800x600 hfront-porch <100>
data abort
pc : [<4ff50842>] lr : [<4ff5082f>]
reloc pc : [<17804842>] lr : [<1780482f>]
sp : 4df4bcf0 ip : 4ff9e488 fp : 4df4bd10
r10: 00000001 r9 : 4df4beb8 r8 : 4e083e70
r7 : 4df4e619 r6 : 00000000 r5 : 00000004 r4 : 4ff9dec4
r3 : 4ff9dac1 r2 : 00000003 r1 : 4df4bd10 r0 : 64000000
Flags: nzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
Am I doing something wrong or is there a bug in U-Boot?
sst
November 24, 2017, 9:02am
2
No one ever tried this?
Or is device tree modification not supported by Toradex?
I have to admit I never tried it. Looking at the official documentation revealed some issues even there which I tried contacting the Denx guys about but only got an answer from a guy meanwhile having left the company. Let me try your exact use case and get back to you.
Apalis i.MX6
Which exact model and hardware revision thereof?
U-Boot 2016.11+fslc+g22e68cb
That looks to me like the one from Apalis_iMX6_LinuxImageV2.7Beta1_20170112 which is long since deprecated. Please update to any supported BSP being either stable V2.6 or the latest beta BSP (being 2.7b4 at the time of this writing. With that it should work just fine:
root@apalis-imx6:~# hexdump /proc/device-tree/soc/aips-bus\@02000000/ldb\@020e0008/lvds-channel\@0/display-timings/800x600/hfront-porch
0000000 0000 2000
0000004
...
U-Boot 2016.11-2.7.4+g1b121c6 (Oct 04 2017 - 22:34:15 +0000)
CPU: Freescale i.MX6Q rev1.5 at 792 MHz
Reset cause: WDOG
I2C: ready
DRAM: 1 GiB
PMIC: device id: 0x10, revision id: 0x11, programmed
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment
auto-detected panel HDMI
Display: HDMI (1024x768)
In: serial
Out: serial
Err: serial
Model: Toradex Apalis iMX6 Quad 1GB V1.1A, Serial# 04843146
Net: using PHY at 7
FEC [PRIME]
Hit any key to stop autoboot: 0
Apalis iMX6 # run emmcdtbload
reading imx6q-apalis-eval.dtb
50345 bytes read in 16 ms (3 MiB/s)
Apalis iMX6 # fdt addr ${fdt_addr_r}
Apalis iMX6 # fdt print /soc/aips-bus/ldb/lvds-channel@0/display-timings/800x600 hfront-porch
hfront-porch = <0x00000020>
Apalis iMX6 # fdt resize
Apalis iMX6 # fdt set /soc/aips-bus/ldb/lvds-channel@0/display-timings/800x600 hfront-porch <100>
Apalis iMX6 # fdt print /soc/aips-bus/ldb/lvds-channel@0/display-timings/800x600 hfront-porch
hfront-porch = <0x00000064>
Apalis iMX6 # run setup; setenv bootargs ${defargs} ${emmcargs} ${setupargs} ${vidargs}; load mmc 0:1 ${kernel_addr_r} ${boot_file} && run fdt_fixup && bootm ${kernel_addr_r} ${dtbparam}
...
root@apalis-imx6:~# hexdump /proc/device-tree/soc/aips-bus\@02000000/ldb\@020e0008/lvds-channel\@0/display-timings/800x600/hfront-porch
0000000 0000 6400
0000004
sst
December 5, 2017, 10:35am
5
Current version of U-Boot works.
Glad, thanks for letting us know.