diff mbox series

[v1,4/5] board: toradex: verdin-imx8mm: add README

Message ID 20200123113140.9353-5-igor.opaniuk@gmail.com
State New
Headers show
Series board: toradex: add Verdin iMX8MM 2GB WB IT v1.0a | expand

Commit Message

Igor Opaniuk Jan. 23, 2020, 11:31 a.m. UTC
From: Igor Opaniuk <igor.opaniuk at toradex.com>

Add README with build steps for U-boot and TF-A for Verdin i.MX8MM SoM.

Signed-off-by: Igor Opaniuk <igor.opaniuk at toradex.com>
---

 board/toradex/verdin-imx8mm/README | 81 ++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 board/toradex/verdin-imx8mm/README

Comments

Oleksandr Suvorov Jan. 23, 2020, 11:43 a.m. UTC | #1
On Thu, Jan 23, 2020 at 1:32 PM Igor Opaniuk <igor.opaniuk at gmail.com> wrote:
>
> From: Igor Opaniuk <igor.opaniuk at toradex.com>
>
> Add README with build steps for U-boot and TF-A for Verdin i.MX8MM SoM.
>
> Signed-off-by: Igor Opaniuk <igor.opaniuk at toradex.com>

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov at toradex.com>

> ---
>
>  board/toradex/verdin-imx8mm/README | 81 ++++++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 board/toradex/verdin-imx8mm/README
>
> diff --git a/board/toradex/verdin-imx8mm/README b/board/toradex/verdin-imx8mm/README
> new file mode 100644
> index 0000000000..857138d4fb
> --- /dev/null
> +++ b/board/toradex/verdin-imx8mm/README
> @@ -0,0 +1,81 @@
> +U-Boot for the Toradex Verdin i.MX8MM  board
> +
> +Quick Start
> +===========
> +- Build the ARM Trusted firmware binary
> +- Get DDR firmware
> +- Build U-Boot
> +- Flash to eMMC
> +- Boot
> +
> +
> +Get and Build the ARM Trusted firmware (Trusted Firmware A)
> +======================================
> +$ echo "Downloading and building TF-A..."
> +$ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf
> +$ cd imx-atf
> +
> +Please edit `plat/imx/imx8mm/include/platform_def.h` so it
> +contains proper values for UART configuration and BL31 base
> +address (correct values listed below):
> +#define BL31_BASE                      0x910000
> +#define IMX_BOOT_UART_BASE             0x30860000
> +#define DEBUG_CONSOLE                  1
> +
> +Then build ATF (TF-A):
> +$ make PLAT=imx8mm bl31
> +
> +Get the DDR firmware
> +=============================
> +$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.1.1.bin
> +$ chmod +x firmware-imx-8.1.1.bin
> +$ ./firmware-imx-8.1.1.bin
> +$ cp firmware-imx-8.1.1/firmware/ddr/synopsys/lpddr4*.bin ./
> +
> +Build U-Boot
> +============
> +$ export CROSS_COMPILE=aarch64-poky-linux-
> +$ make verdin-imx8mm_defconfig
> +$ make flash.bin
> +
> +Flash to eMMC
> +===========
> +> tftpboot ${loadaddr} flash.bin
> +> setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
> +> mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt}
> +
> +Boot
> +===========
> +
> +ATF, U-boot proper and u-boot.dtb images are packed into FIT image,
> +which is loaded and parsed by SPL.
> +
> +Boot sequence is:
> +SPL ---> ATF (TF-A) ---> U-boot proper
> +
> +Output:
> +
> +U-Boot SPL 2020.01-01840-gd92bdc79cf-dirty (Jan 22 2020 - 18:50:57 +0200)
> +Normal Boot
> +Trying to boot from MMC1
> +NOTICE:  Configuring TZASC380
> +NOTICE:  RDC off
> +NOTICE:  BL31: v1.5(release):p9.0.0_1.1.0-ga-20190801-0-gd6451cc1e-dirty
> +NOTICE:  BL31: Built : 17:43:07, Jan 22 2020
> +NOTICE:  sip svc init
> +
> +
> +U-Boot 2020.01-01840-gd92bdc79cf-dirty (Jan 22 2020 - 18:50:57 +0200)
> +
> +CPU:   Freescale i.MX8MMQ rev1.0 at 0 MHz
> +Reset cause: POR
> +DRAM:  2 GiB
> +MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> +Loading Environment from MMC... OK
> +In:    serial
> +Out:   serial
> +Err:   serial
> +Model: Toradex Verdin iMX8M Mini 2GB Wi-Fi / BT IT V1.0A, Serial# 06535148
> +Net:   Could not get PHY for FEC0: addr 7
> +eth0: ethernet at 30be0000
> +Hit any key to stop autoboot:  0
> --
> 2.17.1
>
Marcel Ziswiler Jan. 26, 2020, 2:31 a.m. UTC | #2
Hi Igor

