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.

sdk-06.00.00.00 uboot nand问题

Other Parts Discussed in Thread: AM3352

最近在做am3352的uboot调试,试了很多的uboot,在调试sdk-06.00.00.00  ti-u-boot-2013.01.01版本的uboot的时候

修改eeprom  等的检测,修改ddr配置之后,mlo成功引导uboot启动,进入uboot命令行。

发现nand未能识别,这个版本的如何修改呢?

我用u-boot-2011.09  (sdk-04.06.00.03) mlo不能引导uboot,但是用这个版本编出来的uboot.img结合sdk-06.00.00.00  ti-u-boot-2013.01.01版本的mlo可以启动uboot.img并且能识别到nand,但是烧写ubi的时候会出现重启的情况,导致ubi文件系统不能烧写成功。这个是何原因呢?

qq1833630366

  • sdk-06.00.00.00  ti-u-boot-2013.01.01版本

    启动信息如下

    U-Boot# CCCCCCCCCCCCCCCCCCCCCCCCCCCC
    Starting xmodem transfer. Press Ctrl+C to cancel.
    Transferring u-boot-spl.bin...
    100% 95 KB 6 KB/sec 00:00:14 3 Errors

    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    CCCCCCCCCC
    Starting ymodem transfer. Press Ctrl+C to cancel.
    Transferring u-boot.img...
    100% 356 KB 6 KB/sec 00:00:53 0 Errors

    Loaded 364616 bytes


    U-Boot 2013.01.01-00094-g7552b4c-dirty (Apr 15 2017 - 22:41:32)

    I2C: ready
    DRAM: 512 MiB
    WARNING: Caches not enabled
    NAND: No NAND device found!!!
    0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - readenv() failed, using default environment

    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Net: <ethaddr> not set. Validating first E-fuse MAC
    PHY reset timed out
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    mmc_send_cmd : timeout: No status update
    Card did not respond to voltage select!
    mmc0(part 0) is current device
    mmc_send_cmd : timeout: No status update
    Card did not respond to voltage select!
    Booting from nand ...

    no devices available
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    uboot命令中mmc指令  nand指令

    U-Boot# mmc
    mmc - MMC sub system

    Usage:
    mmc read addr blk# cnt
    mmc write addr blk# cnt
    mmc erase blk# cnt
    mmc rescan
    mmc part - lists available partition on current mmc device
    mmc dev [dev] [part] - show or set current mmc device [partition]
    mmc list - lists available devices
    U-Boot# mmc list
    OMAP SD/MMC: 0
    OMAP SD/MMC: 1
    U-Boot# mmc part
    mmc_send_cmd : timeout: No status update
    Card did not respond to voltage select!
    mmc_send_cmd : timeout: No status update
    Card did not respond to voltage select!
    get mmc type error!
    U-Boot# mmc dev
    mmc_send_cmd : timeout: No status update
    Card did not respond to voltage select!
    mmc0(part 0) is current device
    U-Boot# nand info

    U-Boot#

  • 看看nand PINMUX有没有配置

  • 嗯,这个问题通过用英贝特给的uboot开发包已解决,是这个pinmux的配置问题;

    现在有个新问题就是,spi总线自测没有通过,都是FFFFF,不知道要在哪里做配置呢

  • spi总线自测没有通过声明意思?

    是spi功能不正常?pinmux和初始化spi了吗

  • 就是我做出/dev/spi1.0的设备,然后用linux自带的spi测试程序,收发短接,看收发的数据正不正确。这个收的数据全是FF,不正确。

    另外pinmux是不是在board-am335xevm.c配置的?初始化是在哪里初始化呢?

    我用make sbc8600_defconfig可以从tf启动,用am335x_evm_defconfig就不行,不知道什么情况,对比两个配置,没看到tf卡相关的配置不一样。

  • 是在board-am335xevm.c里初始化,

    /* setup spi0 */
    static void spi0_init(int evm_id, int profile)
    {
    setup_pin_mux(spi0_pin_mux);
    spi_register_board_info(am335x_spi0_slave_info,
    ARRAY_SIZE(am335x_spi0_slave_info));
    return;
    }

    /* setup spi1 */
    static void spi1_init(int evm_id, int profile)
    {
    setup_pin_mux(spi1_pin_mux);
    spi_register_board_info(am335x_spi1_slave_info,
    ARRAY_SIZE(am335x_spi1_slave_info));
    return;
    }

    要调用spi_init这个函数.

    sdk6.0你还修改什么地方吗?


  • 找到原因了,配置spi设备驱动的时候配置错了,

    static struct spi_board_info am335x_spi0_slave_info[] = {
    {
    .modalias = "spidev",
    .max_speed_hz = 1000000,
    .bus_num =1,
    .chip_select = 0,

    中.bus_num 对应的是1就是spi0,2就是spi1

  • 但是觉得好奇怪

    我的spi1的引脚配置,用下面这两种好像都可以量到spi时钟信号,这两种有什么差别么?如果我想用spi1去控制一个交换芯片的话,需要哪种配置呢?

    #if 1
    /* Module pin mux for SPI flash */
    static struct pinmux_config spi1_pin_mux[] = {
    {"mcasp0_aclkx.spi1_sclk", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_INPUT_EN},
    {"mcasp0_fsx.spi1_d0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_PULL_UP | AM33XX_INPUT_EN},
    {"mcasp0_axr0.spi1_d1", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_INPUT_EN},
    {"mcasp0_ahclkr.spi1_cs0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_PULL_UP | AM33XX_INPUT_EN},
    {NULL, 0},
    };
    #else
    /* Module pin mux for SPI flash */
    static struct pinmux_config spi1_pin_mux[] = {
    {"spi1_sclk.spi1_sclk", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_INPUT_EN},
    {"spi1_d0.spi1_d0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_PULL_UP | AM33XX_INPUT_EN},
    {"spi1_d1.spi1_d1", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_INPUT_EN},
    {"spi1_cs0.spi1_cs0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_PULL_UP | AM33XX_INPUT_EN},
    {NULL, 0},
    };
    #endif

  • static struct pinmux_config spi1_pin_mux[] = {
    {"mcasp0_aclkx.spi1_sclk", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_INPUT_EN},
    {"mcasp0_fsx.spi1_d0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_PULL_UP | AM33XX_INPUT_EN},
    {"mcasp0_axr0.spi1_d1", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_INPUT_EN},
    {"mcasp0_ahclkr.spi1_cs0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL
    | AM33XX_PULL_UP | AM33XX_INPUT_EN},
    {NULL, 0},
    };这个配置才是对的,

    下面那个是不正常