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: U-boot fails

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3358

Hello everyone,

I'm trying to bring up a custom board similar to the BBB with the AM335x and I can see the steady "CCCCC".  Because of a different RAM (Micron MT41K256M16HA-107) on my board as on the BBB, I followed these wiki:

_processors.wiki.ti.com/.../Sitara_Linux_Training:_Tuning_the_DDR3_Timings_on_BeagleBoneBlack

in the newest SDK for am335x-evm. When I create an sd-card, I only see this in the terminal (with "define DEBUG" in am335x_evm.h):


U-Boot SPL 2017.01-00360-gc6c77f9-dirty (Nov 23 2017 - 16:42:14)
malloc_simple: size=f98, ptr=f98, limit=100000: 81f00000

After that, nothing happens.

Could somebody give a little advice, what could be the problem? Did I miss something?

I changed the values for the BBB in the ddr_defs.h according to my board, everything else should be the same or is there another file that has to be changed?

Thanks very much for your help.

Kind regards

2068.ddr_defs.h

/*
 * board.c
 *
 * Board functions for TI AM335X based boards
 *
 * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#include <common.h>
#include <errno.h>
#include <spl.h>
#include <serial.h>
#include <asm/arch/cpu.h>
#include <asm/arch/hardware.h>
#include <asm/arch/omap.h>
#include <asm/arch/ddr_defs.h>
#include <asm/arch/clock.h>
#include <asm/arch/clk_synthesizer.h>
#include <asm/arch/gpio.h>
#include <asm/arch/mmc_host_def.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mem.h>
#include <asm/io.h>
#include <asm/emif.h>
#include <asm/gpio.h>
#include <asm/omap_sec_common.h>
#include <i2c.h>
#include <miiphy.h>
#include <cpsw.h>
#include <power/tps65217.h>
#include <power/tps65910.h>
#include <environment.h>
#include <watchdog.h>
#include <environment.h>
#include <libfdt.h>
#include <fdt_support.h>

#include "../common/board_detect.h"
#include "board.h"

DECLARE_GLOBAL_DATA_PTR;

/* GPIO that controls power to DDR on EVM-SK */
#define GPIO_TO_PIN(bank, gpio)		(32 * (bank) + (gpio))
#define GPIO_DDR_VTT_EN		GPIO_TO_PIN(0, 7)
#define ICE_GPIO_DDR_VTT_EN	GPIO_TO_PIN(0, 18)
#define GPIO_PR1_MII_CTRL	GPIO_TO_PIN(3, 4)
#define GPIO_MUX_MII_CTRL	GPIO_TO_PIN(3, 10)
#define GPIO_FET_SWITCH_CTRL	GPIO_TO_PIN(0, 7)
#define GPIO_PHY_RESET		GPIO_TO_PIN(2, 5)
#define GPIO_ETH0_MODE		GPIO_TO_PIN(0, 11)
#define GPIO_ETH1_MODE		GPIO_TO_PIN(1, 26)

static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;

#define GPIO0_RISINGDETECT	(AM33XX_GPIO0_BASE + OMAP_GPIO_RISINGDETECT)
#define GPIO1_RISINGDETECT	(AM33XX_GPIO1_BASE + OMAP_GPIO_RISINGDETECT)

#define GPIO0_IRQSTATUS1	(AM33XX_GPIO0_BASE + OMAP_GPIO_IRQSTATUS1)
#define GPIO1_IRQSTATUS1	(AM33XX_GPIO1_BASE + OMAP_GPIO_IRQSTATUS1)

#define GPIO0_IRQSTATUSRAW	(AM33XX_GPIO0_BASE + 0x024)
#define GPIO1_IRQSTATUSRAW	(AM33XX_GPIO1_BASE + 0x024)

/*
 * Read header information from EEPROM into global structure.
 */
#ifdef CONFIG_TI_I2C_BOARD_DETECT
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");
}
#endif

#ifndef CONFIG_DM_SERIAL
struct serial_device *default_serial_console(void)
{
	if (board_is_icev2())
		return &eserial4_device;
	else
		return &eserial1_device;
}
#endif

#ifndef CONFIG_SKIP_LOWLEVEL_INIT
static const struct ddr_data ddr2_data = {
	.datardsratio0 = MT47H128M16RT25E_RD_DQS,
	.datafwsratio0 = MT47H128M16RT25E_PHY_FIFO_WE,
	.datawrsratio0 = MT47H128M16RT25E_PHY_WR_DATA,
};

static const struct cmd_control ddr2_cmd_ctrl_data = {
	.cmd0csratio = MT47H128M16RT25E_RATIO,

	.cmd1csratio = MT47H128M16RT25E_RATIO,

	.cmd2csratio = MT47H128M16RT25E_RATIO,
};

static const struct emif_regs ddr2_emif_reg_data = {
	.sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
	.ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
	.sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
	.sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
	.sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
	.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
};

static const struct emif_regs ddr2_evm_emif_reg_data = {
	.sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
	.ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
	.sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
	.sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
	.sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
	.ocp_config = EMIF_OCP_CONFIG_AM335X_EVM,
	.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
};

static const struct ddr_data ddr3_data = {
	.datardsratio0 = MT41J128MJT125_RD_DQS,
	.datawdsratio0 = MT41J128MJT125_WR_DQS,
	.datafwsratio0 = MT41J128MJT125_PHY_FIFO_WE,
	.datawrsratio0 = MT41J128MJT125_PHY_WR_DATA,
};

static const struct ddr_data ddr3_beagleblack_data = {
	.datardsratio0 = MT41K256M16HA125E_RD_DQS,
	.datawdsratio0 = MT41K256M16HA125E_WR_DQS,
	.datafwsratio0 = MT41K256M16HA125E_PHY_FIFO_WE,
	.datawrsratio0 = MT41K256M16HA125E_PHY_WR_DATA,
};

static const struct ddr_data ddr3_evm_data = {
	.datardsratio0 = MT41J512M8RH125_RD_DQS,
	.datawdsratio0 = MT41J512M8RH125_WR_DQS,
	.datafwsratio0 = MT41J512M8RH125_PHY_FIFO_WE,
	.datawrsratio0 = MT41J512M8RH125_PHY_WR_DATA,
};

static const struct ddr_data ddr3_icev2_data = {
	.datardsratio0 = MT41J128MJT125_RD_DQS_400MHz,
	.datawdsratio0 = MT41J128MJT125_WR_DQS_400MHz,
	.datafwsratio0 = MT41J128MJT125_PHY_FIFO_WE_400MHz,
	.datawrsratio0 = MT41J128MJT125_PHY_WR_DATA_400MHz,
};

static const struct cmd_control ddr3_cmd_ctrl_data = {
	.cmd0csratio = MT41J128MJT125_RATIO,
	.cmd0iclkout = MT41J128MJT125_INVERT_CLKOUT,

	.cmd1csratio = MT41J128MJT125_RATIO,
	.cmd1iclkout = MT41J128MJT125_INVERT_CLKOUT,

	.cmd2csratio = MT41J128MJT125_RATIO,
	.cmd2iclkout = MT41J128MJT125_INVERT_CLKOUT,
};

static const struct cmd_control ddr3_beagleblack_cmd_ctrl_data = {
	.cmd0csratio = MT41K256M16HA125E_RATIO,
	.cmd0iclkout = MT41K256M16HA125E_INVERT_CLKOUT,

	.cmd1csratio = MT41K256M16HA125E_RATIO,
	.cmd1iclkout = MT41K256M16HA125E_INVERT_CLKOUT,

	.cmd2csratio = MT41K256M16HA125E_RATIO,
	.cmd2iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
};

static const struct cmd_control ddr3_evm_cmd_ctrl_data = {
	.cmd0csratio = MT41J512M8RH125_RATIO,
	.cmd0iclkout = MT41J512M8RH125_INVERT_CLKOUT,

	.cmd1csratio = MT41J512M8RH125_RATIO,
	.cmd1iclkout = MT41J512M8RH125_INVERT_CLKOUT,

	.cmd2csratio = MT41J512M8RH125_RATIO,
	.cmd2iclkout = MT41J512M8RH125_INVERT_CLKOUT,
};

static const struct cmd_control ddr3_icev2_cmd_ctrl_data = {
	.cmd0csratio = MT41J128MJT125_RATIO_400MHz,
	.cmd0iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,

	.cmd1csratio = MT41J128MJT125_RATIO_400MHz,
	.cmd1iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,

	.cmd2csratio = MT41J128MJT125_RATIO_400MHz,
	.cmd2iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,
};

static struct emif_regs ddr3_emif_reg_data = {
	.sdram_config = MT41J128MJT125_EMIF_SDCFG,
	.ref_ctrl = MT41J128MJT125_EMIF_SDREF,
	.sdram_tim1 = MT41J128MJT125_EMIF_TIM1,
	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
	.zq_config = MT41J128MJT125_ZQ_CFG,
	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
				PHY_EN_DYN_PWRDN,
};

static struct emif_regs ddr3_beagleblack_emif_reg_data = {
	.sdram_config = MT41K256M16HA125E_EMIF_SDCFG,
	.ref_ctrl = MT41K256M16HA125E_EMIF_SDREF,
	.sdram_tim1 = MT41K256M16HA125E_EMIF_TIM1,
	.sdram_tim2 = MT41K256M16HA125E_EMIF_TIM2,
	.sdram_tim3 = MT41K256M16HA125E_EMIF_TIM3,
	.ocp_config = EMIF_OCP_CONFIG_BEAGLEBONE_BLACK,
	.zq_config = MT41K256M16HA125E_ZQ_CFG,
	.emif_ddr_phy_ctlr_1 = MT41K256M16HA125E_EMIF_READ_LATENCY,
};

static struct emif_regs ddr3_evm_emif_reg_data = {
	.sdram_config = MT41J512M8RH125_EMIF_SDCFG,
	.ref_ctrl = MT41J512M8RH125_EMIF_SDREF,
	.sdram_tim1 = MT41J512M8RH125_EMIF_TIM1,
	.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
	.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
	.ocp_config = EMIF_OCP_CONFIG_AM335X_EVM,
	.zq_config = MT41J512M8RH125_ZQ_CFG,
	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
				PHY_EN_DYN_PWRDN,
};

static struct emif_regs ddr3_icev2_emif_reg_data = {
	.sdram_config = MT41J128MJT125_EMIF_SDCFG_400MHz,
	.ref_ctrl = MT41J128MJT125_EMIF_SDREF_400MHz,
	.sdram_tim1 = MT41J128MJT125_EMIF_TIM1_400MHz,
	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2_400MHz,
	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3_400MHz,
	.zq_config = MT41J128MJT125_ZQ_CFG_400MHz,
	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY_400MHz |
				PHY_EN_DYN_PWRDN,
};

#ifdef CONFIG_SPL_OS_BOOT
int spl_start_uboot(void)
{
	/* break into full u-boot on 'c' */
	if (serial_tstc() && serial_getc() == 'c')
		return 1;

#ifdef CONFIG_SPL_ENV_SUPPORT
	env_init();
	env_relocate_spec();
	if (getenv_yesno("boot_os") != 1)
		return 1;
#endif

	return 0;
}
#endif

const struct dpll_params *get_dpll_ddr_params(void)
{
	int ind = get_sys_clk_index();

	if (board_is_evm_sk())
		return &dpll_ddr3_303MHz[ind];
	else if (board_is_bone_lt() || board_is_icev2())
		return &dpll_ddr3_400MHz[ind];
	else if (board_is_evm_15_or_later())
		return &dpll_ddr3_303MHz[ind];
	else
		return &dpll_ddr2_266MHz[ind];
}

static u8 bone_not_connected_to_ac_power(void)
{
	if (board_is_bone()) {
		uchar pmic_status_reg;
		if (tps65217_reg_read(TPS65217_STATUS,
				      &pmic_status_reg))
			return 1;
		if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {
			puts("No AC power, switching to default OPP\n");
			return 1;
		}
	}
	return 0;
}

const struct dpll_params *get_dpll_mpu_params(void)
{
	int ind = get_sys_clk_index();
	int freq = am335x_get_efuse_mpu_max_freq(cdev);

	if (bone_not_connected_to_ac_power())
		freq = MPUPLL_M_600;

	if (board_is_bone_lt())
		freq = MPUPLL_M_1000;

	switch (freq) {
	case MPUPLL_M_1000:
		return &dpll_mpu_opp[ind][5];
	case MPUPLL_M_800:
		return &dpll_mpu_opp[ind][4];
	case MPUPLL_M_720:
		return &dpll_mpu_opp[ind][3];
	case MPUPLL_M_600:
		return &dpll_mpu_opp[ind][2];
	case MPUPLL_M_500:
		return &dpll_mpu_opp100;
	case MPUPLL_M_300:
		return &dpll_mpu_opp[ind][0];
	}

	return &dpll_mpu_opp[ind][0];
}

static void scale_vcores_bone(int freq)
{
	int usb_cur_lim, mpu_vdd;

	/*
	 * Only perform PMIC configurations if board rev > A1
	 * on Beaglebone White
	 */
	if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
		return;

	if (i2c_probe(TPS65217_CHIP_PM))
		return;

	/*
	 * On Beaglebone White we need to ensure we have AC power
	 * before increasing the frequency.
	 */
	if (bone_not_connected_to_ac_power())
		freq = MPUPLL_M_600;

	/*
	 * Override what we have detected since we know if we have
	 * a Beaglebone Black it supports 1GHz.
	 */
	if (board_is_bone_lt())
		freq = MPUPLL_M_1000;

	switch (freq) {
	case MPUPLL_M_1000:
		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
		break;
	case MPUPLL_M_800:
		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
		break;
	case MPUPLL_M_720:
		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1200MV;
		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
		break;
	case MPUPLL_M_600:
	case MPUPLL_M_500:
	case MPUPLL_M_300:
	default:
		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1100MV;
		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
		break;
	}

	if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
			       TPS65217_POWER_PATH,
			       usb_cur_lim,
			       TPS65217_USB_INPUT_CUR_LIMIT_MASK))
		puts("tps65217_reg_write failure\n");

	/* Set DCDC3 (CORE) voltage to 1.10V */
	if (tps65217_voltage_update(TPS65217_DEFDCDC3,
				    TPS65217_DCDC_VOLT_SEL_1100MV)) {
		puts("tps65217_voltage_update failure\n");
		return;
	}

	/* Set DCDC2 (MPU) voltage */
	if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
		puts("tps65217_voltage_update failure\n");
		return;
	}

	/*
	 * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
	 * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
	 */
	if (board_is_bone()) {
		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
				       TPS65217_DEFLS1,
				       TPS65217_LDO_VOLTAGE_OUT_3_3,
				       TPS65217_LDO_MASK))
			puts("tps65217_reg_write failure\n");
	} else {
		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
				       TPS65217_DEFLS1,
				       TPS65217_LDO_VOLTAGE_OUT_1_8,
				       TPS65217_LDO_MASK))
			puts("tps65217_reg_write failure\n");
	}

	if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
			       TPS65217_DEFLS2,
			       TPS65217_LDO_VOLTAGE_OUT_3_3,
			       TPS65217_LDO_MASK))
		puts("tps65217_reg_write failure\n");
}

void scale_vcores_generic(int freq)
{
	int sil_rev, mpu_vdd;

	/*
	 * The GP EVM, IDK and EVM SK use a TPS65910 PMIC.  For all
	 * MPU frequencies we support we use a CORE voltage of
	 * 1.10V.  For MPU voltage we need to switch based on
	 * the frequency we are running at.
	 */
	if (i2c_probe(TPS65910_CTRL_I2C_ADDR))
		return;

	/*
	 * Depending on MPU clock and PG we will need a different
	 * VDD to drive at that speed.
	 */
	sil_rev = readl(&cdev->deviceid) >> 28;
	mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev, freq);

	/* Tell the TPS65910 to use i2c */
	tps65910_set_i2c_control();

	/* First update MPU voltage. */
	if (tps65910_voltage_update(MPU, mpu_vdd))
		return;

	/* Second, update the CORE voltage. */
	if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_0))
		return;

}

