Changes between Initial Version and Version 1 of venice/SDP


Ignore:
Timestamp:
12/06/2021 11:27:56 PM (3 years ago)
Author:
Tim Harvey
Comment:

initial page

Legend:

Unmodified
Added
Removed
Modified
  • venice/SDP

    v1 v1  
     1[[Outline]]
     2
     3= IMX Serial Download Protocol (SDP)
     4The iMX processors internal boot ROM handles the first boot stage in order to be able to boot from a variety of devices (uSD, NAND, NOR, SPI, SATA, etc). One of the boot devices, referred to as the 'Serial Downloader Protocol' provides an API over USB OTG. Therefore an application can reside on a host PC that will can control the boot of the iMX as long as you can get the iMX to boot in this mode (referred to as 'BOOT_MODE0'). During the internal ROM's boot, a watchdog is used such that a corrupt or non-existent boot media will result in attempting to boot via SDP. This may be useful if you are working with a board that has an unprogrammed or misprogrammed FLASH device which also has access to USB OTG.
     5
     6=== Booting Venice U-Boot over SDP with uuu
     7NXP provides 'uuu' (Universal Update Utility) which is an evolution of the old Freescale MFGtools. The most important update is that it is supported under Linux instead of Windows only.
     8
     9For i.MX SoC's we use a 2-stage boot firmware comprised of the Secondary Program Loader (SPL) (provided by U-Boot) as well as U-Boot proper. Each stage is loaded separately as seen below in the examples. While no special code support is needed for the SPL boot over SDP, in order for the SPL to implement SDP to boot to U-Boot proper you need to have the following enabled in U-Boot:
     10 - CONFIG_SPL_USB_HOST_SUPPORT=y
     11 - CONFIG_SPL_USB_GADGET=y
     12 - CONFIG_SPL_USB_SDP_SUPPORT=y
     13 - CONFIG_CMD_USB_SDP=y (only if you want the 'sdp' command in U-Boot'
     14
     15Linux Install:
     16{{{#!bash
     17wget https://github.com/NXPmicro/mfgtools/releases/download/uuu_1.4.69/uuu
     18chmod +x uuu
     19sudo mv uuu /usr/local/bin
     20}}}
     21
     22Examples:
     23 * list SDP devices on the USB bus:
     24{{{#!bash
     25$ uuu -lsusb # list compatible devices on the USB bus in SDP mode
     26uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.69-0-g63b1d3c
     27
     28Connected Known USB Devices
     29Path Chip Pro Vid Pid BcdVersion
     30==================================================
     313:2 MX8MM SDP: 0x1FC9 0x0134 0x0101
     32}}}
     33 * Boot Venice U-Boot over SDP (using flash.bin and u-boot.itb):
     34  - linux host:
     35{{{#!bash
     36$ sudo uuu flash.bin && sudo uuu SDPV: write -f u-boot.itb -addr 0x42000000 && sudo uuu SDPV: jump -addr 0x42000000
     37uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760
     38
     39Success 1    Failure 0                                                         
     40                                                                               
     41                                                                               
     422:13     2/ 2 [Done                                  ] SDP: done               
     43
     44
     45uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760
     46
     47Success 0    Failure 0                                                         
     48                                                                               
     49                                                                               
     502:13     1/ 1 [=================100%=================] SDPV: write -f u-boot.itb
     51Okay
     52
     53
     54
     55uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760
     56
     57Success 0    Failure 0                                                         
     58                                                                               
     59                                                                               
     602:13     1/ 1 [=================100%=================] SDPV: jump -addr 0x420000
     61Okay
     62}}}
     63  - target
     64{{{#!bash
     65U-Boot SPL 2021.07-00066-g7cc5a04f34ab (Dec 06 2021 - 14:56:21 -0800)
     66GSC     : v61 0x1d6f RST:VIN Thermal Protection Disabled
     67Model   : GW7211-00-CB
     68Serial  : 852420
     69MFGDate : 11-19-2021
     70RTC     : 1
     71PMIC    : MP5416
     72DRAM    : LPDDR4 1 GiB
     73WDT:   Started with servicing (60s timeout)
     74Trying to boot from USB SDP
     75SDP: initialize...
     76SDP: handle requests...
     77Downloading file of size 968812 to 0x42000000... done
     78Jumping to header at 0x42000000
     79Header Tag is not an IMX image
     80Found header at 0x42000000
     81DTB     : imx8mm-venice-gw72xx-0x
     82NOTICE:  BL31: v2.4(release):f884ad7b0ba2
     83NOTICE:  BL31: Built : 13:06:09, Oct 20 2021
     84
     85
     86U-Boot 2021.07-00066-g7cc5a04f34ab (Dec 06 2021 - 14:56:21 -0800)
     87
     88CPU:   Freescale i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
     89CPU:   Industrial temperature grade (-40C to 105C) at 31C
     90Reset cause: POR
     91Model: Gateworks Venice GW72xx-0x i.MX8MM Development Kit
     92DRAM:  1 GiB
     93temp    : 23.6C
     94vdd_bat : 0.000V
     95vdd_vin : 16.932V
     96vdd_adc1: 0.000V
     97vdd_adc2: 0.000V
     98vdd_dram: 1.097V
     99vdd_1p2 : 1.192V
     100vdd_1p0 : 0.982V
     101vdd_2p5 : 2.470V
     102vdd_3p3 : 3.254V
     103vdd_0p95: 0.949V
     104vdd_1p8 : 1.801V
     105vdd_gsc : 2.942V
     106WDT:   Started with servicing (60s timeout)
     107MMC:   FSL_SDHC: 1, FSL_SDHC: 2
     108Loading Environment from MMC... MMC Device 0 not found
     109*** Warning - No MMC card found, using default environment
     110
     111In:    serial
     112Out:   serial
     113Err:   serial
     114Net:   DP83867 eth0: ethernet@30be0000 [PRIME]
     115GSC     : boot watchdog disabled
     116Hit any key to stop autoboot:  0
     117u-boot=>
     118}}}
     119 * invoke SDP while in U-Boot
     120{{{#!bash
     121u-boot=> sdp 0
     122SDP: initialize...
     123SDP: handle requests...
     124}}}
     125
     126
     127Note in order to force booting from SDP you either need to drive BOOT_MODE0 high (with a special GSC firmware) or simply erase the emmc SPL code (ie 'mmc dev 2 && mmc erase 0 8000)
     128