From: Peng Fan Date: Thu, 25 Apr 2019 02:36:22 +0000 (+0000) Subject: imx: mx6sabresd: fix boot hang with video X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9002e735e717;p=project%2Fbcm63xx%2Fu-boot.git imx: mx6sabresd: fix boot hang with video Meet the following boot hang. " U-Boot SPL 2019.04-00661-gdc80a012e4 (Apr 25 2019 - 10:31:57 +0800) Trying to boot from MMC1 U-Boot 2019.04-00661-gdc80a012e4 (Apr 25 2019 - 10:31:57 +0800) CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz) CPU: Automotive temperature grade (-40C to 125C)Reset cause: POR Model: Freescale i.MX6 Quad SABRE Smart Device Board Board: MX6-SabreSD I2C: ready DRAM: 1 GiB Video device 'ipu@2400000' cannot allocate frame buffer memory -ensure the device is set up before relocation Error binding driver 'ipuv3_video': -28 Video device 'ipu@2800000' cannot allocate frame buffer memory -ensure the device is set up before relocation Error binding driver 'ipuv3_video': -28 Some drivers failed to bind Error binding driver 'generic_simple_bus': -28 Some drivers failed to bind initcall sequence 4ffe4500 failed at call 1780dfb7 (err=-28) " 1. fdtdec_get_alias_seq will use "video" as base, however in alias node, we use ipux, so add new alias for U-Boot dts. 2. DM_VIDEO is enabled, however reserve_video is called before relocation, so to make DM_VIDEO work before relocation, need to set SYS_MALLOC_F_LEN 3. defconfig is updated with savedefconfig Note: I do not have a video panel to test, but with this patch, U-Boot boots up again, below log. " U-Boot SPL 2019.04-00662-g0b62453bff (Apr 25 2019 - 10:36:31 +0800) Trying to boot from MMC1 U-Boot 2019.04-00662-g0b62453bff (Apr 25 2019 - 10:36:31 +0800) CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz) CPU: Automotive temperature grade (-40C to 125C) at 34C Reset cause: POR Model: Freescale i.MX6 Quad SABRE Smart Device Board Board: MX6-SabreSD I2C: ready DRAM: 1 GiB PMIC: PFUZE100 ID=0x10 MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 3 Loading Environment from MMC... *** Warning - bad CRC, using default environment PCI: pcie phy link never came up In: serial Out: serial Err: serial Net: FEC [PRIME] Hit any key to stop autoboot: 0 " Signed-off-by: Peng Fan Reviewed-by: Anatolij Gustschin --- diff --git a/arch/arm/dts/imx6q.dtsi b/arch/arm/dts/imx6q.dtsi index d038f41170..71543a4a68 100644 --- a/arch/arm/dts/imx6q.dtsi +++ b/arch/arm/dts/imx6q.dtsi @@ -9,6 +9,7 @@ / { aliases { ipu1 = &ipu2; + video1 = &ipu2; spi4 = &ecspi5; }; diff --git a/arch/arm/dts/imx6qdl.dtsi b/arch/arm/dts/imx6qdl.dtsi index c0a9478008..83eeb5cc59 100644 --- a/arch/arm/dts/imx6qdl.dtsi +++ b/arch/arm/dts/imx6qdl.dtsi @@ -33,6 +33,7 @@ i2c1 = &i2c2; i2c2 = &i2c3; ipu0 = &ipu1; + video0 = &ipu1; mmc0 = &usdhc1; mmc1 = &usdhc2; mmc2 = &usdhc3; diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig index d3ed3c4543..0fda6fc394 100644 --- a/configs/mx6sabresd_defconfig +++ b/configs/mx6sabresd_defconfig @@ -4,13 +4,13 @@ CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_TARGET_MX6SABRESD=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 CONFIG_SPL=y CONFIG_SPL_LIBDISK_SUPPORT=y -# CONFIG_SYS_MALLOC_F is not set CONFIG_FIT=y CONFIG_SPL_FIT_PRINT=y CONFIG_SPL_LOAD_FIT=y @@ -63,6 +63,7 @@ CONFIG_OF_LIST="imx6q-sabresd imx6qp-sabresd imx6dl-sabresd" CONFIG_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_OF_LIST="imx6dl-sabresd imx6q-sabresd imx6qp-sabresd" +CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_SPL_DM=y