On Thu, 2020-01-23 at 13:31 +0200, Igor Opaniuk wrote:
> From: Igor Opaniuk <igor.opaniuk at toradex.com>
> 
> Add README with build steps for U-boot and TF-A for Verdin i.MX8MM
> SoM.
> 
> Signed-off-by: Igor Opaniuk <igor.opaniuk at toradex.com>
> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov at toradex.com>
> ---
> 
>  board/toradex/verdin-imx8mm/README | 81
> ++++++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 board/toradex/verdin-imx8mm/README
> 
> diff --git a/board/toradex/verdin-imx8mm/README
> b/board/toradex/verdin-imx8mm/README
> new file mode 100644
> index 0000000000..857138d4fb
> --- /dev/null
> +++ b/board/toradex/verdin-imx8mm/README
> @@ -0,0 +1,81 @@
> +U-Boot for the Toradex Verdin i.MX8MM  board

Verdin iMX8M Mini Module

> +
> +Quick Start
> +===========
> +- Build the ARM Trusted firmware binary
> +- Get DDR firmware
> +- Build U-Boot
> +- Flash to eMMC
> +- Boot
> +
> +
> +Get and Build the ARM Trusted firmware (Trusted Firmware A)
> +======================================
> +$ echo "Downloading and building TF-A..."
> +$ git clone -b imx_4.14.78_1.0.0_ga 

I suggest to use the later branch imx_4.14.98_2.3.0 which should also
include i.MX 8M Nano support now.

> https://source.codeaurora.org/external/imx/imx-atf
> +$ cd imx-atf
> +
> +Please edit `plat/imx/imx8mm/include/platform_def.h` so it
> +contains proper values for UART configuration and BL31 base
> +address (correct values listed below):
> +#define BL31_BASE                      0x910000
> +#define IMX_BOOT_UART_BASE             0x30860000
> +#define DEBUG_CONSOLE                  1
> +
> +Then build ATF (TF-A):
> +$ make PLAT=imx8mm bl31
> +
> +Get the DDR firmware
> +=============================
> +$ wget 
> https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.1.1.bin

There is now 8.4.1 available from above mentioned release. However, I
believe there were no changes in DDR firmware.

> +$ chmod +x firmware-imx-8.1.1.bin
> +$ ./firmware-imx-8.1.1.bin
> +$ cp firmware-imx-8.1.1/firmware/ddr/synopsys/lpddr4*.bin ./
> +
> +Build U-Boot
> +============
> +$ export CROSS_COMPILE=aarch64-poky-linux-

With a linaro toolchain this would rather be:

aarch64-linux-gnu-

> +$ make verdin-imx8mm_defconfig
> +$ make flash.bin
> +
> +Flash to eMMC
> +===========
> +> tftpboot ${loadaddr} flash.bin
> +> setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} /
> 0x200
> +> mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt}

Or just run update_uboot (;-p).

