
On Sat, Apr 16, 2022 at 7:35 PM Marek Vasut marex@denx.de wrote:
On 4/16/22 22:49, Adam Ford wrote:
On Thu, Apr 7, 2022 at 5:21 PM Tim Harvey tharvey@gateworks.com wrote:
On Wed, Mar 30, 2022 at 8:04 PM Marek Vasut marex@denx.de wrote:
This driver is the only SMCCC dependency in iMX8M U-Boot port. Rework the driver based on Linux GPCv2 driver to directly control the GPCv2 block instead of using SMCCC calls. This way, U-Boot can operate the i.MX8M power domains without depending on anything else.
This is losely based on Linux GPCv2 driver. The GPU, VPU, MIPI power domains are not supported to save space, since they are not useful in the bootloader. The only domains kept are ones for HSIO, PCIe, USB.
Signed-off-by: Marek Vasut marex@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: Peng Fan peng.fan@nxp.com Cc: Stefano Babic sbabic@denx.de
NOTE: So far this is tested on MX8MM and MX8MN. MX8MQ is not tested.
Sorry for the delay, I tested positive for Covid and needed to recover a bit.
I have confirmed this makes the 8MQ hang during boot.
Before patch series:
U-Boot SPL 2022.04-00812-g9859465bfe (Apr 16 2022 - 15:41:46 -0500) PMIC: PFUZE100 ID=0x10 SEC0: RNG instantiated Normal Boot Trying to boot from MMC2
U-Boot 2022.04-00812-g9859465bfe (Apr 16 2022 - 15:41:46 -0500)
CPU: Freescale i.MX8MQ rev2.1 at 1000 MHz Reset cause: POR Model: NXP i.MX8MQ EVK DRAM: 3 GiB Core: 59 devices, 16 uclasses, devicetree: separate MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SEC0: RNG instantiated Net: eth0: ethernet@30be0000 Hit any key to stop autoboot: 0 u-boot=>
After the patch:
U-Boot SPL 2022.04-00822-gc2a24a7ce5 (Apr 16 2022 - 15:45:29 -0500) PMIC: PFUZE100 ID=0x10 SEC0: RNG instantiated Normal Boot Trying to boot from MMC2
There should be some sort of output from ATF here, which version did you use during your tests ?
I used the version from the imx8mq_evk.rst:
Note: srctree is U-Boot source directory Get ATF from: https://source.codeaurora.org/external/imx/imx-atf branch: imx_5.4.47_2.2.0
This works with U-Boot master. I realize it has the ATF power domain code, but with the SMCC stuff removed, it should be irrelevant.
Did you set IMX_BOOT_UART_BASE correctly ?
Did you set ATF_LOAD_ADDR correctly ?
If I didn't build it right, I don't think 'master' would have booted, but it did. I think I built it correctly.
Do you get a hang when you revert only this specific patch ?
When I reverted the series, it booted again, but I can do a bisect tomorrow to narrow down the specific patch in the series that causes the issue.
adam
The GPC is only used for USB and PCI on the MX8MQ, so you shouldn't be getting hang so early as to get no output at all.
<hang>
I can test it on 8MN and 8MM, but it sounds like that's already been done.
[...]