void gpi2c_init(void)
{
	/* When needed to be invoked prior to BSS initialization */
	static bool first_time = true;

	if (first_time) {
		enable_i2c0_pin_mux();
		i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED,
			 CONFIG_SYS_OMAP24_I2C_SLAVE);
		first_time = false;
	}
}

void scale_vcores(void)
{
	int freq;

	gpi2c_init();
	freq = am335x_get_efuse_mpu_max_freq(cdev);

	if (board_is_beaglebonex())
		scale_vcores_bone(freq);
	else
		scale_vcores_generic(freq);
}

void set_uart_mux_conf(void)
{
#if CONFIG_CONS_INDEX == 1
	enable_uart0_pin_mux();
#elif CONFIG_CONS_INDEX == 2
	enable_uart1_pin_mux();
#elif CONFIG_CONS_INDEX == 3
	enable_uart2_pin_mux();
#elif CONFIG_CONS_INDEX == 4
	enable_uart3_pin_mux();
#elif CONFIG_CONS_INDEX == 5
	enable_uart4_pin_mux();
#elif CONFIG_CONS_INDEX == 6
	enable_uart5_pin_mux();
#endif
}

void set_mux_conf_regs(void)
{
	enable_board_pin_mux();
}

const struct ctrl_ioregs ioregs_evmsk = {
	.cm0ioctl		= MT41J128MJT125_IOCTRL_VALUE,
	.cm1ioctl		= MT41J128MJT125_IOCTRL_VALUE,
	.cm2ioctl		= MT41J128MJT125_IOCTRL_VALUE,
	.dt0ioctl		= MT41J128MJT125_IOCTRL_VALUE,
	.dt1ioctl		= MT41J128MJT125_IOCTRL_VALUE,
};

const struct ctrl_ioregs ioregs_bonelt = {
	.cm0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
	.cm1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
	.cm2ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
	.dt0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
	.dt1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
};

const struct ctrl_ioregs ioregs_evm15 = {
	.cm0ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
	.cm1ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
	.cm2ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
	.dt0ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
	.dt1ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
};

const struct ctrl_ioregs ioregs = {
	.cm0ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
	.cm1ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
	.cm2ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
	.dt0ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
	.dt1ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
};

void sdram_init(void)
{
	if (board_is_evm_sk()) {
		/*
		 * EVM SK 1.2A and later use gpio0_7 to enable DDR3.
		 * This is safe enough to do on older revs.
		 */
		gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
		gpio_direction_output(GPIO_DDR_VTT_EN, 1);
	}

	if (board_is_icev2()) {
		gpio_request(ICE_GPIO_DDR_VTT_EN, "ddr_vtt_en");
		gpio_direction_output(ICE_GPIO_DDR_VTT_EN, 1);
	}

	if (board_is_evm_sk())
		config_ddr(303, &ioregs_evmsk, &ddr3_data,
			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
	else if (board_is_bone_lt()) {
		printf ("BEAGLEBONE BLACK");
		config_ddr(400, &ioregs_bonelt,
			   &ddr3_beagleblack_data,
			   &ddr3_beagleblack_cmd_ctrl_data,
			   &ddr3_beagleblack_emif_reg_data, 0);
	}

	else if (board_is_evm_15_or_later())
		config_ddr(303, &ioregs_evm15, &ddr3_evm_data,
			   &ddr3_evm_cmd_ctrl_data, &ddr3_evm_emif_reg_data, 0);
	else if (board_is_icev2())
		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())
		config_ddr(266, &ioregs, &ddr2_data,
			   &ddr2_cmd_ctrl_data, &ddr2_evm_emif_reg_data, 0);
	else
		config_ddr(266, &ioregs, &ddr2_data,
			   &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data, 0);
}
#endif

#if !defined(CONFIG_SPL_BUILD) || \
	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
static void request_and_set_gpio(int gpio, char *name, int val)
{
	int ret;

	ret = gpio_request(gpio, name);
	if (ret < 0) {
		printf("%s: Unable to request %s\n", __func__, name);
		return;
	}

	ret = gpio_direction_output(gpio, 0);
	if (ret < 0) {
		printf("%s: Unable to set %s  as output\n", __func__, name);
		goto err_free_gpio;
	}

	gpio_set_value(gpio, val);

	return;

err_free_gpio:
	gpio_free(gpio);
}

#define REQUEST_AND_SET_GPIO(N)	request_and_set_gpio(N, #N, 1);
#define REQUEST_AND_CLR_GPIO(N)	request_and_set_gpio(N, #N, 0);

/**
 * RMII mode on ICEv2 board needs 50MHz clock. Given the clock
 * synthesizer With a capacitor of 18pF, and 25MHz input clock cycle
 * PLL1 gives an output of 100MHz. So, configuring the div2/3 as 2 to
 * give 50MHz output for Eth0 and 1.
 */
static struct clk_synth cdce913_data = {
	.id = 0x81,
	.capacitor = 0x90,
	.mux = 0x6d,
	.pdiv2 = 0x2,
	.pdiv3 = 0x2,
};
#endif

#if !defined(CONFIG_SPL_BUILD) || \
	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD)) || \
	(defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP))

static bool eth0_is_mii;
static bool eth1_is_mii;
#endif

/*
 * Basic board specific setup.  Pinmux has been handled already.
 */
int board_init(void)
{
#if defined(CONFIG_HW_WATCHDOG)
	hw_watchdog_init();
#endif

	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
#if defined(CONFIG_NOR) || defined(CONFIG_NAND)
	gpmc_init();
#endif

#if !defined(CONFIG_SPL_BUILD) || \
	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
	if (board_is_icev2()) {
		int rv;
		u32 reg;

		/* factory default configuration */
		eth0_is_mii = true;
		eth1_is_mii = true;

		REQUEST_AND_SET_GPIO(GPIO_PR1_MII_CTRL);
		/* Make J19 status available on GPIO1_26 */
		REQUEST_AND_CLR_GPIO(GPIO_MUX_MII_CTRL);

		REQUEST_AND_SET_GPIO(GPIO_FET_SWITCH_CTRL);
		/*
		 * Both ports can be set as RMII-CPSW or MII-PRU-ETH using
		 * jumpers near the port. Read the jumper value and set
		 * the pinmux, external mux and PHY clock accordingly.
		 * As jumper line is overridden by PHY RX_DV pin immediately
		 * after bootstrap (power-up/reset), we need to sample
		 * it during PHY reset using GPIO rising edge detection.
		 */
		REQUEST_AND_SET_GPIO(GPIO_PHY_RESET);
		/* Enable rising edge IRQ on GPIO0_11 and GPIO 1_26 */
		reg = readl(GPIO0_RISINGDETECT) | BIT(11);
		writel(reg, GPIO0_RISINGDETECT);
		reg = readl(GPIO1_RISINGDETECT) | BIT(26);
		writel(reg, GPIO1_RISINGDETECT);
		/* Reset PHYs to capture the Jumper setting */
		gpio_set_value(GPIO_PHY_RESET, 0);
		udelay(2);	/* PHY datasheet states 1uS min. */
		gpio_set_value(GPIO_PHY_RESET, 1);

		reg = readl(GPIO0_IRQSTATUSRAW) & BIT(11);
		if (reg) {
			writel(reg, GPIO0_IRQSTATUS1); /* clear irq */
			/* RMII mode */
			printf("ETH0, CPSW\n");
			eth0_is_mii = false;
		} else {
			/* MII mode */
			printf("ETH0, PRU\n");
			cdce913_data.pdiv3 = 4;	/* 25MHz PHY clk */
		}

		reg = readl(GPIO1_IRQSTATUSRAW) & BIT(26);
		if (reg) {
			writel(reg, GPIO1_IRQSTATUS1); /* clear irq */
			/* RMII mode */
			printf("ETH1, CPSW\n");
			gpio_set_value(GPIO_MUX_MII_CTRL, 1);
			eth1_is_mii = false;
		} else {
			/* MII mode */
			printf("ETH1, PRU\n");
			cdce913_data.pdiv2 = 4;	/* 25MHz PHY clk */
		}

		/* disable rising edge IRQs */
		reg = readl(GPIO0_RISINGDETECT) & ~BIT(11);
		writel(reg, GPIO0_RISINGDETECT);
		reg = readl(GPIO1_RISINGDETECT) & ~BIT(26);
		writel(reg, GPIO1_RISINGDETECT);

		rv = setup_clock_synthesizer(&cdce913_data);
		if (rv) {
			printf("Clock synthesizer setup failed %d\n", rv);
			return rv;
		}

		/* reset PHYs */
		gpio_set_value(GPIO_PHY_RESET, 0);
		udelay(2);	/* PHY datasheet states 1uS min. */
		gpio_set_value(GPIO_PHY_RESET, 1);
	}
#endif

	return 0;
}

#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
#if !defined(CONFIG_SPL_BUILD)
	uint8_t mac_addr[6];
	uint32_t mac_hi, mac_lo;
#endif

#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
	char *name = NULL;

	if (board_is_bbg1())
		name = "BBG1";
	set_board_info_env(name);

	/*
	 * Default FIT boot on HS devices. Non FIT images are not allowed
	 * on HS devices.
	 */
	if (get_device_type() == HS_DEVICE)
		setenv("boot_fit", "1");
#endif

#if !defined(CONFIG_SPL_BUILD)
	/* try reading mac address from efuse */
	mac_lo = readl(&cdev->macid0l);
	mac_hi = readl(&cdev->macid0h);
	mac_addr[0] = mac_hi & 0xFF;
	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
	mac_addr[4] = mac_lo & 0xFF;
	mac_addr[5] = (mac_lo & 0xFF00) >> 8;

	if (!getenv("ethaddr")) {
		printf("<ethaddr> not set. Validating first E-fuse MAC\n");

		if (is_valid_ethaddr(mac_addr))
			eth_setenv_enetaddr("ethaddr", mac_addr);
	}

	mac_lo = readl(&cdev->macid1l);
	mac_hi = readl(&cdev->macid1h);
	mac_addr[0] = mac_hi & 0xFF;
	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
	mac_addr[4] = mac_lo & 0xFF;
	mac_addr[5] = (mac_lo & 0xFF00) >> 8;

	if (!getenv("eth1addr")) {
		if (is_valid_ethaddr(mac_addr))
			eth_setenv_enetaddr("eth1addr", mac_addr);
	}
#endif

	return 0;
}
#endif

#ifndef CONFIG_DM_ETH

#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
static void cpsw_control(int enabled)
{
	/* VTP can be added here */

	return;
}

static struct cpsw_slave_data cpsw_slaves[] = {
	{
		.slave_reg_ofs	= 0x208,
		.sliver_reg_ofs	= 0xd80,
		.phy_addr	= 0,
	},
	{
		.slave_reg_ofs	= 0x308,
		.sliver_reg_ofs	= 0xdc0,
		.phy_addr	= 1,
	},
};

static struct cpsw_platform_data cpsw_data = {
	.mdio_base		= CPSW_MDIO_BASE,
	.cpsw_base		= CPSW_BASE,
	.mdio_div		= 0xff,
	.channels		= 8,
	.cpdma_reg_ofs		= 0x800,
	.slaves			= 1,
	.slave_data		= cpsw_slaves,
	.ale_reg_ofs		= 0xd00,
	.ale_entries		= 1024,
	.host_port_reg_ofs	= 0x108,
	.hw_stats_reg_ofs	= 0x900,
	.bd_ram_ofs		= 0x2000,
	.mac_control		= (1 << 5),
	.control		= cpsw_control,
	.host_port_num		= 0,
	.version		= CPSW_CTRL_VERSION_2,
};
#endif

#if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) &&\
	defined(CONFIG_SPL_BUILD)) || \
	((defined(CONFIG_DRIVER_TI_CPSW) || \
	  defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
	 !defined(CONFIG_SPL_BUILD))

/*
 * This function will:
 * Read the eFuse for MAC addresses, and set ethaddr/eth1addr/usbnet_devaddr
 * in the environment
 * Perform fixups to the PHY present on certain boards.  We only need this
 * function in:
 * - SPL with either CPSW or USB ethernet support
 * - Full U-Boot, with either CPSW or USB ethernet
 * Build in only these cases to avoid warnings about unused variables
 * when we build an SPL that has neither option but full U-Boot will.
 */
int board_eth_init(bd_t *bis)
{
	int rv, n = 0;
#if defined(CONFIG_USB_ETHER) && \
	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
	uint8_t mac_addr[6];
	uint32_t mac_hi, mac_lo;

	/*
	 * use efuse mac address for USB ethernet as we know that
	 * both CPSW and USB ethernet will never be active at the same time
	 */
	mac_lo = readl(&cdev->macid0l);
	mac_hi = readl(&cdev->macid0h);
	mac_addr[0] = mac_hi & 0xFF;
	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
	mac_addr[4] = mac_lo & 0xFF;
	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
#endif


#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
	if (!getenv("ethaddr")) {
		puts("<ethaddr> not set. Validating first E-fuse MAC\n");
		if (is_valid_ethaddr(mac_addr))
			eth_setenv_enetaddr("ethaddr", mac_addr);
	}

#ifdef CONFIG_DRIVER_TI_CPSW
	if (board_is_bone() || board_is_bone_lt() ||
	    board_is_idk()) {
		writel(MII_MODE_ENABLE, &cdev->miisel);
		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
				PHY_INTERFACE_MODE_MII;
	} else if (board_is_icev2()) {
		writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel);
		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII;
		cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RMII;
		cpsw_slaves[0].phy_addr = 1;
		cpsw_slaves[1].phy_addr = 3;
	} else {
		writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel);
		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
				PHY_INTERFACE_MODE_RGMII;
	}

	rv = cpsw_register(&cpsw_data);
	if (rv < 0)
		printf("Error %d registering CPSW switch\n", rv);
	else
		n += rv;
#endif

	/*
	 *
	 * CPSW RGMII Internal Delay Mode is not supported in all PVT
	 * operating points.  So we must set the TX clock delay feature
	 * in the AR8051 PHY.  Since we only support a single ethernet
	 * device in U-Boot, we only do this for the first instance.
	 */
#define AR8051_PHY_DEBUG_ADDR_REG	0x1d
#define AR8051_PHY_DEBUG_DATA_REG	0x1e
#define AR8051_DEBUG_RGMII_CLK_DLY_REG	0x5
#define AR8051_RGMII_TX_CLK_DLY		0x100

	if (board_is_evm_sk() || board_is_gp_evm()) {
		const char *devname;
		devname = miiphy_get_current_dev();

		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_ADDR_REG,
				AR8051_DEBUG_RGMII_CLK_DLY_REG);
		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_DATA_REG,
				AR8051_RGMII_TX_CLK_DLY);
	}
#endif
#if defined(CONFIG_USB_ETHER) && \
	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
	if (is_valid_ethaddr(mac_addr))
		eth_setenv_enetaddr("usbnet_devaddr", mac_addr);

	rv = usb_eth_initialize(bis);
	if (rv < 0)
		printf("Error %d registering USB_ETHER\n", rv);
	else
		n += rv;
#endif
	return n;
}
#endif

#endif /* CONFIG_DM_ETH */

