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.

Linux/dra726: QSPI boot on dra726

Part Number: DRA726
Other Parts Discussed in Thread: TPS65917-Q1

Tool/software: Linux

I need some help on booting from QSPI on the dra726.

I am obviously not doing things right since it can't find kernel

I am able to load u-boot of qspi, it stops at the u-boot prompt

If I set the boot to boot on SD with an SD card I can boot, it would also boot off the eMMC.

Do you have example configuration and some howto on this?

I set the addresses to match the devicetree info.

/*
 * Default to using SPI for environment, etc.
 * 0x000000 - 0x03FFFF  : QSPI.SPL (256KiB)
 * 0x040000 - 0x13FFFF  : QSPI.u-boot (1MiB)
 * 0x140000 - 0x1BFFFF  : QSPI.devicetree (512KiB)
 * 0x1C0000 - 0x1FFFFF  : QSPI.u-boot-env (256KiB)
 * 0x200000 - 0x23FFFF  : QSPI.u-boot-env.redund (256KiB)
 * 0x240000 - 0xA3FFFF  : QSPI.kernel (8MiB)
 * 0xA40000 - 0xABFFFF  : QSPI.logo (512KiB)
 * 0xAC0000 - 0x3FFFFFF : USERLAND
 */
#define CONFIG_SYS_SPI_KERNEL_OFFS  0x240000
#define CONFIG_SYS_SPI_ARGS_OFFS    0x140000
#define CONFIG_SYS_SPI_ARGS_SIZE    0x80000
#if defined(CONFIG_QSPI_BOOT)
/* In SPL, use the environment and discard MMC support for space. */
#ifdef CONFIG_SPL_BUILD
#undef CONFIG_SPL_MMC_SUPPORT
#endif
#define CONFIG_SPL_ENV_SUPPORT
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
#define CONFIG_ENV_SPI_MAX_HZ    CONFIG_SF_DEFAULT_SPEED
#define CONFIG_ENV_SIZE             (256 << 10)
#define CONFIG_ENV_SECT_SIZE     (256 << 10) /* 256 KB sectors */
#define CONFIG_ENV_OFFSET         0x1C0000
#define CONFIG_ENV_OFFSET_REDUND 0x200000
#endif

/* SPI SPL */
#define CONFIG_SPL_SPI_SUPPORT
#define CONFIG_SPL_DMA_SUPPORT
#define CONFIG_TI_EDMA3
#define CONFIG_SPL_SPI_LOAD
#define CONFIG_SPL_SPI_FLASH_SUPPORT
#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000

U-Boot 2016.05 (Jun 22 2017 - 10:13:54 -0400)

CPU  : DRA722-GP ES2.0
Model: ACTIA Global Display
ACTIA Global Display: Rev C
DRAM:  1 GiB
SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapp0
*** Warning - bad CRC, using default environment

MMC:   no pinctrl for hs
no pinctrl for hs
OMAP SD/MMC: 0, OMAP SD/MMC: 1
SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapp0
*** Warning - bad CRC, using default environment

Net:   No ethernet found.
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
=>

I have MLO, u-boot.img, device tree and kernel programmed in NOR from Linux

