From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pali =?utf-8?B?Um9ow6Fy?= Date: Sat, 25 Apr 2020 23:26:15 +0200 Subject: Bisected: mmc cause reboot loops on N900 (Was: Re: U-Boot is broken on real N900 HW) In-Reply-To: <20200425115045.w45tb62cnwtq5umk@pali> References: <20200331223518.10936-1-pali@kernel.org> <20200331224254.nzaotf5abj6w7n65@pali> <3c7dda52-10b3-e8c3-a382-785c80f124e7@wizzup.org> <20200402184231.jzhy36qfbi4drnli@pali> <20200425104217.pzp5zkhhft5a2he5@pali> <20200425115045.w45tb62cnwtq5umk@pali> Message-ID: <20200425212615.4wzs32p6pgvivsq6@pali> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Adding Jean to the loop. Could you please look at this problem? Your commit (described below) is causing reboot loop on Nokia N900 hardware. On Saturday 25 April 2020 13:50:45 Pali Roh?r wrote: > On Saturday 25 April 2020 06:36:58 Adam Ford wrote: > > On Sat, Apr 25, 2020 at 5:42 AM Pali Roh?r wrote: > > > > > > On Thursday 02 April 2020 20:42:31 Pali Roh?r wrote: > > > > On Wednesday 01 April 2020 12:32:29 Merlijn Wajer wrote: ... > > > > > 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 ... > > > > > MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 ... > > > > > 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? > > > > I booted by board from MMC as shown above. I also use the pinctrl > > features from the device tree to mux the pins in U-Boot (not SPL), so > > my SPL only does manual muxing the essential components it needs > > during the SPL phase, and lets U-Boot do the rest. I only mention > > the pinmux because of message regarding pads/pull-ups. > > > > adam > > I debugged this problem more. I disabled all preboot commands to get > clean U-Boot setup. And it worked. > > After I called any "mmc" command (e.g. "mmc info") I got that instant > board reboot. Preboot commands for n900 try to read some files from mmc, > so this is reason why it get into reboot loop. > > Is there any reason why "mmc info" command can cause "data abort" and > instant reboot of board? > > And do you know what is needed for proper initialization of omap mmc > controller for omap3 board? Because it looks like something fundamental > is missing. > > Currently there are just calls for "omap_mmc_init()" functions and > "twl4030_power_mmc_init()" functions. See: > https://gitlab.denx.de/u-boot/u-boot/-/blob/master/board/nokia/rx51/rx51.c Now I tried git bisect and here is problematic commit which caused whole reboot loop: 04a2ea248f58b3b6216d0cd0a6b8698df8b14355 is the first bad commit commit 04a2ea248f58b3b6216d0cd0a6b8698df8b14355 Author: Jean-Jacques Hiblot Date: Thu Sep 21 16:30:08 2017 +0200 mmc: disable UHS modes if Vcc cannot be switched on and off If a power cycle cannot be done on Vcc, it is safer not to try the UHS modes because we wouldn't be able to recover from an error occurring during the UHS initialization. Signed-off-by: Jean-Jacques Hiblot :040000 040000 04de51428c8311a4b2fb3ad876ac3f6071ab57ee ea7a7959a4bd591c92a2c3d413d5643a8457d2ff M drivers :040000 040000 03f639baf2a2f55003cb750981fd8accc5b4a993 fbcb9607d37959f0b5240f5d727133f58cc35379 M include It changes only core mmc code, nothing platform / board specific. U-Boot compiled from commit before above has fully working eMMC access on real Nokia N900. I can read files on FAT eMMC partition without any problem. I'm not sure what is happening here, but it looks like that omap hs mmc driver used on Nokia N900 is maybe not correctly hooked for UHS support. The most suspicious it that this problem cannot be reproduced in qemu n900 emulator. It happens only on real N900 hw.