#ifdef CONFIG_SPL_LOAD_FIT
int board_fit_config_name_match(const char *name)
{
	if (board_is_gp_evm() && !strcmp(name, "am335x-evm"))
		return 0;
	else if (board_is_bone() && !strcmp(name, "am335x-bone"))
		return 0;
	else if (board_is_bone_lt() && !strcmp(name, "am335x-boneblack"))
		return 0;
	else if (board_is_evm_sk() && !strcmp(name, "am335x-evmsk"))
		return 0;
	else if (board_is_bbg1() && !strcmp(name, "am335x-bonegreen"))
		return 0;
	else if (board_is_icev2() && !strcmp(name, "am335x-icev2"))
		return 0;
	else
		return -1;
}
#endif

#ifdef CONFIG_TI_SECURE_DEVICE
void board_fit_image_post_process(void **p_image, size_t *p_size)
{
	secure_boot_verify_image(p_image, p_size);
}
#endif

#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)

static const char pruss_eth0_alias[] = "/pruss_eth/ethernet-mii0";
static const char pruss_eth1_alias[] = "/pruss_eth/ethernet-mii1";

int ft_board_setup(void *fdt, bd_t *bd)
{
	const char *path;
	int offs;
	int ret;

	if (!board_is_icev2())
		return 0;

	/* Board DT default is both ports are RMII */
	if (!eth0_is_mii && !eth1_is_mii)
		return 0;

	if (eth0_is_mii != eth1_is_mii) {
		printf("Unsupported Ethernet port configuration\n");
		printf("Both ports must be set as RMII or MII\n");
		return 0;
	}

	printf("Fixing up ETH0 & ETH1 to PRUSS Ethernet\n");
	/* Enable PRUSS-MDIO */
	path = "/ocp/pruss_soc_bus@4a326000/pruss@4a300000/mdio@4a332400";
	offs = fdt_path_offset(fdt, path);
	if (offs < 0)
		goto no_node;

	ret = fdt_status_okay(fdt, offs);
	if (ret < 0)
		goto enable_failed;

	/* Enable PRU-ICSS Ethernet */
	path = "/pruss_eth";
	offs = fdt_path_offset(fdt, path);
	if (offs < 0)
		goto no_node;

	ret = fdt_status_okay(fdt, offs);
	if (ret < 0)
		goto enable_failed;

	/* Disable CPSW Ethernet */
	path = "/ocp/ethernet@4a100000";
	offs = fdt_path_offset(fdt, path);
	if (offs < 0)
		goto no_node;

	ret = fdt_status_disabled(fdt, offs);
	if (ret < 0)
		goto disable_failed;

	/* Disable CPSW-MDIO */
	path = "/ocp/ethernet@4a100000/mdio@4a101000";
	offs = fdt_path_offset(fdt, path);
	if (offs < 0)
		goto no_node;

	ret = fdt_status_disabled(fdt, offs);
	if (ret < 0)
		goto disable_failed;

	/* Set MUX_MII_CTL1 pin low */
	path = "/ocp/gpio@481ae000/p10";
	offs = fdt_path_offset(fdt, path);
	if (offs < 0) {
		printf("Node %s not found.\n", path);
		return offs;
	}

	ret = fdt_delprop(fdt, offs, "output-high");
	if (ret < 0) {
		printf("Could not delete output-high property from node %s: %s\n",
		       path, fdt_strerror(ret));
		return ret;
	}

	ret = fdt_setprop(fdt, offs, "output-low", NULL, 0);
	if (ret < 0) {
		printf("Could not add output-low property to node %s: %s\n",
		       path, fdt_strerror(ret));
		return ret;
	}

	/* Fixup ethernet aliases */
	path = "/aliases";
	offs = fdt_path_offset(fdt, path);
	if (offs < 0)
		goto no_node;

	ret = fdt_setprop(fdt, offs, "ethernet0", pruss_eth0_alias,
			  strlen(pruss_eth0_alias) + 1);
	if (ret < 0) {
		printf("Could not change ethernet0 alias: %s\n",
		       fdt_strerror(ret));
		return ret;
	}

	ret = fdt_setprop(fdt, offs, "ethernet1", pruss_eth1_alias,
			  strlen(pruss_eth0_alias) + 1);
	if (ret < 0) {
		printf("Could not change ethernet0 alias: %s\n",
		       fdt_strerror(ret));
		return ret;
	}

	return 0;

no_node:
	printf("Node %s not found. Please update DTB.\n", path);

	/* Return 0 as we don't want to prevent booting with older DTBs */
	return 0;

disable_failed:
	printf("Could not disable node %s: %s\n",
	       path, fdt_strerror(ret));
	return ret;

enable_failed:
	printf("Could not enable node %s: %s\n",
	       path, fdt_strerror(ret));
	return ret;
}
#endif

