Manufacturing Tool - Cannot Program SPI-NOR Device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Manufacturing Tool - Cannot Program SPI-NOR Device

1,096 Views
PaulDeMetrotion
Senior Contributor I

Have a custom device based on the i.MX6Q processor and cannot program the on-board SPI-NOR device. Am using the MfgTool2 program and have generated u-boot and uImage binaries with the Manufacturing Firmware selected in the LTIB menu. When I open the program I successfully connect to the device and it displays that is connected to an HID-compliant device. Everything looks great so far.

When I select "Start", the following occurs which is consistent with my ucl2.xml file.

  1. Loading u-boot. I verified that this file is being loaded at address 0x10800000.
  2. Doing Kernel. Also verified that this is being loaded at address 0x11000000.
  3. Doing initramfs. Now this is where I get confused. I can generate the initramfs.cpio.gz.uboot file in manufacturing firmware mode or not. I tried both ways with no differences. Appears to work but not sure if I am generating a useful file?
  4. Jumping to OS image. Using an emulator the program jumps to address 0x278006e0 which appears to be a valid image.

At this point the system locks up, and I have been able to determine that early in the execution of this image the usboh3 clock is disabled. Later in the code the USB command register is accessed and due to the disabled clock, this fails and the system is dead from that point.

Why is the clock being disabled? What image is being used when the OS image is jumped to?

Labels (6)
Tags (2)
0 Kudos
4 Replies

709 Views
AlejandroSierra
NXP Employee
NXP Employee

Could you please attach you config file. It seems you're missing #defines.

You could based your configuration file on our mx6q_sabreauto_spi-nor_mfg.h

0 Kudos

709 Views
PaulDeMetrotion
Senior Contributor I

A little disappointed in the lack of a response on this issue. I removed the #ifdef code from the previous post and have gotten further.

My current issue is that there are no environment variable being included with my manufacturing u-boot file. When it loads the files into memory and attempts to boot, the code has no idea where to go. The current defined variables are here:

MFG U-Boot>printenv
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0

Environment size: 53/131068 bytes

Within my custom manufacturing include file I have the following definitions:

#define CONFIG_BOOTARGS         "console=ttymxc0,115200 rdinit=/linuxrc"

#define CONFIG_BOOTCOMMAND      "bootm 0x10800000 0x11000000"

#define CONFIG_EXTRA_ENV_SETTINGS \

"netdev=eth0\0"   \

"ethprime=FEC0\0"  \
"uboot=u-boot.bin\0"  \

"kernel=uImage\0"  \

Any idea why these variables are not being included in my u-boot build?

0 Kudos

709 Views
YixingKong
Senior Contributor IV

Paul, please follow Alex's suggestion and try to define in your config file. If it works please click Correct Answer/Helpful Answer.

Thanks,

Yixing

0 Kudos

709 Views
PaulDeMetrotion
Senior Contributor I

Digging a little deeper I found that the code failing is what was added for the manufacturing firmware. In my custom u-boot file I added the following to my board_init function:

#ifdef CONFIG_MFG

/* MFG firmware need reset usb to avoid host crash firstly */

#define USBCMD 0x140

    int val = readl(OTG_BASE_ADDR + USBCMD);

    val &= ~0x1;  /* RS bit */

    writel(val, OTG_BASE_ADDR + USBCMD);

#endif

But nowhere in the u-boot code do I initialize the USB port so the clock is not being enabled. None of the Freescale u-boot code examples do so either. Do I need to add this functionality in order to use the USB OTG port?

0 Kudos