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.

PROCESSOR-SDK-AM335X: Custom board doesn't boot with latest SDK

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: TPS65217, TPS65910

Hi,

I am working on a TI's customized board and using SDCard for booting.

1.) This board is working with  ti-sdk-am335x-evm-07.00.00.00-Linux-x86-Install SDK and I have to make it work for latest SDK ie.,  ti-processor-sdk-linux-am335x-evm-03.02.00.05-Linux-x86-Install.

2.) I tried by compiling the bootloader of latest BSP but my nor MLO and U-Boot are not working and neither I'm getting any print on console. 

Can anyone please help me about what changes am I suppose to do so that MLO and U-Boot start working and I'll also get prints on console?

Thanks and Regards

Deshvir Malik 

  • Hi,

    Most probably you need to bypass the EEPROM check in U-boot. See: e2e.ti.com/.../550719
  • Hi Biser,


    As per your suggestion, I have bypassed the EEPROM check and also did modification for console as my customized board uses uart3 for console but still my board is not booting up.

    Below are all the changes done by me and traced using git. Could you please review the changes and let me know the problem.

    Colors used for indication:

    Blue - File which is modified

    Red - Code commented by me

    Green - Code added by me

    diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c
    index 4618470..78f3dda 100644
    --- a/arch/arm/cpu/armv7/am33xx/board.c
    +++ b/arch/arm/cpu/armv7/am33xx/board.c
    @@ -36,6 +36,9 @@
     #include <asm/omap_musb.h>
     #include <asm/davinci_rtc.h>
     
    +// [16012017] Added by Deshvir
    +//#define GPIO_WD_DISABLE 76
    +
     DECLARE_GLOBAL_DATA_PTR;
     
     #if !CONFIG_IS_ENABLED(OF_CONTROL)
    @@ -108,13 +111,20 @@ const struct gpio_bank *const omap_gpio_bank = gpio_bank_am33xx;
     #if defined(CONFIG_OMAP_HSMMC) && !defined(CONFIG_SPL_BUILD)
     int cpu_mmc_init(bd_t *bis)
     {
    +/*[19012017] - Deshvir*/
    +#if MMC_BOOT    
         int ret;
     
         ret = omap_mmc_init(0, 0, 0, -1, -1);
         if (ret)
             return ret;
    -
         return omap_mmc_init(1, 0, 0, -1, -1);
    +#endif
    +
    +#if NAND_BOOT
    +    return 0;
    +#endif    
    +    
     }
     #endif
     
    @@ -394,6 +404,7 @@ static void rtc_only(void)
     
     void s_init(void)
     {
    +    puts("inside s_init");
     #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_ONLY_SUPPORT)
         rtc_only();
     #endif
    @@ -401,6 +412,7 @@ void s_init(void)
     
     void early_system_init(void)
     {
    +     puts("Inside early_system_init \n");
         /*
          * The ROM will only have set up sufficient pinmux to allow for the
          * first 4KiB NOR to be read, we must finish doing what we know of
    @@ -414,7 +426,7 @@ void early_system_init(void)
         setup_early_clocks();
         uart_soft_reset();
     #ifdef CONFIG_TI_I2C_BOARD_DETECT
    -    do_board_detect();
    +//    do_board_detect();
     #endif
     #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
         /* Enable RTC32K clock */
    @@ -425,9 +437,11 @@ void early_system_init(void)
     #ifdef CONFIG_SPL_BUILD
     void board_init_f(ulong dummy)
     {
    +        puts("board_init \n");
         early_system_init();
         board_early_init_f();
         sdram_init();
    +        puts("Before sdram_init arch/arm/cpu/armv7/am335x/board.c \n");
         /* dram_init must store complete ramsize in gd->ram_size */
         gd->ram_size = get_ram_size(
                 (void *)CONFIG_SYS_SDRAM_BASE,
    diff --git a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
    index 92142c8..ddc4f23 100644
    --- a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
    +++ b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
    @@ -53,8 +53,12 @@ const struct dpll_regs dpll_ddr_regs = {
     
     struct dpll_params dpll_mpu_opp100 = {
             CONFIG_SYS_MPUCLK, OSC-1, 1, -1, -1, -1, -1};
    +#if 0
     const struct dpll_params dpll_core_opp100 = {
             1000, OSC-1, -1, -1, 10, 8, 4};
    +#endif
    +const struct dpll_params dpll_core_opp100 = {
    +        720, OSC-1, -1, -1, 10, 8, 4};
     const struct dpll_params dpll_mpu = {
             MPUPLL_M_300, OSC-1, 1, -1, -1, -1, -1};
     const struct dpll_params dpll_core = {
    diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
    index be08e1d..a91a8b8 100644
    --- a/arch/arm/cpu/armv7/omap-common/boot-common.c
    +++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
    @@ -207,6 +207,7 @@ void spl_board_init(void)
     
     int board_mmc_init(bd_t *bis)
     {
    +#if MMC_BOOT    
         switch (spl_boot_device()) {
         case BOOT_DEVICE_MMC1:
             omap_mmc_init(0, 0, 0, -1, -1);
    @@ -217,6 +218,7 @@ int board_mmc_init(bd_t *bis)
             omap_mmc_init(1, 0, 0, -1, -1);
             break;
         }
    +#endif
         return 0;
     }
     
    diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
    index 11ef3ca..d56a081 100644
    --- a/board/ti/am335x/Kconfig
    +++ b/board/ti/am335x/Kconfig
    @@ -15,7 +15,7 @@ config SYS_CONFIG_NAME
     config CONS_INDEX
         int "UART used for console"
         range 1 6
    -    default 1
    +    default 4
         help
           The AM335x SoC has a total of 6 UARTs (UART0 to UART5 as referenced
           in documentation, etc) available to it.  Depending on your specific
    diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
    index 02e68a6..52e99e9 100644
    --- a/board/ti/am335x/board.c
    +++ b/board/ti/am335x/board.c
    @@ -258,7 +258,7 @@ const struct dpll_params dpll_ddr_bone_black = {
     void am33xx_spl_board_init(void)
     {
         int mpu_vdd;
    -
    +        puts("Inside spl_board_init\n");
         /* Get the frequency */
         dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);
     
    @@ -273,6 +273,8 @@ void am33xx_spl_board_init(void)
             if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
                 return;
     
    +//[18012017] Deshvir
    +#if 0
             if (i2c_probe(TPS65217_CHIP_PM))
                 return;
     
    @@ -297,7 +299,7 @@ void am33xx_spl_board_init(void)
              */
             if (board_is_bone_lt())
                 dpll_mpu_opp100.m = MPUPLL_M_1000;
    -
    +#endif
             /*
              * Increase USB current limit to 1300mA or 1800mA and set
              * the MPU voltage controller as needed.
    @@ -306,10 +308,11 @@ void am33xx_spl_board_init(void)
                 usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
                 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
             } else {
    -            usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    +        //    usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
                 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
             }
    -
    +//[18012017] Deshvir
    +#if 0
             if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
                            TPS65217_POWER_PATH,
                            usb_cur_lim,
    @@ -322,10 +325,13 @@ void am33xx_spl_board_init(void)
                 puts("tps65217_voltage_update failure\n");
                 return;
             }
    -
    +#endif
             /* Set CORE Frequencies to OPP100 */
    -        do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
    +    //    do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
     
    +//[18012017] Deshvir
    +#if 0
    +    
             /* Set DCDC2 (MPU) voltage */
             if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
                 puts("tps65217_voltage_update failure\n");
    @@ -355,7 +361,10 @@ void am33xx_spl_board_init(void)
                            TPS65217_LDO_VOLTAGE_OUT_3_3,
                            TPS65217_LDO_MASK))
                 puts("tps65217_reg_write failure\n");
    -    } else {
    +#endif    
    +    }
    +#if 0
    +    else {
             int sil_rev;
     
             /*
    @@ -389,9 +398,11 @@ void am33xx_spl_board_init(void)
             /* Set CORE Frequencies to OPP100 */
             do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
         }
    -
    +#endif
         /* Set MPU Frequency to what we detected now that voltages are set */
         do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
    +    printf("DRA 618 MPU freq set to %dMhz\n",dpll_mpu_opp100.m);
    +    printf("DRA 618 Core freq set to %dMhz\n",dpll_core_opp100.m);
     }
     
     const struct dpll_params *get_dpll_ddr_params(void)
    @@ -408,6 +419,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
     
     void set_uart_mux_conf(void)
     {
    +         
     #if CONFIG_CONS_INDEX == 1
         enable_uart0_pin_mux();
     #elif CONFIG_CONS_INDEX == 2
    @@ -491,6 +503,11 @@ void sdram_init(void)
             config_ddr(400, &ioregs_evmsk, &ddr3_icev2_data,
                    &ddr3_icev2_cmd_ctrl_data, &ddr3_icev2_emif_reg_data,
                    0);
    +     else if (board_is_gp_evm()) /* [18012017] - deshvir */
    +        config_ddr(400, &ioregs_bonelt,
    +               &ddr3_beagleblack_data,
    +               &ddr3_beagleblack_cmd_ctrl_data,
    +               &ddr3_beagleblack_emif_reg_data, 0);
         else
             config_ddr(266, &ioregs, &ddr2_data,
                    &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data, 0);
    diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
    index 8afa5f9..9cbad02 100644
    --- a/board/ti/am335x/mux.c
    +++ b/board/ti/am335x/mux.c
    @@ -40,11 +40,21 @@ static struct module_pin_mux uart2_pin_mux[] = {
         {-1},
     };
     
    +/*For  ngt [16012017] Deshvir */
    +static struct module_pin_mux uart3_pin_mux[] = {
    +        {OFFSET(mii1_rxd3), (MODE(1) | PULLUP_EN | RXACTIVE)},  /* UART3_RXD */
    +        {OFFSET(mii1_rxd2), (MODE(1) | PULLUDEN)},      /* UART3_TXD */
    +        {-1},
    +};
    +
    +
    +#if 0
     static struct module_pin_mux uart3_pin_mux[] = {
         {OFFSET(spi0_cs1), (MODE(1) | PULLUP_EN | RXACTIVE)},    /* UART3_RXD */
         {OFFSET(ecap0_in_pwm0_out), (MODE(1) | PULLUDEN)},    /* UART3_TXD */
         {-1},
     };
    +#endif
     
     static struct module_pin_mux uart4_pin_mux[] = {
         {OFFSET(gpmc_wait0), (MODE(6) | PULLUP_EN | RXACTIVE)},    /* UART4_RXD */
    @@ -66,7 +76,8 @@ static struct module_pin_mux mmc0_pin_mux[] = {
         {OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},    /* MMC0_CLK */
         {OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},    /* MMC0_CMD */
         {OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)},        /* MMC0_WP */
    -    {OFFSET(spi0_cs1), (MODE(7) | RXACTIVE | PULLUP_EN)},    /* GPIO0_6 */
    +//    {OFFSET(spi0_cs1), (MODE(7) | RXACTIVE | PULLUP_EN)},    /* GPIO0_6 */
    +    {OFFSET(spi0_cs1), (MODE(5) | RXACTIVE | PULLUP_EN)},   /* MMC0_CD */ // [16012017] Deshvir - for mmc0
         {-1},
     };
     
    @@ -353,7 +364,10 @@ void enable_board_pin_mux(void)
             configure_module_pin_mux(mmc1_pin_mux);
     #endif
         } else if (board_is_gp_evm()) {
    +        puts("Inside mux.c - enable_board_pin_mux()");
             /* General Purpose EVM */
    +        #if 0   //[16012017] Deshvir
    +
             unsigned short profile = detect_daughter_board_profile();
             configure_module_pin_mux(rgmii1_pin_mux);
             configure_module_pin_mux(mmc0_pin_mux);
    @@ -369,6 +383,7 @@ void enable_board_pin_mux(void)
                 configure_module_pin_mux(mmc1_pin_mux);
                 configure_module_pin_mux(spi0_pin_mux);
             }
    +        #endif
         } else if (board_is_idk()) {
             /* Industrial Motor Control (IDK) */
             configure_module_pin_mux(mii1_pin_mux);
    @@ -381,8 +396,10 @@ void enable_board_pin_mux(void)
             configure_module_pin_mux(mmc0_pin_mux_sk_evm);
         } else if (board_is_bone_lt()) {
             /* Beaglebone LT pinmux */
    -        configure_module_pin_mux(mii1_pin_mux);
    -        configure_module_pin_mux(mmc0_pin_mux);
    +        //[16012017] Deshvir
    +        puts("Inside mux.c - else if of board_is_bone_lt()");
    +    //    configure_module_pin_mux(mii1_pin_mux);
    +    //    configure_module_pin_mux(mmc0_pin_mux);
     #if defined(CONFIG_NAND) && defined(CONFIG_EMMC_BOOT)
             configure_module_pin_mux(nand_pin_mux);
     #elif defined(CONFIG_NOR) && defined(CONFIG_EMMC_BOOT)
    @@ -393,9 +410,9 @@ void enable_board_pin_mux(void)
         } else if (board_is_icev2()) {
             configure_module_pin_mux(mmc0_pin_mux);
             configure_module_pin_mux(gpio0_18_pin_mux);
    -        configure_module_pin_mux(uart3_icev2_pin_mux);
    -        configure_module_pin_mux(rmii1_pin_mux);
    -        configure_module_pin_mux(spi0_pin_mux);
    +    //    configure_module_pin_mux(uart3_icev2_pin_mux);
    +    //    configure_module_pin_mux(rmii1_pin_mux);
    +    //    configure_module_pin_mux(spi0_pin_mux);
         } else {
             puts("Unknown board, cannot configure pinmux.");
             hang();
    diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
    index 0ddf16a..3e9f3a1 100644
    --- a/configs/am335x_evm_defconfig
    +++ b/configs/am335x_evm_defconfig
    @@ -5,7 +5,7 @@ CONFIG_SPL_STACK_R_ADDR=0x82000000
     CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
     CONFIG_SPL=y
     CONFIG_SPL_STACK_R=y
    -CONFIG_SYS_EXTRA_OPTIONS="NAND"
    +CONFIG_SYS_EXTRA_OPTIONS="SERIAL4,CONS_INDEX=4"
     CONFIG_HUSH_PARSER=y
     CONFIG_AUTOBOOT_KEYED=y
     CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
    @@ -59,4 +59,5 @@ CONFIG_USB_MUSB_TI=y
     CONFIG_OF_BOARD_SETUP=y
     CONFIG_CMD_TIME=y
     CONFIG_DM_I2C=y
    -CONFIG_SPL_YMODEM_SUPPORT=y
    +CONFIG_CONS_INDEX=4
    +CONFIG_MMC_BOOT=1
    diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
    index e3c64bb..0cd65ec 100644
    --- a/drivers/mmc/omap_hsmmc.c
    +++ b/drivers/mmc/omap_hsmmc.c
    @@ -1408,6 +1408,15 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
     #ifdef OMAP_HSMMC3_BASE
         case 2:
             priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC3_BASE;
    +
    +/* [18012017] - Deshvir */        
    +#define eMMC2_ENABLE
    +#ifdef eMMC2_ENABLE
    +               host_caps_val |= MMC_MODE_8BIT;
    +               printf("\nOMAP_HSMMC3_BASE case\n");
    +#endif
    +
    +
     #if defined(CONFIG_DRA7XX) && defined(CONFIG_HSMMC3_8BIT)
             /* Enable 8-bit interface for eMMC on DRA7XX */
             host_caps_val |= MMC_MODE_8BIT;
    diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
    index 02d3bcc..9cac60a 100644
    --- a/include/configs/am335x_evm.h
    +++ b/include/configs/am335x_evm.h
    @@ -18,10 +18,9 @@
     
     #include <configs/ti_am335x_common.h>
     
    -#ifndef CONFIG_SPL_BUILD
    -# define CONFIG_TIMESTAMP
    -# define CONFIG_LZO
    -#endif
    +/*[19012017] - Deshvir*/
    +#define MMC_BOOT    1
    +#define NAND_BOOT   0
     
     #define CONFIG_SYS_BOOTM_LEN        (16 << 20)
     
    @@ -29,6 +28,10 @@
     #define CONFIG_MACH_TYPE        MACH_TYPE_TIAM335EVM
     #define CONFIG_BOARD_LATE_INIT
     
    +/* [18012017] - Deshvir
    +dcache - enabled*/
    +#define CONFIG_CMD_CACHE
    +
     /* Clock Defines */
     #define V_OSCK                24000000  /* Clock output from T2 */
     #define V_SCLK                (V_OSCK)
    @@ -112,13 +115,22 @@
         "bootdir=/boot\0" \
         "bootfile=zImage\0" \
         "fdtfile=undefined\0" \
    -    "console=ttyO0,115200n8\0" \
    +    "console=ttyO3,115200n8\0" \
         "partitions=" \
             "uuid_disk=${uuid_gpt_disk};" \
             "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
         "optargs=\0" \
         "ramroot=/dev/ram0 rw\0" \
         "ramrootfstype=ext2\0" \
    +    "mmcargs=setenv bootargs console=${console} " \
    +        "${optargs} " \
    +        "root=${mmcroot} " \
    +        "rootfstype=${mmcrootfstype} " \
    +        "quiet lpj=2396160\0" \
    +    "usbargs=setenv bootargs console=${console} " \
    +        "${optargs} " \
    +        "root=${usbroot} " \
    +        "rootfstype=${usbrootfstype}\0" \
         "spiroot=/dev/mtdblock4 rw\0" \
         "spirootfstype=jffs2\0" \
         "spisrcaddr=0xe0000\0" \
    @@ -160,7 +172,7 @@
             "if test $board_name = A335_ICE; then "\
                 "setenv console ttyO3,115200n8;" \
             "else " \
    -            "setenv console ttyO0,115200n8;" \
    +            "setenv console ttyO3,115200n8;" \
             "fi;\0" \
         NANDARGS \
         NETARGS \
    @@ -186,10 +198,19 @@
     #define CONFIG_POWER_TPS65217
     #define CONFIG_POWER_TPS65910
     
    +/*[18012017] - Deshvir
    + PMIC support */
    +#undef CONFIG_POWER_TPS65217
    +#undef CONFIG_POWER_TPS65910
    +
     /* SPL */
     #ifndef CONFIG_NOR_BOOT
     #define CONFIG_SPL_POWER_SUPPORT
     
    +/*[18012017] - Deshvir*/
    +/* SPL */
    +#undef CONFIG_SPL_POWER_SUPPORT
    +
     /* Bootcount using the RTC block */
     #define CONFIG_BOOTCOUNT_LIMIT
     #define CONFIG_BOOTCOUNT_AM33XX
    @@ -198,6 +219,11 @@
     /* USB gadget RNDIS */
     #define CONFIG_SPL_MUSB_NEW_SUPPORT
     
    +
    +/*[18012017] - Deshvir*/
    +/* USB gadget RNDIS */
    +#undef CONFIG_SPL_MUSB_NEW_SUPPORT
    +
     #define CONFIG_SPL_LDSCRIPT        "$(CPUDIR)/am33xx/u-boot-spl.lds"
     #endif
     
    @@ -384,6 +410,13 @@
     #define CONFIG_SPL_SPI_LOAD
     #define CONFIG_SYS_SPI_U_BOOT_OFFS    0x20000
     
    +/*[18012017] - Deshvir*/
    +/* SPI flash disabled. */    
    +#undef CONFIG_SPL_SPI_SUPPORT
    +#undef CONFIG_SPL_SPI_FLASH_SUPPORT
    +#undef CONFIG_SPL_SPI_LOAD
    +
    +
     #define CONFIG_ENV_IS_IN_SPI_FLASH
     #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
     #define CONFIG_ENV_SPI_MAX_HZ        CONFIG_SF_DEFAULT_SPEED
    diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
    index 8fa6f3e..8ba9524 100644
    --- a/include/configs/ti_armv7_common.h
    +++ b/include/configs/ti_armv7_common.h
    @@ -17,6 +17,10 @@
     #ifndef __CONFIG_TI_ARMV7_COMMON_H__
     #define __CONFIG_TI_ARMV7_COMMON_H__
     
    +/*[19012017] - Deshvir*/
    +#define MMC_BOOT     1
    +#define NAND_BOOT     0
    +
     /*
      * We typically do not contain NOR flash.  In the cases where we do, we
      * undefine this later.
    @@ -55,7 +59,7 @@
         "scriptaddr=0x80000000\0" \
         "pxefile_addr_r=0x80100000\0" \
         "bootm_size=0x10000000\0" \
    -    "boot_fdt=try\0"
    +    "boot_fdt=no\0"
     
     #define DEFAULT_MMC_TI_ARGS \
         "mmcdev=0\0" \
    @@ -299,6 +303,10 @@
     #define CONFIG_CMD_SPL
     #endif
     
    +#if NAND_BOOT
    +#undef CONFIG_MMC
    +#endif
    +
     #ifdef CONFIG_MMC
     #define CONFIG_SPL_LIBDISK_SUPPORT
     #define CONFIG_SPL_MMC_SUPPORT
    @@ -333,6 +341,23 @@
     
     /* Generic Environment Variables */
     
    +/*[19012017] - Deshvir*/
    +/* MMC Boot */
    +#define BOOTCMD_MMC \
    +    "mmc_boot=" \
    +        "setenv devtype mmc; " \
    +        "if mmc dev ${devnum}; then " \
    +            "run mmcargs;" \
    +            "run scan_boot; " \
    +            "run mmcboot;" \
    +            "setenv mmcdev 1; " \
    +            "setenv bootpart 1:2; " \
    +            "run mmcboot;" \
    +        "fi\0" \
    +    "bootcmd_mmc0=setenv devnum 0; setenv rootpart 2; dcache; run mmc_boot;\0" \
    +
    +
    +
     #ifdef CONFIG_CMD_NET
     #define NETARGS \
         "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \

    Thanks and Regards

    Deshvir Malik

  • Hi,

    Regarding the pinmux & enabling the modules you use in u-boot, note that in latest TI SDK there is a dts file in the u-boot as well:
    arch/arm/dts/

    You need to add the pinmux configurations & change the status of lets say uart3 to status = "okay", so that you can fully enable the module.

    Best Regards,
    Yordan
  • Hi Bisor,

    I have extracted the SDK again and started from scratch. There is no read_eeprom() function in the latest sdk bootloader and do_board_detect function is also without eeprom check.

    Path: /home/deshvir/ti/board-support/u-boot-2016.05+gitAUTOINC+6c5519b6fc-g6c5519b6fc/board/ti/am335x/board.c

    void do_board_detect(void)

    {

           enable_i2c0_pin_mux();

           i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);

           if (ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR))

           printf("ti_i2c_eeprom_init failed\n");

    }

     

    I' m using uart0 and getting following on the console:

    root@nt:~# CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

    On putting SDCard with MLO and U-Boot.img, I'm not getting anything, not even CCCCCCCC...

    Could you please suggest the necessary changes required?

     

    Thanks and Regards

    Deshvir Malik

     

     

     

     

  • Hi Yordan,

    Thanks for this very useful info. But as i have started from scratch again after extracting latest SDK and currently using default uart0 only and once thinks will start working at uart0 then i'll switch to uart3. But I'm getting only CCCCCC.....on console and after putting SDCard with MLO and U-Boot, I'm not getting anything.

    Could you suggest the possible problem and solution?


    Thanks and Regards
    Deshvir Malik
  • Hi Bisor,

    Finally I'm able to boot my board using MLO and u-boot.img after skipping EEPROM check and this is working at uart0.

    I wrote the following function to skip EEPROM Check.

    int __maybe_unused ti_i2c_eeprom_am_get1(void )

    {

           struct ti_common_eeprom *ep;

    /* Initialize with a known bad marker for i2c fails.. */

    ep = TI_EEPROM_DATA;

    ep->header = TI_DEAD_EEPROM_MAGIC;

           ep->name[0] = 0x0;

           ep->version[0] = 0x0;

           ep->serial[0] = 0x0;

           ep->config[0] = 0x0;

    ep->header = TI_EEPROM_HEADER_MAGIC;

    ep->name[0] = 'A';

    ep->name[1] = '3';

    ep->name[2] = '3';

    ep->name[3] = '5';

    ep->name[4] = 'B';

    ep->name[5] = 'N';

    ep->name[6] = 'L';

      ep->name[7] = 'T';

    ep->version[0] = '1';

    ep->version[1] = '0';

    ep->version[2] = '0';

    ep->version[3] = '0';

    return 0;

    }

     

    But I want to boot my board from uart3 and I have done the changes in u-boot/arc/arm/dts/am335x-bone-common.dtsi also for the uart3 as mentioned below, but board is not booting.

     

    uart3_pins: pinmux_uart3_pins {
            pinctrl-single,pins = <
                0x134 (PIN_INPUT_PULLUP | MUX_MODE1)    /* mii1_rxd3.uart3_rxd */
                0x138 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_rxd2.uart3_txd */
            >;
        };

     

    &uart3 {
            pinctrl-names = "default";
            pinctrl-0 = <&uart3_pins>;

            status = "okay";
            };

    Where else am I suppose to make changes to use uart3?

    Thanks and Regards

    Deshvir Malik

     

  • LK"I

    Deshvir,

    Can you share with us the complete code/patch ?

    That would be much helpfull ...

    Harel