Eric

  • Please post your DDR timings spreadsheet. Did you also do the software leveling procedure as described in the wiki?
  • Hello Biser,

    thank you for your fast reply.

    I didn't do the software leveling, because I missed the JTAG on my custom board.

    Kind regards

    Eric

    5635.AM335x_DDR_register_calc_tool.xls

  • It's absolutely necessary to perform software leveling on each new AM335x PCB layout. I'm quite sure that this is the reason for the boot failure you see.
  • I thought it isn't neccesary because the design is the same and only the DDR changed. Is there any other way to do the software leveling, or a other solution without the JTAG?
    Thanks for your help

  • In this case it might not be absolutely necessary. Let me check your timings and I'll get back.
  • I find two differences:

    tRC should be 48.91ns instead of 47.91ns
    ODTLon should be 3CK instead of 4CK

    Can you try with these changes?
  • Is this issue resolved? If so, please close the thread.
  • Hello Biser,

    please excuse the late answer. The problem is not solved, but I detected some issues:
    I compare the values in ddr_defs.h from Micron MT41K256M16HA-125:E with mine calculated MT41K256M16HA-107 with the spreadsheet, and they are completly the same. Also the calculated values from this site (processors.wiki.ti.com/.../Sitara_Linux_Training:_Tuning_the_DDR3_Timings_on_BeagleBoneBlack) are different, then the original values in ddr_defs.h?!

    I added printf-commands in board.c in the function void sdram_init(void), and they never show after
    U-Boot SPL 2017.01-00360-gc6c77f9-dirty (Dec 01 2017 - 10:25:04)

    What did I forget?

    kind regards
    eric

  • /*
     * board.c
     *
     * Board functions for TI AM335X based boards
     *
     * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
     *
     * SPDX-License-Identifier:	GPL-2.0+
     */
    
    #include <common.h>
    #include <errno.h>
    #include <spl.h>
    #include <serial.h>
    #include <asm/arch/cpu.h>
    #include <asm/arch/hardware.h>
    #include <asm/arch/omap.h>
    #include <asm/arch/ddr_defs.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/clk_synthesizer.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/mmc_host_def.h>
    #include <asm/arch/sys_proto.h>
    #include <asm/arch/mem.h>
    #include <asm/io.h>
    #include <asm/emif.h>
    #include <asm/gpio.h>
    #include <asm/omap_sec_common.h>
    #include <i2c.h>
    #include <miiphy.h>
    #include <cpsw.h>
    #include <power/tps65217.h>
    #include <power/tps65910.h>
    #include <environment.h>
    #include <watchdog.h>
    #include <environment.h>
    #include <libfdt.h>
    #include <fdt_support.h>
    
    #include "../common/board_detect.h"
    #include "board.h"
    
    DECLARE_GLOBAL_DATA_PTR;
    
    /* GPIO that controls power to DDR on EVM-SK */
    #define GPIO_TO_PIN(bank, gpio)		(32 * (bank) + (gpio))
    #define GPIO_DDR_VTT_EN		GPIO_TO_PIN(0, 7)
    #define ICE_GPIO_DDR_VTT_EN	GPIO_TO_PIN(0, 18)
    #define GPIO_PR1_MII_CTRL	GPIO_TO_PIN(3, 4)
    #define GPIO_MUX_MII_CTRL	GPIO_TO_PIN(3, 10)
    #define GPIO_FET_SWITCH_CTRL	GPIO_TO_PIN(0, 7)
    #define GPIO_PHY_RESET		GPIO_TO_PIN(2, 5)
    #define GPIO_ETH0_MODE		GPIO_TO_PIN(0, 11)
    #define GPIO_ETH1_MODE		GPIO_TO_PIN(1, 26)
    
    static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
    
    #define GPIO0_RISINGDETECT	(AM33XX_GPIO0_BASE + OMAP_GPIO_RISINGDETECT)
    #define GPIO1_RISINGDETECT	(AM33XX_GPIO1_BASE + OMAP_GPIO_RISINGDETECT)
    
    #define GPIO0_IRQSTATUS1	(AM33XX_GPIO0_BASE + OMAP_GPIO_IRQSTATUS1)
    #define GPIO1_IRQSTATUS1	(AM33XX_GPIO1_BASE + OMAP_GPIO_IRQSTATUS1)
    
    #define GPIO0_IRQSTATUSRAW	(AM33XX_GPIO0_BASE + 0x024)
    #define GPIO1_IRQSTATUSRAW	(AM33XX_GPIO1_BASE + 0x024)
    
    /*
     * Read header information from EEPROM into global structure.
     */
    #ifdef CONFIG_TI_I2C_BOARD_DETECT
    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");
    }
    #endif
    
    #ifndef CONFIG_DM_SERIAL
    struct serial_device *default_serial_console(void)
    {
    	if (board_is_icev2())
    		return &eserial4_device;
    	else
    		return &eserial1_device;
    }
    #endif
    
    #ifndef CONFIG_SKIP_LOWLEVEL_INIT
    static const struct ddr_data ddr2_data = {
    	.datardsratio0 = MT47H128M16RT25E_RD_DQS,
    	.datafwsratio0 = MT47H128M16RT25E_PHY_FIFO_WE,
    	.datawrsratio0 = MT47H128M16RT25E_PHY_WR_DATA,
    };
    
    static const struct cmd_control ddr2_cmd_ctrl_data = {
    	.cmd0csratio = MT47H128M16RT25E_RATIO,
    
    	.cmd1csratio = MT47H128M16RT25E_RATIO,
    
    	.cmd2csratio = MT47H128M16RT25E_RATIO,
    };
    
    static const struct emif_regs ddr2_emif_reg_data = {
    	.sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
    	.ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
    	.sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
    	.sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
    	.sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
    	.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
    };
    
    static const struct emif_regs ddr2_evm_emif_reg_data = {
    	.sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
    	.ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
    	.sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
    	.sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
    	.sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
    	.ocp_config = EMIF_OCP_CONFIG_AM335X_EVM,
    	.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
    };
    
    static const struct ddr_data ddr3_data = {
    	.datardsratio0 = MT41J128MJT125_RD_DQS,
    	.datawdsratio0 = MT41J128MJT125_WR_DQS,
    	.datafwsratio0 = MT41J128MJT125_PHY_FIFO_WE,
    	.datawrsratio0 = MT41J128MJT125_PHY_WR_DATA,
    };
    
    static const struct ddr_data ddr3_beagleblack_data = {
    	.datardsratio0 = MT41K256M16HA125E_RD_DQS,
    	.datawdsratio0 = MT41K256M16HA125E_WR_DQS,
    	.datafwsratio0 = MT41K256M16HA125E_PHY_FIFO_WE,
    	.datawrsratio0 = MT41K256M16HA125E_PHY_WR_DATA,
    };
    
    static const struct ddr_data ddr3_evm_data = {
    	.datardsratio0 = MT41J512M8RH125_RD_DQS,
    	.datawdsratio0 = MT41J512M8RH125_WR_DQS,
    	.datafwsratio0 = MT41J512M8RH125_PHY_FIFO_WE,
    	.datawrsratio0 = MT41J512M8RH125_PHY_WR_DATA,
    };
    
    static const struct ddr_data ddr3_icev2_data = {
    	.datardsratio0 = MT41J128MJT125_RD_DQS_400MHz,
    	.datawdsratio0 = MT41J128MJT125_WR_DQS_400MHz,
    	.datafwsratio0 = MT41J128MJT125_PHY_FIFO_WE_400MHz,
    	.datawrsratio0 = MT41J128MJT125_PHY_WR_DATA_400MHz,
    };
    
    static const struct cmd_control ddr3_cmd_ctrl_data = {
    	.cmd0csratio = MT41J128MJT125_RATIO,
    	.cmd0iclkout = MT41J128MJT125_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41J128MJT125_RATIO,
    	.cmd1iclkout = MT41J128MJT125_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41J128MJT125_RATIO,
    	.cmd2iclkout = MT41J128MJT125_INVERT_CLKOUT,
    };
    
    static const struct cmd_control ddr3_beagleblack_cmd_ctrl_data = {
    	.cmd0csratio = MT41K256M16HA125E_RATIO,
    	.cmd0iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41K256M16HA125E_RATIO,
    	.cmd1iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41K256M16HA125E_RATIO,
    	.cmd2iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    };
    
    static const struct cmd_control ddr3_evm_cmd_ctrl_data = {
    	.cmd0csratio = MT41J512M8RH125_RATIO,
    	.cmd0iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41J512M8RH125_RATIO,
    	.cmd1iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41J512M8RH125_RATIO,
    	.cmd2iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    };
    
    static const struct cmd_control ddr3_icev2_cmd_ctrl_data = {
    	.cmd0csratio = MT41J128MJT125_RATIO_400MHz,
    	.cmd0iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,
    
    	.cmd1csratio = MT41J128MJT125_RATIO_400MHz,
    	.cmd1iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,
    
    	.cmd2csratio = MT41J128MJT125_RATIO_400MHz,
    	.cmd2iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,
    };
    
    static struct emif_regs ddr3_emif_reg_data = {
    	.sdram_config = MT41J128MJT125_EMIF_SDCFG,
    	.ref_ctrl = MT41J128MJT125_EMIF_SDREF,
    	.sdram_tim1 = MT41J128MJT125_EMIF_TIM1,
    	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
    	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
    	.zq_config = MT41J128MJT125_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
    				PHY_EN_DYN_PWRDN,
    };
    
    static struct emif_regs ddr3_beagleblack_emif_reg_data = {
    	.sdram_config = MT41K256M16HA125E_EMIF_SDCFG,
    	.ref_ctrl = MT41K256M16HA125E_EMIF_SDREF,
    	.sdram_tim1 = MT41K256M16HA125E_EMIF_TIM1,
    	.sdram_tim2 = MT41K256M16HA125E_EMIF_TIM2,
    	.sdram_tim3 = MT41K256M16HA125E_EMIF_TIM3,
    	.ocp_config = EMIF_OCP_CONFIG_BEAGLEBONE_BLACK,
    	.zq_config = MT41K256M16HA125E_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41K256M16HA125E_EMIF_READ_LATENCY,
    };
    
    static struct emif_regs ddr3_evm_emif_reg_data = {
    	.sdram_config = MT41J512M8RH125_EMIF_SDCFG,
    	.ref_ctrl = MT41J512M8RH125_EMIF_SDREF,
    	.sdram_tim1 = MT41J512M8RH125_EMIF_TIM1,
    	.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
    	.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
    	.ocp_config = EMIF_OCP_CONFIG_AM335X_EVM,
    	.zq_config = MT41J512M8RH125_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
    				PHY_EN_DYN_PWRDN,
    };
    
    static struct emif_regs ddr3_icev2_emif_reg_data = {
    	.sdram_config = MT41J128MJT125_EMIF_SDCFG_400MHz,
    	.ref_ctrl = MT41J128MJT125_EMIF_SDREF_400MHz,
    	.sdram_tim1 = MT41J128MJT125_EMIF_TIM1_400MHz,
    	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2_400MHz,
    	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3_400MHz,
    	.zq_config = MT41J128MJT125_ZQ_CFG_400MHz,
    	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY_400MHz |
    				PHY_EN_DYN_PWRDN,
    };
    
    #ifdef CONFIG_SPL_OS_BOOT
    int spl_start_uboot(void)
    {
    	/* break into full u-boot on 'c' */
    	if (serial_tstc() && serial_getc() == 'c')
    		return 1;
    
    #ifdef CONFIG_SPL_ENV_SUPPORT
    	env_init();
    	env_relocate_spec();
    	if (getenv_yesno("boot_os") != 1)
    		return 1;
    #endif
    
    	return 0;
    }
    #endif
    
    const struct dpll_params *get_dpll_ddr_params(void)
    {
    	int ind = get_sys_clk_index();
    
    	if (board_is_evm_sk())
    		return &dpll_ddr3_303MHz[ind];
    	else if (board_is_bone_lt() || board_is_icev2())
    		return &dpll_ddr3_400MHz[ind];
    	else if (board_is_evm_15_or_later())
    		return &dpll_ddr3_303MHz[ind];
    	else
    		return &dpll_ddr2_266MHz[ind];
    }
    
    static u8 bone_not_connected_to_ac_power(void)
    {
    	if (board_is_bone()) {
    		uchar pmic_status_reg;
    		if (tps65217_reg_read(TPS65217_STATUS,
    				      &pmic_status_reg))
    			return 1;
    		if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {
    			puts("No AC power, switching to default OPP\n");
    			return 1;
    		}
    	}
    	return 0;
    }
    
    const struct dpll_params *get_dpll_mpu_params(void)
    {
    	int ind = get_sys_clk_index();
    	int freq = am335x_get_efuse_mpu_max_freq(cdev);
    
    	if (bone_not_connected_to_ac_power())
    		freq = MPUPLL_M_600;
    
    	if (board_is_bone_lt())
    		freq = MPUPLL_M_1000;
    
    	switch (freq) {
    	case MPUPLL_M_1000:
    		return &dpll_mpu_opp[ind][5];
    	case MPUPLL_M_800:
    		return &dpll_mpu_opp[ind][4];
    	case MPUPLL_M_720:
    		return &dpll_mpu_opp[ind][3];
    	case MPUPLL_M_600:
    		return &dpll_mpu_opp[ind][2];
    	case MPUPLL_M_500:
    		return &dpll_mpu_opp100;
    	case MPUPLL_M_300:
    		return &dpll_mpu_opp[ind][0];
    	}
    
    	return &dpll_mpu_opp[ind][0];
    }
    
    static void scale_vcores_bone(int freq)
    {
    	int usb_cur_lim, mpu_vdd;
    
    	/*
    	 * Only perform PMIC configurations if board rev > A1
    	 * on Beaglebone White
    	 */
    	if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
    		return;
    
    	if (i2c_probe(TPS65217_CHIP_PM))
    		return;
    
    	/*
    	 * On Beaglebone White we need to ensure we have AC power
    	 * before increasing the frequency.
    	 */
    	if (bone_not_connected_to_ac_power())
    		freq = MPUPLL_M_600;
    
    	/*
    	 * Override what we have detected since we know if we have
    	 * a Beaglebone Black it supports 1GHz.
    	 */
    	if (board_is_bone_lt())
    		freq = MPUPLL_M_1000;
    
    	switch (freq) {
    	case MPUPLL_M_1000:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
    		break;
    	case MPUPLL_M_800:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    		break;
    	case MPUPLL_M_720:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1200MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    		break;
    	case MPUPLL_M_600:
    	case MPUPLL_M_500:
    	case MPUPLL_M_300:
    	default:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1100MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    		break;
    	}
    
    	if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
    			       TPS65217_POWER_PATH,
    			       usb_cur_lim,
    			       TPS65217_USB_INPUT_CUR_LIMIT_MASK))
    		puts("tps65217_reg_write failure\n");
    
    	/* Set DCDC3 (CORE) voltage to 1.10V */
    	if (tps65217_voltage_update(TPS65217_DEFDCDC3,
    				    TPS65217_DCDC_VOLT_SEL_1100MV)) {
    		puts("tps65217_voltage_update failure\n");
    		return;
    	}
    
    	/* Set DCDC2 (MPU) voltage */
    	if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
    		puts("tps65217_voltage_update failure\n");
    		return;
    	}
    
    	/*
    	 * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
    	 * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
    	 */
    	if (board_is_bone()) {
    		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    				       TPS65217_DEFLS1,
    				       TPS65217_LDO_VOLTAGE_OUT_3_3,
    				       TPS65217_LDO_MASK))
    			puts("tps65217_reg_write failure\n");
    	} else {
    		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    				       TPS65217_DEFLS1,
    				       TPS65217_LDO_VOLTAGE_OUT_1_8,
    				       TPS65217_LDO_MASK))
    			puts("tps65217_reg_write failure\n");
    	}
    
    	if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    			       TPS65217_DEFLS2,
    			       TPS65217_LDO_VOLTAGE_OUT_3_3,
    			       TPS65217_LDO_MASK))
    		puts("tps65217_reg_write failure\n");
    }
    
    void scale_vcores_generic(int freq)
    {
    	int sil_rev, mpu_vdd;
    
    	/*
    	 * The GP EVM, IDK and EVM SK use a TPS65910 PMIC.  For all
    	 * MPU frequencies we support we use a CORE voltage of
    	 * 1.10V.  For MPU voltage we need to switch based on
    	 * the frequency we are running at.
    	 */
    	if (i2c_probe(TPS65910_CTRL_I2C_ADDR))
    		return;
    
    	/*
    	 * Depending on MPU clock and PG we will need a different
    	 * VDD to drive at that speed.
    	 */
    	sil_rev = readl(&cdev->deviceid) >> 28;
    	mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev, freq);
    
    	/* Tell the TPS65910 to use i2c */
    	tps65910_set_i2c_control();
    
    	/* First update MPU voltage. */
    	if (tps65910_voltage_update(MPU, mpu_vdd))
    		return;
    
    	/* Second, update the CORE voltage. */
    	if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_0))
    		return;
    
    }
    
    void gpi2c_init(void)
    {
    	/* When needed to be invoked prior to BSS initialization */
    	static bool first_time = true;
    
    	if (first_time) {
    		enable_i2c0_pin_mux();
    		i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED,
    			 CONFIG_SYS_OMAP24_I2C_SLAVE);
    		first_time = false;
    	}
    }
    
    void scale_vcores(void)
    {
    	int freq;
    
    	gpi2c_init();
    	freq = am335x_get_efuse_mpu_max_freq(cdev);
    
    	if (board_is_beaglebonex())
    		scale_vcores_bone(freq);
    	else
    		scale_vcores_generic(freq);
    }
    
    void set_uart_mux_conf(void)
    {
    #if CONFIG_CONS_INDEX == 1
    	enable_uart0_pin_mux();
    #elif CONFIG_CONS_INDEX == 2
    	enable_uart1_pin_mux();
    #elif CONFIG_CONS_INDEX == 3
    	enable_uart2_pin_mux();
    #elif CONFIG_CONS_INDEX == 4
    	enable_uart3_pin_mux();
    #elif CONFIG_CONS_INDEX == 5
    	enable_uart4_pin_mux();
    #elif CONFIG_CONS_INDEX == 6
    	enable_uart5_pin_mux();
    #endif
    }
    
    void set_mux_conf_regs(void)
    {
    	enable_board_pin_mux();
    }
    
    const struct ctrl_ioregs ioregs_evmsk = {
    	.cm0ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.cm1ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.cm2ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.dt0ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.dt1ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    };
    
    const struct ctrl_ioregs ioregs_bonelt = {
    	.cm0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm2ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    };
    
    const struct ctrl_ioregs ioregs_evm15 = {
    	.cm0ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.cm1ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.cm2ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.dt0ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.dt1ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    };
    
    const struct ctrl_ioregs ioregs = {
    	.cm0ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.cm1ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.cm2ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.dt0ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.dt1ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    };
    
    void sdram_init(void)
    {   printf(sdram_init);
    	if (board_is_evm_sk()) {
    		/*
    		 * EVM SK 1.2A and later use gpio0_7 to enable DDR3.
    		 * This is safe enough to do on older revs.
    		 */
    		gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
    		gpio_direction_output(GPIO_DDR_VTT_EN, 1);
    	}
    
    	if (board_is_icev2()) {
    		gpio_request(ICE_GPIO_DDR_VTT_EN, "ddr_vtt_en");
    		gpio_direction_output(ICE_GPIO_DDR_VTT_EN, 1);
    	}
    
    	if (board_is_evm_sk())
    		config_ddr(303, &ioregs_evmsk, &ddr3_data,
    			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
    	else if (board_is_bone_lt()) {
    		printf("BEAGLEBONE BLACK");
    		config_ddr(400, &ioregs_bonelt,
    			   &ddr3_beagleblack_data,
    			   &ddr3_beagleblack_cmd_ctrl_data,
    			   &ddr3_beagleblack_emif_reg_data, 0);
    	}
    
    	else if (board_is_evm_15_or_later())
    		config_ddr(303, &ioregs_evm15, &ddr3_evm_data,
    			   &ddr3_evm_cmd_ctrl_data, &ddr3_evm_emif_reg_data, 0);
    	else if (board_is_icev2())
    		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())
    		config_ddr(266, &ioregs, &ddr2_data,
    			   &ddr2_cmd_ctrl_data, &ddr2_evm_emif_reg_data, 0);
    	else
    		config_ddr(266, &ioregs, &ddr2_data,
    			   &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data, 0);
    }
    #endif
    
    #if !defined(CONFIG_SPL_BUILD) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    static void request_and_set_gpio(int gpio, char *name, int val)
    {
    	int ret;
    
    	ret = gpio_request(gpio, name);
    	if (ret < 0) {
    		printf("%s: Unable to request %s\n", __func__, name);
    		return;
    	}
    
    	ret = gpio_direction_output(gpio, 0);
    	if (ret < 0) {
    		printf("%s: Unable to set %s  as output\n", __func__, name);
    		goto err_free_gpio;
    	}
    
    	gpio_set_value(gpio, val);
    
    	return;
    
    err_free_gpio:
    	gpio_free(gpio);
    }
    
    #define REQUEST_AND_SET_GPIO(N)	request_and_set_gpio(N, #N, 1);
    #define REQUEST_AND_CLR_GPIO(N)	request_and_set_gpio(N, #N, 0);
    
    /**
     * RMII mode on ICEv2 board needs 50MHz clock. Given the clock
     * synthesizer With a capacitor of 18pF, and 25MHz input clock cycle
     * PLL1 gives an output of 100MHz. So, configuring the div2/3 as 2 to
     * give 50MHz output for Eth0 and 1.
     */
    static struct clk_synth cdce913_data = {
    	.id = 0x81,
    	.capacitor = 0x90,
    	.mux = 0x6d,
    	.pdiv2 = 0x2,
    	.pdiv3 = 0x2,
    };
    #endif
    
    #if !defined(CONFIG_SPL_BUILD) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD)) || \
    	(defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP))
    
    static bool eth0_is_mii;
    static bool eth1_is_mii;
    #endif
    
    /*
     * Basic board specific setup.  Pinmux has been handled already.
     */
    int board_init(void)
    {
    #if defined(CONFIG_HW_WATCHDOG)
    	hw_watchdog_init();
    #endif
    
    	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
    #if defined(CONFIG_NOR) || defined(CONFIG_NAND)
    	gpmc_init();
    #endif
    
    #if !defined(CONFIG_SPL_BUILD) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    	if (board_is_icev2()) {
    		int rv;
    		u32 reg;
    
    		/* factory default configuration */
    		eth0_is_mii = true;
    		eth1_is_mii = true;
    
    		REQUEST_AND_SET_GPIO(GPIO_PR1_MII_CTRL);
    		/* Make J19 status available on GPIO1_26 */
    		REQUEST_AND_CLR_GPIO(GPIO_MUX_MII_CTRL);
    
    		REQUEST_AND_SET_GPIO(GPIO_FET_SWITCH_CTRL);
    		/*
    		 * Both ports can be set as RMII-CPSW or MII-PRU-ETH using
    		 * jumpers near the port. Read the jumper value and set
    		 * the pinmux, external mux and PHY clock accordingly.
    		 * As jumper line is overridden by PHY RX_DV pin immediately
    		 * after bootstrap (power-up/reset), we need to sample
    		 * it during PHY reset using GPIO rising edge detection.
    		 */
    		REQUEST_AND_SET_GPIO(GPIO_PHY_RESET);
    		/* Enable rising edge IRQ on GPIO0_11 and GPIO 1_26 */
    		reg = readl(GPIO0_RISINGDETECT) | BIT(11);
    		writel(reg, GPIO0_RISINGDETECT);
    		reg = readl(GPIO1_RISINGDETECT) | BIT(26);
    		writel(reg, GPIO1_RISINGDETECT);
    		/* Reset PHYs to capture the Jumper setting */
    		gpio_set_value(GPIO_PHY_RESET, 0);
    		udelay(2);	/* PHY datasheet states 1uS min. */
    		gpio_set_value(GPIO_PHY_RESET, 1);
    
    		reg = readl(GPIO0_IRQSTATUSRAW) & BIT(11);
    		if (reg) {
    			writel(reg, GPIO0_IRQSTATUS1); /* clear irq */
    			/* RMII mode */
    			printf("ETH0, CPSW\n");
    			eth0_is_mii = false;
    		} else {
    			/* MII mode */
    			printf("ETH0, PRU\n");
    			cdce913_data.pdiv3 = 4;	/* 25MHz PHY clk */
    		}
    
    		reg = readl(GPIO1_IRQSTATUSRAW) & BIT(26);
    		if (reg) {
    			writel(reg, GPIO1_IRQSTATUS1); /* clear irq */
    			/* RMII mode */
    			printf("ETH1, CPSW\n");
    			gpio_set_value(GPIO_MUX_MII_CTRL, 1);
    			eth1_is_mii = false;
    		} else {
    			/* MII mode */
    			printf("ETH1, PRU\n");
    			cdce913_data.pdiv2 = 4;	/* 25MHz PHY clk */
    		}
    
    		/* disable rising edge IRQs */
    		reg = readl(GPIO0_RISINGDETECT) & ~BIT(11);
    		writel(reg, GPIO0_RISINGDETECT);
    		reg = readl(GPIO1_RISINGDETECT) & ~BIT(26);
    		writel(reg, GPIO1_RISINGDETECT);
    
    		rv = setup_clock_synthesizer(&cdce913_data);
    		if (rv) {
    			printf("Clock synthesizer setup failed %d\n", rv);
    			return rv;
    		}
    
    		/* reset PHYs */
    		gpio_set_value(GPIO_PHY_RESET, 0);
    		udelay(2);	/* PHY datasheet states 1uS min. */
    		gpio_set_value(GPIO_PHY_RESET, 1);
    	}
    #endif
    
    	return 0;
    }
    
    #ifdef CONFIG_BOARD_LATE_INIT
    int board_late_init(void)
    {
    #if !defined(CONFIG_SPL_BUILD)
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    #endif
    
    #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
    	char *name = NULL;
    
    	if (board_is_bbg1())
    		name = "BBG1";
    	set_board_info_env(name);
    
    	/*
    	 * Default FIT boot on HS devices. Non FIT images are not allowed
    	 * on HS devices.
    	 */
    	if (get_device_type() == HS_DEVICE)
    		setenv("boot_fit", "1");
    #endif
    
    #if !defined(CONFIG_SPL_BUILD)
    	/* try reading mac address from efuse */
    	mac_lo = readl(&cdev->macid0l);
    	mac_hi = readl(&cdev->macid0h);
    	mac_addr[0] = mac_hi & 0xFF;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    	mac_addr[4] = mac_lo & 0xFF;
    	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
    
    	if (!getenv("ethaddr")) {
    		printf("<ethaddr> not set. Validating first E-fuse MAC\n");
    
    		if (is_valid_ethaddr(mac_addr))
    			eth_setenv_enetaddr("ethaddr", mac_addr);
    	}
    
    	mac_lo = readl(&cdev->macid1l);
    	mac_hi = readl(&cdev->macid1h);
    	mac_addr[0] = mac_hi & 0xFF;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    	mac_addr[4] = mac_lo & 0xFF;
    	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
    
    	if (!getenv("eth1addr")) {
    		if (is_valid_ethaddr(mac_addr))
    			eth_setenv_enetaddr("eth1addr", mac_addr);
    	}
    #endif
    
    	return 0;
    }
    #endif
    
    #ifndef CONFIG_DM_ETH
    
    #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    static void cpsw_control(int enabled)
    {
    	/* VTP can be added here */
    
    	return;
    }
    
    static struct cpsw_slave_data cpsw_slaves[] = {
    	{
    		.slave_reg_ofs	= 0x208,
    		.sliver_reg_ofs	= 0xd80,
    		.phy_addr	= 0,
    	},
    	{
    		.slave_reg_ofs	= 0x308,
    		.sliver_reg_ofs	= 0xdc0,
    		.phy_addr	= 1,
    	},
    };
    
    static struct cpsw_platform_data cpsw_data = {
    	.mdio_base		= CPSW_MDIO_BASE,
    	.cpsw_base		= CPSW_BASE,
    	.mdio_div		= 0xff,
    	.channels		= 8,
    	.cpdma_reg_ofs		= 0x800,
    	.slaves			= 1,
    	.slave_data		= cpsw_slaves,
    	.ale_reg_ofs		= 0xd00,
    	.ale_entries		= 1024,
    	.host_port_reg_ofs	= 0x108,
    	.hw_stats_reg_ofs	= 0x900,
    	.bd_ram_ofs		= 0x2000,
    	.mac_control		= (1 << 5),
    	.control		= cpsw_control,
    	.host_port_num		= 0,
    	.version		= CPSW_CTRL_VERSION_2,
    };
    #endif
    
    #if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) &&\
    	defined(CONFIG_SPL_BUILD)) || \
    	((defined(CONFIG_DRIVER_TI_CPSW) || \
    	  defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
    	 !defined(CONFIG_SPL_BUILD))
    
    /*
     * This function will:
     * Read the eFuse for MAC addresses, and set ethaddr/eth1addr/usbnet_devaddr
     * in the environment
     * Perform fixups to the PHY present on certain boards.  We only need this
     * function in:
     * - SPL with either CPSW or USB ethernet support
     * - Full U-Boot, with either CPSW or USB ethernet
     * Build in only these cases to avoid warnings about unused variables
     * when we build an SPL that has neither option but full U-Boot will.
     */
    int board_eth_init(bd_t *bis)
    {
    	int rv, n = 0;
    #if defined(CONFIG_USB_ETHER) && \
    	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    
    	/*
    	 * use efuse mac address for USB ethernet as we know that
    	 * both CPSW and USB ethernet will never be active at the same time
    	 */
    	mac_lo = readl(&cdev->macid0l);
    	mac_hi = readl(&cdev->macid0h);
    	mac_addr[0] = mac_hi & 0xFF;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    	mac_addr[4] = mac_lo & 0xFF;
    	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
    #endif
    
    
    #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    	if (!getenv("ethaddr")) {
    		puts("<ethaddr> not set. Validating first E-fuse MAC\n");
    		if (is_valid_ethaddr(mac_addr))
    			eth_setenv_enetaddr("ethaddr", mac_addr);
    	}
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    	if (board_is_bone() || board_is_bone_lt() ||
    	    board_is_idk()) {
    		writel(MII_MODE_ENABLE, &cdev->miisel);
    		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    				PHY_INTERFACE_MODE_MII;
    	} else if (board_is_icev2()) {
    		writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel);
    		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII;
    		cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RMII;
    		cpsw_slaves[0].phy_addr = 1;
    		cpsw_slaves[1].phy_addr = 3;
    	} else {
    		writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel);
    		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    				PHY_INTERFACE_MODE_RGMII;
    	}
    
    	rv = cpsw_register(&cpsw_data);
    	if (rv < 0)
    		printf("Error %d registering CPSW switch\n", rv);
    	else
    		n += rv;
    #endif
    
    	/*
    	 *
    	 * CPSW RGMII Internal Delay Mode is not supported in all PVT
    	 * operating points.  So we must set the TX clock delay feature
    	 * in the AR8051 PHY.  Since we only support a single ethernet
    	 * device in U-Boot, we only do this for the first instance.
    	 */
    #define AR8051_PHY_DEBUG_ADDR_REG	0x1d
    #define AR8051_PHY_DEBUG_DATA_REG	0x1e
    #define AR8051_DEBUG_RGMII_CLK_DLY_REG	0x5
    #define AR8051_RGMII_TX_CLK_DLY		0x100
    
    	if (board_is_evm_sk() || board_is_gp_evm()) {
    		const char *devname;
    		devname = miiphy_get_current_dev();
    
    		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_ADDR_REG,
    				AR8051_DEBUG_RGMII_CLK_DLY_REG);
    		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_DATA_REG,
    				AR8051_RGMII_TX_CLK_DLY);
    	}
    #endif
    #if defined(CONFIG_USB_ETHER) && \
    	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
    	if (is_valid_ethaddr(mac_addr))
    		eth_setenv_enetaddr("usbnet_devaddr", mac_addr);
    
    	rv = usb_eth_initialize(bis);
    	if (rv < 0)
    		printf("Error %d registering USB_ETHER\n", rv);
    	else
    		n += rv;
    #endif
    	return n;
    }
    #endif
    
    #endif /* CONFIG_DM_ETH */
    
    #ifdef CONFIG_SPL_LOAD_FIT
    int board_fit_config_name_match(const char *name)
    {
    	if (board_is_gp_evm() && !strcmp(name, "am335x-evm"))
    		return 0;
    	else if (board_is_bone() && !strcmp(name, "am335x-bone"))
    		return 0;
    	else if (board_is_bone_lt() && !strcmp(name, "am335x-boneblack"))
    		return 0;
    	else if (board_is_evm_sk() && !strcmp(name, "am335x-evmsk"))
    		return 0;
    	else if (board_is_bbg1() && !strcmp(name, "am335x-bonegreen"))
    		return 0;
    	else if (board_is_icev2() && !strcmp(name, "am335x-icev2"))
    		return 0;
    	else
    		return -1;
    }
    #endif
    
    #ifdef CONFIG_TI_SECURE_DEVICE
    void board_fit_image_post_process(void **p_image, size_t *p_size)
    {
    	secure_boot_verify_image(p_image, p_size);
    }
    #endif
    
    #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
    
    static const char pruss_eth0_alias[] = "/pruss_eth/ethernet-mii0";
    static const char pruss_eth1_alias[] = "/pruss_eth/ethernet-mii1";
    
    int ft_board_setup(void *fdt, bd_t *bd)
    {
    	const char *path;
    	int offs;
    	int ret;
    
    	if (!board_is_icev2())
    		return 0;
    
    	/* Board DT default is both ports are RMII */
    	if (!eth0_is_mii && !eth1_is_mii)
    		return 0;
    
    	if (eth0_is_mii != eth1_is_mii) {
    		printf("Unsupported Ethernet port configuration\n");
    		printf("Both ports must be set as RMII or MII\n");
    		return 0;
    	}
    
    	printf("Fixing up ETH0 & ETH1 to PRUSS Ethernet\n");
    	/* Enable PRUSS-MDIO */
    	path = "/ocp/pruss_soc_bus@4a326000/pruss@4a300000/mdio@4a332400";
    	offs = fdt_path_offset(fdt, path);
    	if (offs < 0)
    		goto no_node;
    
    	ret = fdt_status_okay(fdt, offs);
    	if (ret < 0)
    		goto enable_failed;
    
    	/* Enable PRU-ICSS Ethernet */
    	path = "/pruss_eth";
    	offs = fdt_path_offset(fdt, path);
    	if (offs < 0)
    		goto no_node;
    
    	ret = fdt_status_okay(fdt, offs);
    	if (ret < 0)
    		goto enable_failed;
    
    	/* Disable CPSW Ethernet */
    	path = "/ocp/ethernet@4a100000";
    	offs = fdt_path_offset(fdt, path);
    	if (offs < 0)
    		goto no_node;
    
    	ret = fdt_status_disabled(fdt, offs);
    	if (ret < 0)
    		goto disable_failed;
    
    	/* Disable CPSW-MDIO */
    	path = "/ocp/ethernet@4a100000/mdio@4a101000";
    	offs = fdt_path_offset(fdt, path);
    	if (offs < 0)
    		goto no_node;
    
    	ret = fdt_status_disabled(fdt, offs);
    	if (ret < 0)
    		goto disable_failed;
    
    	/* Set MUX_MII_CTL1 pin low */
    	path = "/ocp/gpio@481ae000/p10";
    	offs = fdt_path_offset(fdt, path);
    	if (offs < 0) {
    		printf("Node %s not found.\n", path);
    		return offs;
    	}
    
    	ret = fdt_delprop(fdt, offs, "output-high");
    	if (ret < 0) {
    		printf("Could not delete output-high property from node %s: %s\n",
    		       path, fdt_strerror(ret));
    		return ret;
    	}
    
    	ret = fdt_setprop(fdt, offs, "output-low", NULL, 0);
    	if (ret < 0) {
    		printf("Could not add output-low property to node %s: %s\n",
    		       path, fdt_strerror(ret));
    		return ret;
    	}
    
    	/* Fixup ethernet aliases */
    	path = "/aliases";
    	offs = fdt_path_offset(fdt, path);
    	if (offs < 0)
    		goto no_node;
    
    	ret = fdt_setprop(fdt, offs, "ethernet0", pruss_eth0_alias,
    			  strlen(pruss_eth0_alias) + 1);
    	if (ret < 0) {
    		printf("Could not change ethernet0 alias: %s\n",
    		       fdt_strerror(ret));
    		return ret;
    	}
    
    	ret = fdt_setprop(fdt, offs, "ethernet1", pruss_eth1_alias,
    			  strlen(pruss_eth0_alias) + 1);
    	if (ret < 0) {
    		printf("Could not change ethernet0 alias: %s\n",
    		       fdt_strerror(ret));
    		return ret;
    	}
    
    	return 0;
    
    no_node:
    	printf("Node %s not found. Please update DTB.\n", path);
    
    	/* Return 0 as we don't want to prevent booting with older DTBs */
    	return 0;
    
    disable_failed:
    	printf("Could not disable node %s: %s\n",
    	       path, fdt_strerror(ret));
    	return ret;
    
    enable_failed:
    	printf("Could not enable node %s: %s\n",
    	       path, fdt_strerror(ret));
    	return ret;
    }
    #endif
    
    Could somebody please give an advice, why I cant see the printf-commands from my board.c-file (line 526; line 545)  in the terminal?

    I think it should appear after the uboot version?

    Thank you very much

    kind regards

    eric

  • Put the sdram_init within double quotes.
    printf("sdram_init");
  • Hello Kemal,

    I changed the commands, but is nothing visible.

    I put my complete steps in this file:

    eric@eric-VirtualBox:~$ cd /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/board-support/u-boot-2017.01+gitAUTOINC+590c7d7fe1-g590c7d7fe1/
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/board-support/u-boot-2017.01+gitAUTOINC+590c7d7fe1-g590c7d7fe1$ sudo make clean  CLEAN   dts/../arch/arm/dts
      CLEAN   dts
      CLEAN   examples/standalone
      CLEAN   tools
      CLEAN   tools/lib tools/common
      CLEAN   spl/arch spl/board spl/cmd spl/common spl/disk spl/drivers spl/dts spl/fs spl/lib spl/u-boot.cfg spl/u-boot-spl spl/u-boot-spl.bin spl/u-boot-spl.lds spl/u-boot-spl.map spl/u-boot-spl-nodtb.bin
      CLEAN   u-boot u-boot.bin u-boot.cfg u-boot.cfg.configs u-boot.dtb u-boot-dtb.bin u-boot-dtb.img u-boot.img u-boot.lds u-boot.map u-boot-nodtb.bin u-boot.srec u-boot.sym MLO MLO.byteswap System.map
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/board-support/u-boot-2017.01+gitAUTOINC+590c7d7fe1-g590c7d7fe1$ sudo make am335x_evm_config
      HOSTCC  scripts/basic/fixdep
      HOSTCC  scripts/kconfig/conf.o
      HOSTCC  scripts/kconfig/zconf.tab.o
      HOSTLD  scripts/kconfig/conf
    #
    # configuration written to .config
    #
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/board-support/u-boot-2017.01+gitAUTOINC+590c7d7fe1-g590c7d7fe1$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
      HOSTCC  scripts/kconfig/mconf.o
      HOSTCC  scripts/kconfig/lxdialog/checklist.o
      HOSTCC  scripts/kconfig/lxdialog/util.o
      HOSTCC  scripts/kconfig/lxdialog/inputbox.o
      HOSTCC  scripts/kconfig/lxdialog/textbox.o
      HOSTCC  scripts/kconfig/lxdialog/yesno.o
      HOSTCC  scripts/kconfig/lxdialog/menubox.o
      HOSTLD  scripts/kconfig/mconf
    scripts/kconfig/mconf  Kconfig
    
    
    *** End of the configuration.
    *** Execute 'make' to start the build or try 'make help'.
    
    
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/board-support/u-boot-2017.01+gitAUTOINC+590c7d7fe1-g590c7d7fe1$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2
    
    ...
    ...
    ...
    
      CC      cmd/mii.o
      CC      common/miiphyutil.o
      CC      cmd/mdio.o
      CC      common/usb.o
      CC      cmd/misc.o
      CC      cmd/mmc.o
      CC      common/usb_hub.o
      CC      cmd/mtdparts.o
      CC      common/usb_storage.o
      CC      common/flash.o
      CC      common/splash.o
      CC      cmd/nand.o
      CC      common/menu.o
      CC      common/env_common.o
      CC      cmd/net.o
      CC      cmd/part.o
      CC      common/console.o
      CC      cmd/pcmcia.o
      CC      common/dlmalloc.o
      CC      cmd/pxe.o
      CC      common/malloc_simple.o
      CC      common/image.o
      CC      cmd/sf.o
      CC      cmd/spi.o
      CC      cmd/time.o
      CC      common/image-fdt.o
      CC      cmd/test.o
      CC      cmd/usb.o
      CC      common/image-fit.o
      CC      cmd/disk.o
      CC      cmd/ximg.o
      CC      common/memsize.o
      CC      cmd/dfu.o
      CC      common/stdio.o
      CC      cmd/gpt.o
      CC      common/cli_simple.o
      CC      cmd/nvedit.o
      CC      common/cli.o
      CC      common/cli_readline.o
      LD      cmd/built-in.o
      CC      disk/part.o
      CC      common/dfu.o
      CC      common/command.o
      CC      disk/part_dos.o
      CC      common/s_record.o
      CC      disk/part_iso.o
      CC      common/xyzModem.o
      CC      disk/part_efi.o
      LD      common/built-in.o
      LD      drivers/adc/built-in.o
      CC      drivers/block/blk_legacy.o
      LD      disk/built-in.o
      LD      drivers/dma/built-in.o
      LD      drivers/block/built-in.o
      CC      drivers/gpio/gpio-uclass.o
      CC      drivers/bootcount/bootcount.o
      CC      drivers/bootcount/bootcount_davinci.o
      LD      drivers/bootcount/built-in.o
      CC      drivers/core/device.o
      CC      drivers/gpio/omap_gpio.o
      LD      drivers/gpio/built-in.o
      CC      drivers/i2c/i2c-uclass.o
      CC      drivers/core/lists.o
      CC      drivers/i2c/i2c-uclass-compat.o
      CC      drivers/core/root.o
      CC      drivers/i2c/omap24xx_i2c.o
      CC      drivers/core/uclass.o
      LD      drivers/i2c/built-in.o
      CC      drivers/mmc/mmc-uclass.o
      CC      drivers/core/util.o
      CC      drivers/mmc/mmc_legacy.o
      CC      drivers/core/device-remove.o
      CC      drivers/mmc/mmc.o
      CC      drivers/core/simple-bus.o
      CC      drivers/core/dump.o
      LD      drivers/core/built-in.o
      CC      drivers/crypto/fsl/sec.o
      LD      drivers/crypto/fsl/built-in.o
      CC      drivers/crypto/rsa_mod_exp/mod_exp_uclass.o
      CC      drivers/crypto/rsa_mod_exp/mod_exp_sw.o
      LD      drivers/crypto/rsa_mod_exp/built-in.o
      LD      drivers/crypto/built-in.o
      CC      drivers/dfu/dfu.o
      CC      drivers/mmc/omap_hsmmc.o
      CC      drivers/dfu/dfu_mmc.o
      CC      drivers/mmc/mmc_write.o
      CC      drivers/dfu/dfu_nand.o
      LD      drivers/mmc/built-in.o
      CC      drivers/mtd/mtdcore.o
      CC      drivers/dfu/dfu_ram.o
      LD      drivers/dfu/built-in.o
      LD      drivers/hwmon/built-in.o
      CC      drivers/input/input.o
      CC      drivers/mtd/mtd_uboot.o
      LD      drivers/mtd/built-in.o
      CC      drivers/mtd/nand/nand.o
      CC      drivers/mtd/nand/nand_bbt.o
      CC      drivers/input/key_matrix.o
      LD      drivers/input/built-in.o
      LD      drivers/mailbox/built-in.o
      LD      drivers/memory/built-in.o
      CC      drivers/misc/misc-uclass.o
      LD      drivers/misc/built-in.o
      CC      drivers/pcmcia/tqm8xx_pcmcia.o
      CC      drivers/mtd/nand/nand_ids.o
      LD      drivers/pcmcia/built-in.o
      LD      drivers/phy/marvell/built-in.o
      LD      drivers/pwm/built-in.o
      CC      drivers/mtd/nand/nand_util.o
      LD      drivers/reset/built-in.o
      CC      drivers/rtc/date.o
      LD      drivers/rtc/built-in.o
      LD      drivers/soc/built-in.o
      LD      drivers/sound/built-in.o
      LD      drivers/spmi/built-in.o
      LD      drivers/sysreset/built-in.o
      LD      drivers/thermal/built-in.o
      CC      drivers/timer/timer-uclass.o
      CC      drivers/mtd/nand/nand_ecc.o
      CC      drivers/timer/omap-timer.o
      CC      drivers/mtd/nand/nand_base.o
      LD      drivers/timer/built-in.o
      LD      drivers/tpm/built-in.o
      LD      drivers/twserial/built-in.o
      LD      drivers/video/bridge/built-in.o
      LD      drivers/video/built-in.o
      CC      drivers/watchdog/omap_wdt.o
      LD      drivers/watchdog/built-in.o
      LD      drivers/built-in.o
      LD      drivers/mtd/onenand/built-in.o
      CC      drivers/mtd/spi/sf_probe.o
      CC      drivers/mtd/spi/spi_flash.o
      CC      drivers/mtd/spi/spi_flash_ids.o
      CC      drivers/mtd/spi/sf.o
      LD      drivers/mtd/spi/built-in.o
      CC      drivers/net/cpsw.o
      CC      drivers/net/cpsw-common.o
      LD      drivers/net/built-in.o
      CC      drivers/net/phy/phy.o
      CC      drivers/mtd/nand/nand_timings.o
      CC      drivers/mtd/nand/nand-uclass.o
      CC      drivers/mtd/nand/omap_gpmc.o
      CC      drivers/net/phy/atheros.o
      CC      drivers/mtd/nand/omap_elm.o
      CC      drivers/net/phy/smsc.o
      LD      drivers/mtd/nand/built-in.o
      LD      drivers/pci/built-in.o
      LD      drivers/power/built-in.o
      LD      drivers/power/battery/built-in.o
      LD      drivers/power/domain/built-in.o
      LD      drivers/power/fuel_gauge/built-in.o
      LD      drivers/power/mfd/built-in.o
      CC      drivers/power/pmic/pmic_tps65217.o
      CC      drivers/power/pmic/pmic_tps65910.o
      LD      drivers/net/phy/built-in.o
      LD      drivers/power/pmic/built-in.o
      LD      drivers/power/regulator/built-in.o
      LD      drivers/rapidio/built-in.o
      CC      drivers/spi/spi.o
      CC      drivers/serial/serial-uclass.o
      CC      drivers/spi/omap3_spi.o
      CC      drivers/serial/ns16550.o
      LD      drivers/serial/built-in.o
      CC      drivers/usb/common/common.o
      LD      drivers/spi/built-in.o
      LD      drivers/usb/dwc3/built-in.o
      LD      drivers/usb/common/built-in.o
      LD      drivers/usb/emul/built-in.o
      LD      drivers/usb/eth/built-in.o
      LD      drivers/usb/gadget/udc/built-in.o
      CC      drivers/usb/host/usb-uclass.o
      CC      drivers/usb/gadget/epautoconf.o
      CC      drivers/usb/gadget/config.o
      CC      drivers/usb/gadget/usbstring.o
      LD      drivers/usb/host/built-in.o
      CC      drivers/usb/gadget/g_dnl.o
      CC      drivers/usb/musb-new/musb_gadget.o
      CC      drivers/usb/gadget/f_dfu.o
      CC      drivers/usb/musb-new/musb_gadget_ep0.o
      CC      drivers/usb/gadget/ether.o
      CC      drivers/usb/musb-new/musb_core.o
      CC      drivers/usb/gadget/rndis.o
      CC      drivers/usb/musb-new/musb_uboot.o
      LD      drivers/usb/gadget/built-in.o
      LD      drivers/usb/musb/built-in.o
      LD      drivers/usb/phy/built-in.o
      LD      drivers/usb/ulpi/built-in.o
      CC      drivers/usb/musb-new/musb_host.o
      CC      fs/fs.o
      CC      fs/ext4/ext4fs.o
      CC      fs/ext4/ext4_common.o
      CC      drivers/usb/musb-new/musb_dsps.o
      CC      drivers/usb/musb-new/ti-musb.o
      LD      drivers/usb/musb-new/built-in.o
      CC      lib/efi_loader/efi_image_loader.o
      CC      lib/efi_loader/efi_boottime.o
      CC      fs/ext4/dev.o
      CC      fs/ext4/ext4_write.o
      CC      lib/efi_loader/efi_runtime.o
      CC      lib/efi_loader/efi_console.o
      CC      fs/ext4/ext4_journal.o
      CC      lib/efi_loader/efi_memory.o
      CC      fs/ext4/crc16.o
      LD      fs/ext4/built-in.o
      CC      lib/efi_loader/efi_disk.o
      CC      fs/fat/fat_write.o
      CC      lib/efi_loader/efi_net.o
      CC      lib/efi_loader/efi_smbios.o
      CC      lib/efi_loader/helloworld.o
      LD      lib/efi_loader/built-in.o
      LD      lib/efi_loader/helloworld.so
      OBJCOPY lib/efi_loader/helloworld.efi
      CC      lib/libfdt/fdt.o
      CC      lib/libfdt/fdt_ro.o
      CC      fs/fat/file.o
      CC      lib/libfdt/fdt_rw.o
      LD      fs/fat/built-in.o
      LD      fs/built-in.o
      CC      net/checksum.o
      CC      net/arp.o
      CC      lib/libfdt/fdt_strerror.o
      CC      lib/libfdt/fdt_sw.o
      CC      net/bootp.o
      CC      lib/libfdt/fdt_wip.o
      CC      lib/libfdt/fdt_empty_tree.o
      CC      net/eth_legacy.o
      CC      lib/libfdt/fdt_addresses.o
      CC      lib/libfdt/fdt_region.o
      CC      net/eth_common.o
      LD      lib/libfdt/built-in.o
      CC      lib/lzo/lzo1x_decompress.o
      CC      net/net.o
      LD      lib/lzo/built-in.o
      CC      lib/rsa/rsa-mod-exp.o
      CC      net/nfs.o
      LD      lib/rsa/built-in.o
      CC      lib/zlib/zlib.o
      CC      net/ping.o
      CC      net/tftp.o
      LD      net/built-in.o
      LD      test/built-in.o
      CC      test/dm/cmd_dm.o
      LD      test/dm/built-in.o
      CC      lib/crc7.o
      LD      lib/zlib/built-in.o
      CC      lib/crc8.o
      CC      lib/crc16.o
      CC      lib/fdtdec_common.o
      CC      lib/gunzip.o
      CC      lib/smbios.o
      CC      lib/initcall.o
      CC      lib/lmb.o
      CC      lib/ldiv.o
      CC      lib/md5.o
      CC      lib/net_utils.o
      CC      lib/qsort.o
      CC      lib/rc4.o
      CC      lib/list_sort.o
      CC      lib/sha1.o
      CC      lib/sha256.o
      CC      lib/fdtdec.o
      CC      lib/hashtable.o
      CC      lib/errno.o
      CC      lib/display_options.o
      CC      lib/crc32.o
      CC      lib/ctype.o
      CC      lib/div64.o
      CC      lib/hang.o
      CC      lib/linux_string.o
      CC      lib/linux_compat.o
      CC      lib/membuff.o
      CC      lib/slre.o
      CC      lib/string.o
      CC      lib/tables_csum.o
      CC      lib/time.o
      CC      lib/uuid.o
      CC      lib/vsprintf.o
      CC      lib/panic.o
      CC      lib/strto.o
      CC      lib/strmhz.o
      LD      lib/built-in.o
      CC      examples/standalone/stubs.o
      CC      examples/standalone/hello_world.o
      LD      examples/standalone/libstubs.o
      LD      examples/standalone/hello_world
      OBJCOPY examples/standalone/hello_world.srec
      OBJCOPY examples/standalone/hello_world.bin
      LD      u-boot
      OBJCOPY u-boot-nodtb.bin
      OBJCOPY u-boot.srec
      DTC     arch/arm/dts/am335x-boneblack.dtb
      SYM     u-boot.sym
      DTC     arch/arm/dts/am335x-bone.dtb
      DTC     arch/arm/dts/am335x-draco.dtb
      DTC     arch/arm/dts/am335x-evm.dtb
      DTC     arch/arm/dts/am335x-evmsk.dtb
      DTC     arch/arm/dts/am335x-bonegreen.dtb
      DTC     arch/arm/dts/am335x-icev2.dtb
      DTC     arch/arm/dts/am335x-pxm50.dtb
      DTC     arch/arm/dts/am335x-rut.dtb
      SHIPPED dts/dt.dtb
      MKIMAGE u-boot.img
      CAT     u-boot-dtb.bin
      COPY    u-boot.dtb
      MKIMAGE u-boot-dtb.img
      COPY    u-boot.bin
      CC      spl/arch/arm/cpu/armv7/cache_v7.o
      CC      spl/arch/arm/mach-omap2/am33xx/clock_am33xx.o
      AS      spl/arch/arm/cpu/armv7/cache_v7_asm.o
      CC      spl/arch/arm/mach-omap2/am33xx/clock.o
      CC      spl/arch/arm/cpu/armv7/cpu.o
      CC      spl/arch/arm/cpu/armv7/cp15.o
      CC      spl/arch/arm/mach-omap2/am33xx/sys_info.o
      CC      spl/arch/arm/mach-omap2/am33xx/ddr.o
      CC      spl/arch/arm/cpu/armv7/syslib.o
      AS      spl/arch/arm/cpu/armv7/lowlevel_init.o
      AS      spl/arch/arm/cpu/armv7/start.o
      CC      spl/arch/arm/mach-omap2/am33xx/emif4.o
      LD      spl/arch/arm/cpu/armv7/built-in.o
      CC      spl/arch/arm/mach-omap2/reset.o
      CC      spl/arch/arm/mach-omap2/timer.o
      CC      spl/arch/arm/mach-omap2/utils.o
      CC      spl/arch/arm/mach-omap2/am33xx/board.o
      CC      spl/arch/arm/mach-omap2/omap-cache.o
      CC      spl/arch/arm/mach-omap2/am33xx/mux.o
      CC      spl/arch/arm/mach-omap2/am33xx/fdt.o
      CC      spl/arch/arm/mach-omap2/am33xx/clk_synthesizer.o
      LD      spl/arch/arm/cpu/built-in.o
      AS      spl/arch/arm/lib/vectors.o
      AS      spl/arch/arm/lib/crt0.o
      CC      spl/arch/arm/lib/spl.o
      LD      spl/arch/arm/mach-omap2/am33xx/built-in.o
      CC      spl/arch/arm/mach-omap2/boot-common.o
      CC      spl/arch/arm/lib/zimage.o
      AS      spl/arch/arm/mach-omap2/lowlevel_init.o
      CC      spl/arch/arm/mach-omap2/mem-common.o
      CC      spl/arch/arm/lib/bootm-fdt.o
      CC      spl/arch/arm/mach-omap2/fdt-common.o
      CC      spl/arch/arm/lib/sections.o
      LD      spl/arch/arm/mach-omap2/built-in.o
      CC      spl/arch/arm/lib/stack.o
      CC      spl/board/ti/am335x/mux.o
      CC      spl/arch/arm/lib/interrupts.o
      CC      spl/board/ti/am335x/board.o
      CC      spl/arch/arm/lib/reset.o
      CC      spl/arch/arm/lib/cache.o
      LD      spl/board/ti/am335x/built-in.o
      CC      spl/arch/arm/lib/cache-cp15.o
      CC      spl/board/ti/common/board_detect.o
      CC      spl/arch/arm/lib/psci-dt.o
      AS      spl/arch/arm/lib/ashldi3.o
      AS      spl/arch/arm/lib/ashrdi3.o
      CC      spl/arch/arm/lib/div0.o
      LD      spl/board/ti/common/built-in.o
      AS      spl/arch/arm/lib/div64.o
      CC      spl/common/spl/spl.o
      AS      spl/arch/arm/lib/lib1funcs.o
      AS      spl/arch/arm/lib/lshrdi3.o
      AS      spl/arch/arm/lib/muldi3.o
      AS      spl/arch/arm/lib/uldivmod.o
      CC      spl/arch/arm/lib/eabi_compat.o
      CC      spl/common/spl/spl_fit.o
      AS      spl/arch/arm/lib/crt0_arm_efi.o
      CC      spl/arch/arm/lib/reloc_arm_efi.o
      CC      spl/common/spl/spl_ymodem.o
      LD      spl/arch/arm/lib/built-in.o
      AR      spl/arch/arm/lib/lib.a
      CC      spl/common/init/board_init.o
      CC      spl/common/spl/spl_nand.o
      LD      spl/common/init/built-in.o
      CC      spl/common/xyzModem.o
      CC      spl/common/spl/spl_mmc.o
      CC      spl/common/common_fit.o
      CC      spl/common/fdt_support.o
      CC      spl/common/spl/spl_fat.o
      CC      spl/common/spl/spl_ext.o
      LD      spl/common/spl/built-in.o
      CC      spl/cmd/nvedit.o
      CC      spl/common/env_attr.o
      CC      spl/common/env_flags.o
      LD      spl/cmd/built-in.o
      CC      spl/lib/libfdt/fdt.o
      CC      spl/common/env_callback.o
      CC      spl/common/env_fat.o
      CC      spl/lib/libfdt/fdt_ro.o
      CC      spl/common/env_common.o
      CC      spl/common/console.o
      CC      spl/lib/libfdt/fdt_rw.o
      CC      spl/common/dlmalloc.o
      CC      spl/lib/libfdt/fdt_strerror.o
      CC      spl/lib/libfdt/fdt_sw.o
      CC      spl/common/malloc_simple.o
      CC      spl/common/image.o
      CC      spl/lib/libfdt/fdt_wip.o
      CC      spl/common/image-fdt.o
      CC      spl/lib/libfdt/fdt_empty_tree.o
      CC      spl/lib/libfdt/fdt_addresses.o
      CC      spl/common/memsize.o
      CC      spl/lib/libfdt/fdt_region.o
      CC      spl/common/stdio.o
      CC      spl/common/cli_simple.o
      LD      spl/lib/libfdt/built-in.o
      CC      spl/lib/crc16.o
      CC      spl/lib/hashtable.o
      CC      spl/common/cli.o
      CC      spl/common/cli_readline.o
      CC      spl/lib/errno.o
      CC      spl/lib/display_options.o
      CC      spl/common/dfu.o
      CC      spl/lib/crc32.o
      CC      spl/common/command.o
      CC      spl/lib/ctype.o
      CC      spl/lib/div64.o
      CC      spl/lib/hang.o
      CC      spl/lib/linux_compat.o
      CC      spl/lib/linux_string.o
      CC      spl/lib/membuff.o
      CC      spl/common/s_record.o
      LD      spl/common/built-in.o
      CC      spl/disk/part.o
      CC      spl/lib/slre.o
      CC      spl/disk/part_dos.o
      CC      spl/disk/part_iso.o
      LD      spl/disk/built-in.o
      CC      spl/drivers/block/blk_legacy.o
      CC      spl/lib/string.o
      LD      spl/drivers/block/built-in.o
      CC      spl/drivers/gpio/omap_gpio.o
      LD      spl/drivers/gpio/built-in.o
      CC      spl/drivers/i2c/i2c-uclass.o
      CC      spl/lib/tables_csum.o
      CC      spl/drivers/i2c/i2c_core.o
      CC      spl/lib/time.o
      CC      spl/drivers/i2c/omap24xx_i2c.o
      CC      spl/lib/uuid.o
      CC      spl/lib/tiny-printf.o
      LD      spl/drivers/i2c/built-in.o
      CC      spl/drivers/mmc/mmc-uclass.o
      CC      spl/lib/panic.o
      CC      spl/drivers/mmc/mmc_legacy.o
      CC      spl/lib/strto.o
      CC      spl/drivers/mmc/mmc.o
      LD      spl/lib/built-in.o
      LD      spl/drivers/usb/dwc3/built-in.o
      LD      spl/dts/built-in.o
      CC      spl/fs/ext4/ext4fs.o
      CC      spl/fs/ext4/ext4_common.o
      CC      spl/drivers/mmc/omap_hsmmc.o
      LD      spl/drivers/mmc/built-in.o
      CC      spl/drivers/mtd/mtdcore.o
      CC      spl/fs/ext4/dev.o
      CC      spl/drivers/mtd/mtd_uboot.o
      CC      spl/fs/ext4/ext4_write.o
      LD      spl/drivers/mtd/built-in.o
      CC      spl/drivers/mtd/nand/am335x_spl_bch.o
      CC      spl/drivers/mtd/nand/nand_ecc.o
      CC      spl/drivers/mtd/nand/nand_base.o
      CC      spl/fs/ext4/ext4_journal.o
      CC      spl/fs/ext4/crc16.o
      LD      spl/fs/ext4/built-in.o
      CC      spl/fs/fat/fat_write.o
      CC      spl/drivers/mtd/nand/nand-uclass.o
      CC      spl/drivers/mtd/nand/omap_gpmc.o
      CC      spl/drivers/mtd/nand/omap_elm.o
      LD      spl/drivers/mtd/nand/built-in.o
      CC      spl/drivers/net/cpsw.o
      LD      spl/fs/fat/built-in.o
      LD      spl/fs/built-in.o
      LDS     spl/u-boot-spl.lds
      CC      spl/drivers/net/cpsw-common.o
      CC      spl/drivers/net/phy/phy.o
      LD      spl/drivers/net/built-in.o
      LD      spl/drivers/power/built-in.o
      CC      spl/drivers/net/phy/atheros.o
      CC      spl/drivers/net/phy/smsc.o
      CC      spl/drivers/power/pmic/pmic_tps65217.o
      LD      spl/drivers/net/phy/built-in.o
      LD      spl/drivers/power/regulator/built-in.o
      CC      spl/drivers/power/pmic/pmic_tps65910.o
      CC      spl/drivers/serial/serial.o
      LD      spl/drivers/power/pmic/built-in.o
      CC      spl/drivers/usb/gadget/epautoconf.o
      CC      spl/drivers/serial/serial_ns16550.o
      CC      spl/drivers/usb/gadget/config.o
      CC      spl/drivers/serial/ns16550.o
      CC      spl/drivers/usb/gadget/usbstring.o
      LD      spl/drivers/serial/built-in.o
      LD      spl/drivers/usb/gadget/udc/built-in.o
      CC      spl/drivers/usb/gadget/g_dnl.o
      CC      spl/drivers/usb/musb-new/musb_gadget.o
      CC      spl/drivers/usb/musb-new/musb_gadget_ep0.o
      CC      spl/drivers/usb/gadget/ether.o
      CC      spl/drivers/usb/musb-new/musb_core.o
      CC      spl/drivers/usb/musb-new/musb_uboot.o
      CC      spl/drivers/usb/gadget/rndis.o
      CC      spl/drivers/usb/musb-new/musb_host.o
      LD      spl/drivers/usb/gadget/built-in.o
      CC      spl/drivers/usb/musb-new/musb_dsps.o
      CC      spl/drivers/usb/musb-new/ti-musb.o
      CC      spl/drivers/watchdog/omap_wdt.o
      LD      spl/drivers/usb/musb-new/built-in.o
      LD      spl/drivers/watchdog/built-in.o
      LD      spl/drivers/built-in.o
      LD      spl/u-boot-spl
      OBJCOPY spl/u-boot-spl-nodtb.bin
      COPY    spl/u-boot-spl.bin
      MKIMAGE MLO
      MKIMAGE MLO.byteswap
    ./scripts/check-config.sh u-boot.cfg \
    		./scripts/config_whitelist.txt . 1>&2
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/board-support/u-boot-2017.01+gitAUTOINC+590c7d7fe1-g590c7d7fe1$ 
    
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/bin$ sudo ./create-sdcard.sh 
    
    
    ################################################################################
    
    This script will create a bootable SD card from custom or pre-built binaries.
    
    The script must be run with root permissions and from the bin directory of
    the SDK
    
    Example:
     $ sudo ./create-sdcard.sh
    
    Formatting can be skipped if the SD card is already formatted and
    partitioned properly.
    
    ################################################################################
    
    Please insert a SD card to continue
    
    Type 'y' to re-detect the SD card or 'n' to exit the script: y
    Type 'y' to re-detect the SD card or 'n' to exit the script: y
    
    Available Drives to write images to: 
    
    #  major   minor    size   name 
    1:   8       16   15558144 sdb
     
    Enter Device Number or n to exit: 1     
     
    sdb was selected
    
    /dev/sdb is an sdx device
    Unmounting the sdb drives
     unmounted /dev/sdb1
     unmounted /dev/sdb2
    Current size of sdb1 71680 bytes
    Current size of sdb2 15469568 bytes
    
    ################################################################################
    
    	Select 2 partitions if only need boot and rootfs (most users).
    	Select 3 partitions if need SDK & other content on SD card.  This is
            usually used by device manufacturers with access to partition tarballs.
    
    	****WARNING**** continuing will erase all data on sdb
    
    ################################################################################
    
    Number of partitions needed [2/3] : 2
    
     
    Now partitioning sdb with 2 partitions...
     
    
    ################################################################################
    
    		Now making 2 partitions
    
    ################################################################################
    
    1024+0 records in
    1024+0 records out
    1048576 bytes (1.0 MB) copied, 2.45371 s, 427 kB/s
    Disk /dev/sdb doesn't contain a valid partition table
    DISK SIZE - 15931539456 bytes
    
    ################################################################################
    
    		Partitioning Boot
    
    ################################################################################
    mkfs.fat 3.0.26 (2014-03-07)
    mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
    
    ################################################################################
    
    		Partitioning rootfs
    
    ################################################################################
    mke2fs 1.42.9 (4-Feb-2014)
    Filesystem label=rootfs
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    967232 inodes, 3867392 blocks
    193369 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=3963617280
    119 block groups
    32768 blocks per group, 32768 fragments per group
    8128 inodes per group
    Superblock backups stored on blocks: 
    	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
    
    Allocating group tables: done                            
    Writing inode tables: done                            
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information: done   
    
    
    
    ################################################################################
    
       Partitioning is now done
       Continue to install filesystem or select 'n' to safe exit
    
       **Warning** Continuing will erase files any files in the partitions
    
    ################################################################################
    
    
    Would you like to continue? [y/n] : y
    
     
     
    Mount the partitions 
    mkdir: cannot create directory 'rootfs': File exists
     
    Emptying partitions 
     
    
    Syncing....
    
    ################################################################################
    
    	Choose file path to install from
    
    	1 ) Install pre-built images from SDK
    	2 ) Enter in custom boot and rootfs file paths
    
    ################################################################################
    
    Choose now [1/2] : 2
    
     
    
    ################################################################################
    
      For U-boot and MLO
    
      If files are located in Tarball write complete path including the file name.
          e.x. $:  /home/user/MyCustomTars/boot.tar.xz
    
      If files are located in a directory write the directory path
          e.x. $: /ti-sdk/board-support/prebuilt-images/
    
      NOTE: Not all platforms will have an MLO file and this file can
            be ignored for platforms that do not support an MLO.
    
      Update: The proper location for the kernel image and device tree
              files have moved from the boot partition to the root filesystem.
    
    ################################################################################
    
    Enter path for Boot Partition : /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/board-support/u-boot-2017.01+gitAUTOINC+590c7d7fe1-g590c7d7fe1/
    
    Directory exists
    
    This directory contains:
    0001-Hardcode-EEPROM-board-name-to-A335BNLT.patch  MAINTAINERS	 README        arch    config.mk  drivers   include  scripts	      tools	      u-boot-nodtb.bin	  u-boot.dtb  u-boot.srec
    Kbuild						   MLO		 System.map    board   configs	  dts	    lib      snapshot.commit  u-boot	      u-boot.bin	  u-boot.img  u-boot.sym
    Kconfig						   MLO.byteswap  TISDK-README  cmd     disk	  examples  net      spl	      u-boot-dtb.bin  u-boot.cfg	  u-boot.lds
    Licenses					   Makefile	 api	       common  doc	  fs	    post     test	      u-boot-dtb.img  u-boot.cfg.configs  u-boot.map
    
    Is this correct? [y/n] : y
    
    
    ################################################################################
    
       For Kernel Image and Device Trees files
    
        What would you like to do?
         1) Reuse kernel image and device tree files found in the selected rootfs.
         2) Provide a directory that contains the kernel image and device tree files
            to be used.
    
    ################################################################################
    
    Choose option 1 or 2 : 1
    
     
    Reusing kernel and dt files from the rootfs's boot directory
     
    
    
    ################################################################################
    
       For Rootfs partition
    
       If files are located in Tarball write complete path including the file name.
          e.x. $:  /home/user/MyCustomTars/rootfs.tar.xz
    
      If files are located in a directory write the directory path
          e.x. $: /ti-sdk/targetNFS/
    
    ################################################################################
    
    Enter path for Rootfs Partition : /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS/
    
    This directory contains:
    bin  boot  dev	etc  home  include  lib  media	mnt  opt  proc	run  sbin  srv	sys  tmp  usr  var  www
    
    Is this correct? [y/n] : y
    
    ################################################################################
    
    	Copying files now... will take minutes
    
    ################################################################################
    
    Copying boot partition
    
    cp: target 'boot/MLO' is not a directory
    MLO copied
    
    
    cp: target 'boot/u-boot.img' is not a directory
    u-boot.img copied
    
    
    Copying rootfs System partition
    1563672 /  1554200 copied 
    
    Syncing...
     
    Un-mount the partitions 
     
    Remove created temp directories 
     
    Operation Finished
     
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/bin$ 
    
    
    

    In the menuconfig I disabled the "networking" and the "Falcon Mode" under SPL.

    When I generate the sd-card, I choose the option to reuse kernel image and device tree files found in the selected rootfs.

    Could one of these two configurations be a problem?

    I didnt change the configuration for the debug port (UART0). Could it be, that it changed it with make am335x_evm_config?

    Kind regards

    Eric

  • Hello,

    could anybody check the log-file?
  • The log file looks good. I tried to add DEBUG and removed Ethernet and USB, but still could not build the SDK 04.01.00.0x. I'm still trying.

    Steve K.
  • Hello Steve,

    could you build it?
    I used a eeprom from an old BBB and put it on my custom board. After that I used an sd-card with an old BBB image (U-Boot SPL 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06)

    with this image, I can see following lines on the terminal:
    U-Boot 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06), Build: jenkins-github_Bootloader-Builder-105

    Watchdog enabled
    I2C: ready
    DRAM: 512 MiB

    Then it stops, because of the wrong DDR configuration.
    Does this mean, that there is something that I miss during the compilation of the uboot?
  • Hello, could someone provide a uboot.img and MLO or a complete image that works with an AM3358? That would help me to delimit where the problem comes from.
  • Could someone from the TI eployees please help?
  • I'm heading out of town today and will be back in office next Thursday so I will look at it then. I'm sorry for the delay.

    Steve K.

  • Hello,
    any new information?

    Kind regards
  • Do you have JTAG capability with the board? I think we'll have to look at where the failure is with JTAG. It could be failing after the sdram init, but I think JTAG would really help.

    Steve K.
  • Also, does your board have NAND? Using the latest SDK, I just booted a BBB and stopped in u-boot. After the DDR printf is a printf for any NAND found (or NOR if that is enabled)

    U-Boot 2017.01-g340fb36f04 (Dec 23 2017 - 10:20:13 -0500)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM: 512 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1

    In older u-boots I have seen when you modify gpmc code, sometimes a failure can happen there.

    Steve K.
  • a little summary so far:

    - I have a board which is mostly identical to the BBB (only difference is the DDR  Micron MT41K256M16HA-107) but without JTAG

    - I copied the complete connection between the ARM and the RAM from the pcb

    - with putty I see the steady 'C's from the bootloader and all frequencys and voltages are fine

    - I'm using the ti-processor sdk for am335x 04.01.00.06 on a VM with virualbox (tried ubuntu 14 and a fresh install of ubuntu 16)

    - I use the create sd-card.sh script with the prebuild image and the result was:

    U-Boot SPL 2017.01-g590c7d7fe1 (Sep 26 2017 - 18:28:01)                                           #nothing else

    - I use the create sd-card.sh script with a custom image and the result was:

    U-Boot SPL 2017.01 (Dec 19 2017 - 16:39:10)                                       #nothing else

    - then I tried with a BBB-Image and I get the following:
        U-Boot 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06), Build: jenkins-github_Bootloader-Builder-105
        Watchdog enabled
        I2C: ready
        DRAM: 512 MiB

        Then it stops, because of the wrong DDR configuration.

    It seems to me that the sdk is not right configured or something is missing (even though there is no error during the creation of the sd-card). To be sure I would try a working MLO and u-boot.img. Could you please load up these two files from your sdk?

    kind regards

    eric

  • When you installed the SDK, there is a board-support/prebuilt-images directory. Can you copy MLO and u-boot.img to your SD Card (renaming from MLO-am335x-evm to MLO and u-boot-am335x-evm.img to u-boot.img) and try to boot?

    Steve K.
  • then I can even see only this:

    CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

    U-Boot SPL 2017.01-g590c7d7fe1 (Sep 26 2017 - 18:28:01)

    Like I sad, I can see more output with an BBB-img:

    - then I tried with a BBB-Image and I get the following:

       U-Boot 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06), Build: jenkins-github_Bootloader-Builder-105

       Watchdog enabled

       I2C: ready

       DRAM: 512 MiB

    Because of this I tried an img from the EVM ( ; the working img):

    CCCCCCCCCCCCCCCC

    U-Boot SPL 2013.01.01 (Jun 25 2013 - 16:42:52)

    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, 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, bulk combine, bulk split, 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

    OMAP SD/MMC: 0

    reading u-boot.img

    reading u-boot.img

    U-Boot 2013.01.01 (Jun 25 2013 - 16:42:52)

    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, bulk combine, bulk split, 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, bulk combine, bulk split, 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

    cpsw, usb_ether

    Hit any key to stop autoboot:  0

    mmc0 is current device

    SD/MMC found on device 0

    reading uEnv.txt

    ** Unable to read file uEnv.txt **

    reading uImage

    3194336 bytes read in 320 ms (9.5 MiB/s)

    Booting from mmc ...

    ## Booting kernel from Legacy Image at 80007fc0 ...

      Image Name:   Linux-3.2.0

      Image Type:   ARM Linux Kernel Image (uncompressed)

      Data Size:    3194272 Bytes = 3 MiB

      Load Address: 80008000

      Entry Point:  80008000

      Verifying Checksum ... OK

      XIP Kernel Image ... OK

    OK

    Starting kernel ...

    Thats what I get. That seems to me, that there must be a problem with the sdk. I run again the setup.sh from the SDK, do you see there any mistakes?

    eric@eric-VirtualBox:~$ cd /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06$ sudo ./setup.sh 
    [sudo] Passwort f�r eric: 
    -------------------------------------------------------------------------------
    TISDK setup script
    This script will set up your development host for SDK development.
    Parts of this script require administrator priviliges (sudo access).
    -------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    Verifying Linux host distribution
    Ubuntu 12.04 LTS, Ubuntu 14.04, or Ubuntu 14.04 LTS is being used, continuing..
    --------------------------------------------------------------------------------
    
    Starting with Ubuntu 12.04 serial devices are only accessible by members of the 'dialout' group.
    A user must be apart of this group to have the proper permissions to access a serial device.
    
    Are you running this script using sudo? The detected username is 'root'.
    Verify and enter your Linux username below
    [ root ] root
    
    User 'root' is already apart of the 'dialout' group
    
    -------------------------------------------------------------------------------
    setup package script
    This script will make sure you have the proper host support packages installed
    This script requires administrator priviliges (sudo access) if packages are to be installed.
    -------------------------------------------------------------------------------
    System requires packages xinetd tftpd nfs-kernel-server minicom libncurses5-dev dos2unix screen lrzsz uboot-mkimage to be installed
    Installation requires you to have administrator priviliges (sudo access) 
    on your host. Do you have administrator privilieges?
    Type 'y' to continue or 'n' to exit the installation: y
    Performing sudo apt-get install xinetd tftpd nfs-kernel-server minicom libncurses5-dev dos2unix screen lrzsz uboot-mkimage
    Paketlisten werden gelesen... Fertig
    Abh�ngigkeitsbaum wird aufgebaut.       
    Statusinformationen werden eingelesen.... Fertig
    Paket uboot-mkimage ist nicht verf�gbar, wird aber von einem anderen Paket
    referenziert. Das kann hei�en, dass das Paket fehlt, dass es abgel�st
    wurde oder nur aus einer anderen Quelle verf�gbar ist.
    Doch die folgenden Pakete ersetzen es:
      u-boot-tools:i386 u-boot-tools
    
    E: F�r Paket �uboot-mkimage� existiert kein Installationskandidat.
    Failed setup, aborting..
    Failed setup, aborting..
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06$ sudo apt-get install u-boot-tools
    Paketlisten werden gelesen... Fertig
    Abh�ngigkeitsbaum wird aufgebaut.       
    Statusinformationen werden eingelesen.... Fertig
    Die folgenden NEUEN Pakete werden installiert:
      u-boot-tools
    0 aktualisiert, 1 neu installiert, 0 zu entfernen und 275 nicht aktualisiert.
    Es m�ssen 97,5 kB an Archiven heruntergeladen werden.
    Nach dieser Operation werden 395 kB Plattenplatz zus�tzlich benutzt.
    Holen:1 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 u-boot-tools amd64 2016.01+dfsg1-2ubuntu3 [97,5 kB]
    Es wurden 97,5 kB in 0 s geholt (250 kB/s).
    Vormals nicht ausgew�hltes Paket u-boot-tools wird gew�hlt.
    (Lese Datenbank ... 178134 Dateien und Verzeichnisse sind derzeit installiert.)
    Vorbereitung zum Entpacken von .../u-boot-tools_2016.01+dfsg1-2ubuntu3_amd64.deb ...
    Entpacken von u-boot-tools (2016.01+dfsg1-2ubuntu3) ...
    Trigger f�r man-db (2.7.5-1) werden verarbeitet ...
    u-boot-tools (2016.01+dfsg1-2ubuntu3) wird eingerichtet ...
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06$ sudo ./setup.sh 
    -------------------------------------------------------------------------------
    TISDK setup script
    This script will set up your development host for SDK development.
    Parts of this script require administrator priviliges (sudo access).
    -------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    Verifying Linux host distribution
    Ubuntu 12.04 LTS, Ubuntu 14.04, or Ubuntu 14.04 LTS is being used, continuing..
    --------------------------------------------------------------------------------
    
    Starting with Ubuntu 12.04 serial devices are only accessible by members of the 'dialout' group.
    A user must be apart of this group to have the proper permissions to access a serial device.
    
    Are you running this script using sudo? The detected username is 'root'.
    Verify and enter your Linux username below
    [ root ] 
    
    User 'root' is already apart of the 'dialout' group
    
    -------------------------------------------------------------------------------
    setup package script
    This script will make sure you have the proper host support packages installed
    This script requires administrator priviliges (sudo access) if packages are to be installed.
    -------------------------------------------------------------------------------
    System has required packages!
    --------------------------------------------------------------------------------
    Package verification and installation successfully completed
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    In which directory do you want to install the target filesystem?(if this directory does not exist it will be created)
    [ /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS ] 
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    This step will extract the target filesystem to /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS
    
    Note! This command requires you to have administrator priviliges (sudo access) 
    on your host.
    Press return to continue
    /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS already exists
    (r) rename existing filesystem (o) overwrite existing filesystem (s) skip filesystem extraction
    [r] o
    oOld /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS removed
    
    Successfully extracted tisdk-rootfs-image-am335x-evm.tar.xz to /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    This step will set up the SDK to install binaries in to:
        /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS/home/root/am335x-evm
    
    The files will be available from /home/root/am335x-evm on the target.
    
    This setting can be changed later by editing Rules.make and changing the
    EXEC_DIR or DESTDIR variable (depending on your SDK).
    
    Press return to continue
    Rules.make edited successfully..
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    This step will export your target filesystem for NFS access.
    
    Note! This command requires you to have administrator priviliges (sudo access) 
    on your host.
    Press return to continue
    /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/targetNFS already NFS exported, skipping..
    
    [ ok ] Stopping nfs-kernel-server (via systemctl): nfs-kernel-server.service.
    [ ok ] Starting nfs-kernel-server (via systemctl): nfs-kernel-server.service.
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    Which directory do you want to be your tftp root directory?(if this directory does not exist it will be created for you)
    [ /tftpboot ] 
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    This step will set up the tftp server in the /tftpboot directory.
    
    Note! This command requires you to have administrator priviliges (sudo access) 
    on your host.
    Press return to continue
    
    /tftpboot already exists, not creating..
    
    /tftpboot/zImage-am335x-evm.bin already exists. The existing installed file can be renamed and saved under the new name.
    (r) rename (o) overwrite (s) skip copy 
    [r] o
    
    Successfully overwritten zImage-am335x-evm.bin in tftp root directory /tftpboot
    
    /tftpboot/am335x-boneblack.dtb already exists. The existing installed file can be renamed and saved under the new name.
    (o) overwrite (s) skip copy 
    [o] o
    
    Successfully overwritten am335x-boneblack.dtb in tftp root directory /tftpboot
    
    /tftpboot/am335x-bone.dtb already exists. The existing installed file can be renamed and saved under the new name.
    (o) overwrite (s) skip copy 
    [o] o
    
    Successfully overwritten am335x-bone.dtb in tftp root directory /tftpboot
    
    /tftpboot/am335x-bonegreen.dtb already exists. The existing installed file can be renamed and saved under the new name.
    (o) overwrite (s) skip copy 
    [o] o
    
    Successfully overwritten am335x-bonegreen.dtb in tftp root directory /tftpboot
    
    /tftpboot/am335x-evm.dtb already exists. The existing installed file can be renamed and saved under the new name.
    (o) overwrite (s) skip copy 
    [o] o
    
    Successfully overwritten am335x-evm.dtb in tftp root directory /tftpboot
    
    /tftpboot/am335x-evmsk.dtb already exists. The existing installed file can be renamed and saved under the new name.
    (o) overwrite (s) skip copy 
    [o] o
    
    Successfully overwritten am335x-evmsk.dtb in tftp root directory /tftpboot
    
    /tftpboot/am335x-icev2.dtb already exists. The existing installed file can be renamed and saved under the new name.
    (o) overwrite (s) skip copy 
    [o] o
    
    Successfully overwritten am335x-icev2.dtb in tftp root directory /tftpboot
    
    /tftpboot/am335x-icev2-pru-excl-uio.dtb already exists. The existing installed file can be renamed and saved under the new name.
    (o) overwrite (s) skip copy 
    [o] o
    
    Successfully overwritten am335x-icev2-pru-excl-uio.dtb in tftp root directory /tftpboot
    
    /etc/xinetd.d/tftp already exists..
    /tftpboot already exported for TFTP, skipping..
    
    Restarting tftp server
    [ ok ] Stopping xinetd (via systemctl): xinetd.service.
    [ ok ] Starting xinetd (via systemctl): xinetd.service.
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------"
    This step will set up minicom (serial communication application) for
    SDK development
    
    
    For boards that contain a USB-to-Serial converter on the board such as:
    	* BeagleBone
    	* Beaglebone Black
    	* AM335x EVM-SK
    	* AM57xx EVM
    	* K2H, K2L, and K2E EVMs
    
    the port used for minicom will be automatically detected. By default Ubuntu
    will not recognize this device. Setup will add a udev rule to
    /etc/udev/ so that from now on it will be recognized as soon as the board is
    plugged in.
    
    For other boards, the serial will defualt to /dev/ttyS0. Please update based
    on your setup.
    
    --------------------------------------------------------------------------------
    
    
    NOTE: If your using any of the above boards simply hit enter
    and the correct port will be determined automatically at a
    later step.  For all other boards select the serial port
    that the board is connected to.
    Which serial port do you want to use with minicom?
    [ /dev/ttyS0 ] 
    
    Copied existing /home/eric/.minirc.dfl to /home/eric/.minirc.dfl.old
    
    Configuration saved to /home/eric/.minirc.dfl. You can change it further from inside
    minicom, see the Software Development Guide for more information.
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    This step will set up the U-Boot variables for booting the EVM.
    
    Autodetected the following ip address of your host, correct it if necessary
    [  ] 
    
    Select Linux kernel location:
     1: TFTP
     2: SD card
    
    [ 1 ] 
    
    Select root file system location:
     1: NFS
     2: SD card
    
    [ 1 ] 
    
    Available kernel images in /tftproot:
        am335x-bone.dtb
        am335x-boneblack.dtb
        am335x-bonegreen.dtb
        am335x-evm.dtb
        am335x-evmsk.dtb
        am335x-icev2-pru-excl-uio.dtb
        am335x-icev2.dtb
        zImage-am335x-evm.bin
    
    Which kernel image do you want to boot from TFTP?
    [ zImage-am335x-evm.bin ] 
    --------------------------------------------------------------------------------
    Would you like to create a minicom script with the above parameters (y/n)?
    [ y ] y
    
    Successfully wrote /opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06/bin/setupBoard.minicom
    
    No BeagleBone (Black) or StarterKit detected. Assuming
    general purpose evm is being used. Is this correct?
    (y/n) y
    
    Would you like to run the setup script now (y/n)? For the general purpose evm 
    you must now connect the RS-232 cable to your evm now. For the Beaglebone (Black)
    or StarterKit this step should of already have been done. Also connect the ethernet
    cable as described in the Quick Start Guide.
    **Important**
    Once answering 'y' on the prompt below you will have 300 seconds to turn on the
    board or if it was already on reboot the board before the setup times out
    
    After successfully executing this script, your board will be set up. You will be 
    able to connect to it by executing 'minicom -w' or if you prefer a windows host
    you can set up Tera Term as explained in the Software Developer's Guide.
    If you connect minicom or Tera Term and power cycle the board Linux will boot.
    
    [ y ] n
    You can manually run minicom in the future with this setup script using: minicom -S ./bin/setupBoard.minicom
    --------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    TISDK setup completed!
    Please continue reading the Software Developer's Guide for more information on
    how to develop software on the EVM
    -------------------------------------------------------------------------------
    eric@eric-VirtualBox:/opt/ti-processor-sdk-linux-am335x-evm-04.01.00.06$ 

  • Could it be, that the sdk is not configured correctly? I run the setup.sh and then comes the question "No BeagleBone (Black) or StarterKit detected. Assuming general purpose evm is being used. Is this correct? (y/n)"
    Could it be, that the setup.sh is configuring wrong, because of the fact that is not detecting the board?
    Why doesnt it recognize the board? The device shows up under lsusb:

    eric@eric-VirtualBox:~/Downloads$ lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 003: ID 0451:6141 Texas Instruments, Inc.
    Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    I connected my beagleboneblack and it is shown under lsusb as:

    Bus 001 Device 003: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget

    Are there any known issues with using virtualBox and Ubuntu16??

  • It looks like the setup script is not looking at the vid:pid from the Boot ROM (0451:6141) since it would be the same for all boards. For Beaglebone (white) and EVM-SK, the vid:pid for the serial port is 0403:6010 so this is what the script looks for. The script looks for Beaglebone Black by looking for the vid:pid of the FTDI cable, 0x0403:6001.

    Steve K.

  • That it obvious for me. I have a AM3358BZCZ1000. Why does it not show the numbers that the script suggests? Where are these numbers come from? Do I need another sdk? I am using the am335x SDK.
  • You do not need a different SDK. For the setup script to recognize a Beaglebone Black, you need the FTDI serial cable attached to the 6-pin header on the board and the other end to your PC. For Starter Kit, you just need a USB cable connected between the board and your PC.

    Steve K.
  • Ok, but this does not solve my problem at all.

    Why does my created MLO and uboot.img not work at all, but the MLO and uboot.img that I linked before (EVM, boots to the uboot)?

    What can I check? What could cause the problem? In my oppinion it has to depend on the SDK (maybe wrong configuration)??
  • Is there anybody who could give an advice?
  • What make commands are you using to build the code?

    Steve K.

  • They are in the log-file in my second post. You wrote back then that they are okay.

  • In this SDK and the latest, I have to build am335x_boneblack_config to boot on the BBB.  Building am335x_evm_config does not seem to boot on the BBB. It used to so I will check if this is a bug or something new.

    Steve K.