This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: Sysboot Strange Problem AM335x

Part Number: AM3358
Other Parts Discussed in Thread: UNIFLASH,

Hi,

We have a custom board which based on BBB.

During the development and bring-up, i was using "SYSBOOT[4:0]=01011b" config; which is:  USB0(RNDIS), NAND, SPI0,MMC0 respectively. I could program my board without anyproblem.

Now we are in production and prototyping process. I change the sysboot pins to "10010b" which is: NAND, USB0, UART0. I had wrote my program to NAND and made it work successfully boot from NAND.

I had some strange problem couple of times. I try to summarize;
I had require to change some u-boot code. So erased SPL part of my nand flash. Second boot option was USB0 (processor was working like this), but the processor won't open from USB(RNDIS) anymore! There is no network device in my network manager.

I tried to boot from UART. It was okey. As soon as U-Boot open, i can reach USB0(RNDIS) and read zImage and dtb via TFTP. It means my USB peripheral working.

I have changed the SYSBOOT back to my first config "01011b". After that my board can boot from USB0 and NAND.

When i change back to my second SYSBOOT "10010b". Everything working fine.

As result Hardware is okey. Code ise same. When i erase NAND part USB0(RNDIS) is not working anymore, after some strange test (as i described above), it start working normally.
I had this problem with many different boards. Logically there is no explanation.

