aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini2020-06-13 09:01:01 -0400
committerTom Rini2020-06-13 09:01:01 -0400
commitf9e3d2e147ee3b18dbc09e56d13e6fc8758ac375 (patch)
treebd93f43be8a3ea14724aeb5686fbdcb80125623e /board
parent8a1292ce3e21205645a155b23ac083a3fc6b64c1 (diff)
parentcea8f2c995b9d87af6ef42f967402e1c8a3506db (diff)
Merge tag 'dm-pull-12jun20' of git://git.denx.de/u-boot-dm into next
patman improvements to allow it to work with Zephyr change to how sequence numbers are assigned to devices minor fixes and improvements
Diffstat (limited to 'board')
-rw-r--r--board/freescale/imx8mp_evk/README41
-rw-r--r--board/freescale/imx8mp_evk/spl.c28
-rw-r--r--board/menlo/m53menlo/m53menlo.c14
3 files changed, 54 insertions, 29 deletions
diff --git a/board/freescale/imx8mp_evk/README b/board/freescale/imx8mp_evk/README
new file mode 100644
index 00000000000..7dd3a9352a5
--- /dev/null
+++ b/board/freescale/imx8mp_evk/README
@@ -0,0 +1,41 @@
+U-Boot for the NXP i.MX8MP EVK board
+
+Quick Start
+===========
+- Build the ARM Trusted firmware binary
+- Get the firmware-imx package
+- Build U-Boot
+- Boot
+
+Get and Build the ARM Trusted firmware
+======================================
+Note: $(srctree) is the U-Boot source directory
+Get ATF from: https://source.codeaurora.org/external/imx/imx-atf
+branch: imx_5.4.3_2.0.0
+$ make PLAT=imx8mp bl31
+$ sudo cp build/imx8mp/release/bl31.bin $(srctree)
+
+Get the ddr firmware
+====================
+$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.7.bin
+$ chmod +x firmware-imx-8.7.bin
+$ ./firmware-imx-8.7
+$ sudo cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem_201904.bin $(srctree)/lpddr4_pmu_train_1d_dmem.bin
+$ sudo cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem_201904.bin $(srctree)/lpddr4_pmu_train_1d_imem.bin
+$ sudo cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem_201904.bin $(srctree)/lpddr4_pmu_train_2d_dmem.bin
+$ sudo cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem_201904.bin $(srctree)/lpddr4_pmu_train_2d_imem.bin
+
+Build U-Boot
+============
+$ export CROSS_COMPILE=aarch64-poky-linux-
+$ make imx8mp_evk_defconfig
+$ export ATF_LOAD_ADDR=0x960000
+$ make flash.bin
+
+Burn the flash.bin to the MicroSD card at offset 32KB
+$sudo dd if=flash.bin of=/dev/sd[x] bs=1K seek=32; sync
+
+Boot
+====
+Set Boot switch to SD boot
+Use /dev/ttyUSB2 for U-Boot console
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index cd5b32c3f8c..3b3a854e29b 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -29,11 +29,6 @@
#include <mmc.h>
#include <asm/arch/ddr.h>
-#include <dm/uclass.h>
-#include <dm/device.h>
-#include <dm/uclass-internal.h>
-#include <dm/device-internal.h>
-
DECLARE_GLOBAL_DATA_PTR;
int spl_board_boot_device(enum boot_device boot_dev_spl)
@@ -48,16 +43,7 @@ void spl_dram_init(void)
void spl_board_init(void)
{
- struct udevice *dev;
- int ret;
-
puts("Normal Boot\n");
-
- ret = uclass_get_device_by_name(UCLASS_CLK,
- "clock-controller@30380000",
- &dev);
- if (ret < 0)
- printf("Failed to find clock node. Check device tree\n");
}
#define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PE)
@@ -118,6 +104,7 @@ int board_fit_config_name_match(const char *name)
}
#endif
+/* Do not use BSS area in this phase */
void board_init_f(ulong dummy)
{
int ret;
@@ -128,19 +115,14 @@ void board_init_f(ulong dummy)
board_early_init_f();
- timer_init();
-
- preloader_console_init();
-
- /* Clear the BSS. */
- memset(__bss_start, 0, __bss_end - __bss_start);
-
- ret = spl_init();
+ ret = spl_early_init();
if (ret) {
debug("spl_init() failed: %d\n", ret);
hang();
}
+ preloader_console_init();
+
enable_tzc380();
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
@@ -149,6 +131,4 @@ void board_init_f(ulong dummy)
/* DDR initialization */
spl_dram_init();
-
- board_init_r(NULL, 0);
}
diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c
index 58a564ac314..d4288a2c573 100644
--- a/board/menlo/m53menlo/m53menlo.c
+++ b/board/menlo/m53menlo/m53menlo.c
@@ -353,24 +353,28 @@ int board_late_init(void)
ret = splash_screen_prepare();
if (ret < 0)
- return ret;
+ goto splasherr;
len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;
ret = gunzip(dst + 2, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE - 2,
(uchar *)addr, &len);
if (ret) {
printf("Error: no valid bmp or bmp.gz image at %lx\n", addr);
- free(dst);
- return ret;
+ goto splasherr;
}
ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
if (ret)
- return ret;
+ goto splasherr;
ret = video_bmp_display(dev, (ulong)dst + 2, xpos, ypos, true);
if (ret)
- return ret;
+ goto splasherr;
+
+ return 0;
+
+splasherr:
+ free(dst);
#endif
return 0;
}