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.

AM4372: AM437x boot from usb1 mass storage!

Part Number: AM4372

I spent a little time trying to boot the chip (custom board and gp evm) with no luck  I think I should be able to format a USB pen drive the same way I format an SD card and it should boot.  I have looked through the TRM,  and can't really find an obvious problem.  Chip is revB (1.2) so it should work.  Am I misunderstanding how this should work?

  • Hi James,

    Can you please provide more details on what exact error do you observe?

    Please explain step by step how did you format the USB thumb drive.

  • I format the usb (with gparted) to have a 72MB msdos fat32 partition and a 4G rootfs partition.  with a known good MLO and u-boot.img in fat partition and a known good root fs in the other partition and I see nothing on serial port.  It looks to me like the boot just does not start.

    I am using the same partition scheme as I use for the micro sd.

  • Hi James,

    Sorry for my late response. The thumb drive should be partitioned/formatted in the same way as the SD card. I tested the USB host boot on my AM437x EVM a month ago, and had a hard time using fdisk to get the thumb drive partitioned correctly on Ubuntu 18.04 (it was easy with fdisk on Ubuntu 14.04 which I have used for years), but got it working eventually, it turned out I believe the fdisk utility on Ubuntu18.04 supports much more partition schemes, and the default fat32 is not supported by the AM437 ROM.

    Please try fdisk instead of gparted (I never used it), and let me know if you cannot get it working either, I will try it again and provide your the exact instructions.

  • Thanks for the help, we all get busy.  I will try to update post when I get it working.

  • Not sure what i could be doing wrong.  Still messing around.

    working sd card...

    Device Boot Start End Sectors Size Id Type
    /dev/sdc1 * 2048 149503 147456 72M c W95 FAT32 (LBA)
    /dev/sdc2 149504 8341503 8192000 3.9G 83 Linux

    Nonworking USB

    Device Boot Start End Sectors Size Id Type
    /dev/sdf1 * 2048 74048 72001 35.2M c W95 FAT32 (LBA)

  • James,

    I am currently out of office. Once I am back next week I will test it again on the evm and let you know the exact steps I did.

  • Hi James,

    I finally got my hands on this issue. Following is the procedure I did to validate the USB Host Boot on the AM437x GP EVM.

    - Download Processor SDK Linux v5.3.0.7 release (Please don't use SDK v6.0.0.7, in which U-Boot there is a bug which prevents MLO to load u-boot.img);

    - Use the create-sdcard.sh script in the SDK to format the thumb drive into two partitions;

    - Rebuild U-Boot in the SDK with config am43xx_evm_usbhost_boot_defconfig;

    - Copy the new MLO and u-boot.img into the SD card first partition;

    - Set the EVM SYSBOOT[4-0] to 10101b (I also tested 10010b);

    Now booting the EVM with the thumb drive should get you into the U-Boot prompt.

    Please let me know if you run into any issue with this procedure.

  • I will test this next week, thanks for getting back to me.  Can you comment on whether a fix will show up in the next release?

  • Hi James,

    I have reported the issue back to our Dev team. It should be fixed, but I don't have a time line yet if the fix will be in the next release.

    Do you need to use USB Host Boot mode in your final product or just for development? If latter do you have an alternative to boot your platform?

  • I would like to use a USB stick for recovery mode, first boot  in our final product.  For the time being I have a work around.

  • I just got around to re-reading your reply.  Given that I need a new config file does this imply that i cannot set up a system that boots from (for example) mmc and usb?

  • James,

    Do you mean if you can use the same U-Boot image built with am43xx_evm_usbhost_boot_defconfig to boot from both MMC and USB? Yes, you can. The main difference between am43xx_evm_defconfig and am43xx_evm_usbhost_boot_defconfig is switching from enabling USB device mode to enabling host mode, MMC is not affected.

    I verified I can boot the AM437x EVM from MMC using the U-Boot image built with am43xx_evm_usbhost_boot_defconfig.

  • Hi James,

    Please apply the following two patches to the Processor SDK 6.x U-Boot. It fixes the issue that MLO doesn't load u-boot.img when booting from USB device that I mentioned earlier.

    tiU19.01-1-2-ARM-dts-AM437x-enable-USB-host-port-2-in-SPL.patch.txt
    From patchwork Wed Nov 13 09:03:49 2019
    Content-Type: text/plain; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Subject: [tiU19.01,1/2] ARM: dts: AM437x: enable USB host port #2 in SPL
    Date: Wed, 13 Nov 2019 15:03:49 -0000
    From: Jean-Jacques Hiblot <jjhiblot@ti.com>
    X-Patchwork-Id: 51082
    Message-Id: <20191113090350.13757-2-jjhiblot@ti.com>
    To: <lokeshvutla@ti.com>
    Cc: <nsekhar@ti.com>, <linux-patch-review@list.ti.com>
    
    Include the nodes required by the USB host port (USB port #2) in the
    stripped DTB used by the SPL.
    
    Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
    
    ---
    arch/arm/dts/am4372-u-boot.dtsi | 20 ++++++++++++++++++++
     1 file changed, 20 insertions(+)
    
    diff --git a/arch/arm/dts/am4372-u-boot.dtsi b/arch/arm/dts/am4372-u-boot.dtsi
    index 99922ca030..2faada5e11 100644
    --- a/arch/arm/dts/am4372-u-boot.dtsi
    +++ b/arch/arm/dts/am4372-u-boot.dtsi
    @@ -38,3 +38,23 @@
     &ocp2scp0 {
     	u-boot,dm-spl;
     };
    +
    +&dwc3_2 {
    +	u-boot,dm-spl;
    +};
    +
    +&usb2 {
    +	u-boot,dm-spl;
    +};
    +
    +&usb2_phy2 {
    +	u-boot,dm-spl;
    +};
    +
    +&am43xx_control_usb2phy2 {
    +	u-boot,dm-spl;
    +};
    +
    +&ocp2scp1 {
    +	u-boot,dm-spl;
    +};
    

    tiU19.01-2-2-configs-sync-am43xx_evm_usbhost_boot_defconfig-with-am43xx_evm_defconfig.patch.txt
    From patchwork Wed Nov 13 09:03:50 2019
    Content-Type: text/plain; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Subject: [tiU19.01, 2/2] configs: sync am43xx_evm_usbhost_boot_defconfig with
     am43xx_evm_defconfig
    Date: Wed, 13 Nov 2019 15:03:50 -0000
    From: Jean-Jacques Hiblot <jjhiblot@ti.com>
    X-Patchwork-Id: 51083
    Message-Id: <20191113090350.13757-3-jjhiblot@ti.com>
    To: <lokeshvutla@ti.com>
    Cc: <nsekhar@ti.com>, <linux-patch-review@list.ti.com>
    
    am43xx_evm_usbhost_boot_defconfig is used when booting the AM437x from an
    external USB drive. Synchronize this defconfig with the reference defconfig
    used when booting from SD/MMC.
    
    Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
    
    ---
    configs/am43xx_evm_usbhost_boot_defconfig | 32 ++++++++++++++++-------
     1 file changed, 22 insertions(+), 10 deletions(-)
    
    diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
    index 6e90bd02c6..01a2968ac8 100644
    --- a/configs/am43xx_evm_usbhost_boot_defconfig
    +++ b/configs/am43xx_evm_usbhost_boot_defconfig
    @@ -1,8 +1,10 @@
     CONFIG_ARM=y
     CONFIG_ARCH_OMAP2PLUS=y
    +CONFIG_TI_COMMON_CMD_OPTIONS=y
     CONFIG_SYS_MALLOC_F_LEN=0x2000
     CONFIG_AM43XX=y
     CONFIG_ISW_ENTRY_ADDR=0x40300350
    +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
     CONFIG_SPL=y
     CONFIG_DISTRO_DEFAULTS=y
     CONFIG_SPL_LOAD_FIT=y
    @@ -11,26 +13,21 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1"
     CONFIG_SYS_CONSOLE_INFO_QUIET=y
     # CONFIG_MISC_INIT_R is not set
     CONFIG_VERSION_VARIABLE=y
    +CONFIG_SPL_ETH_SUPPORT=y
     CONFIG_SPL_MTD_SUPPORT=y
    +CONFIG_SPL_NET_SUPPORT=y
    +CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL"
     CONFIG_SPL_OS_BOOT=y
    +CONFIG_SPL_USB_GADGET=y
    +CONFIG_SPL_USB_ETHER=y
     CONFIG_SPL_USB_HOST_SUPPORT=y
     CONFIG_SPL_USB_SUPPORT=y
     CONFIG_CMD_SPL=y
     CONFIG_CMD_SPL_NAND_OFS=0x00100000
     CONFIG_CMD_SPL_WRITE_SIZE=0x40000
    -CONFIG_CMD_ASKENV=y
    -CONFIG_CMD_DFU=y
     # CONFIG_CMD_FLASH is not set
    -CONFIG_CMD_GPIO=y
    -CONFIG_CMD_GPT=y
    -CONFIG_CMD_I2C=y
    -CONFIG_CMD_MMC=y
     CONFIG_CMD_NAND=y
    -CONFIG_CMD_SF=y
    -CONFIG_CMD_SPI=y
    -CONFIG_CMD_USB=y
     # CONFIG_CMD_SETEXPR is not set
    -CONFIG_CMD_EXT4_WRITE=y
     CONFIG_CMD_MTDPARTS=y
     CONFIG_MTDIDS_DEFAULT="nand0=nand.0"
     CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),512k(NAND.u-boot-spl-os),1m(NAND.u-boot),256k(NAND.u-boot-env),256k(NAND.u-boot-env.backup1),7m(NAND.kernel),-(NAND.file-system)"
    @@ -40,10 +37,15 @@ CONFIG_OF_LIST="am437x-gp-evm am437x-sk-evm am43x-epos-evm am437x-idk-evm"
     CONFIG_ENV_IS_IN_FAT=y
     CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
     CONFIG_DM=y
    +CONFIG_REGMAP=y
    +CONFIG_SPL_REGMAP=y
    +CONFIG_SYSCON=y
    +CONFIG_SPL_SYSCON=y
     CONFIG_DFU_MMC=y
     CONFIG_DFU_RAM=y
     CONFIG_DFU_SF=y
     CONFIG_DM_GPIO=y
    +CONFIG_MISC=y
     CONFIG_DM_MMC=y
     CONFIG_MMC_OMAP_HS=y
     CONFIG_NAND=y
    @@ -52,17 +54,24 @@ CONFIG_SPI_FLASH_MACRONIX=y
     CONFIG_PHY_GIGE=y
     CONFIG_MII=y
     CONFIG_DRIVER_TI_CPSW=y
    +CONFIG_PHY=y
    +CONFIG_SPL_PHY=y
    +CONFIG_OMAP_USB2_PHY=y
     CONFIG_DM_SERIAL=y
     CONFIG_SPI=y
     CONFIG_TI_QSPI=y
     CONFIG_TIMER=y
     CONFIG_OMAP_TIMER=y
     CONFIG_USB=y
    +CONFIG_DM_USB=y
    +CONFIG_DM_USB_GADGET=y
    +CONFIG_SPL_DM_USB_GADGET=y
     CONFIG_USB_XHCI_HCD=y
     CONFIG_USB_XHCI_DWC3=y
     CONFIG_USB_DWC3=y
     CONFIG_USB_DWC3_GADGET=y
     CONFIG_USB_DWC3_OMAP=y
    +CONFIG_USB_DWC3_GENERIC=y
     CONFIG_USB_DWC3_PHY_OMAP=y
     CONFIG_OMAP_USB_PHY=y
     CONFIG_USB_GADGET=y
    @@ -70,3 +79,6 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
     CONFIG_USB_GADGET_VENDOR_NUM=0x0403
     CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
     CONFIG_USB_GADGET_DOWNLOAD=y
    +CONFIG_USB_ETHER=y
    +CONFIG_CLK=y
    +CONFIG_CLK_CDCE9XX=y
    

  • I loaded these patches, and I see the changes in: 

    ./work/am437x_evm-linux-gnueabi/u-boot-ti-staging/2019.01+gitAUTOINC+8b90adfb16r13.tisdk3/git/configs/am43xx_evm_usbhost_boot_defconfig

    and i added UBOOT_MACHINE="am43xx_evm_usbhost_boot_defconfig"  to my image recipe:

    jsp@rover: MACHINE=am437x-evm bitbake alx-arago-base-tisdk-image -e | grep UBOOT_MACHINE
    # [doc] "Configures the UBOOT_MACHINE and can also define IMAGE_FSTYPES for individual cases."
    # $UBOOT_MACHINE [3 operations]
    UBOOT_MACHINE="am43xx_evm_usbhost_boot_defconfig"

     

    But so far I have had no joy,  I tried turning on console printing: #CONFIG_SYS_CONSOLE_INFO_QUIET is not set  but I am not seeing any extra messages.

     

    Am I missing something obvious?

  • Hi James,

    Let's step back from the two patches which is only for SDK v6.0/6.1. I am not sure how your U-Boot is compiled, but can you boot from USB with SDK v5.3.0.7 U-Boot using the instructions I posted on 11/7?

  • hmm,  starting to see activity on from the spl,  still not quite right...

    U-Boot SPL 2018.01-00569-gf9c38b9-dirty (Nov 22 2019 - 13:22:37)
    Trying to boot from USB
    USB0: Register 2000440 NbrPorts 2
    Starting the controller
    USB XHCI 1.00
    scanning bus 0 for devices... Device not responding to set address.

    USB device not accepting new address (error=80000000)
    1 USB Device(s) found
    scanning usb for storage devices... 0 Storage Device(s) found
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

  • James Pawlyk said:

    scanning bus 0 for devices... Device not responding to set address.

    USB device not accepting new address (error=80000000)

    This sounds like signal integrity issue.

    Does USB1 host function properly in Linux? If you boot your board into Linux from MMC, can USB1 read/write this thumb drive correctly?

  • I can read and write both partitions of the usb after I boot the OS from the sd card.  I also re-wrote the MLO and u-boot.img to make sure there was not an issue.

    here is the device getting loaded on the os:

    asco-lx login: [ 241.907515] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [ 242.095047] usb 1-1: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.01
    [ 242.103372] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 242.112919] usb 1-1: Product: Mass Storage
    [ 242.117070] usb 1-1: Manufacturer: Generic
    [ 242.123343] usb 1-1: SerialNumber: ABFFBEDE
    [ 242.222572] SCSI subsystem initialized
    [ 242.254357] usb-storage 1-1:1.0: USB Mass Storage device detected
    [ 242.261742] scsi host0: usb-storage 1-1:1.0
    [ 242.273968] usbcore: registered new interface driver usb-storage
    [ 242.291801] usbcore: registered new interface driver uas
    [ 243.290205] scsi 0:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 4
    [ 243.338716] sd 0:0:0:0: [sda] 2007040 512-byte logical blocks: (1.03 GB/980 MiB)
    [ 243.360124] sd 0:0:0:0: [sda] Write Protect is off
    [ 243.366445] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [ 243.386982] sda: sda1 sda2
    [ 243.395252] sd 0:0:0:0: [sda] Attached SCSI removable disk

  • Hmm, not sure why the thumb drive was failed to be enumerated in U-Boot then. Is this USB3.0 thumb drive?

  • Nope, it's a 2.0  drive (1GB).  let me dig around see if i have another type.  

  • ok, looks like it did not like the usb stick.  funny i have a bunch of these and have been using them with no other problems.  Now kernel starts to boot and stops here:

    [ 1.839774] vmmcwl_fixed: disabling
    [ 1.843337] ALSA device list:
    [ 1.846418] No soundcards found.
    [ 1.851096] Waiting for root device /dev/sda2...
    [ 2.304333] random: fast init done

    Saw same issue with my bitbaked 6.0 build and the sdk 5.3 rootfs

    1067.log.log
    Starting the controller
    USB XHCI 1.00
    scanning bus 0 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    
    Device 0: Vendor: Generic- Rev: 1.00 Prod: SD/MMC
                Type: Removable Hard Disk
                Capacity: 3827.0 MB = 3.7 GB (7837696 x 512)
    ... is now current device
    MMC: no card present
    ** Bad device mmc 0 **
    3887616 bytes read in 2301 ms (1.6 MiB/s)
    52849 bytes read in 135 ms (381.8 KiB/s)
    Booting from usb 0...
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8fff0000, end 8ffffe70 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.14.79-ge669d52447 (jsp@rover) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #1 PREEMPT Fri Nov 22 13:18:54 EST 2019
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM437x GP 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 0xfcc00000
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM437x ES1.2 (sgx neon)
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 522559
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/sda2 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 2015592K/2097148K available (8192K kernel code, 329K rwdata, 2500K rodata, 1024K init, 268K bss, 32404K reserved, 49152K cma-reserved, 1261564K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
    [    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
    [    0.000000]       .data : 0xc0d00000 - 0xc0d52588   ( 330 kB)
    [    0.000000]        .bss : 0xc0d52588 - 0xc0d957e4   ( 269 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
    [    0.000000] OMAP L2C310: ROM does not support power control setting
    [    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
    [    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
    [    0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000013] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000031] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000039] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000428] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000437] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000834] Console: colour dummy device 80x30
    [    0.000859] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000865] This ensures that you still see kernel messages. Please
    [    0.000870] update your kernel commandline.
    [    0.000893] Calibrating delay loop... 1993.93 BogoMIPS (lpj=9969664)
    [    0.060151] pid_max: default: 32768 minimum: 301
    [    0.060312] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.060334] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.061006] CPU: Testing write buffer coherency: ok
    [    0.061062] CPU0: Spectre v2: using BPIALL workaround
    [    0.061739] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.061880] Hierarchical SRCU implementation.
    [    0.062198] EFI services will not be available.
    [    0.063273] devtmpfs: initialized
    [    0.072002] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1ac with crng_init=0
    [    0.072408] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    [    0.072690] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.072711] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.075943] pinctrl core: initialized pinctrl subsystem
    [    0.076600] DMI not present or invalid.
    [    0.076990] NET: Registered protocol family 16
    [    0.078567] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.150240] cpuidle: using governor ladder
    [    0.150281] cpuidle: using governor menu
    [    0.155603] omap_gpio 44e07000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio0_pins, deferring probe
    [    0.156378] OMAP GPIO hardware version 0.1
    [    0.158295] omap_gpio 48322000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/display_mux_pins, deferring probe
    [    0.162055] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/nand_flash_x8, deferring probe
    [    0.165936] No ATAGs?
    [    0.165960] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    [    0.165975] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [    0.177681] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.181779] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c0_pins, deferring probe
    [    0.181839] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c1_pins, deferring probe
    [    0.181975] media: Linux media interface: v0.10
    [    0.182012] Linux video capture interface: v2.00
    [    0.182115] pps_core: LinuxPPS API ver. 1 registered
    [    0.182123] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.182142] PTP clock support registered
    [    0.182182] EDAC MC: Ver: 3.0.0
    [    0.182584] dmi: Firmware registration failed.
    [    0.182916] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.183289] Advanced Linux Sound Architecture Driver Initialized.
    [    0.184301] clocksource: Switched to clocksource timer1
    [    0.191457] NET: Registered protocol family 2
    [    0.192058] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.192125] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.192198] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.192363] UDP hash table entries: 512 (order: 1, 8192 bytes)
    [    0.192385] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
    [    0.192537] NET: Registered protocol family 1
    [    0.192927] RPC: Registered named UNIX socket transport module.
    [    0.192939] RPC: Registered udp transport module.
    [    0.192945] RPC: Registered tcp transport module.
    [    0.192950] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.194932] workingset: timestamp_bits=14 max_order=19 bucket_order=5
    [    0.198173] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.198890] NFS: Registering the id_resolver key type
    [    0.198926] Key type id_resolver registered
    [    0.198933] Key type id_legacy registered
    [    0.198977] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.200923] bounce: pool size: 64 pages
    [    0.201007] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.201017] io scheduler noop registered
    [    0.201024] io scheduler deadline registered
    [    0.201218] io scheduler cfq registered (default)
    [    0.201226] io scheduler mq-deadline registered
    [    0.201233] io scheduler kyber registered
    [    0.203260] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
    [    0.206321] pwm-backlight backlight: backlight supply power not found, using dummy regulator
    [    0.247397] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.249573] omap8250 44e09000.serial: No clock speed specified: using default: 48000000
    [    0.250203] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    0.979954] console [ttyS0] enabled
    [    0.983908] omap8250 481a6000.serial: No clock speed specified: using default: 48000000
    [    0.992604] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 31, base_baud = 3000000) is a 8250
    [    1.003251] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    1.010665] omapdss_dss 4832a000.dss: 4832a000.dss supply vdda_video not found, using dummy regulator
    [    1.020126] DSS: OMAP DSS rev 2.0
    [    1.024272] omapdss_dss 4832a000.dss: bound 4832a400.dispc (ops dispc_component_ops)
    [    1.033431] panel-dpi display: display supply vcc not found, using dummy regulator
    [    1.053056] brd: module loaded
    [    1.064187] loop: module loaded
    [    1.069800] libphy: Fixed MDIO Bus: probed
    [    1.144363] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.152063] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [    1.159402] libphy: 4a101000.mdio: probed
    [    1.163444] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Micrel KSZ9031 Gigabit PHY
    [    1.174067] cpsw 4a100000.ethernet: Detected MACID = 68:9e:19:b8:38:e5
    [    1.180827] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    1.187300] cpsw 4a100000.ethernet: ALE Table size 1024
    [    1.192591] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.202236] omap_rtc 44e3e000.rtc: registered as rtc0
    [    1.207632] i2c /dev entries driver
    [    1.211534] IR NEC protocol handler initialized
    [    1.216127] IR RC5(x/sz) protocol handler initialized
    [    1.221199] IR RC6 protocol handler initialized
    [    1.225760] IR JVC protocol handler initialized
    [    1.230307] IR Sony protocol handler initialized
    [    1.234950] IR SANYO protocol handler initialized
    [    1.239671] IR Sharp protocol handler initialized
    [    1.244400] IR MCE Keyboard/mouse protocol handler initialized
    [    1.250255] IR XMP protocol handler initialized
    [    1.256332] cpuidle: enable-method property 'ti,am4372' found operations
    [    1.263445] sdhci: Secure Digital Host Controller Interface driver
    [    1.269803] sdhci: Copyright(c) Pierre Ossman
    [    1.334601] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.344265] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.354408] NET: Registered protocol family 10
    [    1.360974] Segment Routing with IPv6
    [    1.364810] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.371335] NET: Registered protocol family 17
    [    1.376180] Key type dns_resolver registered
    [    1.380647] omap_voltage_late_init: Voltage driver support not added
    [    1.393010] omapdrm omapdrm.0: DMM not available, disable DMM support
    [    1.399971] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.406689] [drm] No driver support for vblank timestamp query.
    [    1.475026] Console: switching to colour frame buffer device 100x30
    [    1.498165] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    1.504810] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
    [    1.512530] GPIO line 119 (SelEMMCorNAND) hogged as output/low
    [    1.519208] GPIO line 136 (SelLCDorHDMI) hogged as output/high
    [    1.525808] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.530979] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.538717] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
    [    1.545161] nand: Micron MT29F4G08ABAEAWP
    [    1.549192] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224
    [    1.556997] using OMAP_ECC_BCH16_CODE_HW ECC scheme
    [    1.562009] 10 ofpart partitions found on MTD device omap2-nand.0
    [    1.568153] Creating 10 MTD partitions on "omap2-nand.0":
    [    1.573593] 0x000000000000-0x000000040000 : "NAND.SPL"
    [    1.579699] 0x000000040000-0x000000080000 : "NAND.SPL.backup1"
    [    1.586373] 0x000000080000-0x0000000c0000 : "NAND.SPL.backup2"
    [    1.593015] 0x0000000c0000-0x000000100000 : "NAND.SPL.backup3"
    [    1.599632] 0x000000100000-0x000000180000 : "NAND.u-boot-spl-os"
    [    1.606490] 0x000000180000-0x000000280000 : "NAND.u-boot"
    [    1.612684] 0x000000280000-0x0000002c0000 : "NAND.u-boot-env"
    [    1.619211] 0x0000002c0000-0x000000300000 : "NAND.u-boot-env.backup1"
    [    1.626504] 0x000000300000-0x000000a00000 : "NAND.kernel"
    [    1.633565] 0x000000a00000-0x000020000000 : "NAND.file-system"
    [    1.750153] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz
    [    1.757446] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 100 kHz
    [    1.765079] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.826162] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    1.839774] vmmcwl_fixed: disabling
    [    1.843337] ALSA device list:
    [    1.846418]   No soundcards found.
    [    1.851096] Waiting for root device /dev/sda2...
    [    2.304333] random: fast init done
    

  • Hi James,

    James Pawlyk said:
    ok, looks like it did not like the usb stick.  funny i have a bunch of these and have been using them with no other problems. 

    Great progress! Many USB devices don't fully compliant with the USB Spec, the Linux kernel USB stack has been working hard to add quirks to make those USB devices working in Linux. But U-Boot might have more issues with such USB devices. Since U-Boot is mainly a boot loader, same of the quirks are not implemented in U-Boot USB stack.

    James Pawlyk said:
    Now kernel starts to boot and stops here:

    The kernel log shows no any USB related messages, so likely the issue is due that the USB related drivers are built as module and located in the root filesystem, then the thumb drive won't be enumerated and mounted as the root filesystem. Please rebuild the kernel with all the USB drivers are built into zImage, mainly the xHCI controller, USB PHY, and USB MSC drivers.

  • Bin, I still have not been able to boot the kernel.  Do you have a .config that does boot?  Is there any chance you could post it?

    Also since i did get u-boot to work I went back and retested the 6.0 patches and they do not seem to work.

    james

  • Hi James,

    Let's solve the issues one by one. Following is the .config changes to build in all USB related drivers.

    --- _config-am437x-defconfig    2019-12-09 08:41:49.107066832 -0600
    +++ _config-am437x-usb-builtin  2019-12-09 09:01:53.427089442 -0600
     # CONFIG_I2C_HID is not set
     CONFIG_USB_OHCI_LITTLE_ENDIAN=y
     CONFIG_USB_SUPPORT=y
    -CONFIG_USB_COMMON=m
    +CONFIG_USB_COMMON=y
     CONFIG_USB_ARCH_HAS_HCD=y
    -CONFIG_USB=m
    +CONFIG_USB=y
     CONFIG_USB_PCI=y
     CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
     
    @@ -3418,9 +3414,9 @@
     # USB Host Controller Drivers
     #
     # CONFIG_USB_C67X00_HCD is not set
    -CONFIG_USB_XHCI_HCD=m
    -CONFIG_USB_XHCI_PCI=m
    -CONFIG_USB_XHCI_PLATFORM=m
    +CONFIG_USB_XHCI_HCD=y
    +CONFIG_USB_XHCI_PCI=y
    +CONFIG_USB_XHCI_PLATFORM=y
     # CONFIG_USB_EHCI_HCD is not set
     # CONFIG_USB_OXU210HP_HCD is not set
     # CONFIG_USB_ISP116X_HCD is not set
    @@ -3449,7 +3445,7 @@
     #
     # also be needed; see USB_STORAGE Help for more info
     #
    -CONFIG_USB_STORAGE=m
    +CONFIG_USB_STORAGE=y
     # CONFIG_USB_STORAGE_DEBUG is not set
     # CONFIG_USB_STORAGE_REALTEK is not set
     # CONFIG_USB_STORAGE_DATAFAB is not set
    @@ -3493,7 +3489,7 @@
     CONFIG_USB_INVENTRA_DMA=y
     CONFIG_USB_TI_CPPI41_DMA=y
     CONFIG_USB_TUSB_OMAP_DMA=y
    -CONFIG_USB_DWC3=m
    +CONFIG_USB_DWC3=y
     # CONFIG_USB_DWC3_HOST is not set
     # CONFIG_USB_DWC3_GADGET is not set
     CONFIG_USB_DWC3_DUAL_ROLE=y
    @@ -3501,7 +3497,7 @@
     #
     # Platform Glue Driver Support
     #
    -CONFIG_USB_DWC3_OMAP=m
    +CONFIG_USB_DWC3_OMAP=y
     CONFIG_USB_DWC3_OF_SIMPLE=m
     # CONFIG_USB_DWC2 is not set
     # CONFIG_USB_CHIPIDEA is not set
    @@ -3606,7 +3602,7 @@
     # CONFIG_USB_GPIO_VBUS is not set
     # CONFIG_USB_ISP1301 is not set
     # CONFIG_USB_ULPI is not set
    -CONFIG_USB_GADGET=m
    +CONFIG_USB_GADGET=y
     CONFIG_USB_GADGET_DEBUG=y
     # CONFIG_USB_GADGET_VERBOSE is not set
     CONFIG_USB_GADGET_DEBUG_FILES=y
    @@ -4388,7 +4384,7 @@
     # CONFIG_PHY_CPCAP_USB is not set
     CONFIG_PHY_DM816X_USB=m
     CONFIG_OMAP_CONTROL_PHY=y
    -CONFIG_OMAP_USB2=m
    +CONFIG_OMAP_USB2=y
     CONFIG_TI_PIPE3=y
     CONFIG_PHY_AM654_MMC=y
     # CONFIG_POWERCAP is not set
    
  • Good, news.  Finally got the usb to start up.  

    One comment, One must make  scsi-device -support and scsi-disk-support built in before you can make USB stuff  built in.  I did this in menuconfig then compared the result to your diff to get it to work.

    I agree with your above  re fix one thing at a time, but i did want to document that the patches do not seem to work.

    I build them against u-boot-ti-staging

  • Hi James,

    Great progress to get all related modules built in kernel!

    I am not sure what the u-boot-ti-staging package is, assume it is in yocto? Do you get a compile or runtime error?

    The two patches were tested on Processor SDK Linux v6.1 U-Boot package. Can you please test the patches with the v6.1 SDK U-Boot?