> +
> +Boot
> +===========
> +
> +ATF, U-boot proper and u-boot.dtb images are packed into FIT image,
> +which is loaded and parsed by SPL.
> +
> +Boot sequence is:
> +SPL ---> ATF (TF-A) ---> U-boot proper
> +
> +Output:
> +
> +U-Boot SPL 2020.01-01840-gd92bdc79cf-dirty (Jan 22 2020 - 18:50:57
> +0200)
> +Normal Boot
> +Trying to boot from MMC1
> +NOTICE:  Configuring TZASC380
> +NOTICE:  RDC off
> +NOTICE:  BL31: v1.5(release):p9.0.0_1.1.0-ga-20190801-0-gd6451cc1e-
> dirty
> +NOTICE:  BL31: Built : 17:43:07, Jan 22 2020
> +NOTICE:  sip svc init
> +
> +
> +U-Boot 2020.01-01840-gd92bdc79cf-dirty (Jan 22 2020 - 18:50:57
> +0200)
> +
> +CPU:   Freescale i.MX8MMQ rev1.0 at 0 MHz
> +Reset cause: POR
> +DRAM:  2 GiB
> +MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> +Loading Environment from MMC... OK
> +In:    serial
> +Out:   serial
> +Err:   serial
> +Model: Toradex Verdin iMX8M Mini 2GB Wi-Fi / BT IT V1.0A, Serial#
> 06535148
> +Net:   Could not get PHY for FEC0: addr 7
> +eth0: ethernet at 30be0000
> +Hit any key to stop autoboot:  0

Cheers

Marcel
diff mbox series

Patch

diff --git a/board/toradex/verdin-imx8mm/README b/board/toradex/verdin-imx8mm/README
new file mode 100644
index 0000000000..857138d4fb
--- /dev/null
+++ b/board/toradex/verdin-imx8mm/README
@@ -0,0 +1,81 @@ 
+U-Boot for the Toradex Verdin i.MX8MM  board
+
+Quick Start
+===========
+- Build the ARM Trusted firmware binary
+- Get DDR firmware
+- Build U-Boot
+- Flash to eMMC
+- Boot
+
+
+Get and Build the ARM Trusted firmware (Trusted Firmware A)
+======================================
+$ echo "Downloading and building TF-A..."
+$ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf
+$ cd imx-atf
+
+Please edit `plat/imx/imx8mm/include/platform_def.h` so it
+contains proper values for UART configuration and BL31 base
+address (correct values listed below):
+#define BL31_BASE                      0x910000
+#define IMX_BOOT_UART_BASE             0x30860000
+#define DEBUG_CONSOLE                  1
+
+Then build ATF (TF-A):
+$ make PLAT=imx8mm bl31
+
+Get the DDR firmware
+=============================
+$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.1.1.bin
+$ chmod +x firmware-imx-8.1.1.bin
+$ ./firmware-imx-8.1.1.bin
+$ cp firmware-imx-8.1.1/firmware/ddr/synopsys/lpddr4*.bin ./
+
+Build U-Boot
+============
+$ export CROSS_COMPILE=aarch64-poky-linux-
+$ make verdin-imx8mm_defconfig
+$ make flash.bin
+
+Flash to eMMC
+===========
+> tftpboot ${loadaddr} flash.bin
+> setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
+> mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt}
+
+Boot
+===========
+
+ATF, U-boot proper and u-boot.dtb images are packed into FIT image,
+which is loaded and parsed by SPL.
+
+Boot sequence is:
+SPL ---> ATF (TF-A) ---> U-boot proper
+
+Output:
+
+U-Boot SPL 2020.01-01840-gd92bdc79cf-dirty (Jan 22 2020 - 18:50:57 +0200)
+Normal Boot
+Trying to boot from MMC1
+NOTICE:  Configuring TZASC380
+NOTICE:  RDC off
+NOTICE:  BL31: v1.5(release):p9.0.0_1.1.0-ga-20190801-0-gd6451cc1e-dirty
+NOTICE:  BL31: Built : 17:43:07, Jan 22 2020
+NOTICE:  sip svc init
+
+
+U-Boot 2020.01-01840-gd92bdc79cf-dirty (Jan 22 2020 - 18:50:57 +0200)
+
+CPU:   Freescale i.MX8MMQ rev1.0 at 0 MHz
+Reset cause: POR
+DRAM:  2 GiB
+MMC:   FSL_SDHC: 0, FSL_SDHC: 1
+Loading Environment from MMC... OK
+In:    serial
+Out:   serial
+Err:   serial
+Model: Toradex Verdin iMX8M Mini 2GB Wi-Fi / BT IT V1.0A, Serial# 06535148
+Net:   Could not get PHY for FEC0: addr 7
+eth0: ethernet at 30be0000
+Hit any key to stop autoboot:  0