On Thursday 02 April 2020 20:42:31 Pali Rohár wrote: > On Wednesday 01 April 2020 12:32:29 Merlijn Wajer wrote: > > Hi, > > > > On 01/04/2020 00:42, Pali Rohár wrote: > > > On Wednesday 01 April 2020 00:35:07 Pali Rohár wrote: > > >> This patch series contain fixes for Nokia RX-51 board (aka N900). > > >> After these changes it is possible to run U-Boot in qemu emulator again. > > >> And U-Boot can boot kernel image from RAM, eMMC or OneNAND memory without > > >> problem. > > > > > > But on real Nokia N900 device is U-Boot crashing in reboot loop. > > > > > > I do not have serial console for Nokia N900 to debug this issue, but > > > seems that it is related to OMAP I2C and OMAP HS MMC code. Problem is > > > that there is no crash and even no error in qemu emulator so I cannot > > > debug this issue. > > > > > > First problem is around /* reset lp5523 led */ code in rx51.c. On real > > > N900 device it generates repeating messages: > > > > > > Check if pads/pull-ups of bus are properly configured > > > Timed out in wait_for_event: status=0000 > > > > > > When I commented that few lines all these messages disappeared. So > > > problem is with OMAP I2C. > > > > > > Second problem happen after misc_init_r() function finishes. U-Boot just > > > prints on N900 screen message "data abort" and reboots. As I do not have > > > serial console it is hard to debug. but I figured out that problem is in > > > mmc_set_ios() function in mmc.c file. In function mmc_set_clock() I put > > > debug info prior to mmc_set_ios() call and after it, and debug info > > > prior was printed, not after. > > > > > > I remember that somebody had serial jig for Nokia N900, could somebody > > > look at this reboot loop problem? > > > > > > And any idea how should be OMAP I2C configured in U-Boot to correctly > > > work? > > > > > > Maybe I will try to find some time to git bisect which change broke > > > U-Boot on real N900 hardware. > > > > Took latest u-boot master, applied patches and this is the result on > > serial (first part is NOLO booting, I think that can be ignored) [1]. > > ... > > > U-Boot 2020.04-rc4-00033-g7dbafe0634-dirty (Apr 01 2020 - 12:15:47 +0200) > > > > OMAP3530-HS ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 MHz > > Nokia RX-51 + LPDDR/OneNAND > > I2C: ready > > DRAM: 256 MiB > > NAND: 0 Bytes > > Looks like that something with NAND is broken. > > > MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 > > In: vga > > Out: vga > > Err: vga > > Timed out in wait_for_event: status=0100 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > Timed out in wait_for_event: status=0000 > > Check if pads/pull-ups of bus are properly configured > > i2c_read (addr phase): pads on bus probably not configured (status=0x10) > > i2c_write: timed out writig last byte! > > These i2c errors are caused by > > /* reset lp5523 led */ > i2c_set_bus_num(1); > state = 0xff; > i2c_write(0x32, 0x3d, 1, &state, 1); > i2c_set_bus_num(0); > > Is there anything which needs to be done to initialize i2c bus 1? > Because this code is working fine on older U-Boot version.
Above code worked fine for U-Boot 2013.04, but in git version from January 2015 it prints above error messages. On on internet forums I see these error messages also from other OMAP3 board, e.g. beagle board. Has somebody some working OMAP3 board? And can test if it works with recent version of U-Boot? I guess that above i2c problem would happen also on other OMAP3 boards. > Was something changed to OMAP i2c bus code in U-Boot? > > > OMAP die ID: 031400240000000004036ac10b01100f > > OMAP3530-HS ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 MHz > > > > And then U-Boot freeze, right? > > Any idea how to debug this issue? > > On my N900 I'm getting "data abort" error on display and then instant > reboot. It looks like that omap hs mmc code cause that freeze/reboot on real HW. Was there some significat change to OMAP3 or omap hs mmc?

