UUU not working (to flash emmc) with custom i.mx 8m nano

cancel
Showing results for 
Search instead for 
Did you mean: 

UUU not working (to flash emmc) with custom i.mx 8m nano

339 Views
kippowens
Contributor III

Hi,

We have a custom i.mx 8m nano board that we are trying to bring up.  It very closely follows the DDR4 EVK with a couple of notable differences.

  • Console is on UART3 (instead of 2)
  • 2GB of DDR4
  • We use a USB 2.0 mini connector instead of USB-C
  • We utilize a different PMIC

We can successfully run the DDR memory tool - calibration and stress.  I've applied the ddr4_timing changes in the u-boot build.

However, when we attempt to burn the emmc from UUU, we see an HID(w):LIBUSB_ERROR_TIMEOUT (after a brief run to 3% - if that really is doing something).  The same toolchain is used to burn the LPDDR4 EVK, so I don't think it's a driver issue (but I'm wrong often!).

Any ideas we could try?  I'd appreciate any suggestions and can supply more info as needed.  Best,

Kipp

 

Labels (1)
Tags (2)
0 Kudos
8 Replies

330 Views
kippowens
Contributor III

I should note as well that I believe I have made all necessary changes to appropriately move the console to UART3 (in u-boot and the yocto kernel), but have yet to see any life on that side of things.

0 Kudos

282 Views
nxf46838
NXP TechSupport
NXP TechSupport

Hello,

If it is not printing maybe changes to UART were not done properly, you may take a look to this guide here for reference:
https://community.nxp.com/t5/i-MX-Community-Articles/How-to-Change-i-MX8MM-evk-Linux-Debug-UART/ba-p...

Also, please check that you have disabled the type-c correctly in uboot defconfig

CONFIG_USB_TCPC=n

And remove the typec_ptn5110 1/2 dependencies in dts

&usbotg1 {
    status = "okay";
};

&usbotg2 {
    status = "okay";
};

 

Best regards,
Aldo.

0 Kudos

267 Views
kippowens
Contributor III

Appreciate the response!

I decided I'd start from the basics and try to move the u-boot console output of the imx8mn nano evk (lpddr4) from UART2 to UART3.  My attempts are leading to the same issue I'm seeing on our custom board.  Which...I guess...is promising?

Here are the changes I've made to try to move the console to UART3.

Physical Changes:

  • USB to UART connected to pins 6 (UART3_GND), 8 (UART3_TXD), 10 (UART3_RXD) of the J1003 header

U-Boot-Imx Device Tree Changes

  • arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi && arch/arm/dts/imx8mn-evk-u-boot.dtsi
    • &pinctrl_uart2 --> &pinctrl_uart3
    • &uart2 --> &uart3
  • arch/arm/dts/imx8mn-ddr4-evk.dts && arch/arm/dts/imx8mn-evk.dts 
    • console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 --> console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200
    • stdout-path = &uart2 --> stdout-path = &uart3;
    • pinctrl_uart2 --> pinctrl_uart3
    • MX8MN_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
      MX8MN_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140 -->
      MX8MN_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
      MX8MN_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
    • &uart2 --> &uart3 { /* console */
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_uart2> --> pinctrl-0 = <&pinctrl_uart3>
  • board/freescale/imx8mn_evk/imx8mn_evk.c
    • IMX8MN_PAD_UART2_RXD__UART2_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
      IMX8MN_PAD_UART2_TXD__UART2_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL), -->
      IMX8MN_PAD_UART3_RXD__UART3_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
      IMX8MN_PAD_UART3_TXD__UART3_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL), 
    • "console=ttymxc1,115200\0" --> "console=ttymxc2,115200\0"
    • #define CONFIG_MXC_UART_BASE UART2_BASE_ADDR --> #define CONFIG_MXC_UART_BASE UART3_BASE_ADDR

Imx-Atf Changes:

  • plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
    • added RDC_PDAPn(RDC_PDAP_UART3, D0R | D0W),

Optee Changes:

  • I tried to remove op-tee / op-tee package from my config... Not sure I'm doing that correctly, but wasn't sure where to make these changes.  Would love advice here - either on how to remove (for now) or how to best make changes.