&qspi {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&qspi1_pins>;

    spi-max-frequency = <48000000>;
    m25p80@0 {
                compatible = "s25fl512s";
        spi-max-frequency = <48000000>;
                reg = <0>;
                spi-tx-bus-width = <1>;
                spi-rx-bus-width = <4>;
                #address-cells = <1>;
                #size-cells = <1>;
        spi-cpol;
        spi-cpha;

                /* MTD partition table.
                 * The ROM checks the first four physical blocks
                 * for a valid file to boot and the flash here is
                 * 256KiB block size.
                 */
        partition@0 {
            label = "QSPI.MLO";
            reg = <0x0 0x40000>;
        };
        partition@1 {
            label = "QSPI.u-boot.img";
            reg = <0x40000 0x100000>;
            };
        partition@2 {
            label = "QSPI.devicetree";
            reg = <0x140000 0x80000>;
        };
        partition@3 {
            label = "QSPI.u-boot-env";
            reg = <0x1C0000 0x40000>;
        };
        partition@4 {
            label = "QSPI.u-boot-env.redund";
            reg = <0x200000 0x40000>;
        };
        partition@5 {
            label = "QSPI.zImage";
            reg = <0x240000 0x800000>;
        };
        partition@6 {
            label = "QSPI.logo";
            reg = <0xa40000 0x80000>;
        };
        partition@7 {
            label = "QSPI.userland";
            reg = <0xac0000 0x3540000>;
        };
    };
};

  • I forgot to mention, the eMMC has the rootfs on the second partition. On the first partition I only have uEnv.txt
  • Hi Michel,

    Do you use the latest PSDKLA 3.02? Do you use DRA72x TI EVM or custom board?

    Check if your steps are aligned with below wiki pages:

    processors.wiki.ti.com/.../Processor_SDK_Linux_Automotive_Software_Developers_Guide
    processors.wiki.ti.com/.../Linux_Core_U-Boot_User's_Guide
    processors.wiki.ti.com/.../Linux_Core_QSPI_User's_Guide

    Regards,
    Pavel
  • It is a custom board. Brad told me Friday that I should use uImage contrary to the previous suggestion to use zImage.

    I don't have enough room in the NOR so the rootfs has to be on the eMMC. The size of the eMMC is 4G.

    On the Processor page you have the IPU in the QSPI, does it have to be or can it still be loaded from the rootfs?

    My u-boot for QSPI is based on the latest automotive u-boot minus the support for android, my files on include/configs do not have support for android.

    For booting off the Micro SD and eMMC I was using the industrial version 3.03, so for QSPI I made it almost identical to the one from the automotive SDK except for the android support which I didn't bring in.

    My Linux kernel is the latest one with the industrial version 3.03, I need to look at the differences with the automotive 3.02

    It looks like what I have right now is what is called the development QSPI boot, it boots u-boot but loads the device tree and kernel from eMMC.

    My new entry in the device tree is this one. It needs to run in mode 3 to work because of the way the NOR is wired.

    For setup of the board software I force the boot on microSD and the files are copied from the Linux boot disk using a bash script.

    &qspi {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&qspi1_pins>;

        spi-max-frequency = <48000000>;
        m25p80@0 {
                    compatible = "s25fl512s";
            spi-max-frequency = <48000000>;
                    reg = <0>;
                    spi-tx-bus-width = <1>;
                    spi-rx-bus-width = <4>;
                    #address-cells = <1>;
                    #size-cells = <1>;
            spi-cpol;
            spi-cpha;

                    /* MTD partition table.
                     * The ROM checks the first four physical blocks
                     * for a valid file to boot and the flash here is
                     * 256KiB block size.
                     */
            partition@0 {
                label = "QSPI.MLO";
                reg = <0x0 0x40000>;
            };
            partition@1 {
                label = "QSPI.u-boot.img";
                reg = <0x40000 0x100000>;
                };
            partition@2 {
                label = "QSPI.devicetree";
                reg = <0x140000 0x80000>;
            };
            partition@3 {
                label = "QSPI.u-boot-env";
                reg = <0x1C0000 0x40000>;
            };
            partition@4 {
                label = "QSPI.u-boot-env.redund";
                reg = <0x200000 0x40000>;
            };
            partition@5 {
                label = "QSPI.uImage";
                reg = <0x240000 0x800000>;
            };
            partition@6 {
                label = "QSPI.logo";
                reg = <0xa40000 0x80000>;
            };
            partition@7 {
                label = "QSPI.userland";
                reg = <0xac0000 0x3540000>;
            };
        };
    };


    Michel Catudal

    ACTIA Corp

  • Michel,

    Michel Catudal said:
    It is a custom board

    What are the hardware differences (if any) between your custom board and DRA72x TI EVM regarding QSPI?

    Michel Catudal said:
    Brad told me Friday that I should use uImage contrary to the previous suggestion to use zImage.

    Yes, uImage should be used for QSPI boot.

    Michel Catudal said:
    On the Processor page you have the IPU in the QSPI, does it have to be or can it still be loaded from the rootfs?

    I think IPU exe is needed in QSPI only when "early boot" feature is enabled and planned to be used. Do you enable and plan to use that feature?

    Michel Catudal said:

    My u-boot for QSPI is based on the latest automotive u-boot minus the support for android, my files on include/configs do not have support for android.

    For booting off the Micro SD and eMMC I was using the industrial version 3.03, so for QSPI I made it almost identical to the one from the automotive SDK except for the android support which I didn't bring in.

    My Linux kernel is the latest one with the industrial version 3.03, I need to look at the differences with the automotive 3.02

    I am not sure I understand your Industrial/Automotive/Android mixture. I would suggest you to use PSDKLA 3.02 u-boot and linux kernel. Industrial SDK is used only for AM57x devices.

    Can you provide me full console log regarding your boot-up process? Can you also print the u-boot environments when you are in the u-boot prompt?

    Regards,
    Pavel

  • rtclk is not connected so mode 3 has to be used

    Early boot is not planned for now unless we find issues with reading the keypad at boot time. The keypad in question is connected on a CAN port, we have 5 CAN ports, 2 local and 3 using Microchip devices on a SPI port.

    It was easier to get the boot on micro SD to work with the industrial SDK. Our Linux doesn't use the SDK for the rootfs, we have a custom board and and custom yocto recipes. For qspi I am using the automotive SDK to generate u-boot without any android support in my include files. I have no need for android to be in or for u-boot to waste time looking for a possible android boot.

    My comment was that my current Linux kernel was generated using the Makefile in the industrial SDK and that I needed to look to see if I had to move to use the automotive SDK to generate the kernel for QSPI. I don't see big differences between the two, either way I do not use it as is considering that neither of them support our custom LCD and touch screen.
  • Pavel,

    In a meeting this morning I was told that we need to recognize a certain message from the CAN 3 (on a Microchip device) within one or two seconds from boot. Is that possible with early boot? Our can code is in IPU1 with TI-RTOS.

    I see this in the documentation, is that correct? if so the code is not there for QSPI. Any details on loading the IPU1 code from QSPI then?

    ----------------------------------------------------------------------------------------------------------------------------------------------
    Validation and Limitations

    Late attach functionality has been validated for all the remotecores IPU2,IPU1,DSP1 and DSP2. However there is the following limitation.

    U-Boot has only been updated to load remotecore binaries from the boot partition of the SD card or eMMC. If you desire to load remotecore binaries from other media (e.g. QSPI), the code to load the binaries needs to be added to U-Boot.

    ---------------------------------------------------------------------------------------------------------------------------------------------------

    Michel
  • Michel Catudal said:
    rtclk is not connected so mode 3 has to be used

    Yes, this is supported, just make sure you have the correct values in QSPI_SPI_DC_REG

    Michel Catudal said:
    It was easier to get the boot on micro SD to work with the industrial SDK. Our Linux doesn't use the SDK for the rootfs, we have a custom board and and custom yocto recipes. For qspi I am using the automotive SDK to generate u-boot without any android support in my include files. I have no need for android to be in or for u-boot to waste time looking for a possible android boot.

    My comment was that my current Linux kernel was generated using the Makefile in the industrial SDK and that I needed to look to see if I had to move to use the automotive SDK to generate the kernel for QSPI. I don't see big differences between the two, either way I do not use it as is considering that neither of them support our custom LCD and touch screen.

    DRA72x device comes with the below SDK options:

    1. Automotive Android Processor SDK - v6AM.1.3

    2. Automotive Linux Processor SDK - v3.02.00

    3. Automotive RTOS Processor SDK - v3.03.01

    Also there are SDK options for AM571x device:

    1. Linux Processor SDK - v03.03

    2. Linux-RT Processor SDK - v03.03

    3. RTOS Processor SDK - v03.03

    Which SDK exactly you call "industrial SDK"? Is it some of these 6?

    For QSPI boot on DRA72x device, I would suggest you to use Automotive Linux Processor SDK - v3.02.00:

    Note also that in "Development boot" mode MLO/u-boot are in QSPI, but DTB and uImage are in MMC. Have you made any changes regarding this default setup?

    How exactly you build your MLO/u-boot/uImage/DTB? Do you use dra7xx_evm_defconfig, dra7xx_evm_qspiboot_config?

    How exactly you flash MLO/u-boot/uImage/DTB/env in QSPI? Do you use mk-qspi-boot.sh script?

    You should setup your u-boot environments to load and start uImage from the correct location.

    Regards,
    Pavel

  • Michel Catudal said:
    In a meeting this morning I was told that we need to recognize a certain message from the CAN 3 (on a Microchip device) within one or two seconds from boot. Is that possible with early boot? Our can code is in IPU1 with TI-RTOS.

    I see this in the documentation, is that correct? if so the code is not there for QSPI. Any details on loading the IPU1 code from QSPI then?

    See if the below e2e thread will be in help:

    Regards,
    Pavel

  • I was using the u-boot and Linux kernel in  Linux Processor SDK - v03.03 for the first boards. We had a hardware issue with the QSPi pins backwards so QSPI use was not possible and it was not possible to boot off the micro SD with the u-boot from the automotive SDK.

    Now we have a few good boards and today we are supposed to get around 100 more so I have been working to get the QSPI to work. I have it work in the dev mode as you described. Now I want it to load the devicetree, uImage and logo from QSPI and possibly the IPU1 and IPU2 code. We do not use the DSP for the current customer but may for other customers in the future. Since we have both USB boards set as host it is not possible to use them as device for DFU, or is there a way around? Our planned approach is to force the boot on MicroSD with a fixture at manufacturing and use a boot on a micro SD which has a linux. With a script I copy the data to the MTD and ext4 partitions.

    I have no issue accessing the QSPI as long it is in mode 3 and at 48Mhz

    I have put my patches yesterday in the Kernel found in the automotive SDK, I was allready using the u-boot from that SDK. I haven't changed much in the kernel, added support for our touch screen and a new devicetree. I still need to add a driver for the ST Accelerometer, it looks like the driver in the latest kernel would do the trick. The more complicated one may be the external LVDS which is connected on the HDMI port, not urgent at the moment since both are not populated on the boards we have in house. I didn't see any TI support for the device we use, I may bug Brad later on this. This is likely a few months away.

    Changes are more involved in u-boot where I have my own board definitions beside the device tree. I have my board definitions on a directory called actia, not using the ti directory

    Originally the EEPROM was on SPI, in the new hardware it was moved to the EEPROM so right now the functions to check the board don't exist and for the micro SD card I force one device tree name in u-boot. I have two include files in include/configs

    actia_dra726.h and actia_omap5_common.h, they are based on dra7xx_evm.h and ti_omap5_common.h

    I have customized the addresses to match that of the devicetree.

    The major difference is that for when it is not defined as QSPI it boots off the microSD much like we do on the beagleboard X15. Using the automotive SDK approach I could not get it to go past the SPL. Aside from that it is very close to the automotive two files I mentioned.

    We've had some issues with the voltage on the SD going to 3V and 90% or our board would not boot at all. I commented out the section where it was trying to lower that voltage and the problem went away.

    There is no such thing as dra7xx_evm_qspiboot_config in the automotive sdk ti-processor-sdk-linux-automotive-dra7xx-evm-03_02_00_03

    in the Makefile I have this

    linux-1:

           $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) ARCH=arm $(DEFAULT_LINUXKERNEL_CONFIG)

           $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) uImage modules dtbs LOADADDR=80008000

           $(MAKE) -C $(SGX_KERNEL_MODULE_PATH) $(LINUXKERNEL_BUILD_VARS) KERNELDIR=$(LINUXKERNEL_INSTALL_DIR) DISCIMAGE=$(EXEC_DIR)

    Here is the script to flash, I have another one to erase the partitions.

    #! /bin/sh

    MLO_FILE_PATH=/home/root/qspi/target/u-boot/MLO

    UBOOT_FILE_PATH=/home/root/qspi/target/u-boot/u-boot.img

    DTB_FILE_PATH=/home/root/qspi/target/boot/dra726-actia-lcd-12inch.dtb

    UIMAGE_FILE_PATH=/home/root/qspi/target/boot/uImage

    echo "Flashing MLO image @ 0x000000"

    mtd_debug write /dev/mtd0 0 $(ls -l $MLO_FILE_PATH | awk '{ print $5 }') $MLO_FILE_PATH

    echo "MLO flashing completed"

    echo "Flashing u-boot.img image  @ 0x040000"

    mtd_debug write /dev/mtd1 0 $(ls -l $UBOOT_FILE_PATH | awk '{ print $5 }') $UBOOT_FILE_PATH

    echo "u-boot.img flashing completed"

    echo "Flashing devicetree file @ 0x140000"

    mtd_debug write /dev/mtd2 0 $(ls -l $DTB_FILE_PATH | awk '{ print $5 }') $DTB_FILE_PATH

    echo "devicetree file flashing completed"

    echo "Flashing uImage @ 0x240000"

    mtd_debug write /dev/mtd5 0 $(ls -l $UIMAGE_FILE_PATH | awk '{    print $5 }') $UIMAGE_FILE_

    echo "uImage flashing completed"

    I was programming zImage as I was instructed to earlier and Friday Brad said that it is supposed to be uImage. I haven't tested it yet, I was looking for you configuration file as stated in your message and on the web and found out that it doesn't exist.

    Michel Catudal

    ACTIA Corp

  • Michel Catudal said:
    Now I want it to load the devicetree, uImage and logo from QSPI and possibly the IPU1 and IPU2 code.

    Do not forget the u-boot envs. In u-boot envs you should point that u-boot should load linux kernel at specific address.

    Michel Catudal said:
    Since we have both USB boards set as host it is not possible to use them as device for DFU, or is there a way around?

    I can not find a way around this.

    Michel Catudal said:
    There is no such thing as dra7xx_evm_qspiboot_config in the automotive sdk ti-processor-sdk-linux-automotive-dra7xx-evm-03_02_00_03

    Michel Catudal said:
    I was looking for you configuration file as stated in your message and on the web and found out that it doesn't exist.

    Do you have QSPI_BOOT enabled in dra7xx_evm.h (or your own fail that replace dra7xx_evm.h)? See the below e2e post for more info:

    Regards,
    Pavel

  •   "Do not forget the u-boot envs. In u-boot envs you should point that u-boot should load linux kernel at specific address."

    I am not sure what needs to be in that envs, more details?

      "Do you have QSPI_BOOT enabled in dra7xx_evm.h (or your own fail that replace dra7xx_evm.h)? See the below e2e post for more info:"

    Yes

    Michel

  • Pavel,

    Here is the parts on the env in my include file

    #ifndef CONFIG_QSPI_BOOT
    /* Micro SD ENV related defines */
    #define CONFIG_ENV_SIZE            (64 << 10)
    #define CONFIG_ENV_IS_IN_FAT
    #define FAT_ENV_INTERFACE        "mmc"
    #define FAT_ENV_DEVICE_AND_PART    "0:1"
    #define FAT_ENV_FILE            "uboot.env"
    #endif


    /*
     * Default to using SPI for environment, etc.
     * 0x000000 - 0x03FFFF  : QSPI.SPL (256KiB)
     * 0x040000 - 0x13FFFF  : QSPI.u-boot (1MiB)
     * 0x140000 - 0x1BFFFF  : QSPI.devicetree (512KiB)
     * 0x1C0000 - 0x1FFFFF  : QSPI.u-boot-env (256KiB)
     * 0x200000 - 0x23FFFF  : QSPI.u-boot-env.redund (256KiB)
     * 0x240000 - 0xA3FFFF  : QSPI.kernel (8MiB)
     * 0xA40000 - 0xABFFFF  : QSPI.logo (512KiB)
     * 0xAC0000 - 0x3FFFFFF : USERLAND
     */
    #define CONFIG_SYS_SPI_KERNEL_OFFS  0x240000
    #define CONFIG_SYS_SPI_ARGS_OFFS    0x140000
    #define CONFIG_SYS_SPI_ARGS_SIZE    0x80000
    #if defined(CONFIG_QSPI_BOOT)
    /* In SPL, use the environment and discard MMC support for space. */
    #ifdef CONFIG_SPL_BUILD
    #undef CONFIG_SPL_MMC_SUPPORT
    #endif
    #define CONFIG_SPL_ENV_SUPPORT
    #define CONFIG_ENV_IS_IN_SPI_FLASH
    #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
    #define CONFIG_ENV_SPI_MAX_HZ    CONFIG_SF_DEFAULT_SPEED
    #define CONFIG_ENV_SIZE             (256 << 10)
    #define CONFIG_ENV_SECT_SIZE     (256 << 10) /* 256 KB sectors */
    #define CONFIG_ENV_OFFSET         0x1C0000
    #define CONFIG_ENV_OFFSET_REDUND 0x200000
    #endif

    /* SPI SPL */
    #define CONFIG_SPL_SPI_SUPPORT
    #define CONFIG_SPL_DMA_SUPPORT
    #define CONFIG_TI_EDMA3
    #define CONFIG_SPL_SPI_LOAD
    #define CONFIG_SPL_SPI_FLASH_SUPPORT
    #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000

    When is the env saved to the env location?

    Michel

  • Regarding u-boot environments, check the below scripts:

    ti-processor-sdk-linux-automotive-dra7xx-evm-03_02_00_03/bin/mk-qspi-boot.sh
    ti-processor-sdk-linux-automotive-dra7xx-evm-03_02_00_03/bin/setup-uboot-env.sh

    Regards,
    Pavel
  • Here what I get so far, it gets blocked after loading the kernel

    I also cannot stop to a u-boot prompt

    U-Boot SPL 2016.05 (Jun 28 2017 - 10:38:50)
    DRA722-GP ES2.0
    Trying to boot from SPI
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.45 (michelcatudal@mcatu01d) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) )7
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine model: ACTIA Global Display
    [    0.000000] bootconsole [earlycon0] enabled
    [    0.000000] Reserved memory: created CMA memory pool at 0x95800000, size 56 MiB
    [    0.000000] Reserved memory: initialized node ipu2_cma@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x9d000000, size 32 MiB
    [    0.000000] Reserved memory: initialized node ipu1_cma@9d000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 64 MiB at 0xbbc00000
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] OMAP4: Map 0xbfe00000 to fe600000 for dram barrier
    [    0.000000] DRA722 ES2.0
    [    0.000000] PERCPU: Embedded 12 pages/cpu @ef672000 s18944 r8192 d22016 u49152
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259904
    [    0.000000] Kernel command line: elevator=noop console=ttyO2,115200n8 root=/mmcblk0p2 rw rootwait earlyprintk fi4
    [    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: 870748K/1046528K available (6283K kernel code, 322K rwdata, 2296K rodata, 332K init, 219K bs)
    [    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 - 0xc0868fcc   (8580 kB)
    [    0.000000]       .init : 0xc0869000 - 0xc08bc000   ( 332 kB)
    [    0.000000]       .data : 0xc08bc000 - 0xc090cb50   ( 323 kB)
    [    0.000000]        .bss : 0xc090e000 - 0xc0944f04   ( 220 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
    [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] ti_dt_clocks_register: failed to lookup clock node gmac_gmii_ref_clk_div
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] Architected cp15 timer(s) running at 6.14MHz (virt).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 44079520s
    [    0.000004] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
    [    0.008310] Switching to timer-based delay loop, resolution 162ns
    [    0.014948] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.025220] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.030877] Console: colour dummy device 80x30
    [    0.035535] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [    0.042334] This ensures that you still see kernel messages. Please
    [    0.048854] update your kernel commandline.
    [    0.053244] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.063878] pid_max: default: 32768 minimum: 301
    [    0.068794] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.075685] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.083533] Initializing cgroup subsys io
    [    0.087759] Initializing cgroup subsys memory
    [    0.092332] Initializing cgroup subsys devices
    [    0.096981] Initializing cgroup subsys freezer
    [    0.101644] Initializing cgroup subsys perf_event
    [    0.106562] Initializing cgroup subsys pids
    [    0.110962] CPU: Testing write buffer coherency: ok
    [    0.116262] /cpus/cpu@0 missing clock-frequency property
    [    0.121806] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.127747] Setting up static identity map for 0x80008340 - 0x800083a0
    [    0.177969] Brought up 1 CPUs
    [    0.181106] SMP: Total of 1 processors activated (12.29 BogoMIPS).
    [    0.187540] CPU: All CPU(s) started in SVC mode.
    [    0.193345] devtmpfs: initialized
    [    0.232606] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.241485] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.388366] omap_hwmod: i2c1: _wait_target_disable failed
    [    0.447151] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.470330] pinctrl core: initialized pinctrl subsystem
    [    0.476673] NET: Registered protocol family 16
    [    0.482342] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.511417] cpuidle: using governor ladder
    [    0.541444] cpuidle: using governor menu
    [    0.553540] OMAP GPIO hardware version 0.1
    [    0.564683] irq: no irq domain found for /ocp/l4@4a000000/scm@2000/pinmux@1400 !
    [    0.591284] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.599616] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.606066] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.613762] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.621914] OMAP DMA hardware revision 0.0
    [    0.706503] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.717341] edma 43300000.edma: memcpy is disabled
    [    0.726989] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.735838] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.741920] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.749658] SCSI subsystem initialized
    [    0.754823] palmas 0-0058: Irq flag is 0x00000000
    [    0.775266] palmas 0-0058: Muxing GPIO 51, PWM 0, LED 2
    [    0.824407] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.830781] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
    [    0.837110] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
    [    0.843069] media: Linux media interface: v0.10
    [    0.847869] Linux video capture interface: v2.00
    [    0.852724] pps_core: LinuxPPS API ver. 1 registered
    [    0.857920] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.867400] PTP clock support registered
    [    0.871566] EDAC MC: Ver: 3.0.0
    [    0.882009] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    0.888537] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    0.895857] clocksource: Switched to clocksource arch_sys_counter
    [    0.911991] NET: Registered protocol family 2
    [    0.917068] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.924445] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.931286] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.937948] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.944135] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.950951] NET: Registered protocol family 1
    [    0.965787] RPC: Registered named UNIX socket transport module.
    [    0.971987] RPC: Registered udp transport module.
    [    0.976919] RPC: Registered tcp transport module.
    [    0.981834] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.989502] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    1.000285] futex hash table entries: 256 (order: 2, 16384 bytes)
    [    1.023234] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    1.039994] NFS: Registering the id_resolver key type
    [    1.045288] Key type id_resolver registered
    [    1.049705] Key type id_legacy registered
    [    1.053959] ntfs: driver 2.1.32 [Flags: R/O].
    [    1.060720] bounce: pool size: 64 pages
    [    1.064882] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    1.072648] io scheduler noop registered (default)
    [    1.077701] io scheduler deadline registered
    [    1.082195] io scheduler cfq registered
    [    1.088410] ldo4: supplied by vdd_5v0
    [    2.142327] omap_hwmod: i2c1: _wait_target_disable failed
    [    2.392701] clock: dpll_pcie_ref_ck failed transition to 'locked'
    [    2.400371] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
    [    2.407920] pinctrl-single 4a002e8c.pinmux: 1 pins at pa fc002e8c size 4
    [    2.418159] backlight supply power not found, using dummy regulator
    [    2.478215] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    2.488141] 4806a000.serial: ttyS0 at MMIO 0x4806a000 (irq = 299, base_baud = 3000000) is a 8250
    [    2.498182] 4806c000.serial: ttyS1 at MMIO 0x4806c000 (irq = 300, base_baud = 3000000) is a 8250
    [    2.508180] console [ttyS2] disabled
    [    2.511973] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 301, base_baud = 3000000) is a 8250
    [    2.521181] console [ttyS2] enabled
    [    2.521181] console [ttyS2] enabled
    [    2.528383] bootconsole [earlycon0] disabled
    [    2.528383] bootconsole [earlycon0] disabled
    [    2.538028] 48066000.serial: ttyS4 at MMIO 0x48066000 (irq = 302, base_baud = 3000000) is a 8250
    [    2.547672] 48424000.serial: ttyS8 at MMIO 0x48424000 (irq = 303, base_baud = 3000000) is a 8250
    [    2.557587] [drm] Initialized drm 1.1.0 20060810
    [    2.563096] 58000000.dss supply vdda_video not found, using dummy regulator
    [    2.570309] OMAP DSS rev 6.1
    [    2.574089] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [    2.669536] loop: module loaded
    [    2.672938] at24 2-0050: 4096 byte 24c32 EEPROM, writable, 32 bytes/write
    [    2.681869] m25p80 spi32766.0: s25fl512s (65536 Kbytes)
    [    2.687226] 8 ofpart partitions found on MTD device spi32766.0
    [    2.693082] Creating 8 MTD partitions on "spi32766.0":
    [    2.698258] 0x000000000000-0x000000040000 : "QSPI.MLO"
    [    2.714332] 0x000000040000-0x000000140000 : "QSPI.u-boot.img"
    [    2.730962] 0x000000140000-0x0000001c0000 : "QSPI.devicetree"
    [    2.747597] 0x0000001c0000-0x000000200000 : "QSPI.u-boot-env"
    [    2.764199] 0x000000200000-0x000000240000 : "QSPI.u-boot-env.redund"
    [    2.781436] 0x000000240000-0x000000a40000 : "QSPI.uImage"
    [    2.797719] 0x000000a40000-0x000000ac0000 : "QSPI.logo"
    [    2.813830] 0x000000ac0000-0x000004000000 : "QSPI.userland"
    [    2.831244] libphy: Fixed MDIO Bus: probed
    [    2.837802] mousedev: PS/2 mouse device common for all mice
    [    2.853912] i2c /dev entries driver
    [    2.858657] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
    [    2.864409] vpe 489d0000.vpe: Direct firmware load for vpdma-1b8.bin failed with error -2
    [    2.877108] omap_hsmmc 4809c000.mmc: no pinctrl state for hs mode
    [    2.883572] vpe 489d0000.vpe: couldn't get firmware
    [    2.916213] omap_hsmmc 480b4000.mmc: no pinctrl state for hs mode
    [    2.956501] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.964397] NET: Registered protocol family 10
    [    2.996541] sit: IPv6 over IPv4 tunneling driver
    [    3.001723] NET: Registered protocol family 17
    [    3.015949] Key type dns_resolver registered
    [    3.020374] omap_voltage_late_init: Voltage driver support not added
    [    3.036416] Adding alias for supply vdd,cpu0 -> vdd,4a003b20.oppdm
    [    3.042625] Adding alias for supply vbb,cpu0 -> vbb,4a003b20.oppdm
    [    3.065925] smps1: supplied by fixed-vdd-3v3
    [    3.070841] Adding alias for supply vdd,cpu0 -> vdd,4a003b20.oppdm
    [    3.085881] Adding alias for supply vbb,cpu0 -> vbb,4a003b20.oppdm
    [    3.107045] Power Management for TI OMAP4+ devices.
    [    3.112122] Registering SWP/SWPB emulation handler
    [    3.136308] dmm 4e000000.dmm: initialized all PAT entries
    [    3.157486] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    3.164127] [drm] No driver support for vblank timestamp query.
    [    3.195912] [drm] Enabling DMM ywrap scrolling
    [    3.253605] Console: switching to colour frame buffer device 240x45
    [    3.285857] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    3.316962] [drm] Initialized omapdrm 1.0.0 20110917 on minor 0
    [    3.356221] hctosys: unable to open rtc device (rtc0)
    [    3.386255] Waiting for root device /mmcblk0p2...
    [    4.129484] mmc1: MAN_BKOPS_EN bit is not set
    [    4.134944] mmc1: new MMC card at address 0001
    [    4.145944] omap_hwmod: i2c1: _wait_target_disable failed
    [    4.161750] mmcblk0: mmc1:0001 Q2J54A 3.59 GiB
    [    4.176487] mmcblk0boot0: mmc1:0001 Q2J54A partition 1 16.0 MiB
    [    4.192601] mmcblk0boot1: mmc1:0001 Q2J54A partition 2 16.0 MiB
    [    4.200822]  mmcblk0: p1 p2
    [    6.142857] omap_hwmod: i2c1: _wait_target_disable failed
    [  129.014842] random: nonblocking pool is initialized

  • Michel Catudal said:
    U-Boot SPL 2016.05 (Jun 28 2017 - 10:38:50)
    DRA722-GP ES2.0
    Trying to boot from SPI
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset

    It looks like SPL is configured for the correct UART output, but for some reason u-boot is not.  That's why you don't see any printouts related to u-boot and you cannot stop the boot at u-boot.  You're not using "falcon mode" (single stage boot) are you?  Perhaps double check that you've rebuilt u-boot and flashed it (just to make sure it wasn't somehow missed)?

  • How do you keep from be in falcon mode and still load the kernel from QSPI?

    If I keep it from switching to falcon mode I get this, it is obviously reading u-boot from QSPI since I do not have anything on the FAT partition on the eMMC.

    The offending code is in ti_armv7_common.h

    Is there a way to still be able to stop at u-boot and load u-boot, devicetree and kernel from qspi?

    What about the stall I get at the end? it is not the uart, minicom can still talk to the board, it is just won't go any farther.

    CPU  : DRA722-GP ES2.0
    Model: ACTIA Global Display
    ACTIA Global Display: Rev C
    DRAM:  1 GiB
    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 5c000000
    *** Warning - bad CRC, using default environment

    MMC:   no pinctrl for hs
    no pinctrl for hs
    OMAP SD/MMC: 0, OMAP SD/MMC: 1
    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 5c000000
    *** Warning - bad CRC, using default environment

    Net:   No ethernet found.
    Hit any key to stop autoboot:  0
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    =>

  • There's a service called getty that's responsible for giving you the terminal through the serial port. Back with sysvinit you needed to correspondingly configure /etc/inittab to point to the appropriate serial port. I have not found the equivalent under systemd. I wanted to at least share this much info though to get things moving in the right direction.
  • I found this systemd FAQ:

    https://wiki.archlinux.org/index.php/Systemd_FAQ#How_do_I_change_the_default_number_of_gettys.3F

    I see in the root file system there are several symlinks:

    root@am57xx-evm:~# cd /etc/systemd/system/getty.target.wants/
    root@am57xx-evm:/etc/systemd/system/getty.target.wants# ls -al
    drwxr-xr-x 2 root root 4096 Mar 30 05:28 .
    drwxr-xr-x 11 root root 4096 Mar 30 05:32 ..
    lrwxrwxrwx 1 root root 45 Mar 30 02:18 getty@tty1.service -> ../../../../lib/systemd/system/getty@.service
    lrwxrwxrwx 1 root root 41 Mar 30 02:03 serial-getty@ttyO2.service -> /lib/systemd/system/serial-getty@.service
    lrwxrwxrwx 1 root root 41 Mar 30 02:03 serial-getty@ttyS2.service -> /lib/systemd/system/serial-getty@.service

    It looks like you simply need to rename the symlinks to use the proper UART.

  • The problem is not the serial access, that works, it is just that is stalls with
    [ 6.142857] omap_hwmod: i2c1: _wait_target_disable failed
    [ 129.014842] random: nonblocking pool is initialized

    lrwxrwxrwx 1 root root 45 28 jun 15:31 getty@tty1.service -> ../../../../lib/systemd/system/getty@.service
    lrwxrwxrwx 1 root root 41 28 jun 15:31 serial-getty@ttyS2.service -> /lib/systemd/system/serial-getty@.service

    The service exists, I connected a keyboard on the USB port and cannot go to the command line.
    It did turn the backlight on the LCD

    It must have a problem with the PMIC. I have seen that before with the micro SD boot.

    If I modify my include file to point to the mmc correctly it loads the kernel from the mmc and boots fine.

    I will be on vacation until next wednesday, I guess the work around would be that and I will have to use the debugger to figure out the reason of the crash.

    Our application is about 20MB, will I get a bit of improvement loading it from QSPI vs the emmc?

    If you have any idea about the crash let me know. I can be reached on my gmail address. I could provide you with the patches for Kernel and u-boot if you want to look at them.

    Michel
  • Michel,


    Michel Catudal said:

    cannot stop to a u-boot prompt

    U-Boot SPL 2016.05 (Jun 28 2017 - 10:38:50)
    DRA722-GP ES2.0
    Trying to boot from SPI
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.45 (michelcatudal@mcatu01d) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) )7

    As Brad explained, this is Production mode (also known as spl_early_boot mode, single stage mode, falcon mode). In this stage u-boot.img is optional, MLO/SPL is trying to load uImage directly.

    In this boot mode SPL (first stage bootloader) directly boots the Linux kernel. Optionally, in order to enter into U-Boot, reset the board while keeping 'c' key on the serial terminal pressed. When falcon mode is enabled in U-Boot build (usually enabled by default), MLO checks if there is a valid uImage present at a defined offset. If uImage is present, it is booted directly. If valid uImage is not found, MLO falls back to booting u-boot.img.

    For QSPI single stage or Falcon mode, the CONFIG_QSPI_BOOT shall enabled.

    MLO, u-boot.img (optional), DTB, uImage are stored in QSPI flash memory.

    The QSPI boot uses uImage. Build the kernel uImage. You will need to keep the U-Boot tool mkimage in your $PATH

    # make uImage modules dtbs LOADADDR=80008000

    If kernel is not build with CONFIG_CMDLINE to set correct bootargs, then add the needed bootargs in chosen node in DTB file, using fdtput host utility. For example, for DRA74x EVM:

    # fdtput -v -t s arch/arm/boot/dts/dra7-evm.dtb "/chosen" bootargs "console=ttyO0,115200n8 root=<rootfs>"

    Set the environment variable "boot_os" to 1.

    Michel Catudal said:
    Here what I get so far, it gets blocked after loading the kernel

    Michel Catudal said:
    [    0.000000] Kernel command line: elevator=noop console=ttyO2,115200n8 root=/mmcblk0p2 rw rootwait earlyprintk fi4

    Michel Catudal said:
    [    6.142857] omap_hwmod: i2c1: _wait_target_disable failed
    [  129.014842] random: nonblocking pool is initialized

    First thing to check is your boot args (kernel command line). From what I understand you are trying to load rootfs from MMC/SD card.

    In 'spl_early_boot' mode, While building kernel uImage, set CONFIG_CMDLINE bootargs appropriately and set rootfs=/dev/mmcblk0p2 (eMMC device) and set kernel CONFIG_CMDLINE bootargs @menuconfig->Boot options->"Default kernel command string".

    for example:

    CONFIG_CMDLINE = "elevator=noop console=ttyO0,115200n8 root=<rootfs> rw rootwait earlyprintk fixrtc omapdrm.num_crtc=2 consoleblank=0  cma=64M rootfstype=ext4";
     where <rootfs> can be /dev/mmcblk0p2 for eMMC or /dev/mmcblk1p2 for mmc/sd.

    Add also "debug" in your boot args, thus you will boot linux kernel in debug mode and check where exactly it hang.

    Regards,
    Pavel

  • Pavel Botev said:

    For QSPI single stage or Falcon mode, the CONFIG_QSPI_BOOT shall enabled.

    MLO, u-boot.img (optional), DTB, uImage are stored in QSPI flash memory.

    The QSPI boot uses uImage. Build the kernel uImage. You will need to keep the U-Boot tool mkimage in your $PATH

    # make uImage modules dtbs LOADADDR=80008000

    I do all those

    Pavel Botev said:
    CONFIG_CMDLINE = "elevator=noop console=ttyO0,115200n8 root=<rootfs> rw rootwait earlyprintk fixrtc omapdrm.num_crtc=2 consoleblank=0  cma=64M rootfstype=ext4";
     where <rootfs> can be /dev/mmcblk0p2 for eMMC or /dev/mmcblk1p2 for mmc/sd.

    Mine is

    CONFIG_CMDLINE="elevator=noop console=ttyS2,115200n8 root=/mmcblk0p2 rw rootwait earlyprintk consoleblank=0  cma=64M rootfstype=ext4"

    What does fixrtc do? the rtc module is not populated correctly on our dra726 so I had to take it out of the device tree otherwise it hangs, even with the SD boot.

    What does omapdrm.num_crtc=2 do?

    I also have this

    CONFIG_CMDLINE_FROM_BOOTLOADER=y
    Does u-boot override CONFIG_CMDLINE when this is enabled?

    My configuration was partly copied from the EVM version

    When booting from qspi I shouldn't need the fat partition and just use one ext4 partition on the eMMC, correct?

    For a micro SD boot, why the use of the FAT partition instead of a linux partition? It doesn't seem make much sense to use old dos partitioning for Linux.

    Michel

  • Michel Catudal2 said:
    console=ttyS2,115200n8

    Do you use UART3 for console? Can you try to replace ttyS2 with ttyO2, is there any difference?

    By default we use ttyOx format regarding DRA7x device, see the below pointers:

    ti-processor-sdk-linux-automotive-dra7xx-evm-03_02_00_03/bin/setup-uboot-env.sh

    ttySx format should be used when 8250 UART driver is used (not the default OMAP serial driver), see the below wiki for details:

    Michel Catudal2 said:
    root=/mmcblk0p2

    try with root=/dev/mmcblk0p2

    I will check your other questions.

    Regards,
    Pavel

  • Michel Catudal2 said:
    What does fixrtc do? the rtc module is not populated correctly on our dra726 so I had to take it out of the device tree otherwise it hangs, even with the SD boot.

    I found fixrtc is related to RTC SS. The kernel option 'fixrtc' exists to set the system time from the last mount time from the rootfs. This allows systems which does not have a valid RTC time at startup to be able to boot of the root file system. When the 'fixrtc' option is used, the system time is set to the last mount time, regardless if the system time is already set to something valid.

    Also the below documents might be in help to you:

    Note that as you are booting directly to the kernel from the first stage bootloader, the kernel boot arguments need to be passed via the device tree. This could be done by modifying the device tree file before compilation or using fdtput after compilation.

    Regards,
    Pavel

  • Pavel Botev said:
    Do you use UART3 for console? Can you try to replace ttyS2 with ttyO2, is there any difference?

    I tried both, the kernel does the conversion if I use ttyO2

    The kernel uses the 8250 mode

    I am off today, I will be back to work monday

  • Michel Catudal2 said:
    What does omapdrm.num_crtc=2 do?

    Number of CRTCs on this device.

    linux-kernel/drivers/gpu/drm/omapdrm/Kconfig

    config DRM_OMAP_NUM_CRTCS
        int "Number of CRTCs"
        range 1 10
        default 1  if ARCH_OMAP2 || ARCH_OMAP3
        default 2  if ARCH_OMAP4
        help
          Select the number of video overlays which can be used as framebuffers.
          The remaining overlays are reserved for video.

    Set Number of CRTCs to the number of displays you have.

    crtc      -> DSS overlay manager

    Number of CRTCs must be passed either through bootargs or kernel config.
    The number of CRTCs must be set to the number of displays. Each CRTC reserves one plane.

    DRM CRTC Features:

    • One TV and three LCD Overlay Managers
    • Supports 1080p at 60Hz for all CRTCs

    Number of CRTCs must be passed either through bootargs or kernel config, which limits number of free DRM planes.




  • Michel Catudal2 said:
    CONFIG_CMDLINE_FROM_BOOTLOADER=y
    Does u-boot override CONFIG_CMDLINE when this is enabled?

    Yes. CONFIG_CMDLINE is valid only in SPL-> kernel mode (no u-boot.img is loaded). In this mode you should build kernel with CONFIG_CMDLINE to set correct bootargs or add the needed bootargs in chosen node in DTB file, using fdtput host utility.

    CMDLINE_FROM_BOOTLOADER - Use bootloader kernel arguments if available. Uses the command-line options passed by the boot loader. If the boot loader doesn't provide any, the default kernel command string provided in CMDLINE will be used.

  • Michel Catudal2 said:
    When booting from qspi I shouldn't need the fat partition and just use one ext4 partition on the eMMC, correct?

    Yes, FAT (vfat) is needed only for eMMC/MMC boot,  SPL/MLO and u-boot.img are stored in that boot partition. ext4 is for kernel, dtb and rootfs partition for eMMC/MMC.

    Michel Catudal2 said:
    For a micro SD boot, why the use of the FAT partition instead of a linux partition? It doesn't seem make much sense to use old dos partitioning for Linux.

    This is DRA72x ROM Code requirement. See DM72x TRM, section 33.3.7.6 eMMC Memories and SD Cards


  • Pavel,

    I got the Falcon  mode with QSPI to work, boot to the splash is about 6-7 seconds. I am using the u-boot from the latest automotive SDK (3.02) with my patches for our hardware.

    When booting in Falcon mode from QSPI the micro SD is not recognized and cannot be mounted.

    The rootfs is on the eMMC

    If I set it up to read the kernel from the eMMC I have the same issue.

    If I set it to read the kernel from the micro SD and there is no bootable micro SD it will complain about a bad micro SD and load the kernel from the eMMC.

    When Linux boot I can see that it was able to find the micro SD and mount it.

    How can I fix that?

    I need the microSD to be accessible since that is where we have the maps for Navionics' software.

    Here is my boot arg

    CONFIG_CMDLINE="elevator=noop console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw rootwait loglevel=0 fixrtc omapdrm.num_crtc=2 consoleblank=0  cma=64M rootfstype=ext4";

    If I set for root=/dev/mmcblk1p2 I get errors, it does see the two partitions but cannot find the rootfs it says waiting for /dev/mmcblk0p2

    Michel

  • Michel,

    I am not sure I understand your requirements. From what I understand you need to boot from QSPI flash in falcon mode (production mode, spl_early_boot mode, signle stage mode), then mount and use rootfs from MMC/SD card (not EMMC), is that correct?

    Could please clarify where is your kernel (uImage) located, in QSPI flash or in MMC/SD card?

    Please provide me full console boot up log (in debug mode) for analysis.

    Regards,
    Pavel
  • Pavel,

    It boots fine in QSPI, the problem is when I do that it doesn't recognize the micro SD. The rootfs is on the eMMC which is on the second mmc port.

    If I pass the kernel argument about the second mmc it recognizes two partitions which is correct and wants to boot of the micro SD where there is one FAT partition, so it just freezes there.

    It looks to me like very early in the process it cannot access the micro SD, perhaps it is not turning the voltage on correctly. Our hardware doesn't work if the voltage for the micro SD is less than 3.3V. I set the device tree to not support 1.8V for the mmc

    What would force the voltage below 3.3V? We use a similar PMIC as the one on the automotive evm but do not have something to switch the power off outside of the PMIC.

    In u-boot I get this if I stop u-boot before it loads the kernel.

    U-Boot 2016.05 (Jul 19 2017 - 17:46:58 -0400)

    CPU  : DRA722-GP ES2.0
    Model: ACTIA Global Display
    ACTIA Global Display: Rev D
    DRAM:  1 GiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    Net:   No ethernet found.
    Hit any key to stop autoboot:  0
    => mmc rescan             
    Card did not respond to voltage select!

    &qspi {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&qspi1_pins>;

        spi-max-frequency = <48000000>;
        m25p80@0 {
                    compatible = "s25fl512s","spi-flash";
            spi-max-frequency = <48000000>;
                    reg = <0>;
                    spi-tx-bus-width = <1>;
                    spi-rx-bus-width = <4>;
                    #address-cells = <1>;
                    #size-cells = <1>;
            spi-cpol;
            spi-cpha;

            /* MTD partition table.
             * The ROM checks the first four physical blocks
             * for a valid file to boot and the flash here is
             * 256KiB block size.
             */
            partition@0 {
                label = "QSPI.MLO";
                reg = <0x0 0x40000>;
            };
            partition@1 {
                label = "QSPI.u-boot.img";
                reg = <0x40000 0x100000>;
            };
            partition@2 {
                label = "QSPI.devicetree";
                reg = <0x140000 0x80000>;
            };
            partition@3 {
                label = "QSPI.u-boot-env";
                reg = <0x1C0000 0x40000>;
            };
            partition@4 {
                label = "QSPI.u-boot-env.redund";
                reg = <0x200000 0x40000>;
            };
            partition@5 {
                label = "QSPI.uImage";
                reg = <0x240000 0x800000>;
            };
            partition@6 {
                label = "QSPI.logo";
                reg = <0xa40000 0x80000>;
            };
            partition@7 {
                label = "QSPI.userland";
                reg = <0xac0000 0x3540000>;
            };
        };
    };

    &mmc1 {
            status = "okay";
        pinctrl-names = "default", "hs";
            pinctrl-0 = <&mmc1_pins_default>;
        pinctrl-1 = <&mmc1_pins_hs>;
            vmmc-supply = <&ldo1_reg>;
            bus-width = <4>;
            max-frequency = <192000000>;
            no-1-8-v;
    };

    &mmc2 {
            status = "okay";
        pinctrl-names = "default", "hs";
            pinctrl-0 = <&mmc2_pins_default>;
        pinctrl-1 = <&mmc2_pins_hs>;
            vmmc-supply = <&ldo1_reg>;
            bus-width = <8>;
            ti,non-removable;
            max-frequency = <192000000>;
            no-1-8-v;
    };


    Michel

  • Pavel,

    I noticed after looking back the message that I had forgotten to add the log

    Here is the dmesg

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.47-gf9f6f0db2d (michelcatudal@mcatu01d) (gcc version 5.3.1 2016017
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine model: ACTIA Global Display
    [    0.000000] Reserved memory: created CMA memory pool at 0x95800000, size 56 MiB
    [    0.000000] Reserved memory: initialized node ipu2_cma@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x9d000000, size 32 MiB
    [    0.000000] Reserved memory: initialized node ipu1_cma@9d000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 64 MiB at 0xbbc00000
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] OMAP4: Map 0xbfe00000 to fe600000 for dram barrier
    [    0.000000] On node 0 totalpages: 261632
    [    0.000000] free_area_init_node: node 0, pgdat c08bb940, node_mem_map ef6cc000
    [    0.000000]   Normal zone: 1728 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 196608 pages, LIFO batch:31
    [    0.000000]   HighMem zone: 65024 pages, LIFO batch:15
    [    0.000000] DRA722 ES2.0
    [    0.000000] PERCPU: Embedded 12 pages/cpu @ef672000 s18944 r8192 d22016 u49152
    [    0.000000] pcpu-alloc: s18944 r8192 d22016 u49152 alloc=12*4096
    [    0.000000] pcpu-alloc: [0] 0
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259904
    [    0.000000] Kernel command line: elevator=noop console=ttyO2,115200n8 console=tty1 root=/dev/mm4
    [    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: 870988K/1046528K available (6099K kernel code, 317K rwdata, 2168K rodata, 3)
    [    0.000000] Virtual kernel memory layout:
                       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                       fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                       vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
                       lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
                       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                         .text : 0xc0008000 - 0xc081afcc   (8268 kB)
                         .init : 0xc081b000 - 0xc086e000   ( 332 kB)
                         .data : 0xc086e000 - 0xc08bd450   ( 318 kB)
                          .bss : 0xc08bf000 - 0xc09077c4   ( 290 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
    [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] ti_dt_clocks_register: failed to lookup clock node gmac_gmii_ref_clk_div
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] Architected cp15 timer(s) running at 6.14MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_s
    [    0.000005] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
    [    0.000016] Switching to timer-based delay loop, resolution 162ns
    [    0.000321] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 583s
    [    0.000328] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000694] Console: colour dummy device 80x30
    [    0.000803] console [tty1] enabled
    [    0.000819] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [    0.000824] This ensures that you still see kernel messages. Please
    [    0.000829] update your kernel commandline.
    [    0.000840] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 Bo)
    [    0.000853] pid_max: default: 32768 minimum: 301
    [    0.000950] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000959] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.001491] Initializing cgroup subsys io
    [    0.001507] Initializing cgroup subsys memory
    [    0.001531] Initializing cgroup subsys devices
    [    0.001543] Initializing cgroup subsys freezer
    [    0.001554] Initializing cgroup subsys perf_event
    [    0.001564] Initializing cgroup subsys pids
    [    0.001590] CPU: Testing write buffer coherency: ok
    [    0.001789] /cpus/cpu@0 missing clock-frequency property
    [    0.001800] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.001847] Setting up static identity map for 0x80008340 - 0x800083a0
    [    0.050042] Brought up 1 CPUs
    [    0.050053] SMP: Total of 1 processors activated (12.29 BogoMIPS).
    [    0.050060] CPU: All CPU(s) started in HYP mode.
    [    0.050066] CPU: Virtualization extensions available.
    [    0.051030] devtmpfs: initialized
    [    0.080107] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.081060] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.223054] omap_hwmod: i2c1: _wait_target_disable failed
    [    0.289094] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260s
    [    0.293132] pinctrl core: initialized pinctrl subsystem
    [    0.294046] NET: Registered protocol family 16
    [    0.295023] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.320224] cpuidle: using governor ladder
    [    0.350246] cpuidle: using governor menu
    [    0.358242] OMAP GPIO hardware version 0.1
    [    0.365046] irq: no irq domain found for /ocp/l4@4a000000/scm@2000/

    pinmux@1400 !
    [    0.384206] No ATAGs?
    [    0.384233] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.384242] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.384638] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.384647] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.385136] OMAP DMA hardware revision 0.0
    [    0.470804] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 su)
    [    0.471921] edma 43300000.edma: memcpy is disabled
    [    0.476648] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.479861] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.480030] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.481962] SCSI subsystem initialized
    [    0.483171] palmas 0-0058: Irq flag is 0x00000000
    [    0.502677] palmas 0-0058: Muxing GPIO 51, PWM 0, LED 2
    [    0.551815] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.552396] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
    [    0.552912] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
    [    0.553077] pps_core: LinuxPPS API ver. 1 registered
    [    0.553086] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linu>
    [    0.553109] PTP clock support registered
    [    0.553153] EDAC MC: Ver: 3.0.0
    [    0.561608] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    0.561803] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    0.562795] clocksource: Switched to clocksource arch_sys_counter
    [    0.572713] NET: Registered protocol family 2
    [    0.573237] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.573300] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.573425] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.573476] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.573507] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.573715] NET: Registered protocol family 1
    [    0.584002] RPC: Registered named UNIX socket transport module.
    [    0.584012] RPC: Registered udp transport module.
    [    0.584019] RPC: Registered tcp transport module.
    [    0.584025] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.585012] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.587295] futex hash table entries: 256 (order: 2, 16384 bytes)
    [    0.603973] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.614630] NFS: Registering the id_resolver key type
    [    0.614657] Key type id_resolver registered
    [    0.614665] Key type id_legacy registered
    [    0.614737] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.616942] bounce: pool size: 64 pages
    [    0.617099] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
    [    0.617113] io scheduler noop registered (default)
    [    0.617125] io scheduler deadline registered
    [    0.617156] io scheduler cfq registered
    [    0.619258] ldo4: supplied by vdd_5v0
    [    1.907004] clock: dpll_pcie_ref_ck failed transition to 'locked'
    [    1.908327] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
    [    1.908452] pinctrl-single 4a002e8c.pinmux: 1 pins at pa fc002e8c size 4
    [    1.911660] backlight supply power not found, using dummy regulator
    [    1.965886] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    1.969096] 4806a000.serial: ttyS0 at MMIO 0x4806a000 (irq = 299, base_baud = 3000000) is a 8250
    [    1.969973] 4806c000.serial: ttyS1 at MMIO 0x4806c000 (irq = 300, base_baud = 3000000) is a 8250
    [    1.970825] console [ttyS2] disabled
    [    1.970874] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 301, base_baud = 3000000) is a 8250
    [    1.971194] console [ttyS2] enabled
    [    1.972035] 48066000.serial: ttyS4 at MMIO 0x48066000 (irq = 302, base_baud = 3000000) is a 8250
    [    1.972881] 48424000.serial: ttyS8 at MMIO 0x48424000 (irq = 303, base_baud = 3000000) is a 8250
    [    1.973960] [drm] Initialized drm 1.1.0 20060810
    [    1.974900] ldo5: supplied by vdd_3v3
    [    1.975448] OMAP DSS rev 6.1
    [    1.976336] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [    2.064056] loop: module loaded
    [    2.064333] at24 2-0050: 4096 byte 24c32 EEPROM, writable, 32 bytes/write
    [    2.066438] m25p80 spi32766.0: s25fl512s (65536 Kbytes)
    [    2.066514] 8 ofpart partitions found on MTD device spi32766.0
    [    2.066522] Creating 8 MTD partitions on "spi32766.0":
    [    2.066532] 0x000000000000-0x000000040000 : "QSPI.MLO"
    [    2.077458] 0x000000040000-0x000000140000 : "QSPI.u-boot.img"
    [    2.088313] 0x000000140000-0x0000001c0000 : "QSPI.devicetree"
    [    2.099169] 0x0000001c0000-0x000000200000 : "QSPI.u-boot-env"
    [    2.110017] 0x000000200000-0x000000240000 : "QSPI.u-boot-env.redund"
    [    2.120875] 0x000000240000-0x000000a40000 : "QSPI.uImage"
    [    2.131740] 0x000000a40000-0x000000ac0000 : "QSPI.logo"
    [    2.142597] 0x000000ac0000-0x000004000000 : "QSPI.userland"
    [    2.154411] libphy: Fixed MDIO Bus: probed
    [    2.156837] mousedev: PS/2 mouse device common for all mice
    [    2.167351] i2c /dev entries driver
    [    2.171855] ldo1: supplied by vdd_3v3
    [    2.253441] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.255320] NET: Registered protocol family 10
    [    2.273051] sit: IPv6 over IPv4 tunneling driver
    [    2.273605] NET: Registered protocol family 17
    [    2.273691] Key type dns_resolver registered
    [    2.273840] omap_voltage_late_init: Voltage driver support not added
    [    2.274397] Adding alias for supply vdd,cpu0 -> vdd,4a003b20.oppdm
    [    2.274407] Adding alias for supply vbb,cpu0 -> vbb,4a003b20.oppdm
    [    2.274471] smps1: supplied by vdd_3v3
    [    2.275105] Adding alias for supply vdd,cpu0 -> vdd,4a003b20.oppdm
    [    2.275115] Adding alias for supply vbb,cpu0 -> vbb,4a003b20.oppdm
    [    2.277041] Power Management for TI OMAP4+ devices.
    [    2.277238] Registering SWP/SWPB emulation handler
    [    2.284591] dmm 4e000000.dmm: initialized all PAT entries
    [    2.304453] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    2.304460] [drm] No driver support for vblank timestamp query.
    [    2.322842] [drm] Enabling DMM ywrap scrolling
    [    2.370514] Console: switching to colour frame buffer device 240x45
    [    2.389821] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    2.412803] [drm] Initialized omapdrm 1.0.0 20110917 on minor 0
    [    2.453167] hctosys: unable to open rtc device (rtc0)
    [    2.473201] Waiting for root device /dev/mmcblk0p2...
    [    3.279327] omap_hwmod: i2c1: _wait_target_disable failed
    [    3.293175] mmc1: MAN_BKOPS_EN bit is not set
    [    3.296361] mmc1: new high speed MMC card at address 0001
    [    3.306738] mmcblk0: mmc1:0001 Q2J54A 3.59 GiB
    [    3.316909] mmcblk0boot0: mmc1:0001 Q2J54A partition 1 16.0 MiB
    [    3.327070] mmcblk0boot1: mmc1:0001 Q2J54A partition 2 16.0 MiB
    [    3.328045]  mmcblk0: p1 p2
    [    3.400035] EXT4-fs (mmcblk0p2): recovery complete
    [    3.400476] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    3.400502] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    3.402900] devtmpfs: mounted
    [    3.403049] Freeing unused kernel memory: 332K (c081b000 - c086e000)
    [    3.403054] This architecture does not have kernel memory protection.
    [    3.526202] systemd[1]: System time before build time, advancing clock.
    [    3.547647] random: systemd: uninitialized urandom read (16 bytes read, 11 bits of entropy avai)
    [    3.549735] random: systemd: uninitialized urandom read (16 bytes read, 11 bits of entropy avai)
    [    3.555369] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMO)
    [    3.555687] systemd[1]: Detected architecture arm.
    [    3.573439] systemd[1]: Set hostname to <actia-global-display>.
    [    3.600678] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 13 bits of entr)
    [    3.606335] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 13 bits of entr)
    [    3.606468] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 13 bits of entr)
    [    3.620979] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 14 bits of entr)
    [    3.631210] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 15 bits of entr)
    [    3.664941] random: systemd: uninitialized urandom read (16 bytes read, 17 bits of entropy avai)
    [    3.665128] random: systemd: uninitialized urandom read (16 bytes read, 17 bits of entropy avai)
    [    3.665740] random: systemd: uninitialized urandom read (16 bytes read, 17 bits of entropy avai)
    [    3.767447] systemd[1]: sysinit.target: Found ordering cycle on sysinit.target/start
    [    3.767467] systemd[1]: sysinit.target: Found dependency on alignment.service/start
    [    3.767482] systemd[1]: sysinit.target: Found dependency on basic.target/start
    [    3.767495] systemd[1]: sysinit.target: Found dependency on sockets.target/start
    [    3.767507] systemd[1]: sysinit.target: Found dependency on sshd.socket/stop
    [    3.767519] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
    [    3.767532] systemd[1]: sysinit.target: Breaking ordering cycle by deleting job alignment.servit
    [    3.767545] systemd[1]: alignment.service: Job alignment.service/start deleted to break orderint
    [    3.796374] systemd[1]: Created slice User and Session Slice.
    [    3.813129] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [    3.833142] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    3.853654] systemd[1]: Created slice System Slice.
    [    3.873007] systemd[1]: Reached target Slices.
    [    3.892968] systemd[1]: Reached target Swap.
    [    3.912959] systemd[1]: Reached target Remote File Systems.
    [    3.933122] systemd[1]: Listening on Journal Socket.
    [    3.953079] systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway.
    [    3.955017] systemd[1]: Mounting Temporary Directory...
    [    3.975268] systemd[1]: Starting Synchronize System and HW clocks...
    [    3.995400] systemd[1]: Mounting Debug File System...
    [    4.003169] systemd[1]: Starting Create list of required static device nodes for the current ke.
    [    4.035320] systemd[1]: Starting Remount Root and Kernel File Systems...
    [    4.043625] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    4.060324] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    4.073748] systemd[1]: Listening on Syslog Socket.
    [    4.093774] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [    4.116541] systemd[1]: Starting Load Kernel Modules...
    [    4.126699] systemd[1]: Starting Starts Psplash Boot screen...
    [    4.153231] systemd[1]: Listening on udev Kernel Socket.
    [    4.185285] systemd[1]: Starting Setup Virtual Console...
    [    4.210047] systemd[1]: Mounting POSIX Message Queue File System...
    [    4.243218] systemd[1]: Listening on Journal Socket (/dev/log).
    [    4.265238] systemd[1]: Starting Journal Service...
    [    4.283861] systemd[1]: Created slice system-getty.slice.
    [    4.303323] systemd[1]: Listening on udev Control Socket.
    [    4.333139] systemd[1]: Reached target Paths.
    [    4.359572] systemd[1]: Mounted POSIX Message Queue File System.
    [    4.383234] systemd[1]: Mounted Debug File System.
    [    4.403067] systemd[1]: Mounted Temporary Directory.
    [    4.423248] systemd[1]: Started Journal Service.
    [    5.049463] omap_hwmod: i2c1: _wait_target_disable failed
    [    5.271195] systemd-journald[147]: Received request to flush runtime journal from PID 1
    [    6.160543] omap_hwmod: i2c1: _wait_target_disable failed
    [    6.185038] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
    [    6.208010] alg: skcipher: setkey failed on test 5 for ecb-des-omap: flags=100
    [    6.208139] alg: skcipher-ddst: setkey failed on test 5 for ecb-des-omap: flags=100
    [    6.208268] alg: skcipher-ddst: setkey failed on test 5 for ecb-des-omap: flags=100
    [    6.258477] [egalax_i2c]:  Driver init done!
    [    6.258614] [egalax_i2c]:  Start probe
    [    6.258635] [egalax_i2c]:  IRQ = 139
    [    6.258807] input: eGalax_Touch_Screen as /devices/virtual/input/input0
    [    6.259019] [egalax_i2c]:  Register input device done
    [    6.282893] [egalax_i2c]:  Request irq(139) gpio(113) with result:0
    [    6.282902] [egalax_i2c]:  I2C probe done
    [    6.284277] omap_rng 48090000.rng: OMAP Random Number Generator ver. 20
    [    6.596663] random: nonblocking pool is initialized
    [    6.868643] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    6.873581] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
    [    7.446606] omap-aes 4b500000.aes: OMAP AES hw accel rev: 3.3
    [    7.489901] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Pl.
    [    7.624901] omap-aes 4b700000.aes: OMAP AES hw accel rev: 3.3
    [    7.625730] omap-rproc 58820000.ipu: assigned reserved memory node ipu1_cma@9d000000
    [    7.625772]  remoteproc0: 58820000.ipu is available
    [    7.625778]  remoteproc0: Note: remoteproc is still under development and considered experiment.
    [    7.625783]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility is.
    [    7.625907] omap-rproc 55020000.ipu: assigned reserved memory node ipu2_cma@95800000
    [    7.625940]  remoteproc1: 55020000.ipu is available
    [    7.625946]  remoteproc1: Note: remoteproc is still under development and considered experiment.
    [    7.625951]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility is.
    [    7.647710] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [    7.824822]  remoteproc1: registered virtio0 (type 7)
    [    7.867506]  remoteproc0: registered virtio1 (type 7)
    [    7.930264] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    [    9.451321]  remoteproc1: powering up 55020000.ipu
    [    9.477590]  remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3739032
    [    9.477670] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [    9.710465]  remoteproc1: remote processor 55020000.ipu is now up
    [    9.711415] virtio_rpmsg_bus virtio0: rpmsg host is online
    [    9.718950] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x65
    [    9.719865] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x66
    [    9.725475]  remoteproc0: powering up 58820000.ipu
    [    9.731125]  remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 5033360
    [    9.731239] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [    9.784168]  remoteproc0: remote processor 58820000.ipu is now up
    [    9.785414] virtio_rpmsg_bus virtio1: rpmsg host is online
    [    9.794843] virtio_rpmsg_bus virtio1: creating channel rpmsg-proto addr 0x3d
    [    9.819793] rpmsg_rpc rpmsg0: probing service dce-callback with src 1024 dst 101
    [    9.820240] rpmsg_rpc rpmsg1: probing service rpmsg-dce with src 1025 dst 102
    [    9.820637] rpmsg_rpc rpmsg0: published functions = 4
    [    9.821320] rpmsg_rpc rpmsg1: published functions = 9
    [    9.831916] NET: Registered protocol family 41
    [   10.981109] usbcore: registered new interface driver usbfs
    [   10.984181] usbcore: registered new interface driver hub
    [   10.987043] usbcore: registered new device driver usb
    [   10.996759] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    [   10.996793] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
    [   10.997341] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00210010
    [   10.997392] xhci-hcd xhci-hcd.0.auto: irq 417, io mem 0x48890000
    [   10.998887] hub 1-0:1.0: USB hub found
    [   10.998998] hub 1-0:1.0: 1 port detected
    [   11.000200] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    [   11.000218] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
    [   11.000592] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [   11.013211] hub 2-0:1.0: USB hub found
    [   11.013249] hub 2-0:1.0: 1 port detected
    [   11.013656] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   11.013679] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
    [   11.022279] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00210010
    [   11.022330] xhci-hcd xhci-hcd.1.auto: irq 418, io mem 0x488d0000
    [   11.031424] hub 3-0:1.0: USB hub found
    [   11.031544] hub 3-0:1.0: 1 port detected
    [   11.032140] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   11.032157] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
    [   11.033027] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
    [   11.039924] hub 4-0:1.0: USB hub found
    [   11.040040] hub 4-0:1.0: 1 port detected
    [   11.312882] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [   12.364791] asix 1-1:1.0 eth0: register 'asix' at usb-xhci-hcd.0.auto-1, ASIX AX88772B USB 2.0 9
    [   12.364888] usbcore: registered new interface driver asix
    [   13.183986] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   16.248722] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   16.252498] asix 1-1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
    [   16.295532] 8021q: 802.1Q VLAN Support v1.8
    Michel
  • Michel Catudal said:

    It looks to me like very early in the process it cannot access the micro SD, perhaps it is not turning the voltage on correctly. Our hardware doesn't work if the voltage for the micro SD is less than 3.3V. I set the device tree to not support 1.8V for the mmc

    What would force the voltage below 3.3V? We use a similar PMIC as the one on the automotive evm but do not have something to switch the power off outside of the PMIC.

    It might be HW problem of your custom board. So I have the below question. I assume you connect your SD card to DRA72x MMC1 interface. MMC1 IO buffers are powered by DRA72x VDDSHV8 power domain.

    What is the power source of your VDDSHV8 (MMC1 power domain)?

    Regards,
    Pavel

  • Pavel Botev said:

    It might be HW problem of your custom board. So I have the below question. I assume you connect your SD card to DRA72x MMC1 interface. MMC1 IO buffers are powered by DRA72x VDDSHV8 power domain.

    What is the power source of your VDDSHV8 (MMC1 power domain)?

    It is connected to LDO1_OUT, pin 23 on TPS65917-Q1

    The micro SD is powered directly with 3.3V, LDO1 is connected to the pullups and QSPI flash.

    What are the correct entries for the PMIC in u-boot configuration for this device? There is no switch for the SD card as on the automotive EVM.

    For a test I hacked the mmc source to keep from ever trying to switch voltage to 3.0V or 1.8V and the SD is now always recognized in the early stage, it was never recognized at that point before.

    It still is not listed as a dev in Linux, the problem may be in Linux or is it just not enable for some reason in u-boot when I boot off QSPI?

    If I delete the kernel from QSPI it has no problem booting from the eMMC as long as I have the device tree and kernel available in the eMMC.

    I can provide you with the schematic and devicetree if you would send me an Email. We have an NDA with Texas Instruments.

    Michel Catudal

    ACTIA Corp

  • Michel Catudal said:
    LDO1 is connected to the pullups and QSPI flash.

    LDO1 is connected to QSPI flash? Can you provide more info on that point? Do you mean that LDO1 is connected to QSPI flash power supply?

    Regards,
    Pavel

  • Pavel Botev said:
    LDO1 is connected to QSPI flash? Can you provide more info on that point? Do you mean that LDO1 is connected to QSPI flash power supply?

    That is correct. The device is a S25FL512S, VCC and VIO/RFU are connected to MMC1_3V3 which is also connected to misc pull ups (QSPI, micro SD,  eMMC and sysboot pins).

    This is connected to VDDSHV8.1 and VDDSHV8.2 (Y8 and W8).

    Both micro SD and eMMC VCC are connected to a fixed 3.3V supply which is connected to the SMPS inputs on the PMIC

    The supply that provides the 3.3V supply is controlled by an STM32 processor

    Michel Catudal

    ACTIA Corp

  • Pavel,

    I forgot to mention, both STM32 and DRA726 are power up on cold boot. The STM32 can then turn the supply of the DRA726 but only does it on request from the DRA726.

    The reasoning from our hardware designer for using this is that the DRA726 takes too much current in sleep mode so the STM32 is used for the wakeups.

    The STM32 is also used for analog and binary inputs which do not exist on the DRA726.

    Michel

  • Michel,

    I sent you a private message.

    Regards,
    Pavel
  • Pavel,

    I hacked the mmc drivers in u-boot and linux and the problem is gone. I had to add a patch after the micro SD was always recognized correctly but if I had the micro SD card inserted it could not boot.

    Now the mmc is labeled according to the order of the mmc and not which one is recognized first. That way the eMMC is always recognized as mmcblk1

    Next for me is Early boot, late attach. I have some issues with the documentation for the Linux kernel, could you help on that ? I will post in a different message

    Michel Catudal

    ACTIA Corp

  • Hi Michel,

    Glad to see you have fixed your issue. Could you mark this thread as resolved.

    I will have a look in your another e2e thread and provide hints if I have something there.

    Regards,
    Pavel
  • Michel Catudal2 said:
    I hacked the mmc drivers in u-boot and linux and the problem is gone. I had to add a patch after the micro SD was always recognized correctly but if I had the micro SD card inserted it could not boot.

    We solved this issue by using part uuid as the method of defining the boot devices.  See this u-boot patch:

    https://lists.denx.de/pipermail/u-boot/2015-August/225415.html

  • Brad,

    It worked for me with the eMMC boot but not for the QSPI falcon mode boot. Also the changing of device identification could be a problem for our software updates.

    The way I fixed it is this way which for our board is cleaner since it doesn't allow the device name to change whether or not the micro SD is in the slot. It would be nice though if we could get it to automount like the USB devices.

    in drivers/mmc/card/Kconfig

    config MMC_SLOTINDEX
            bool "Use host index for enumerating mmxblkN"
            depends on MMC_BLOCK
            default n
            help
              On embedded devices, often there is a combination of
              removable mmc devices (e.g. MMC/SD cards) and hard
              wired ones (e.g. eMMC). Depending on the hardware
              configuration, the 'mmcblkN' node might change if
              the removable device is available or not at boot time.
     
              E.g. if the removable device is attached at boot time,
              it might become mmxblk0. And the hard wired one mmcblk1.
              But if the removable device isn't there at boot time,
              the hard wired one will become mmcblk0. This makes it
              somehow difficult to hard code the root device to the
              non-removable device and boot fast.
     
              Enabling this option will simply associating 'N' of
              'mmcblkN' with the slot index instead of the dynamic
              name index. The slot index is always the same, ensuring
              that the non-removable mmc device is associated always
              with the same mmcblkN. Independent of the availability of
              the removable one.
     
              If unsure, say N here.
     


    in  include/linux/mmc/host.h

    #ifdef CONFIG_MMC_SLOTINDEX
    #define NAMEIDX (card->host->index)
    #else
    #define NAMEIDX (md->name_idx)   
    #endif

    in drivers/mmc/card/block.c change the snprintf command to use NAMEIDX

            snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
                                                                     "mmcblk%u%s", NAMEIDX, subname ? subname : "");

    Michel

  • Hi, I'm encountered same problem ,but I want boot kernel in single stage mode. Could you send your changes in dra7xx_evm.h or others to me? please,thank you very much!!!

  • I do boot in falcon mode. Do you use micro SD, QSPI or eMMC boot?
    In falcon mode you need to pass the argument with the kernel.

    The changes I have for the boot are the ones described but I did find other issues. In falcon mode the micro SD was never recognized. I had to hack the mmc driver in both u-boot and Linux kernel to never allow it to switch to 3V. Most of our boards would crash on boot if I allowed the voltage on the micro SD to switch to 3V which is hardcoded for the DRA7xx. Our hardware cannot handle this as the same supply is used on other devices that cannot run at that voltage.

    I could provide you some patches on my website if you have a similar problem. That would be on the weekend.

    They would be on : http://suzielinux.com/

    I have not implemented the patches yet for my beagleboard X15 as I I have not experimented with falcon mode on that one yet, just for the ACTIA boards where boot time was an issue.

    If you do not boot on qspi you could have some changes to the kernel default arguments in the uEnv.txt file.
    In our ACTIA board I boot of QSPI and the rootfs resides on the eMMC. I use the micro SD for some maps from Navionics.

    The argument I have in mine is :

    CONFIG_CMDLINE="elevator=noop console=ttyO2,115200n8 root=/dev/mmcblk1p2 rw rootwait earlyprintk loglevel=15 fixrtc omapdrm.num_crtc=2 consoleblank=0 cma=64M rootfstype=ext4"

    You can reduce the loglevel to limit messages and remove the earlyprintk

    Michel