Is there any idea?

  • Hi Gokhan,

    When i erase NAND part USB0(RNDIS) is not working anymore, after some strange test (as i described above), it start working normally.

    Do you mean when sysboot pins are "10010b", right after erased NAND, the board doesn't boot from USB/RNDIS, but after some testing, the board started to boot from USB/RNDIS? If so, did you power cycle the board during the testing?

  • Hi Bin,

    Ofcourse i power cycle the board.
    It think it should be more clear. While i say "after some testing", i mean i change the system boot pins to other congifs as 01100b, 11000b, etc. Because when i enter that strange condition, RNDIS never respons me in "10010b" config, until i change the boot pins to other configs.

  • Hi Gokhan,

    Thanks for the clarification. I am routing your query to our ROM expert for comments.

  • Gokhan, i'm a little confused on your steps.  It appears that the only thing that is *not* working for you is that after a NAND erase, you power cycle the board and the boot does not move on to the 2nd boot source which is USB (when you have boot sequence NAND, USB, UART).

    Note that in order for an erased NAND to fail to boot, the ROM has to read 0xFFFFFFFF out of the first block of the NAND.  This would indicate to the ROM that this NAND is erased and it moves on to the next boot source.  If it is anything else, ROM assumes a valid image and attempts to boot.  This may be what you are seeing: the ROM is hung in the NAND boot and never moves on to USB boot.

    Ensure that when you erase the SPL from NAND, that the first block in the NAND is erased to all Fs.

    Regards,

    James

  • Hi JJD,

    "ROM is hung in the NAND boot" comment is logical, but i should explain issue a little more. I try to explain above but i think you missed.

    While Sysboot pins set to "10010b" which is: NAND, USB0, UART0.
    After i erase the NAND, while i was waiting for RNDIS, no RNDIS.
    But i my terminal screen there is "CCC". It means UART0 boot is ready.
    I send SPL via X-modem , u-boot.img via Y-modem. Then U-boot starts. Then i can download zImage and dtb from RNDIS via TFTP(Uniflash).

    Then you teory falls, because if ROM hung in NAND, It can't skip USB0(RNDIS) to UART0 right? It means it is not hang.
    Then if we had a USB0(RNDIS) problem,  how can i download zImage after UART0 boot?

    I got confused so much.Upside down

  • Ok, yes i misunderstood.  So with what you descibe, it appears the ROM is attempting NAND first and fails, attempting USB0 and fails, and then attempting UART0.  

    Not sure why the USB0 would fail in this instance, whereas it is fine with the other boot sequence.  Is there a long pause (like a few seconds) before the "CCCC" is seen?  The enumeration timeout should be 3 sec or so, so it should be noticeable.  This will at least tell us that ROM is attempting the USB0 boot, but failing, and not just skipping over it.

    Is the cable connected and supplying 5V (check VBUS on the board) at the point the ROM is attempting to boot USB0?  Can you detect any enumeration attempt (not sure if you have the capability with a USB logic analyzer in the path)?    

    Do you have JTAG access to the board?  If so, can you record the value of CONTROL_STATUS register at 0x44E10040 after each of the boot scenarios?

    Can you send the schematic portion of all the sysboot signals?

    Long shot, but can you try different USB cable?

    Regards,

    James

  • In addition to what James requested, I'd like to see the USB0 portion of the schematics, from AM335x USB0 pins to the USB connector.

  • Hi JJD,

    First of all, it is not cable problem because, if i connect another board to that USB cable. It start with USB(RNDIS) boot.

    In my test i wait for ROM boot attempt for ~10 minutes. So nothing changed. (While boot sequence USB->NAND->UART, if nand is empty, i am waiting for a while to see "CCC". I know i need to wait a little)

    I have a jtag, but i dont use your SDK. As last solution, i can check via Jtag.

    sysboot signals same as BBB; schmatic part is here;


    Our Problem is; This board would be out first prototype of mass production. So we didn't place any switch.
    For any change of Sysboot pins, we are soldering and replacing some resistors. So new test means a messy work for me.

  • Hi Gokhan,

    Yes, understood that it is cumbersome at the moment

    Also provide the USB portion of the schematic as Bin mentioned.

    If you can connect JTAG, we may be able to get some more clues as to why USB boot fails after NAND boot.  If you are waiting a while to see the 'CCCC', it appears that USB0 boot is being attempted.

    Do you happen to have a USB protocol analyzer?

    Regards,

    James

      

  • Hi JJD;
    As i told you before, our design based on BBB.  USB pins directly connected to AM3358 soc. I don't know what are you expected to see at USB connections. Sweat smileThere is nothing special. 
    Here is USB portion.

    I will try to attach Jtag. (when i connect what should i do, which registers should i watch)

    We have salea logic protocol analyser. We can decode USB. As similar question. If i follow the usb lines? What should i see as packets? Are there any special packets, or existance of any USB data?

  • Hi Gokhan,

    What is J1 and U1 in the schematics?

    I'd like to see the entire USB0 portion of the schematics, from AM335x USB0 pins to the USB connector.

  • U1 is PMIC TPS65217B.
    J1 is a Connector.
    USB0_5V and USB1_5V derivated from SYS_5V.
    USB data pins passing through ferrites and going directly to AM335X pins.

  • Gokhan, can you take a USB trace of a successful USB(RNDIS) boot vs a failed one, and post the trace?   

    Your schematics aren't quite the same as BBB.  The BBB has USB_DRVVBUS unconnected, but your schematics have a trace on it (what is this connected to?).  Also, on the schematic snippets you provided, i can't tell if USB0_ID is connected to something else.

    I think possibly the USB controller/PHY is not in the right state when attempting to boot in peripheral mode

    If you do get JTAG to work, first dump the following register on a failing and passing booting scenario: 0x44E10040

    Regards,

    James

  • Hi James,

    Getting back to this topic after the New Year.

    While the customer was trying falcon mode they reprogrammed NAND memory a few times and changed boot-mode numerous times. This showed that when they erase other parts of NAND sometimes it affects the SPL part. So now their card cannot wake from NAND.spl. This could be the problem.

     

    TI recommendation says, 4 SPL area should be there as backup areas. Ex:

     

    Do you recommend changing the NAND memory to eMMC memory?


    1. This is the config:

    CONFIG_SPL_OS_BOOT=y is set by Kernel

    CONFIG_CMD_SPL_NAND_OFS=0x005e0000
    CONFIG_SPL_PAYLOAD_ARGS_ADDR=0x80000100

    CONFIG_SYS_NAND_SPL_KERNEL_OFFS=0x000c0000

    CONFIG_CMD_SPL_NAND_OFS=0x005e0000

    CONFIG_CMD_SPL_WRITE_SIZE=0x20000

    # CONFIG_SPL_SIZE_LIMIT=0x10000 (this caused a problem because of the size)

    2. Next, they created a uImage file
    3. Flashed to NAND.
    4. Used these commands:


    nand read ${fdtaddr} NAND.dtb

    nand read ${loadaddr} NAND.zImage   (uImage placed in this area)
    spl export fdt ${loadaddr} - ${fdtaddr}

    nand erase.part NAND.flags

    nand write ${fdtaddr} NAND.flags

    setenv boot_os 1
    saveenv


    Nothing happens.

    1st question: should there be any special address when creating uImage? (ex:make LOADADDR=80008000 uImage)
    2nd question: should they use atag or ftd ? (spl export atags 0x82000000 or spl export fdt ${loadaddr} - ${fdtaddr})
    3rd question: Do uboot config parameters look ok?


    Thank you,

    Daniel

  • Hello Daniel,
    For your reference, I'm attaching the working nand flashing/booting logs with Linux SDK 7.3 on TI AM335x GP EVM, where the u-boot and kernel binary are the default ones from SDK 7.3.
    - am3_7.3_nand_linux_flash.txt: nand flashing
    - am3_7.3_nand_linux_boot.txt: nand booting
    Best,
    -Hong

    => mmc part
    
    Partition Map for MMC device 0  --   Partition Type: DOS
    
    Part	Start Sector	Num Sectors	UUID		Type
      1	2048      	153600    	4e825ce6-01	0c Boot
      2	155648    	7471104   	4e825ce6-02	83
    => ls mmc 0:1
       108352   MLO
       767796   u-boot.img
            0   ws-calibrate.rules
        50433   MLO_7.3_hs
       773776   u-boot_7.3_hs.img
            1   .ipaddr
                am335x_7.3_gp_build/
                System Volume Information/
                7.3_prebuilt/
    
    6 file(s), 3 dir(s)
    
    => ls mmc 0:2
    <DIR>       4096 .
    <DIR>       4096 ..
    <DIR>       4096 bin
    <DIR>       4096 boot
    <DIR>       4096 dev
    <DIR>       4096 etc
    <DIR>       4096 home
    <DIR>       4096 include
    <SYM>         20 init
    <DIR>       4096 lib
    <SYM>         19 linuxrc
    <DIR>       4096 media
    <DIR>       4096 mnt
    <DIR>       4096 opt
    <DIR>       4096 proc
    <DIR>       4096 run
    <DIR>       4096 sbin
    <DIR>       4096 sys
    <DIR>       4096 tmp
    <DIR>       4096 usr
    <DIR>       4096 var
    <DIR>       4096 www
    => ls mmc 0:2 boot
    <DIR>       4096 .
    <DIR>       4096 ..
               59557 am335x-bone.dtb
               62568 am335x-boneblack-wireless.dtb
               61337 am335x-boneblack.dtb
               60882 am335x-boneblue.dtb
               61118 am335x-bonegreen-wireless.dtb
               59777 am335x-bonegreen.dtb
               66064 am335x-evm.dtb
               64918 am335x-evmsk.dtb
               62691 am335x-icev2-prueth.dtb
               61547 am335x-icev2.dtb
               58511 am335x-pocketbeagle.dtb
               61921 am335x-sancloud-bbe.dtb
    <SYM>         28 fitImage
             5410411 fitImage-5.4.106-g023faefa70
    <SYM>         26 zImage
             4653568 zImage-5.4.106-g023faefa70
               59557 am335x-bone-am335x-hs-evm.dtb
               61337 am335x-boneblack-am335x-hs-evm.dtb
               62568 am335x-boneblack-wireless-am335x-hs-evm.dtb
               60882 am335x-boneblue-am335x-hs-evm.dtb
               59777 am335x-bonegreen-am335x-hs-evm.dtb
               61118 am335x-bonegreen-wireless-am335x-hs-evm.dtb
               66064 am335x-evm-am335x-hs-evm.dtb
               64918 am335x-evmsk-am335x-hs-evm.dtb
               61547 am335x-icev2-am335x-hs-evm.dtb
               62691 am335x-icev2-prueth-am335x-hs-evm.dtb
               58511 am335x-pocketbeagle-am335x-hs-evm.dtb
               61921 am335x-sancloud-bbe-am335x-hs-evm.dtb
    => ls mmc 0:2 media
    <DIR>       4096 .
    <DIR>       4096 ..
    <DIR>       4096 ram
             5373952 tisdk-tiny-image-am335x-evm.ubi
    => mtdparts
    
    device nand0 <nand.0>, # parts = 10
     #: name		size		offset		mask_flags
     0: NAND.SPL            0x00020000	0x00000000	0
     1: NAND.SPL.backup1    0x00020000	0x00020000	0
     2: NAND.SPL.backup2    0x00020000	0x00040000	0
     3: NAND.SPL.backup3    0x00020000	0x00060000	0
     4: NAND.u-boot-spl-os  0x00040000	0x00080000	0
     5: NAND.u-boot         0x00100000	0x000c0000	0
     6: NAND.u-boot-env     0x00020000	0x001c0000	0
     7: NAND.u-boot-env.backup10x00020000	0x001e0000	0
     8: NAND.kernel         0x00800000	0x00200000	0
     9: NAND.file-system    0x0f600000	0x00a00000	0
    
    active partition: nand0,0 - (NAND.SPL) 0x00020000 @ 0x00000000
    
    defaults:
    mtdids  : nand0=nand.0
    mtdparts: mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
    => nand erase.chip
    
    NAND erase.chip: device 0 whole chip
    Erasing at 0x0 --   0% complete.Erasing at 0x280000 --   1% complete.Erasing at 0x500000 --   2% complete.Erasing at 0x7a0000 --   3% complete.Erasing at 0xa20000 --   4% complete.Erasing at 0xcc0000 --   5% complete.Erasing at 0xf40000 --   6% complete.Erasing at 0x11e0000 --   7% complete.Erasing at 0x1460000 --   8% complete.Erasing at 0x1700000 --   9% complete.Erasing at 0x1980000 --  10% complete.Erasing at 0x1c20000 --  11% complete.Erasing at 0x1ea0000 --  12% complete.Erasing at 0x2140000 --  13% complete.Erasing at 0x23c0000 --  14% complete.Erasing at 0x2660000 --  15% complete.Erasing at 0x28e0000 --  16% complete.Erasing at 0x2b80000 --  17% complete.Erasing at 0x2e00000 --  18% complete.Erasing at 0x30a0000 --  19% complete.Erasing at 0x3320000 --  20% complete.Erasing at 0x35c0000 --  21% complete.Erasing at 0x3840000 --  22% complete.Erasing at 0x3ae0000 --  23% complete.Erasing at 0x3d60000 --  24% complete.Erasing at 0x3fe0000 --  25% complete.Erasing at 0x4280000 --  26% complete.Erasing at 0x4500000 --  27% complete.Erasing at 0x47a0000 --  28% complete.Erasing at 0x4a20000 --  29% complete.Erasing at 0x4cc0000 --  30% complete.Erasing at 0x4f40000 --  31% complete.Erasing at 0x51e0000 --  32% complete.Erasing at 0x5460000 --  33% complete.Erasing at 0x5700000 --  34% complete.Erasing at 0x5980000 --  35% complete.Erasing at 0x5c20000 --  36% complete.Erasing at 0x5ea0000 --  37% complete.Erasing at 0x6140000 --  38% complete.Erasing at 0x63c0000 --  39% complete.Erasing at 0x6660000 --  40% complete.Erasing at 0x68e0000 --  41% complete.Erasing at 0x6b80000 --  42% complete.Erasing at 0x6e00000 --  43% complete.Erasing at 0x70a0000 --  44% complete.Erasing at 0x7320000 --  45% complete.Erasing at 0x75c0000 --  46% complete.Erasing at 0x7840000 --  47% complete.Erasing at 0x7ae0000 --  48% complete.Erasing at 0x7d60000 --  49% complete.Erasing at 0x7fe0000 --  50% complete.Erasing at 0x8280000 --  51% complete.Erasing at 0x8500000 --  52% complete.Erasing at 0x87a0000 --  53% complete.Erasing at 0x8a20000 --  54% complete.Erasing at 0x8cc0000 --  55% complete.Erasing at 0x8f40000 --  56% complete.Erasing at 0x91e0000 --  57% complete.Erasing at 0x9460000 --  58% complete.Erasing at 0x9700000 --  59% complete.Erasing at 0x9980000 --  60% complete.Erasing at 0x9c20000 --  61% complete.Erasing at 0x9ea0000 --  62% complete.Erasing at 0xa140000 --  63% complete.Erasing at 0xa3c0000 --  64% complete.Erasing at 0xa660000 --  65% complete.Erasing at 0xa8e0000 --  66% complete.Erasing at 0xab80000 --  67% complete.Erasing at 0xae00000 --  68% complete.Erasing at 0xb0a0000 --  69% complete.Erasing at 0xb320000 --  70% complete.Erasing at 0xb5c0000 --  71% complete.Erasing at 0xb840000 --  72% complete.Erasing at 0xbae0000 --  73% complete.Erasing at 0xbd60000 --  74% complete.Erasing at 0xbfe0000 --  75% complete.Erasing at 0xc280000 --  76% complete.Erasing at 0xc500000 --  77% complete.Erasing at 0xc7a0000 --  78% complete.Erasing at 0xca20000 --  79% complete.Erasing at 0xccc0000 --  80% complete.Erasing at 0xcf40000 --  81% complete.Erasing at 0xd1e0000 --  82% complete.Erasing at 0xd460000 --  83% complete.Erasing at 0xd700000 --  84% complete.Erasing at 0xd980000 --  85% complete.Erasing at 0xdc20000 --  86% complete.Erasing at 0xdea0000 --  87% complete.Erasing at 0xe140000 --  88% complete.Erasing at 0xe3c0000 --  89% complete.Erasing at 0xe660000 --  90% complete.Erasing at 0xe8e0000 --  91% complete.Erasing at 0xeb80000 --  92% complete.Erasing at 0xee00000 --  93% complete.Erasing at 0xf0a0000 --  94% complete.Erasing at 0xf320000 --  95% complete.Erasing at 0xf5c0000 --  96% complete.Erasing at 0xf840000 --  97% complete.Erasing at 0xfae0000 --  98% complete.Erasing at 0xfd60000 --  99% complete.Erasing at 0xffe0000 -- 100% complete.
    OK
    => load mmc 0:1 ${loadaddr} MLO
    108352 bytes read in 15 ms (6.9 MiB/s)
    => nand write ${loadaddr} NAND.SPL ${filesize}
    
    NAND write: device 0 offset 0x0, size 0x1a740
     108352 bytes written: OK
    => load mmc 0:1 ${loadaddr} u-boot.img
    767796 bytes read in 71 ms (10.3 MiB/s)
    => nand write ${loadaddr} NAND.u-boot ${filesize}
    
    NAND write: device 0 offset 0xc0000, size 0xbb734
     767796 bytes written: OK
    => load mmc 0:2 ${loadaddr} boot/am335x-evm.dtb
    66064 bytes read in 15 ms (4.2 MiB/s)
    => nand write ${loadaddr} NAND.u-boot-spl-os ${filesize}
    
    NAND write: device 0 offset 0x80000, size 0x10210
     66064 bytes written: OK
    => load mmc 0:2 ${loadaddr} boot/zImage
    4653568 bytes read in 402 ms (11 MiB/s)
    => nand write ${loadaddr} NAND.kernel ${filesize}
    
    NAND write: device 0 offset 0x200000, size 0x470200
     4653568 bytes written: OK
    => load mmc 0:2 ${loadaddr} media/arago-tiny-image-am335x-evm.ubi
    => nand write ${loadaddr} NAND.file-system ${filesize}
    
    NAND write: device 0 offset 0xa00000, size 0x470200
     4653568 bytes written: OK
    => 

    U-Boot SPL 2020.01-dirty (Dec 10 2021 - 17:44:26 -0600)
    Trying to boot from NAND
    
    
    U-Boot 2020.01-dirty (Dec 10 2021 - 17:44:26 -0600)
    
    CPU  : AM335X-GP rev 2.0
    Model: TI AM335x EVM
    DRAM:  512 MiB
    WDT:   Started with servicing (60s timeout)
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0
    Loading Environment from FAT... <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  c8:a0:30:7d:1a:92
    , eth1: usb_ether
    Hit any key to stop autoboot:  2  0 
    => run nandboot
    Booting from nand ...
    
    NAND read: device 0 offset 0x80000, size 0x40000
     262144 bytes read: OK
    
    NAND read: device 0 offset 0x200000, size 0x800000
     8388608 bytes read: OK
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ffec000, end 8ffff20f ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 5.4.106-g023faefa70 (oe-user@oe-host) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 PREEMPT Mon Sep 6 22:18:18 UTC 2021
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM335x EVM
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9c800000
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.0 (sgx neon)
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129666
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 rootfstype=ubifs rootwait=1
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] Memory: 453820K/523264K available (9216K kernel code, 295K rwdata, 3092K rodata, 1024K init, 254K bss, 20292K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] 	Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [    0.000000] random: get_random_bytes called from start_kernel+0x2b4/0x470 with crng_init=0
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000022] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000049] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000063] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000448] timer_probe: no matching timers found
    [    0.000697] Console: colour dummy device 80x30
    [    0.000744] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000753] This ensures that you still see kernel messages. Please
    [    0.000760] update your kernel commandline.
    [    0.000823] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.118648] pid_max: default: 32768 minimum: 301
    [    0.118955] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [    0.118975] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [    0.120193] CPU: Testing write buffer coherency: ok
    [    0.120284] CPU0: Spectre v2: using BPIALL workaround
    [    0.121408] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.121613] rcu: Hierarchical SRCU implementation.
    [    0.121731] EFI services will not be available.
    [    0.122245] devtmpfs: initialized
    [    0.138543] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.139194] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.139227] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
    [    0.144339] pinctrl core: initialized pinctrl subsystem
    [    0.145403] DMI not present or invalid.
    [    0.146016] NET: Registered protocol family 16
    [    0.149376] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.180053] l3-aon-clkctrl:0000:0: failed to disable
    [    0.182752] cpuidle: using governor ladder
    [    0.182799] cpuidle: using governor menu
    [    0.207982] No ATAGs?
    [    0.207997] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.231314] debugfs: Directory '49000000.edma' with parent 'dmaengine' already present!
    [    0.231362] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.233764] v1_8d: supplied by vbat
    [    0.234236] v3_3d: supplied by vbat
    [    0.235635] iommu: Default domain type: Translated 
    [    0.239254] SCSI subsystem initialized
    [    0.239975] mc: Linux media interface: v0.10
    [    0.240029] videodev: Linux video capture interface: v2.00
    [    0.240169] pps_core: LinuxPPS API ver. 1 registered
    [    0.240179] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.240209] PTP clock support registered
    [    0.240255] EDAC MC: Ver: 3.0.0
    [    0.241913] Advanced Linux Sound Architecture Driver Initialized.
    [    0.243569] clocksource: Switched to clocksource timer1
    [    0.254894] thermal_sys: Registered thermal governor 'fair_share'
    [    0.254906] thermal_sys: Registered thermal governor 'bang_bang'
    [    0.254928] thermal_sys: Registered thermal governor 'step_wise'
    [    0.254938] thermal_sys: Registered thermal governor 'user_space'
    [    0.254946] thermal_sys: Registered thermal governor 'power_allocator'
    [    0.255726] NET: Registered protocol family 2
    [    0.256780] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
    [    0.256823] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
    [    0.256886] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
    [    0.256947] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.257093] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
    [    0.257120] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
    [    0.257326] NET: Registered protocol family 1
    [    0.258111] RPC: Registered named UNIX socket transport module.
    [    0.258131] RPC: Registered udp transport module.
    [    0.258139] RPC: Registered tcp transport module.
    [    0.258147] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.258168] PCI: CLS 0 bytes, default 64
    [    0.259461] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.261236] Initialise system trusted keyrings
    [    0.261675] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.268986] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.270061] NFS: Registering the id_resolver key type
    [    0.270115] Key type id_resolver registered
    [    0.270125] Key type id_legacy registered
    [    0.270192] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.271167] Key type asymmetric registered
    [    0.271185] Asymmetric key parser 'x509' registered
    [    0.271255] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
    [    0.271269] io scheduler mq-deadline registered
    [    0.271279] io scheduler kyber registered
    [    0.278750] OMAP GPIO hardware version 0.1
    [    0.312999] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.344600] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [    0.350779] pwm-backlight backlight: backlight supply power not found, using dummy regulator
    [    0.420862] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.427252] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    1.056759] printk: console [ttyS0] enabled
    [    1.062950] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 37, base_baud = 3000000) is a 8250
    [    1.075885] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    1.083830] random: fast init done
    [    1.087575] random: crng init done
    [    1.094160] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
    [    1.105448] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
    [    1.116280] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
    [    1.126572] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.133215] [drm] No driver support for vblank timestamp query.
    [    1.140019] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0
    [    1.195319] Console: switching to colour frame buffer device 100x30
    [    1.217704] tilcdc 4830e000.lcdc: fb0: tilcdcdrmfb frame buffer device
    [    1.246286] brd: module loaded
    [    1.259616] loop: module loaded
    [    1.270977] libphy: Fixed MDIO Bus: probed
    [    1.333604] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.341334] libphy: 4a101000.mdio: probed
    [    1.347356] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Atheros 8031 ethernet
    [    1.357027] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    1.363418] cpsw 4a100000.ethernet: ALE Table size 1024
    [    1.368910] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.376260] cpsw 4a100000.ethernet: Detected MACID = c8:a0:30:7d:1a:90
    [    1.385591] i2c /dev entries driver
    [    1.393060] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.401002] sdhci: Secure Digital Host Controller Interface driver
    [    1.407349] sdhci: Copyright(c) Pierre Ossman
    [    1.413846] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [    1.422625] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.435742] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.443340] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.455845] davinci-mcasp 4803c000.mcasp: IRQ common not found
    [    1.464318] NET: Registered protocol family 10
    [    1.470402] Segment Routing with IPv6
    [    1.474387] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.481317] NET: Registered protocol family 17
    [    1.486435] Key type dns_resolver registered
    [    1.490941] omap_voltage_late_init: Voltage driver support not added
    [    1.498292] Loading compiled-in X.509 certificates
    [    1.521034] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.526460] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.535214] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
    [    1.541609] nand: Micron MT29F2G08ABAEAWP
    [    1.545742] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    1.553591] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.559122] 10 fixed-partitions partitions found on MTD device omap2-nand.0
    [    1.566183] Creating 10 MTD partitions on "omap2-nand.0":
    [    1.571620] 0x000000000000-0x000000020000 : "NAND.SPL"
    [    1.579234] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [    1.587061] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [    1.594836] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [    1.602456] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [    1.610379] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
    [    1.618085] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
    [    1.625751] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
    [    1.634064] 0x000000200000-0x000000a00000 : "NAND.kernel"
    [    1.645109] 0x000000a00000-0x000010000000 : "NAND.file-system"
    [    1.793868] tps65910 0-002d: No interrupt support, no core IRQ
    [    1.805110] vrtc: supplied by vbat
    [    1.810163] vio: supplied by vbat
    [    1.815437] vdd_mpu: supplied by vbat
    [    1.821011] vdd_core: supplied by vbat
    [    1.827656] vdig1: supplied by vbat
    [    1.832597] vdig2: supplied by vbat
    [    1.837601] vpll: supplied by vbat
    [    1.842452] vdac: supplied by vbat
    [    1.847343] vaux1: supplied by vbat
    [    1.852307] vaux2: supplied by vbat
    [    1.857296] vaux33: supplied by vbat
    [    1.862332] vmmc: supplied by vbat
    [    1.867167] vbb: supplied by vbat
    [    1.871292] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.879847] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
    [    1.891864] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [    1.900865] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    2.050083] ubi0: attaching mtd9
    [    2.059116] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range
    [    2.081196] mmc1: new SDIO card at address 0001
    [    3.226949] ubi0: scanning is finished
    [    3.250045] ubi0: attached mtd9 (name "NAND.file-system", size 246 MiB)
    [    3.256829] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    3.264100] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    [    3.271043] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    3.278082] ubi0: good PEBs: 1968, bad PEBs: 0, corrupted PEBs: 0
    [    3.284243] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    [    3.291506] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1759344572
    [    3.300694] ubi0: available PEBs: 0, total reserved PEBs: 1968, PEBs reserved for bad PEB handling: 40
    [    3.310087] ubi0: background thread "ubi_bgt0d" started, PID 57
    [    3.317268] input: volume_keys0 as /devices/platform/volume_keys0/input/input0
    [    3.325452] hctosys: unable to open rtc device (rtc0)
    [    3.331422] ALSA device list:
    [    3.334606]   No soundcards found.
    [    3.340102] UBIFS (ubi0:0): Mounting in unauthenticated mode
    [    3.353667] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 58
    [    3.430861] UBIFS (ubi0:0): recovery needed
    [    3.586528] UBIFS (ubi0:0): recovery completed
    [    3.591398] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    [    3.598882] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [    3.609202] UBIFS (ubi0:0): FS size: 242778112 bytes (231 MiB, 1912 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
    [    3.620069] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
    [    3.626042] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID AF09DAE9-2295-491F-89F1-DD785CFE4A34, small LPT model
    [    3.638606] VFS: Mounted root (ubifs filesystem) on device 0:17.
    [    3.646166] devtmpfs: mounted
    [    3.651023] Freeing unused kernel memory: 1024K
    [    3.656260] Run /sbin/init as init process
    INIT: version 2.88 booting
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Mon Apr 20 03:50:24 UTC 2020
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    INIT: Entering runlevel: 5
    Configuring network interfaces... [    5.169549] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
    [    5.179936] Atheros 8031 ethernet 4a101000.mdio:00: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    udhcpc: started, v1.29.3
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: no lease, forking to background
    ifconfig: SIOCGIFFLAGS: No such device
    ifconfig: SIOCSIFADDR: No such device
    done.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting syslogd/klogd: done
    
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am335x-evm /dev/ttyS0
    
    Arago 2019.11 am335x-evm /dev/ttyS0
    
    am335x-evm login: root
    root@am335x-evm:~# 

  • Hi Hong,

    What was your answer about? Thinking

    We can already flash our codes to nand.
    We can already boot our board from nand.

    Our first problem was about strange boot problem after Nand erase and replace a new code.(This error is not routine fault, Occasionally occurs on some boards. )
    Secondly Daniel added our new falcon boot problem.

    your answer doesn't match with both. Sweat smileSweat smile

  • Hello Gokhan,
    We're catching up e2e backlogs after holidays.
    Based on Daniel's latest post, I thought the board was bricked booting from nand. That is why "For your reference, I'm attaching the working nand flashing/booting logs with Linux SDK 7.3 on TI AM335x GP EVM."

    Anyway back to the issue in your original post. For non-working case,
    - "attach" JTAG to the running board, where "attach" is non-intrusive to the running board or NO HW RESET
    - dump and check trace vector filled by on-chip bootrom code.

    Refer to AM335x TRM <Table 26-4. Tracing Data> for trace vector addresses, and <Table 26-42. Tracing Vectors> for trace vector description.

    Best,
    -Hong

  • Hi JJD,

    As I told you before, that problem was not occuring deteminisicly. Today finally i had same problem one of my card.

    My boot pins [4:0] was setted "11100" via  pullup and pulldown registers. Which is ok for us.
    11100b MMC1     MMC0           UART0     USB0.
    My system doesn't have mmc. Production technician should see CCC from terminal to understand Processor is up. Secondly should program the NAND via USB-RNDIS(tftp).

    Problem is that: We can see "CCC" chars, after that Network device appears on network but no trigger for UNIFLASH-RNDIS. We couldn't see anything except CCC. I have connected JTAG (Blackhawk XDS100v2). I have read the CONTROL_STATUS register at 0x44E10040: value was 0x0040031C. Processor stucked at that stage.

    When i connect anyother card to same system. Card programmed by UNIFLASH-RNDIS.

  • Gokhan, on that board that fails, can you also dump the tracing vectors at 0x4030CE40-0x4030CE64.  This will give us a clue which boot mode are attempting to be executed.  

    I would also suggest the protocol analyzer.  Since this is happening intermittently, there may be some hardware issue.  Comparing good vs. bad analyzer traces may give you a clue as to why the UNIFLASH is failing

    Regards,

    James