The result when I try to use uuu:

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.127-0-g08c58c9

Success 0 Failure 1


1:222 1/ 2 [HID(W):LIBUSB_ERROR_TIMEOUT ] SDPS: boot -f "imx-boot-imx8mnevk-emmc.bin-flash_evk"

 

c:\NXP_images_sdk_tools\images\custom>uuu_1.4.127.exe -v imx-boot-imx8mnevk-emmc.bin-flash_evk
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.127-0-g08c58c9

Build in config:
Pctl Chip Vid Pid BcdVersion
==================================================
SDPS: MX8QXP 0x1fc9 0x012f [0x0002..0xffff]
SDPS: MX8QM 0x1fc9 0x0129 [0x0002..0xffff]
SDPS: MX8DXL 0x1fc9 0x0147
SDPS: MX28 0x15a2 0x004f
SDPS: MX815 0x1fc9 0x013e
SDPS: MX865 0x1fc9 0x0146
SDPS: MX8ULP 0x1fc9 0x014a
SDPS: MX8ULP 0x1fc9 0x014b
SDP: MX7D 0x15a2 0x0076
SDP: MX6Q 0x15a2 0x0054
SDP: MX6D 0x15a2 0x0061
SDP: MX6SL 0x15a2 0x0063
SDP: MX6SX 0x15a2 0x0071
SDP: MX6UL 0x15a2 0x007d
SDP: MX6ULL 0x15a2 0x0080
SDP: MX6SLL 0x1fc9 0x0128
SDP: MX7ULP 0x1fc9 0x0126
SDP: MXRT106X 0x1fc9 0x0135
SDP: MX8MM 0x1fc9 0x0134
SDP: MX8MQ 0x1fc9 0x012b
SDPU: SPL 0x0525 0xb4a4 [0x0000..0x04ff]
SDPV: SPL1 0x0525 0xb4a4 [0x0500..0x9998]
SDPU: SPL 0x0525 0xb4a4 [0x9999..0x9999]
SDPU: SPL 0x3016 0x1001 [0x0000..0x04ff]
SDPV: SPL1 0x3016 0x1001 [0x0500..0x9998]
FBK: 0x066f 0x9afe
FBK: 0x066f 0x9bff
FB: 0x0525 0xa4a5
FB: 0x18d1 0x0d02
FB: 0x3016 0x0001
Wait for Known USB Device Appear...
New USB Device Attached at 1:222
1:222>Start Cmd:SDPS: boot -f "imx-boot-imx8mnevk-emmc.bin-flash_evk"
10%1:222>Fail HID(W):LIBUSB_ERROR_TIMEOUT(1.045s)

0 Kudos

259 Views
kippowens
Contributor III

This change:

  • #define CONFIG_MXC_UART_BASE UART2_BASE_ADDR --> #define CONFIG_MXC_UART_BASE UART3_BASE_ADDR

Stops UUU from loading the bootloader...

Is it possible this points to the need for a change in optee?

0 Kudos

231 Views
kippowens
Contributor III

Any idea what might be keeping the u-boot messages from displaying on UART3?  It seems like I've made all of the needed changes, but I must be missing something.  Any assistance would be greatly appreciated.  Thanks!

Tags (3)
0 Kudos

201 Views
nxf46838
NXP TechSupport
NXP TechSupport

Hello,

Good to know that you have made some progress in your issue, I notice that you haven't changed IMX_BOOT_UART_BASE definition in ATF:
https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/imx8mn/include/platform_def.h...

Please check this as well

Best regards,
Aldo.

0 Kudos

185 Views
kippowens
Contributor III

Thank you for the response, Aldo.

I did have that change in there and I was able to get things working on my custom board (never did get things completely working on UART3 on the EVK, but that's ok!).

I'm still struggling to boot directly from emmc, but I'll post that as a separate topic.  Thank you again!
Kipp

243 Views
kippowens
Contributor III

I'm now able to run UUU and burn to emmc correctly, it appears.  I was not properly initializing the clock for UART3.

HOWEVER...I still am not getting any debug output on UART3 (during u-boot).

0 Kudos