This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4379: U-boot doesn't start

Part Number: AM4379


Tool/software: Linux

Hi All,

There's a problem I haven't solved in a long time.
I tried to explain problem. I need your help.

Processor SDK version 05.03.00.07

We selected "AM437x Evaluation Module" as a reference designs for RAM-DDR layout.
But we used different RAM (MT41K256M16TW-107:P) on our custom board.

I created bootable SD Card with "am437x-evm-linux-05.03.00.07.img"
Boot mode pins are selected as a MMC0 first.

For initial test,we used GEL Files.
I modified "evmam437x.gel" file because of RAM difference. (I changed SDRAM data bus width from 32 to 16. --> GP_EVM_DDR3_SDRAM_CONFIG 0x61A053B2. )
Then i connected to the target and initialized board with "AM43xx_GP_EVM_Initialization" script.
All tests passed successfully. DDR works fine. I can write DDR and read DDR.

After initialization with GEL file, I did not terminate debug window, i loaded "u-boot.bin" to 0x80800000 and resume.
Log messages seen at serial port. I stopped autoboot and programmed EEPROM. I wrote board name "AM43__GP"
After these steps, Linux started successfully.

But normally, we don't want to use GEL File for initialization so i started to modify u-boot source code.
I tried to fill "SPRAC70A_AM437x_EMIF_Configuration_Tool_V21"
When i fill "SPRAC70A_AM437x_EMIF_Configuration_Tool_V21" , i inspired by "evmam437x.gel" and MT41K256M16TW Datasheet

I modified u-boot source code(board.c) according to spreadsheet.(spreadsheet and board.c are attached.)

But following register values could not change.
Because when i change this register values, i cannot see SPL log messages on serial port. So i did not change these register values.
EMIF4D_DDR_PHY_CTRL_1
EMIF4D_EXT_PHY_CTRL_1
EMIF4D_EXT_PHY_CTRL_2
EMIF4D_EXT_PHY_CTRL_3
EMIF4D_EXT_PHY_CTRL_4
EMIF4D_EXT_PHY_CTRL_5

After modifications, i built "am43xx_evm_config", "u-boot.bin" and "u-boot-spl.bin"

I followed "training.ti.com/linux-board-porting-series-module-7-debugging-u-boot-jtag-ccs for making Linux work.

I launched selected configuration and connected target.
"u-boot-spl.bin" is loaded to Memory 0x402F4000
Program Counter is set to 0x402F4000.
When i resumed, SPL log messages appeared on serial port! ( as in training module 18:35 training.ti.com/linux-board-porting-series-module-7-debugging-u-boot-jtag-ccs

/*//**/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
U-Boot SPL 2018.01-00569-gf9c38b91a2-dirty (Jun 13 2019 - 11:08:02)
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
/*//**/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/


I think everything is fine so far.

Then i loaded u-boot.bin 0x80800000
Program Counter is set to 0x80800000.
When i resumed program, i think i will see u-boot log messages ( as in training module 21:18 training.ti.com/linux-board-porting-series-module-7-debugging-u-boot-jtag-ccs
But there is nothing on serial port!
Program Counter stops at 0x402f4040.

I can't solve this problem for a long time.
When trying to solve this problem, i saw thread about Debug Server Scripting (DSS) .
"am43xx-ddr-analysis" results is also attached.
Maybe it will help us solve the problem.

I need your help.
Thanks,
Best regards,
Mehmet.

CONTROL: device_id = 0x2b98c02f
  * AM43xx family
  * Silicon Revision 1.2

CONTROL: control_status = 0x00400318
  * Bit 26 (SYSBOOT18=0): Do not route EXTCLK to CLKOUT2
  * Bits 23:22 (SYSBOOT15:14=1): 24 MHz

CM_CLKSEL_DPLL_DDR = 0x00003202
  * DPLL_MULT = 50 (x50)
  * DPLL_DIV = 2 (/3)

CM_DIV_M2_DPLL_DDR = 0x00000221
  * CLKST = 1: M2 output clock enabled
  * DIVHS = 1 (/1)

CM_DIV_M4_DPLL_DDR = 0x00000222
  * CLKST = 1: M4 output clock enabled
  * DIVHS = 2 (/2)

DPLL_DDR Summary
 -> F_input = 24 MHz
 -> CLKOUT_M2 = DDR_PLL_CLKOUT = 400 MHz
 -> CLKOUT_M4 = DLL_CLKOUT = 400 MHz

EMIF: SDRAM_CONFIG = 0x638413b2
  * SDRAM_TYPE = DDR3
  * Bits 26:24 (reg_ddr_term) set for RZQ/6 (011b)
  * Bits 19:18 (reg_sdram_drive) set for RZQ/7 (01b)
  * Bits 17:16 (cwl) set for 5 (00b)
  * NARROW_MODE=0 (32-bit wide)
  * Bits 13:10 (CL) set for 6
  * Bits 9:7 (ROWSIZE) set for 16 row bits
  * Bits 6:4 (IBANK) set for 8 banks
  * Bit 3 (EBANK) set for 1 chip select (CS0)
  * Bits 3:0 (PAGESIZE) set for 10 column bits

EMIF: PWR_MGMT_CTRL = 0x000000a0

DDR PHY: DDR_PHY_CTRL_1 = 0x0e004008
  * RDLVL_MASK=1, read leveling is disabled! Not recommended.
  * RDLVLGATE_MASK=1, read leveling is disabled! Not recommended.
  * WRLVL_MASK=1, write leveling is disabled! Not recommended.
  * PHY_INVERT_CLKOUT=0.
  * PHY_DLL_LOCK_DIFF is not set to the required value.
  * READ_LAT=8, (corresponds correctly with CL and PHY_INVERT_CLKOUT)

DDR PHY: EXT_PHY_CTRL_1 = 0x08020080

DDR PHY: EXT_PHY_CTRL_36 = 0x000001ff
  * Bits 7:0 recommended value is 0x77.
  * Please verify you are using the latest AM43xx DDR Spreadsheet: http://www.ti.com/lit/zip/sprac70

CTRL_DDR_ADDRCTRL_IOCTRL = 0x00000084
  * Bits 9:5 control ddr_ck and ddr_ckn
    - Slew fastest
    - Drive Strength 9 mA
  * Bits 4:0 control all other address/control pins
    - Slew fastest
    - Drive Strength 9 mA

CTRL_DDR_ADDRCTRL_WD0_IOCTRL = 0x00000000
CTRL_DDR_ADDRCTRL_WD1_IOCTRL = 0x00000000
  * [ddr_a0    ] Pullup/Pulldown disabled
  * [ddr_a1    ] Pullup/Pulldown disabled
  * [ddr_a2    ] Pullup/Pulldown disabled
  * [ddr_a3    ] Pullup/Pulldown disabled
  * [ddr_a4    ] Pullup/Pulldown disabled
  * [ddr_a5    ] Pullup/Pulldown disabled
  * [ddr_a6    ] Pullup/Pulldown disabled
  * [ddr_a7    ] Pullup/Pulldown disabled
  * [ddr_a8    ] Pullup/Pulldown disabled
  * [ddr_a9    ] Pullup/Pulldown disabled
  * [ddr_a10   ] Pullup/Pulldown disabled
  * [ddr_a11   ] Pullup/Pulldown disabled
  * [ddr_a12   ] Pullup/Pulldown disabled
  * [ddr_a13   ] Pullup/Pulldown disabled
  * [ddr_a14   ] Pullup/Pulldown disabled
  * [ddr_a15   ] Pullup/Pulldown disabled
  * [ddr_ba2   ] Pullup/Pulldown disabled
  * [ddr_ba1   ] Pullup/Pulldown disabled
  * [ddr_ba0   ] Pullup/Pulldown disabled
  * [ddr_wen   ] Pullup/Pulldown disabled
  * [ddr_rasn  ] Pullup/Pulldown disabled
  * [ddr_casn  ] Pullup/Pulldown disabled
  * [ddr_nck   ] Pullup/Pulldown disabled
  * [ddr_ck    ] Pullup/Pulldown disabled
  * [ddr_cke   ] Pullup/Pulldown disabled
  * [ddr_csn1  ] Pullup/Pulldown disabled
  * [ddr_csn0  ] Pullup/Pulldown disabled
  * [ddr_resetn] Pullup/Pulldown disabled
  * [ddr_odt1  ] Pullup/Pulldown disabled
  * [ddr_odt0  ] Pullup/Pulldown disabled

CTRL_DDR_DATA0_IOCTRL = 0x00000084
  * ddr_d0 Pullup/Pulldown disabled
  * ddr_d1 Pullup/Pulldown disabled
  * ddr_d2 Pullup/Pulldown disabled
  * ddr_d3 Pullup/Pulldown disabled
  * ddr_d4 Pullup/Pulldown disabled
  * ddr_d5 Pullup/Pulldown disabled
  * ddr_d6 Pullup/Pulldown disabled
  * ddr_d7 Pullup/Pulldown disabled
  * ddr_dqm0 Pullup/Pulldown disabled
  * ddr_dqs0 and ddr_dqsn0 Pullup/Pulldown disabled
  * Bits 9:5 control ddr_dqs0, ddr_dqsn0
    - Slew fastest
    - Drive Strength 9 mA
  * Bits 4:0 control ddr_d[7:0], dqm0
    - Slew fastest
    - Drive Strength 9 mA

CTRL_DDR_DATA1_IOCTRL = 0x00000084
  * ddr_d8 Pullup/Pulldown disabled
  * ddr_d9 Pullup/Pulldown disabled
  * ddr_d10 Pullup/Pulldown disabled
  * ddr_d11 Pullup/Pulldown disabled
  * ddr_d12 Pullup/Pulldown disabled
  * ddr_d13 Pullup/Pulldown disabled
  * ddr_d14 Pullup/Pulldown disabled
  * ddr_d15 Pullup/Pulldown disabled
  * ddr_dqm1 Pullup/Pulldown disabled
  * ddr_dqs1 and ddr_dqsn1 Pullup/Pulldown disabled
  * Bits 9:5 control ddr_dqs1, ddr_dqsn1
    - Slew fastest
    - Drive Strength 9 mA
  * Bits 4:0 control ddr_d[15:8], ddr_dqm1
    - Slew fastest
    - Drive Strength 9 mA

CTRL_DDR_DATA2_IOCTRL = 0x00000084
  * ddr_d16 Pullup/Pulldown disabled
  * ddr_d17 Pullup/Pulldown disabled
  * ddr_d18 Pullup/Pulldown disabled
  * ddr_d19 Pullup/Pulldown disabled
  * ddr_d20 Pullup/Pulldown disabled
  * ddr_d21 Pullup/Pulldown disabled
  * ddr_d22 Pullup/Pulldown disabled
  * ddr_d23 Pullup/Pulldown disabled
  * ddr_dqm2 Pullup/Pulldown disabled
  * ddr_dqs2 and ddr_dqsn2 Pullup/Pulldown disabled
  * Bits 9:5 control ddr_dqs2, ddr_dqsn2
    - Slew fastest
    - Drive Strength 9 mA
  * Bits 4:0 control ddr_d[23:16], ddr_dqm2
    - Slew fastest
    - Drive Strength 9 mA

CTRL_DDR_DATA3_IOCTRL = 0x00000084
  * ddr_d24 Pullup/Pulldown disabled
  * ddr_d25 Pullup/Pulldown disabled
  * ddr_d26 Pullup/Pulldown disabled
  * ddr_d27 Pullup/Pulldown disabled
  * ddr_d28 Pullup/Pulldown disabled
  * ddr_d29 Pullup/Pulldown disabled
  * ddr_d30 Pullup/Pulldown disabled
  * ddr_d31 Pullup/Pulldown disabled
  * ddr_dqm3 Pullup/Pulldown disabled
  * ddr_dqs3 and ddr_dqsn3 Pullup/Pulldown disabled
  * Bits 9:5 control ddr_dqs3, ddr_dqsn3
    - Slew fastest
    - Drive Strength 9 mA
  * Bits 4:0 control ddr_d[31:24], ddr_dqm3
    - Slew fastest
    - Drive Strength 9 mA

CONTROL: CTRL_DDR_IO = 0x00000000
  * Bit 31: DDR_RESETn controlled by EMIF.

CONTROL: CTRL_VTP = 0x00010167
  * VTP not disabled (expected in normal operation, but not DS0).

CONTROL: CTRL_VREF = 0x00000000
  * VREF supplied externally (typical).

CONTROL: CTRL_DDR_CKE = 0x0000000f
  * CKE0 controlled by EMIF (normal/ungated operation).
  * CKE1 controlled by EMIF (normal/ungated operation).

CONTROL: CTRL_EMIF_SDRAM_CONFIG_EXT = 0x0000c163
  * Bit  17:    NARROW_ONLY = 0
  * Bits 15:14: phy_num_of_samples = 3 -> 128 samples, full leveling
  * Bit  13:    phy_sel_logic = 0 (Recommended)
  * Bit  12:    phy_all_dq_mpr_rd_resp = 0
  * Bits 11:09: phy_output_sts_select = 0
  * Bit   8:    dynamic_pwrdn_en = 1
  * Bits 06:05: phy_rd_local_odt = 3, Half Thevenin load
  * Bit   3:    dfi_clock_phase_ctrl = 0
  * Bit   1:    en_slice_1 = 1 (CMD PHY1)
  * Bit   0:    en_slice_0 = 1 (CMD PHY0)
/*
 * board.c
 *
 * Board functions for TI AM43XX based boards
 *
 * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#include <common.h>
#include <i2c.h>
#include <linux/errno.h>
#include <spl.h>
#include <usb.h>
#include <asm/omap_sec_common.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mux.h>
#include <asm/arch/ddr_defs.h>
#include <asm/arch/gpio.h>
#include <asm/emif.h>
#include <asm/omap_common.h>
#include "../common/board_detect.h"
#include "board.h"
#include <power/pmic.h>
#include <power/tps65218.h>
#include <power/tps62362.h>
#include <miiphy.h>
#include <cpsw.h>
#include <linux/usb/gadget.h>
#include <dwc3-uboot.h>
#include <dwc3-omap-uboot.h>
#include <ti-usb-phy-uboot.h>

DECLARE_GLOBAL_DATA_PTR;

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

/*
 * Read header information from EEPROM into global structure.
 */
#ifdef CONFIG_TI_I2C_BOARD_DETECT
void do_board_detect(void)
{
	if (ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
				 CONFIG_EEPROM_CHIP_ADDRESS))
		printf("ti_i2c_eeprom_init failed\n");
}
#endif

#ifndef CONFIG_SKIP_LOWLEVEL_INIT

const struct dpll_params dpll_mpu[NUM_CRYSTAL_FREQ][NUM_OPPS] = {
	{	/* 19.2 MHz */
		{125, 3, 2, -1, -1, -1, -1},	/* OPP 50 */
		{-1, -1, -1, -1, -1, -1, -1},	/* OPP RESERVED	*/
		{125, 3, 1, -1, -1, -1, -1},	/* OPP 100 */
		{150, 3, 1, -1, -1, -1, -1},	/* OPP 120 */
		{125, 2, 1, -1, -1, -1, -1},	/* OPP TB */
		{625, 11, 1, -1, -1, -1, -1}	/* OPP NT */
	},
	{	/* 24 MHz */
		{300, 23, 1, -1, -1, -1, -1},	/* OPP 50 */
		{-1, -1, -1, -1, -1, -1, -1},	/* OPP RESERVED	*/
		{600, 23, 1, -1, -1, -1, -1},	/* OPP 100 */
		{720, 23, 1, -1, -1, -1, -1},	/* OPP 120 */
		{800, 23, 1, -1, -1, -1, -1},	/* OPP TB */
		{1000, 23, 1, -1, -1, -1, -1}	/* OPP NT */
	},
	{	/* 25 MHz */
		{300, 24, 1, -1, -1, -1, -1},	/* OPP 50 */
		{-1, -1, -1, -1, -1, -1, -1},	/* OPP RESERVED	*/
		{600, 24, 1, -1, -1, -1, -1},	/* OPP 100 */
		{720, 24, 1, -1, -1, -1, -1},	/* OPP 120 */
		{800, 24, 1, -1, -1, -1, -1},	/* OPP TB */
		{1000, 24, 1, -1, -1, -1, -1}	/* OPP NT */
	},
	{	/* 26 MHz */
		{300, 25, 1, -1, -1, -1, -1},	/* OPP 50 */
		{-1, -1, -1, -1, -1, -1, -1},	/* OPP RESERVED	*/
		{600, 25, 1, -1, -1, -1, -1},	/* OPP 100 */
		{720, 25, 1, -1, -1, -1, -1},	/* OPP 120 */
		{800, 25, 1, -1, -1, -1, -1},	/* OPP TB */
		{1000, 25, 1, -1, -1, -1, -1}	/* OPP NT */
	},
};

const struct dpll_params dpll_core[NUM_CRYSTAL_FREQ] = {
		{625, 11, -1, -1, 10, 8, 4},	/* 19.2 MHz */
		{1000, 23, -1, -1, 10, 8, 4},	/* 24 MHz */
		{1000, 24, -1, -1, 10, 8, 4},	/* 25 MHz */
		{1000, 25, -1, -1, 10, 8, 4}	/* 26 MHz */
};

const struct dpll_params dpll_per[NUM_CRYSTAL_FREQ] = {
		{400, 7, 5, -1, -1, -1, -1},	/* 19.2 MHz */
		{400, 9, 5, -1, -1, -1, -1},	/* 24 MHz */
		{384, 9, 5, -1, -1, -1, -1},	/* 25 MHz */
		{480, 12, 5, -1, -1, -1, -1}	/* 26 MHz */
};

const struct dpll_params epos_evm_dpll_ddr[NUM_CRYSTAL_FREQ] = {
		{665, 47, 1, -1, 4, -1, -1}, /*19.2*/
		{133, 11, 1, -1, 4, -1, -1}, /* 24 MHz */
		{266, 24, 1, -1, 4, -1, -1}, /* 25 MHz */
		{133, 12, 1, -1, 4, -1, -1}  /* 26 MHz */
};

const struct dpll_params gp_evm_dpll_ddr = {
		50, 2, 1, -1, 2, -1, -1};

static const struct dpll_params idk_dpll_ddr = {
	400, 23, 1, -1, 2, -1, -1
};

static const u32 ext_phy_ctrl_const_base_lpddr2[] = {
	0x00500050,
	0x00350035,
	0x00350035,
	0x00350035,
	0x00350035,
	0x00350035,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x40001000,
	0x08102040
};

const struct ctrl_ioregs ioregs_lpddr2 = {
	.cm0ioctl		= LPDDR2_ADDRCTRL_IOCTRL_VALUE,
	.cm1ioctl		= LPDDR2_ADDRCTRL_WD0_IOCTRL_VALUE,
	.cm2ioctl		= LPDDR2_ADDRCTRL_WD1_IOCTRL_VALUE,
	.dt0ioctl		= LPDDR2_DATA0_IOCTRL_VALUE,
	.dt1ioctl		= LPDDR2_DATA0_IOCTRL_VALUE,
	.dt2ioctrl		= LPDDR2_DATA0_IOCTRL_VALUE,
	.dt3ioctrl		= LPDDR2_DATA0_IOCTRL_VALUE,
	.emif_sdram_config_ext	= 0x1,
};

const struct emif_regs emif_regs_lpddr2 = {
	.sdram_config			= 0x808012BA,
	.ref_ctrl			= 0x0000040D,
	.sdram_tim1			= 0xEA86B411,
	.sdram_tim2			= 0x103A094A,
	.sdram_tim3			= 0x0F6BA37F,
	.read_idle_ctrl			= 0x00050000,
	.zq_config			= 0x50074BE4,
	.temp_alert_config		= 0x0,
	.emif_rd_wr_lvl_rmp_win		= 0x0,
	.emif_rd_wr_lvl_rmp_ctl		= 0x0,
	.emif_rd_wr_lvl_ctl		= 0x0,
	.emif_ddr_phy_ctlr_1		= 0x0E284006,
	.emif_rd_wr_exec_thresh		= 0x80000405,
	.emif_ddr_ext_phy_ctrl_1	= 0x04010040,
	.emif_ddr_ext_phy_ctrl_2	= 0x00500050,
	.emif_ddr_ext_phy_ctrl_3	= 0x00500050,
	.emif_ddr_ext_phy_ctrl_4	= 0x00500050,
	.emif_ddr_ext_phy_ctrl_5	= 0x00500050,
	.emif_prio_class_serv_map	= 0x80000001,
	.emif_connect_id_serv_1_map	= 0x80000094,
	.emif_connect_id_serv_2_map	= 0x00000000,
	.emif_cos_config			= 0x000FFFFF
};

const struct ctrl_ioregs ioregs_ddr3 = {
	.cm0ioctl		= DDR3_ADDRCTRL_IOCTRL_VALUE,
	.cm1ioctl		= DDR3_ADDRCTRL_WD0_IOCTRL_VALUE,
	.cm2ioctl		= DDR3_ADDRCTRL_WD1_IOCTRL_VALUE,
	.dt0ioctl		= DDR3_DATA0_IOCTRL_VALUE,
	.dt1ioctl		= DDR3_DATA0_IOCTRL_VALUE,
	.dt2ioctrl		= DDR3_DATA0_IOCTRL_VALUE,
	.dt3ioctrl		= DDR3_DATA0_IOCTRL_VALUE,
	.emif_sdram_config_ext	= 0xc163,
};

const struct emif_regs ddr3_emif_regs_400Mhz = {
	.sdram_config			= 0x61A053B2,   // 0x638413B2
	.ref_ctrl			= 0x00000C30,       // OK
	.sdram_tim1			= 0xEAAAD4DB,       // OK
	.sdram_tim2			= 0x266B7FDA,       // OK
	.sdram_tim3			= 0x5F7F867F,       // 0x107F8678
	.read_idle_ctrl			= 0x00050000,
	.zq_config			= 0x50077D33,       // 0x50074BE4
	.temp_alert_config		= 0x0,
	.emif_ddr_phy_ctlr_1		= 0x0E004008,
	.emif_ddr_ext_phy_ctrl_1	= 0x08020080,
	.emif_ddr_ext_phy_ctrl_2	= 0x00400040,
	.emif_ddr_ext_phy_ctrl_3	= 0x00400040,
	.emif_ddr_ext_phy_ctrl_4	= 0x00400040,
	.emif_ddr_ext_phy_ctrl_5	= 0x00400040,
	.emif_rd_wr_lvl_rmp_win		= 0x0,
	.emif_rd_wr_lvl_rmp_ctl		= 0x0,
	.emif_rd_wr_lvl_ctl		= 0x0,
	.emif_rd_wr_exec_thresh		= 0x80000405,
	.emif_prio_class_serv_map	= 0x80000001,
	.emif_connect_id_serv_1_map	= 0x80000094,
	.emif_connect_id_serv_2_map	= 0x00000000,
	.emif_cos_config		= 0x000FFFFF
};

/* EMIF DDR3 Configurations are different for beta AM43X GP EVMs */
const struct emif_regs ddr3_emif_regs_400Mhz_beta = {
	.sdram_config			= 0x638413B2,
	.ref_ctrl			= 0x00000C30,
	.sdram_tim1			= 0xEAAAD4DB,
	.sdram_tim2			= 0x266B7FDA,
	.sdram_tim3			= 0x107F8678,
	.read_idle_ctrl			= 0x00050000,
	.zq_config			= 0x50074BE4,
	.temp_alert_config		= 0x0,
	.emif_ddr_phy_ctlr_1		= 0x0E004008,
	.emif_ddr_ext_phy_ctrl_1	= 0x08020080,
	.emif_ddr_ext_phy_ctrl_2	= 0x00000065,
	.emif_ddr_ext_phy_ctrl_3	= 0x00000091,
	.emif_ddr_ext_phy_ctrl_4	= 0x000000B5,
	.emif_ddr_ext_phy_ctrl_5	= 0x000000E5,
	.emif_rd_wr_exec_thresh		= 0x80000405,
	.emif_prio_class_serv_map	= 0x80000001,
	.emif_connect_id_serv_1_map	= 0x80000094,
	.emif_connect_id_serv_2_map	= 0x00000000,
	.emif_cos_config		= 0x000FFFFF
};

/* EMIF DDR3 Configurations are different for production AM43X GP EVMs */
const struct emif_regs ddr3_emif_regs_400Mhz_production = {
	.sdram_config			= 0x638413B2,
	.ref_ctrl			= 0x00000C30,
	.sdram_tim1			= 0xEAAAD4DB,
	.sdram_tim2			= 0x266B7FDA,
	.sdram_tim3			= 0x107F8678,
	.read_idle_ctrl			= 0x00050000,
	.zq_config			= 0x50074BE4,
	.temp_alert_config		= 0x0,
	.emif_ddr_phy_ctlr_1		= 0x0E004008,
	.emif_ddr_ext_phy_ctrl_1	= 0x08020080,
	.emif_ddr_ext_phy_ctrl_2	= 0x00000066,
	.emif_ddr_ext_phy_ctrl_3	= 0x00000091,
	.emif_ddr_ext_phy_ctrl_4	= 0x000000B9,
	.emif_ddr_ext_phy_ctrl_5	= 0x000000E6,
	.emif_rd_wr_exec_thresh		= 0x80000405,
	.emif_prio_class_serv_map	= 0x80000001,
	.emif_connect_id_serv_1_map	= 0x80000094,
	.emif_connect_id_serv_2_map	= 0x00000000,
	.emif_cos_config		= 0x000FFFFF
};

static const struct emif_regs ddr3_sk_emif_regs_400Mhz = {
	.sdram_config			= 0x638413b2,
	.sdram_config2			= 0x00000000,
	.ref_ctrl			= 0x00000c30,
	.sdram_tim1			= 0xeaaad4db,
	.sdram_tim2			= 0x266b7fda,
	.sdram_tim3			= 0x107f8678,
	.read_idle_ctrl			= 0x00050000,
	.zq_config			= 0x50074be4,
	.temp_alert_config		= 0x0,
	.emif_ddr_phy_ctlr_1		= 0x0e084008,
	.emif_ddr_ext_phy_ctrl_1	= 0x08020080,
	.emif_ddr_ext_phy_ctrl_2	= 0x89,
	.emif_ddr_ext_phy_ctrl_3	= 0x90,
	.emif_ddr_ext_phy_ctrl_4	= 0x8e,
	.emif_ddr_ext_phy_ctrl_5	= 0x8d,
	.emif_rd_wr_lvl_rmp_win		= 0x0,
	.emif_rd_wr_lvl_rmp_ctl		= 0x00000000,
	.emif_rd_wr_lvl_ctl		= 0x00000000,
	.emif_rd_wr_exec_thresh		= 0x80000000,
	.emif_prio_class_serv_map	= 0x80000001,
	.emif_connect_id_serv_1_map	= 0x80000094,
	.emif_connect_id_serv_2_map	= 0x00000000,
	.emif_cos_config		= 0x000FFFFF
};

static const struct emif_regs ddr3_idk_emif_regs_400Mhz = {
	.sdram_config			= 0x61a11b32,
	.sdram_config2			= 0x00000000,
	.ref_ctrl			= 0x00000c30,
	.sdram_tim1			= 0xeaaad4db,
	.sdram_tim2			= 0x266b7fda,
	.sdram_tim3			= 0x107f8678,
	.read_idle_ctrl			= 0x00050000,
	.zq_config			= 0x50074be4,
	.temp_alert_config		= 0x00000000,
	.emif_ddr_phy_ctlr_1		= 0x00008009,
	.emif_ddr_ext_phy_ctrl_1	= 0x08020080,
	.emif_ddr_ext_phy_ctrl_2	= 0x00000040,
	.emif_ddr_ext_phy_ctrl_3	= 0x0000003e,
	.emif_ddr_ext_phy_ctrl_4	= 0x00000051,
	.emif_ddr_ext_phy_ctrl_5	= 0x00000051,
	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
	.emif_rd_wr_lvl_rmp_ctl		= 0x00000000,
	.emif_rd_wr_lvl_ctl		= 0x00000000,
	.emif_rd_wr_exec_thresh		= 0x00000405,
	.emif_prio_class_serv_map	= 0x00000000,
	.emif_connect_id_serv_1_map	= 0x00000000,
	.emif_connect_id_serv_2_map	= 0x00000000,
	.emif_cos_config		= 0x00ffffff
};

void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size)
{
	if (board_is_eposevm()) {
		*regs = ext_phy_ctrl_const_base_lpddr2;
		*size = ARRAY_SIZE(ext_phy_ctrl_const_base_lpddr2);
	}

	return;
}

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

	if (board_is_eposevm())
		return &epos_evm_dpll_ddr[ind];
	else if (board_is_evm() || board_is_sk())
		return &gp_evm_dpll_ddr;
	else if (board_is_idk())
		return &idk_dpll_ddr;

	printf(" Board '%s' not supported\n", board_ti_get_name());
	return NULL;
}


/*
 * get_opp_offset:
 * Returns the index for safest OPP of the device to boot.
 * max_off:	Index of the MAX OPP in DEV ATTRIBUTE register.
 * min_off:	Index of the MIN OPP in DEV ATTRIBUTE register.
 * This data is read from dev_attribute register which is e-fused.
 * A'1' in bit indicates OPP disabled and not available, a '0' indicates
 * OPP available. Lowest OPP starts with min_off. So returning the
 * bit with rightmost '0'.
 */
static int get_opp_offset(int max_off, int min_off)
{
	struct ctrl_stat *ctrl = (struct ctrl_stat *)CTRL_BASE;
	int opp, offset, i;

	/* Bits 0:11 are defined to be the MPU_MAX_FREQ */
	opp = readl(&ctrl->dev_attr) & ~0xFFFFF000;

	for (i = max_off; i >= min_off; i--) {
		offset = opp & (1 << i);
		if (!offset)
			return i;
	}

	return min_off;
}

const struct dpll_params *get_dpll_mpu_params(void)
{
	int opp = get_opp_offset(DEV_ATTR_MAX_OFFSET, DEV_ATTR_MIN_OFFSET);
	u32 ind = get_sys_clk_index();

	return &dpll_mpu[ind][opp];
}

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

	return &dpll_core[ind];
}

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

	return &dpll_per[ind];
}

void scale_vcores_generic(u32 m)
{
	int mpu_vdd, ddr_volt;

	if (i2c_probe(TPS65218_CHIP_PM))
		return;

	switch (m) {
	case 1000:
		mpu_vdd = TPS65218_DCDC_VOLT_SEL_1330MV;
		break;
	case 800:
		mpu_vdd = TPS65218_DCDC_VOLT_SEL_1260MV;
		break;
	case 720:
		mpu_vdd = TPS65218_DCDC_VOLT_SEL_1200MV;
		break;
	case 600:
		mpu_vdd = TPS65218_DCDC_VOLT_SEL_1100MV;
		break;
	case 300:
		mpu_vdd = TPS65218_DCDC_VOLT_SEL_0950MV;
		break;
	default:
		puts("Unknown MPU clock, not scaling\n");
		return;
	}

	/* Set DCDC1 (CORE) voltage to 1.1V */
	if (tps65218_voltage_update(TPS65218_DCDC1,
				    TPS65218_DCDC_VOLT_SEL_1100MV)) {
		printf("%s failure\n", __func__);
		return;
	}

	/* Set DCDC2 (MPU) voltage */
	if (tps65218_voltage_update(TPS65218_DCDC2, mpu_vdd)) {
		printf("%s failure\n", __func__);
		return;
	}

	if (board_is_eposevm())
		ddr_volt = TPS65218_DCDC3_VOLT_SEL_1200MV;
	else
		ddr_volt = TPS65218_DCDC3_VOLT_SEL_1350MV;

	/* Set DCDC3 (DDR) voltage */
	if (tps65218_voltage_update(TPS65218_DCDC3, ddr_volt)) {
		printf("%s failure\n", __func__);
		return;
	}
}

void scale_vcores_idk(u32 m)
{
	int mpu_vdd;

	if (i2c_probe(TPS62362_I2C_ADDR))
		return;

	switch (m) {
	case 1000:
		mpu_vdd = TPS62362_DCDC_VOLT_SEL_1330MV;
		break;
	case 800:
		mpu_vdd = TPS62362_DCDC_VOLT_SEL_1260MV;
		break;
	case 720:
		mpu_vdd = TPS62362_DCDC_VOLT_SEL_1200MV;
		break;
	case 600:
		mpu_vdd = TPS62362_DCDC_VOLT_SEL_1100MV;
		break;
	case 300:
		mpu_vdd = TPS62362_DCDC_VOLT_SEL_1330MV;
		break;
	default:
		puts("Unknown MPU clock, not scaling\n");
		return;
	}

	/* Set VDD_MPU voltage */
	if (tps62362_voltage_update(TPS62362_SET3, mpu_vdd)) {
		printf("%s failure\n", __func__);
		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)
{
	const struct dpll_params *mpu_params;

	/* Ensure I2C is initialized for PMIC configuration */
	gpi2c_init();

	/* Get the frequency */
	mpu_params = get_dpll_mpu_params();

	if (board_is_idk())
		scale_vcores_idk(mpu_params->m);
	else
		scale_vcores_generic(mpu_params->m);
}

void set_uart_mux_conf(void)
{
	enable_uart0_pin_mux();
}

void set_mux_conf_regs(void)
{
	enable_board_pin_mux();
}

static void enable_vtt_regulator(void)
{
	u32 temp;

	/* enable module */
	writel(GPIO_CTRL_ENABLEMODULE, AM33XX_GPIO5_BASE + OMAP_GPIO_CTRL);

	/* enable output for GPIO5_7 */
	writel(GPIO_SETDATAOUT(7),
	       AM33XX_GPIO5_BASE + OMAP_GPIO_SETDATAOUT);
	temp = readl(AM33XX_GPIO5_BASE + OMAP_GPIO_OE);
	temp = temp & ~(GPIO_OE_ENABLE(7));
	writel(temp, AM33XX_GPIO5_BASE + OMAP_GPIO_OE);
}

enum {
	RTC_BOARD_EPOS = 1,
	RTC_BOARD_EVM14,
	RTC_BOARD_EVM12,
	RTC_BOARD_GPEVM,
	RTC_BOARD_SK,
};

/*
 * In the rtc_only boot path we have the board type info in the rtc scratch pad
 * register hence we bypass the costly i2c reads to eeprom and directly program
 * the board name string
 */
void rtc_only_update_board_type(u32 btype)
{
	const char *name = "";
	const char *rev = "1.0";

	switch (btype) {
	case RTC_BOARD_EPOS:
		name = "AM43EPOS";
		break;
	case RTC_BOARD_EVM14:
		name = "AM43__GP";
		rev = "1.4";
		break;
	case RTC_BOARD_EVM12:
		name = "AM43__GP";
		rev = "1.2";
		break;
	case RTC_BOARD_GPEVM:
		name = "AM43__GP";
		break;
	case RTC_BOARD_SK:
		name = "AM43__SK";
		break;
	}
	ti_i2c_eeprom_am_set(name, rev);
}

u32 rtc_only_get_board_type(void)
{
	if (board_is_eposevm())
		return RTC_BOARD_EPOS;
	else if (board_is_evm_14_or_later())
		return RTC_BOARD_EVM14;
	else if (board_is_evm_12_or_later())
		return RTC_BOARD_EVM12;
	else if (board_is_gpevm())
		return RTC_BOARD_GPEVM;
	else if (board_is_sk())
		return RTC_BOARD_SK;

	return 0;
}

void sdram_init(void)
{
	/*
	 * EPOS EVM has 1GB LPDDR2 connected to EMIF.
	 * GP EMV has 1GB DDR3 connected to EMIF
	 * along with VTT regulator.
	 */
	if (board_is_eposevm()) {
		config_ddr(0, &ioregs_lpddr2, NULL, NULL, &emif_regs_lpddr2, 0);
	} else if (board_is_evm_14_or_later()) {
		enable_vtt_regulator();
		config_ddr(0, &ioregs_ddr3, NULL, NULL,
			   &ddr3_emif_regs_400Mhz_production, 0);
	} else if (board_is_evm_12_or_later()) {
		enable_vtt_regulator();
		config_ddr(0, &ioregs_ddr3, NULL, NULL,
			   &ddr3_emif_regs_400Mhz_beta, 0);
	} else if (board_is_evm()) {
		enable_vtt_regulator();
		config_ddr(0, &ioregs_ddr3, NULL, NULL,
			   &ddr3_emif_regs_400Mhz, 0);
	} else if (board_is_sk()) {
		config_ddr(400, &ioregs_ddr3, NULL, NULL,
			   &ddr3_sk_emif_regs_400Mhz, 0);
	} else if (board_is_idk()) {
		config_ddr(400, &ioregs_ddr3, NULL, NULL,
			   &ddr3_idk_emif_regs_400Mhz, 0);
	}
}
#endif

/* setup board specific PMIC */
int power_init_board(void)
{
	struct pmic *p;

	if (board_is_idk()) {
		power_tps62362_init(I2C_PMIC);
		p = pmic_get("TPS62362");
		if (p && !pmic_probe(p))
			puts("PMIC:  TPS62362\n");
	} else {
		power_tps65218_init(I2C_PMIC);
		p = pmic_get("TPS65218_PMIC");
		if (p && !pmic_probe(p))
			puts("PMIC:  TPS65218\n");
	}

	return 0;
}

int board_init(void)
{
	struct l3f_cfg_bwlimiter *bwlimiter = (struct l3f_cfg_bwlimiter *)L3F_CFG_BWLIMITER;
	u32 mreqprio_0, mreqprio_1, modena_init0_bw_fractional,
	    modena_init0_bw_integer, modena_init0_watermark_0;

	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
	gpmc_init();

	/*
	 * Call this to initialize ctrl again. ctrl would not have been updated
	 *  across relocation because its address is in SRAM scratchpad
	 */
	hw_data_init();

	/* Clear all important bits for DSS errata that may need to be tweaked*/
	mreqprio_0 = readl(&cdev->mreqprio_0) & MREQPRIO_0_SAB_INIT1_MASK &
	                   MREQPRIO_0_SAB_INIT0_MASK;

	mreqprio_1 = readl(&cdev->mreqprio_1) & MREQPRIO_1_DSS_MASK;

	modena_init0_bw_fractional = readl(&bwlimiter->modena_init0_bw_fractional) &
	                                   BW_LIMITER_BW_FRAC_MASK;

	modena_init0_bw_integer = readl(&bwlimiter->modena_init0_bw_integer) &
	                                BW_LIMITER_BW_INT_MASK;

	modena_init0_watermark_0 = readl(&bwlimiter->modena_init0_watermark_0) &
	                                 BW_LIMITER_BW_WATERMARK_MASK;

	/* Setting MReq Priority of the DSS*/
	mreqprio_0 |= 0x77;

	/*
	 * Set L3 Fast Configuration Register
	 * Limiting bandwith for ARM core to 700 MBPS
	 */
	modena_init0_bw_fractional |= 0x10;
	modena_init0_bw_integer |= 0x3;

	writel(mreqprio_0, &cdev->mreqprio_0);
	writel(mreqprio_1, &cdev->mreqprio_1);

	writel(modena_init0_bw_fractional, &bwlimiter->modena_init0_bw_fractional);
	writel(modena_init0_bw_integer, &bwlimiter->modena_init0_bw_integer);
	writel(modena_init0_watermark_0, &bwlimiter->modena_init0_watermark_0);

	return 0;
}

#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
	set_board_info_env(NULL);

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

#ifdef CONFIG_USB_DWC3
static struct dwc3_device usb_otg_ss1 = {
	.maximum_speed = USB_SPEED_HIGH,
	.base = USB_OTG_SS1_BASE,
	.tx_fifo_resize = false,
	.index = 0,
};

static struct dwc3_omap_device usb_otg_ss1_glue = {
	.base = (void *)USB_OTG_SS1_GLUE_BASE,
	.utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
	.index = 0,
};

static struct ti_usb_phy_device usb_phy1_device = {
	.usb2_phy_power = (void *)USB2_PHY1_POWER,
	.index = 0,
};

static struct dwc3_device usb_otg_ss2 = {
	.maximum_speed = USB_SPEED_HIGH,
	.base = USB_OTG_SS2_BASE,
	.tx_fifo_resize = false,
	.index = 1,
};

static struct dwc3_omap_device usb_otg_ss2_glue = {
	.base = (void *)USB_OTG_SS2_GLUE_BASE,
	.utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
	.index = 1,
};

static struct ti_usb_phy_device usb_phy2_device = {
	.usb2_phy_power = (void *)USB2_PHY2_POWER,
	.index = 1,
};

int usb_gadget_handle_interrupts(int index)
{
	u32 status;

	status = dwc3_omap_uboot_interrupt_status(index);
	if (status)
		dwc3_uboot_handle_interrupt(index);

	return 0;
}
#endif /* CONFIG_USB_DWC3 */

#if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
int board_usb_init(int index, enum usb_init_type init)
{
	enable_usb_clocks(index);
#ifdef CONFIG_USB_DWC3
	switch (index) {
	case 0:
		if (init == USB_INIT_DEVICE) {
			usb_otg_ss1.dr_mode = USB_DR_MODE_PERIPHERAL;
			usb_otg_ss1_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
			dwc3_omap_uboot_init(&usb_otg_ss1_glue);
			ti_usb_phy_uboot_init(&usb_phy1_device);
			dwc3_uboot_init(&usb_otg_ss1);
		}
		break;
	case 1:
		if (init == USB_INIT_DEVICE) {
			usb_otg_ss2.dr_mode = USB_DR_MODE_PERIPHERAL;
			usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
			ti_usb_phy_uboot_init(&usb_phy2_device);
			dwc3_omap_uboot_init(&usb_otg_ss2_glue);
			dwc3_uboot_init(&usb_otg_ss2);
		}
		break;
	default:
		printf("Invalid Controller Index\n");
	}
#endif

	return 0;
}

int board_usb_cleanup(int index, enum usb_init_type init)
{
#ifdef CONFIG_USB_DWC3
	switch (index) {
	case 0:
	case 1:
		if (init == USB_INIT_DEVICE) {
			ti_usb_phy_uboot_exit(index);
			dwc3_uboot_exit(index);
			dwc3_omap_uboot_exit(index);
		}
		break;
	default:
		printf("Invalid Controller Index\n");
	}
#endif
	disable_usb_clocks(index);

	return 0;
}
#endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */

#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)
{
	/* Additional controls can be added here */
	return;
}

static struct cpsw_slave_data cpsw_slaves[] = {
	{
		.slave_reg_ofs	= 0x208,
		.sliver_reg_ofs	= 0xd80,
		.phy_addr	= 16,
	},
	{
		.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
/*
 * 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.
 */
#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_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
	int rv;
	uint8_t mac_addr[6];
	uint32_t mac_hi, mac_lo;

	/* 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 (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
	if (!env_get("ethaddr")) {
		puts("<ethaddr> not set. Validating first E-fuse MAC\n");
		if (is_valid_ethaddr(mac_addr))
			eth_env_set_enetaddr("ethaddr", mac_addr);
	}
#ifndef CONFIG_SPL_BUILD
	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 (!env_get("eth1addr")) {
		if (is_valid_ethaddr(mac_addr))
			eth_env_set_enetaddr("eth1addr", mac_addr);
	}
#endif
	if (board_is_eposevm()) {
		writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel);
		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII;
		cpsw_slaves[0].phy_addr = 16;
	} else if (board_is_sk()) {
		writel(RGMII_MODE_ENABLE, &cdev->miisel);
		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
		cpsw_slaves[0].phy_addr = 4;
		cpsw_slaves[1].phy_addr = 5;
	} else if (board_is_idk()) {
		writel(RGMII_MODE_ENABLE, &cdev->miisel);
		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
		cpsw_slaves[0].phy_addr = 0;
	} else {
		writel(RGMII_MODE_ENABLE, &cdev->miisel);
		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
		cpsw_slaves[0].phy_addr = 0;
	}

	rv = cpsw_register(&cpsw_data);
	if (rv < 0) {
		printf("Error %d registering CPSW switch\n", rv);
		return rv;
	}
#endif
#if defined(CONFIG_USB_ETHER) && \
	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
	if (is_valid_ethaddr(mac_addr))
		eth_env_set_enetaddr("usbnet_devaddr", mac_addr);

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

	return rv;
}
#endif
#endif

#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, bd_t *bd)
{
	ft_cpu_setup(blob, bd);

	return 0;
}
#endif

#ifdef CONFIG_SPL_LOAD_FIT
int board_fit_config_name_match(const char *name)
{
	if (board_is_evm() && !strcmp(name, "am437x-gp-evm"))
		return 0;
	else if (board_is_sk() && !strcmp(name, "am437x-sk-evm"))
		return 0;
	else if (board_is_eposevm() && !strcmp(name, "am43x-epos-evm"))
		return 0;
	else if (board_is_idk() && !strcmp(name, "am437x-idk-evm"))
		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);
}

void board_tee_image_process(ulong tee_image, size_t tee_size)
{
	secure_tee_install((u32)tee_image);
}

U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process);
#endif
SPRAC70A_AM437x_EMIF_Configuration_Tool_V21_modifiedAccordingToGelFile.xlsx

  • Hello Mehmet,

    I am able to replicate the error on my board and I am working with our experts on a solution. I will keep you posted on any updates.

    Regards,
    Krunal 

  • Thank you Krunal,

    I'm waiting for your answer.

    Regards,
    Mehmet

  • Hello Mehmet,

    In the newer Uboot version, u-boot.img is a fit image and it contains the relevant dtb information about the board. The elf file "u-boot" does not contain the dtb information needed to boot the board. Unfortunately, the training video has become obsolete and we are trying to figure out an alternative.

    In the meantime, please take a look at the section "Add a spinlock in SBL main" in the following page. Feel free to add that code in the SPL and compile Uboot to generate MLO and u-boot.img. Next, copy the images in the SD card and boot the board using an SD card.

    After the board boots, connect to CCS (no GEL file) and you should notice the code is stuck inside the while loop. Change the value of exitSpinLock to exit the while loop. Now, you should be able to step through the SPL/Uboot code without any problems.

    Regards,
    Krunal 

  • Hello Krunal,

    "In the newer Uboot version, u-boot.img is a fit image and it contains the relevant dtb information about the board. The elf file "u-boot" does not contain the dtb information needed to boot the board."

    This explanation inspired me.

    Normally I had followed "Processor SDK - Windows SD Card Creation Guide" for creating bootable SD Card.
    "u-boot.img", "MLO" and "uEnv.txt" were created.

    But after this explanation i decided to use "u-boot.bin" and "MLO" which are created by u-boot source code.
    I built "am43xx_evm_config", "u-boot.bin" and "u-boot-spl.bin".
    "u-boot.bin" and "MLO" are created.
    I changed "u-boot.bin" name to the "u-boot.img"
    I replaced "u-boot.img" and "MLO" with existing "u-boot.img" and "MLO" files in SD Card
    I didn't make a change at "uEnv.txt"

    I plug SD card to our custom design board.
    Although there are some error messages, Arago-Linux started.
    U-boot and kernel logs attached.

    I think no need anymore adding "spinlock" to the SBL.

    But the issue that we have now is that we can not use the ethernet port..

    I saw this thread trying to solve ethernet problem. -> e2e.ti.com/.../646456 this thread.
    I suppoze the same problem with us.
    Maybe our problem is also about .dts files.

    I changed "phy_id = <&davinci_mdio>, <0>" to the "phy_id = <&davinci_mdio>, <4>" at am437x-gp-evm.dts (referenced am437x-sk-evm.dts)
    But nothing changed. There is no ethernet connection.

    ifconfig command output is

    root@am437x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 60:64:05:6B:E0:3C
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:46
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1%775872/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:205 errors:0 dropped:0 overruns:0 frame:0
              TX packets:205 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:21378 (20.8 KiB)  TX bytes:21378 (20.8 KiB)

    U-Boot SPL 2018.01-00569-gf9c38b91a2-dirty (Jun 19 2019 - 14:18:29)
    Trying to boot from MMC1
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    
    
    U-Boot 2018.01-00569-gf9c38b91a2-dirty (Jun 19 2019 - 14:18:23 +0300)
    
    CPU  : AM437X-GP rev 1.2
    Model: TI AM437x GP EVM
    DRAM:  512 MiB
    sdadadsadCan't find PMIC:TPS65218_PMIC
    NAND:  512 MiB
    MMC:   OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment
    
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** Unable to read file boot.scr **
    717 bytes read in 3 ms (233.4 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    3887616 bytes read in 230 ms (16.1 MiB/s)
    52821 bytes read in 24 ms (2.1 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8fff0000, end 8ffffe54 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.14.79-gbde58ab01e (oe-user@oe-host) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #1 PREEMPT Thu Dec 20 04:03:12 UTC 2018
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM437x GP EVM
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM437x ES1.2 (sgx neon)
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyO0,115200n8 video=HDMI-A-1:800x600 root=PARTUUID=f9fdd9ec-02 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 456852K/524288K available (8192K kernel code, 329K rwdata, 2560K rodata, 1024K init, 268K bss, 18284K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
    [    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
    [    0.000000]       .data : 0xc0d00000 - 0xc0d52448   ( 330 kB)
    [    0.000000]        .bss : 0xc0d52448 - 0xc0d9569c   ( 269 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
    [    0.000000] OMAP L2C310: ROM does not support power control setting
    [    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
    [    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
    [    0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000011] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000028] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000037] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000429] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000439] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000848] Console: colour dummy device 80x30
    [    0.000876] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000882] This ensures that you still see kernel messages. Please
    [    0.000886] update your kernel commandline.
    [    0.000907] Calibrating delay loop... 1993.93 BogoMIPS (lpj=9969664)
    [    0.060152] pid_max: default: 32768 minimum: 301
    [    0.060316] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.060332] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.061026] CPU: Testing write buffer coherency: ok
    [    0.061086] CPU0: Spectre v2: using BPIALL workaround
    [    0.061776] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.061920] Hierarchical SRCU implementation.
    [    0.062241] EFI services will not be available.
    [    0.063095] devtmpfs: initialized
    [    0.071861] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1ac with crng_init=0
    [    0.072283] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    [    0.072553] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.072573] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.076001] pinctrl core: initialized pinctrl subsystem
    [    0.076669] DMI not present or invalid.
    [    0.077042] NET: Registered protocol family 16
    [    0.078704] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.150048] cpuidle: using governor ladder
    [    0.150085] cpuidle: using governor menu
    [    0.155401] omap_gpio 44e07000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio0_pins, deferring probe
    [    0.156204] OMAP GPIO hardware version 0.1
    [    0.158142] omap_gpio 48322000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/display_mux_pins, deferring probe
    [    0.161854] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/nand_flash_x8, deferring probe
    [    0.165770] No ATAGs?
    [    0.165795] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    [    0.165808] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [    0.177690] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.181886] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c0_pins, deferring probe
    [    0.181948] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c1_pins, deferring probe
    [    0.182081] media: Linux media interface: v0.10
    [    0.182117] Linux video capture interface: v2.00
    [    0.182216] pps_core: LinuxPPS API ver. 1 registered
    [    0.182222] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.182251] PTP clock support registered
    [    0.182283] EDAC MC: Ver: 3.0.0
    [    0.182689] dmi: Firmware registration failed.
    [    0.183031] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.183409] Advanced Linux Sound Architecture Driver Initialized.
    [    0.184449] clocksource: Switched to clocksource timer1
    [    0.191728] NET: Registered protocol family 2
    [    0.192336] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.192376] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.192417] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.192534] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.192550] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.192703] NET: Registered protocol family 1
    [    0.193110] RPC: Registered named UNIX socket transport module.
    [    0.193121] RPC: Registered udp transport module.
    [    0.193127] RPC: Registered tcp transport module.
    [    0.193132] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.195161] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.198521] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.199266] NFS: Registering the id_resolver key type
    [    0.199303] Key type id_resolver registered
    [    0.199310] Key type id_legacy registered
    [    0.199355] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.201367] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.201385] io scheduler noop registered
    [    0.201392] io scheduler deadline registered
    [    0.201579] io scheduler cfq registered (default)
    [    0.201587] io scheduler mq-deadline registered
    [    0.201594] io scheduler kyber registered
    [    0.203640] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
    [    0.206795] pwm-backlight backlight: backlight supply power not found, using dummy regulator
    [    0.248382] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.250623] omap8250 44e09000.serial: No clock speed specified: using default: 48000000
    [    0.251292] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    0.979802] console [ttyS0] enabled
    [    0.983784] omap8250 481a6000.serial: No clock speed specified: using default: 48000000
    [    0.992515] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 31, base_baud = 3000000) is a 8250
    [    1.003191] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    1.010621] omapdss_dss 4832a000.dss: 4832a000.dss supply vdda_video not found, using dummy regulator
    [    1.020085] DSS: OMAP DSS rev 2.0
    [    1.024246] omapdss_dss 4832a000.dss: bound 4832a400.dispc (ops dispc_component_ops)
    [    1.033425] panel-dpi display: display supply vcc not found, using dummy regulator
    [    1.053045] brd: module loaded
    [    1.064370] loop: module loaded
    [    1.070019] libphy: Fixed MDIO Bus: probed
    [    1.144513] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.152215] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [    1.159576] libphy: 4a101000.mdio: probed
    [    1.163617] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Micrel KSZ9031 Gigabit PHY
    [    1.174253] cpsw 4a100000.ethernet: Detected MACID = 60:64:05:6b:e0:3c
    [    1.181004] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    1.187475] cpsw 4a100000.ethernet: ALE Table size 1024
    [    1.192768] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.201236] i2c /dev entries driver
    [    1.205295] IR NEC protocol handler initialized
    [    1.209848] IR RC5(x/sz) protocol handler initialized
    [    1.214957] IR RC6 protocol handler initialized
    [    1.219504] IR JVC protocol handler initialized
    [    1.224049] IR Sony protocol handler initialized
    [    1.228693] IR SANYO protocol handler initialized
    [    1.233414] IR Sharp protocol handler initialized
    [    1.238146] IR MCE Keyboard/mouse protocol handler initialized
    [    1.244000] IR XMP protocol handler initialized
    [    1.250098] cpuidle: enable-method property 'ti,am4372' found operations
    [    1.257290] sdhci: Secure Digital Host Controller Interface driver
    [    1.263497] sdhci: Copyright(c) Pierre Ossman
    [    1.324750] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.334422] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.344696] NET: Registered protocol family 10
    [    1.351284] Segment Routing with IPv6
    [    1.355124] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.361679] NET: Registered protocol family 17
    [    1.366527] Key type dns_resolver registered
    [    1.371003] omap_voltage_late_init: Voltage driver support not added
    [    1.383478] omapdrm omapdrm.0: DMM not available, disable DMM support
    [    1.390453] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.397174] [drm] No driver support for vblank timestamp query.
    [    1.465712] Console: switching to colour frame buffer device 100x30
    [    1.488847] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    1.495513] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
    [    1.503238] GPIO line 119 (SelEMMCorNAND) hogged as output/low
    [    1.509946] GPIO line 136 (SelLCDorHDMI) hogged as output/high
    [    1.516559] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.521730] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.529500] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
    [    1.535947] nand: Micron MT29F4G08ABAEAWP
    [    1.539975] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224
    [    1.547782] using OMAP_ECC_BCH16_CODE_HW ECC scheme
    [    1.552803] 10 ofpart partitions found on MTD device omap2-nand.0
    [    1.558946] Creating 10 MTD partitions on "omap2-nand.0":
    [    1.564398] 0x000000000000-0x000000040000 : "NAND.SPL"
    [    1.570483] 0x000000040000-0x000000080000 : "NAND.SPL.backup1"
    [    1.577208] 0x000000080000-0x0000000c0000 : "NAND.SPL.backup2"
    [    1.583854] 0x0000000c0000-0x000000100000 : "NAND.SPL.backup3"
    [    1.590530] 0x000000100000-0x000000180000 : "NAND.u-boot-spl-os"
    [    1.597385] 0x000000180000-0x000000280000 : "NAND.u-boot"
    [    1.603582] 0x000000280000-0x0000002c0000 : "NAND.u-boot-env"
    [    1.610128] 0x0000002c0000-0x000000300000 : "NAND.u-boot-env.backup1"
    [    1.617439] 0x000000300000-0x000000a00000 : "NAND.kernel"
    [    1.624568] 0x000000a00000-0x000020000000 : "NAND.file-system"
    [    1.724656] tps65218 0-0024: Failed to set masks in 0x3: -121
    [    1.730606] tps65218: probe of 0-0024 failed with error -121
    [    1.736741] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz
    [    1.743981] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 100 kHz
    [    1.750747] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.815819] hctosys: unable to open rtc device (rtc0)
    [    1.821548] vmmcwl_fixed: disabling
    [    1.825208] ALSA device list:
    [    1.828256]   No soundcards found.
    [    1.835577] Waiting for root device PARTUUID=f9fdd9ec-02...
    [    1.881522] mmc1: host does not support reading read-only switch, assuming write-enable
    [    1.891469] mmc1: new high speed SDXC card at address 1234
    [    1.897524] mmcblk1: mmc1:1234 SA64G 58.0 GiB
    [    1.903453]  mmcblk1: p1 p2
    [    1.958622] EXT4-fs (mmcblk1p2): recovery complete
    [    3.055697] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
    [    3.063914] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    3.073220] devtmpfs: mounted
    [    3.078046] Freeing unused kernel memory: 1024K
    [    3.084482] random: fast init done
    [    3.427960] systemd[1]: System time before build time, advancing clock.
    [    3.487736] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN default-hierarchy=hybrid)
    [    3.509354] systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2018.10!
    
    [    3.562621] systemd[1]: Set hostname to <am437x-evm>.
    [    4.175576] random: systemd: uninitialized urandom read (16 bytes read)
    [    4.182719] systemd[1]: Listening on Journal Socket.
    [  OK  ] Listening on Journal Socket.
    [    4.214875] random: systemd: uninitialized urandom read (16 bytes read)
    [    4.221932] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [    4.264723] random: systemd: uninitialized urandom read (16 bytes read)
    [    4.271695] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
    [    4.316938] systemd[1]: Created slice System Slice.
    [  OK  ] Created slice System Slice.
    [    4.345275] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    4.375180] systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [    4.423002] systemd[1]: Listening on Process Core Dump Socket.
    [  OK  ] Listening on Process Core Dump Socket.
    [  OK  ] Created slice system-getty.slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
             Starting Create list of required st…ce nodes for the current kernel...
    [  OK  ] Listening on Journal Socket (/dev/log).
             Starting Remount Root and Kernel File Systems...
    [  OK  ] Reached target Remote File Systems.
    [    4.631424] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
    [  OK  ] Reached target Swap.
             Mounting Temporary Directory (/tmp)...
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Reached target Paths.
             Mounting POSIX Message Queue File System...
    [  OK  ] Created slice User and Session Slice.
    [  OK  ] Reached target Slices.
             Starting Load Kernel Modules...
    [  OK  ] Listening on Syslog Socket.
    [    4.938344] cmemk: loading out-of-tree module taints kernel.
    [    4.947193] CMEMK module: reference Linux version 4.14.79
    [    4.953474] no physical memory specified
    [    4.957629] cmemk initialized
             [    4.976074] cryptodev: driver 1.9 loaded.
    Starting Journal Service...
             Mounting Kernel Debug File System...
    [    5.019937] usbcore: registered new interface driver usbfs
    [    5.056674] usbcore: registered new interface driver hub
    [    5.056819] usbcore: registered new device driver usb
    [    5.080316] usbcore: registered new interface driver usbserial
    [  OK  ] Mounted POSIX Message Queue File System.
    [    5.107914] usbcore: registered new interface driver ftdi_sio
    [    5.113761] usbserial: USB Serial support registered for FTDI USB Serial Device
    [  OK  ] Mounted Temporary Directory (/tmp).
    [  OK  ] Mounted Kernel Debug File System.
    [  OK  ] Started Create list of required sta…vice nodes for the current kernel.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Journal Service.
             Mounting Kernel Configuration File System...
             Starting Apply Kernel Variables...
             Starting Rebuild Hardware Database...
             Starting Flush Journal to Persistent Storage...
             Starting Create System Users...
    [  OK  ] Mounted Kernel Configuration File System.
    [  OK  ] Started Apply Kernel Variables.
    [  OK  ] Started Create System Users.
    [    5.639497] systemd-journald[69]: Received request to flush runtime journal from PID 1
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /var/volatile...
             Mounting /media/ram...
             Starting udev Kernel Device Manager...
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Mounted /media/ram.
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Rebuild Dynamic Linker Cache...
             Starting Create Volatile Files and Directories...
             Starting Rebuild Journal Catalog...
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Network Time Synchronization...
             Starting Update UTMP about System Boot/Shutdown...
    [  OK  ] Started Rebuild Journal Catalog.
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Started Rebuild Dynamic Linker Cache.
    [  OK  ] Started Rebuild Hardware Database.
             Starting Update is Completed...
             Starting udev Coldplug all Devices...
    [  OK  ] Started Update is Completed.
    [   12.360730] Unable to handle kernel paging request at virtual address 0000decc
    [   12.398565] pgd = dba40000
    [   12.401302] [0000decc] *pgd=00000000
    [   12.416731] Internal error: Oops: 5 [#1] PREEMPT ARM
    [   12.421731] Modules linked in: sch_fq_codel uio_module_drv(O) uio ftdi_sio usbserial usbcore usb_common cryptodev(O) cmemk(O)
    [   12.433116] CPU: 0 PID: 110 Comm: systemd-udevd Tainted: G           O    4.14.79-gbde58ab01e #1
    [   12.441938] Hardware name: Generic AM43 (Flattened Device Tree)
    [   12.447881] task: dba49200 task.stack: db9bc000
    [   12.452448] PC is at link_path_walk+0x38/0x4ec
    [   12.456911] LR is at path_openat+0x88/0x1124
    [   12.461197] pc : [<c0231a1c>]    lr : [<c0233488>]    psr: 20070013
    [   12.467487] sp : db9bddb8  ip : db9bde18  fp : db9bde14
    [   12.472729] r10: 00000005  r9 : dbfdea80  r8 : c0107ea4
    [   12.477973] r7 : 00000001  r6 : 0000dea8  r5 : dbf1e011  r4 : 0000dea8
    [   12.484524] r3 : 00000073  r2 : c0ab13e8  r1 : 0000dea8  r0 : dbf1e010
    [   12.491079] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
    [   12.498242] Control: 10c53c7d  Table: 9ba40059  DAC: 00000051
    [   12.504009] Process systemd-udevd (pid: 110, stack limit = 0xdb9bc208)
    [   12.510562] Stack: (0xdb9bddb8 to 0xdb9be000)
    [   12.514935] dda0:                                                       c0213978 c02139e4
    [   12.523148] ddc0: c0d1c2b4 dbf77e80 c0d7f680 00000001 c0107ea4 db9bc000 db9bdea8 dbf1e010
    [   12.531361] dde0: db9bde14 db9bddf0 c022f3fc 0000dea8 dbf1e010 db9bdf5c 00000001 c0107ea4
    [   12.539572] de00: dbfdea80 00000005 db9bdea4 db9bde18 c0233488 c02319f0 dbf1e015 c0248ad8
    [   12.547785] de20: 00000000 dc0e6110 dc102bd0 00000000 dbf1e010 c0ab13e8 00000000 ffffe000
    [   12.555996] de40: 00000000 db9bde48 00000041 dbfdea80 dbf1e000 dbf1e010 db9bde94 00000000
    [   12.564208] de60: c0292948 c02425d0 00000000 00000000 dc100440 db9bc000 db9bdeb4 00000007
    [   12.572420] de80: db9bdea8 db9bdf5c 00000001 c0107ea4 db9bc000 00000005 db9bdf4c db9bdea8
    [   12.580631] dea0: c02353f8 c023340c db8db910 dc0e6110 000041ed 00000055 00000000 00000000
    [   12.588842] dec0: db8db910 dc0e6110 dc0fa2e8 00001051 00000002 00000250 00000001 00000000
    [   12.597055] dee0: 00000000 db9bdee8 c0d032ec 00000007 dc439180 dc439194 00000000 00000400
    [   12.605267] df00: db9bdf3c db9bdf10 c0245e84 c02454b0 000a0000 000a0000 dbf1e000 00000000
    [   12.613480] df20: fffff000 00000002 ffffff9c 00000005 00000007 ffffff9c dbf1e000 fffff000
    [   12.621692] df40: db9bdf94 db9bdf50 c02228e8 c0235398 0000000f 00000000 00000000 00020000
    [   12.629903] df60: 00000000 00000004 00000100 00000001 004c3a20 00000000 00000008 00000005
    [   12.638116] df80: c0107ea4 db9bc000 db9bdfa4 db9bdf98 c0222988 c022278c 00000000 db9bdfa8
    [   12.646328] dfa0: c0107ca0 c0222974 004c3a20 00000000 be8aaaa8 000a0000 000001b6 000001b6
    [   12.654540] dfc0: 004c3a20 00000000 00000008 00000005 00000000 00000000 be8aaae8 be8aaaf0
    [   12.662753] dfe0: 00000000 be8aa96c b6d59281 b6d94188 40070030 be8aaaa8 00000000 00000000
    [   12.670959] Backtrace:
    [   12.673422] [<c02319e4>] (link_path_walk) from [<c0233488>] (path_openat+0x88/0x1124)
    [   12.681288]  r10:00000005 r9:dbfdea80 r8:c0107ea4 r7:00000001 r6:db9bdf5c r5:dbf1e010
    [   12.689146]  r4:0000dea8
    [   12.691692] [<c0233400>] (path_openat) from [<c02353f8>] (do_filp_open+0x6c/0xd0)
    [   12.699207]  r10:00000005 r9:db9bc000 r8:c0107ea4 r7:00000001 r6:db9bdf5c r5:db9bdea8
    [   12.707065]  r4:00000007
    [   12.709620] [<c023538c>] (do_filp_open) from [<c02228e8>] (do_sys_open+0x168/0x1e8)
    [   12.717307]  r7:fffff000 r6:dbf1e000 r5:ffffff9c r4:00000007
    [   12.722992] [<c0222780>] (do_sys_open) from [<c0222988>] (SyS_open+0x20/0x24)
    [   12.730157]  r9:db9bc000 r8:c0107ea4 r7:00000005 r6:00000008 r5:00000000 r4:004c3a20
    [   12.737946] [<c0222968>] (SyS_open) from [<c0107ca0>] (ret_fast_syscall+0x0/0x54)
    [   12.745462] Code: e353002f 0afffffc e3530000 0a0000da (e5963024)
    [  OK  ] Created slice system-systemd\x2dcoredump.slice.
    [  OK  ] Started Process Core Dump (PID 111/UID 0).
    [   13.261549] remoteproc remoteproc0: wkup_m3 is available
    [   13.390365] remoteproc remoteproc0: powering up wkup_m3
    [  OK  ] Found device /dev/ttyS0.
    [   13.456329] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [   13.491119] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224628
    [   13.539958] omap_rtc 44e3e000.rtc: char device (253:0)
    [   13.540097] omap_rtc 44e3e000.rtc: registered as rtc0
    [   13.577761] ov2659 0-0030: GPIO lookup for consumer pwrdn
    [   13.577767] ov2659 0-0030: using device tree for GPIO lookup
    [   13.577785] of_get_named_gpiod_flags: can't parse 'pwrdn-gpios' property of node '/ocp@44000000/i2c@44e0b000/ov2659@30[0]'
    [   13.577792] of_get_named_gpiod_flags: can't parse 'pwrdn-gpio' property of node '/ocp@44000000/i2c@44e0b000/ov2659@30[0]'
    [   13.577796] ov2659 0-0030: using lookup tables for GPIO lookup
    [   13.577802] ov2659 0-0030: lookup for GPIO pwrdn failed
    [   13.608141] ov2659 0-0030: Sensor detection failed (3030, 0)
    [   13.608583] ov2659 1-0030: GPIO lookup for consumer pwrdn
    [   13.608589] ov2659 1-0030: using device tree for GPIO lookup
    [   13.608607] of_get_named_gpiod_flags: can't parse 'pwrdn-gpios' property of node '/ocp@44000000/i2c@4802a000/ov2659@30[0]'
    [   13.608614] of_get_named_gpiod_flags: can't parse 'pwrdn-gpio' property of node '/ocp@44000000/i2c@4802a000/ov2659@30[0]'
    [   13.608618] ov2659 1-0030: using lookup tables for GPIO lookup
    [   13.608624] ov2659 1-0030: lookup for GPIO pwrdn failed
    [   13.637544] ov2659 1-0030: Sensor detection failed (3030, 0)
    [   13.641114] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   13.641315] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   13.654641] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   13.706382] pixcir_ts 1-005c: GPIO lookup for consumer attb
    [   13.706388] pixcir_ts 1-005c: using device tree for GPIO lookup
    [   13.706409] of_get_named_gpiod_flags: can't parse 'attb-gpios' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]'
    [   13.706498] of_get_named_gpiod_flags: parsed 'attb-gpio' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]' - status (0)
    [   13.706567] pixcir_ts 1-005c: GPIO lookup for consumer reset
    [   13.706571] pixcir_ts 1-005c: using device tree for GPIO lookup
    [   13.706581] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]'
    [   13.706588] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]'
    [   13.706592] pixcir_ts 1-005c: using lookup tables for GPIO lookup
    [   13.706597] pixcir_ts 1-005c: lookup for GPIO reset failed
    [   13.706603] pixcir_ts 1-005c: GPIO lookup for consumer wake
    [   13.706606] pixcir_ts 1-005c: using device tree for GPIO lookup
    [   13.706612] of_get_named_gpiod_flags: can't parse 'wake-gpios' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]'
    [   13.706618] of_get_named_gpiod_flags: can't parse 'wake-gpio' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]'
    [   13.706621] pixcir_ts 1-005c: using lookup tables for GPIO lookup
    [   13.706625] pixcir_ts 1-005c: lookup for GPIO wake failed
    [   13.706630] pixcir_ts 1-005c: GPIO lookup for consumer enable
    [   13.706634] pixcir_ts 1-005c: using device tree for GPIO lookup
    [   13.706640] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]'
    [   13.706645] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/ocp@44000000/i2c@4802a000/pixcir_ts@5c[0]'
    [   13.706649] pixcir_ts 1-005c: using lookup tables for GPIO lookup
    [   13.706653] pixcir_ts 1-005c: lookup for GPIO enable failed
    [   13.709615] pixcir_ts 1-005c: pixcir_set_power_mode: can't read reg 0x33 : -121
    [   13.709621] pixcir_ts 1-005c: Failed to set IDLE mode
    [   13.710022] pixcir_ts: probe of 1-005c failed with error -121
    [   13.786044] CAN device driver interface
    [   13.809844] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=60)
    [   13.810741] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   13.810903] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   13.811051] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   13.815848] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=61)
    [   13.816761] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   13.816934] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   13.817086] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   13.921977] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   13.922143] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   13.922290] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   13.940637] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   13.940806] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   13.940953] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.058207] ---[ end trace dec43064f7bc4877 ]---
    [   14.065585] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.065750] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.066219] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.086073] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.086239] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.086388] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.396378] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.396530] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.396675] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.453000] omap-sham 53100000.sham: hw accel on OMAP rev 0.0
    [   14.545081] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.545252] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.547795] omap-aes 53501000.aes: OMAP AES hw accel rev: 0.1
    [   14.549523] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.550599] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.550759] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.550894] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.578001] omap-aes 53501000.aes: will run requests pump with realtime priority
    [   14.605491] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.605671] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.605978] omap-des 53701000.des: OMAP DES hw accel rev: 0.33
    [   14.606256] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.616658] omap-des 53701000.des: will run requests pump with realtime priority
    [   14.630619] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.630790] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.631801] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   14.632464] [drm] Initialized pvr 1.14.3699939 20110701 for 56000000.sgx on minor 1
    [   14.634971] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   14.635171] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   14.635310] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   16.216508] PM: Cannot get wkup_m3_ipc handle
    [   16.234997] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad0[0]' - status (0)
    [   16.235022] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad0[1]' - status (0)
    [   16.235045] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad0[2]' - status (0)
    [   16.235058] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad0[0]' - status (0)
    [   16.235074] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad0[1]' - status (0)
    [   16.235614] input: matrix_keypad0 as /devices/platform/matrix_keypad0/input/input1
    [   16.248741] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   16.248914] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   16.265228] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   16.265740] PM: Cannot get wkup_m3_ipc handle
    [   16.373632] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   18.856445] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   18.856659] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   18.856809] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   18.857154] PM: Cannot get wkup_m3_ipc handle
    [   20.091006] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.091169] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.091318] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.091663] PM: Cannot get wkup_m3_ipc handle
    [   20.101077] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.101236] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.103931] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.104710] PM: Cannot get wkup_m3_ipc handle
    [   20.181129] pruss 54400000.pruss: creating PRU cores and other child platform devices
    [   20.184654] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.184840] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.184989] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.185330] PM: Cannot get wkup_m3_ipc handle
    [   20.225031] pruss 54440000.pruss: creating PRU cores and other child platform devices
    [   20.228492] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.228652] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.228796] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.229132] PM: Cannot get wkup_m3_ipc handle
    [   20.354060] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    [   20.354100] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
    [   20.369103] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f06d hci version 0x100 quirks 0x02010010
    [   20.369158] xhci-hcd xhci-hcd.0.auto: irq 104, io mem 0x48390000
    [   20.374255] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [   20.374263] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   20.374269] usb usb1: Product: xHCI Host Controller
    [   20.374273] usb usb1: Manufacturer: Linux 4.14.79-gbde58ab01e xhci-hcd
    [   20.374277] usb usb1: SerialNumber: xhci-hcd.0.auto
    [   20.375173] hub 1-0:1.0: USB hub found
    [   20.375222] hub 1-0:1.0: 1 port detected
    [   20.376279] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.376467] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.376617] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.376962] PM: Cannot get wkup_m3_ipc handle
    [   20.378529] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.378690] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.379005] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    [   20.379024] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
    [   20.379043] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0  SuperSpeed
    [   20.380940] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.392522] PM: Cannot get wkup_m3_ipc handle
    [   20.410865] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [   20.410983] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
    [   20.410990] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   20.410995] usb usb2: Product: xHCI Host Controller
    [   20.410999] usb usb2: Manufacturer: Linux 4.14.79-gbde58ab01e xhci-hcd
    [   20.411004] usb usb2: SerialNumber: xhci-hcd.0.auto
    [   20.411755] hub 2-0:1.0: USB hub found
    [   20.411808] hub 2-0:1.0: 1 port detected
    [   20.412393] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   20.412420] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
    [   20.415612] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.415791] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.433005] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.438893] PM: Cannot get wkup_m3_ipc handle
    [   20.448272] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.457059] remoteproc remoteproc1: 54434000.pru is available
    [   20.457123] pru-rproc 54434000.pru: PRU rproc node /ocp@44000000/pruss_soc_bus@54426000/pruss@0/pru@34000 probed successfully
    [   20.457583] remoteproc remoteproc2: 54438000.pru is available
    [   20.457644] pru-rproc 54438000.pru: PRU rproc node /ocp@44000000/pruss_soc_bus@54426000/pruss@0/pru@38000 probed successfully
    [   20.458057] remoteproc remoteproc3: 54474000.pru is available
    [   20.458115] pru-rproc 54474000.pru: PRU rproc node /ocp@44000000/pruss_soc_bus@54426000/pruss@40000/pru@74000 probed successfully
    [   20.458463] remoteproc remoteproc4: 54478000.pru is available
    [   20.458497] pru-rproc 54478000.pru: PRU rproc node /ocp@44000000/pruss_soc_bus@54426000/pruss@40000/pru@78000 probed successfully
    [   20.464922] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.469155] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.469743] PM: Cannot get wkup_m3_ipc handle
    [   20.471201] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.471354] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.477891] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [   20.481134] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f06d hci version 0x100 quirks 0x02010010
    [   20.481194] xhci-hcd xhci-hcd.1.auto: irq 105, io mem 0x483d0000
    [   20.481392] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
    [   20.481398] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   20.481403] usb usb3: Product: xHCI Host Controller
    [   20.481408] usb usb3: Manufacturer: Linux 4.14.79-gbde58ab01e xhci-hcd
    [   20.481412] usb usb3: SerialNumber: xhci-hcd.1.auto
    [   20.482174] hub 3-0:1.0: USB hub found
    [   20.482223] hub 3-0:1.0: 1 port detected
    [   20.482604] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   20.482624] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
    [   20.482640] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0  SuperSpeed
    [   20.482715] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
    [   20.482814] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
    [   20.482821] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   20.482826] usb usb4: Product: xHCI Host Controller
    [   20.482830] usb usb4: Manufacturer: Linux 4.14.79-gbde58ab01e xhci-hcd
    [   20.482834] usb usb4: SerialNumber: xhci-hcd.1.auto
    [   20.483409] hub 4-0:1.0: USB hub found
    [   20.483447] hub 4-0:1.0: 1 port detected
    [   20.489714] PM: Cannot get wkup_m3_ipc handle
    [   20.491216] of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp@44000000/i2c@4802a000/tlv320aic3106@1b[0]'
    [   20.491374] tlv320aic3x-codec 1-001b: Failed to get supply 'DVDD': -517
    [   20.534176] tlv320aic3x-codec 1-001b: Failed to request supplies: -517
    [  OK  ] Started udev Coldplug all Devices.
    [   21.574105] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [   21.580757] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Created slice system-systemd\x2dbacklight.slice.
             Starting Load/Save Screen Backlight…ightness of backlight:backlight...
    [  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Started Daily rotation of log files.
             Starting Network Service...
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
    [  OK  ] Reached target Containers.
             Starting Print notice about GPLv3 packages...
    [  OK  ] Started System Logging Service.
    [  OK  ] Started Kernel Logging Service.
             Starting RPC Bind Service...
    [  OK  ] Started D-Bus System Message Bus.
    [  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
    [  OK  ] Started Job spooling tools.
             Starting uim-sysfs.service...
    [   24.015531] random: crng init done
    [   24.035402] random: 7 urandom warning(s) missed due to ratelimiting
             Starting Login Service...
    [  OK  ] Started Periodic Command Scheduler.
    [   24.153999] net eth0: initializing cpsw version 1.15 (0)
             Starting Avahi mDNS/DNS-SD Stack...
    [  OK  ] Started Network Service.
    [  OK  ] Started RPC Bind Service.
    [  OK  ] Reached target Network.
             Starting Simple Network Management Protocol (SNMP) Daemon....
    [   24.339711] Micrel KSZ9031 Gigabit PHY 4a101000.mdio:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    [  OK  ] Started Redis In-Memory Data Store.
             Starting Enable and configure wl18xx bluetooth stack...
    [   24.501684] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
             Starting Lightning Fast Webserver With Light System Requirements...
             Starting Permit User Sessions...
             Starting Network Name Resolution...
             Starting Wait for Network to be Configured...
    [  OK  ] Started Lightning Fast Webserver With Light System Requirements.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Started Login Service.
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Reached target Login Prompts.
             Starting Synchronize System and HW clocks...
    [  OK  ] Started Synchronize System and HW clocks.
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Reached target Host and Network Name Lookups.
    [  OK  ] Started NFS status monitor for NFSv2/3 locking..
    [  OK  ] Started Simple Network Management Protocol (SNMP) Daemon..
    [  OK  ] Started Enable and configure wl18xx bluetooth stack.
    [  OK  ] Started uim-sysfs.service.
             Starting rc.pvr.service...
    [   27.350956] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    [  OK  ] Started rc.pvr.service.
             Starting weston.service...
    [  OK  ] Started weston.service.
             Starting Matrix GUI...
             Starting telnetd.service...
    [  OK  ] Started Matrix GUI.
    [  OK  ] Started telnetd.service.
             Starting thttpd.service...
    [  OK  ] Started thttpd.service.
             Starting rng-tools.service...
    [  OK  ] Started rng-tools.service.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
            autoconf
            bash-dev
            bash
            binutils
            cifs-utils
            cpio
            cpp-symlinks
            cpp
            dosfstools
            elfutils
            findutils
            g++-symlinks
            g++
            gawk
            gcc-symlinks
            gcc
            gdb
            gdbserver
            gettext
            glmark2
            gstreamer1.0-libav
            gzip
            hidapi
            libdw1
            libelf1
            libgdbm-compat4
            libgdbm-dev
            libgdbm4
            libgettextlib
            libgettextsrc
            libgmp10
            libidn11
            libmavconn
            libmpc3
            libmpfr4
            libreadline-dev
            libreadline7
            libunistring2
            m4-dev
            m4
            make
            mavlink
            mavros-extras
            mavros-msgs
            mavros
            nettle
            python3-pycairo
            socketcan-interface
            which
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org am437x-evm ttyS0
    
    Arago 2018.10 am437x-evm ttyS0
    
    am437x-evm login: [   34.248139] alloc_contig_range: [9d051, 9d052) PFNs busy
    [   34.257487] alloc_contig_range: [9d051, 9d052) PFNs busy

  • Hello Mehmet,

    I highly recommend using the u-boot.img and I am not sure why you are using you are using u-boot.bin. With regards to the Ethernet issue, I am wondering if you could please open another thread.

    When it comes to booting from a boot media, we recommend using MLO and u-boot.img for Uboot. If you are loading images from CCS, the tutorial you watched does not work anymore and we are working on figuring out an alternative. 

    Regards,
    Krunal

  • Hello Krunal,

    "I highly recommend using the u-boot.img and I am not sure why you are using you are using u-boot.bin. "

    I just tried and work.

    "u-boot.img" and "MLO" which are created with "Windows SD Card Creation Guide" did not work.  http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_02_00_10/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide

    So I deleted them. Then i used "u-boot.bin" and "MLO" (where are located at home/ti-processor-sdk-linux-am437x-evm-05.03.00.07/board-support/u-boot-2018.01+gitAU.../ ) "u-boot.bin" extension had changed to ".img" And i copied them to the SD Card. Linux started.

     

    I will open another thread for Ethernet issue, Thanks,

     

    Best Regards

    Mehmet

  • Hello Mehmet,

    With regards to your initial problem, please add CONFIG_OF_EMBED=y in the am43xx_evm_defconfig file. If you refer to the <u-boot_dir>/README file, it mentions "If this variable is defined, U-Boot will embed a device tree binary in its image." Please keep in mind that this is suitable for debugging and development only and is not recommended for production devices (reference-><u-boot_dir>/docs/README.fdt-control). 

    After loading the new elf "u-boot" file, I noticed the program counter change to 0x80800000. However, after stepping through a few lines of assembly code, I noticed the program counter changed to 0x402f4040. At that point, please change the program counter back to 0x80800000. After executing the previous steps, if I click run in CCS, I am able to see the Uboot prompt on my terminal.

    Regards,
    Krunal

  • Hello Krunal, 

    Thank you for your interest.

    Whether I add  "CONFIG_OF_EMBED=y" or not (I tried both of them)

    I loaded u-boot-spl.bin at 0x402f4000. Changed PC to 0x402f4000. Run.

    SPL message seen.

    Then I loaded u.boot.bin at 0x80800000. Changed PC to 0x80800000. Run . 

    Program counter waits 0x402f4040

    Again I changed PC to 0x80800000 and Run.

    I am also able to see the Uboot prompt on my terminal

    Infact my goal is not to debug board.

    I followed "training.ti.com/linux-board-porting-series-module-7-debugging-u-boot-jtag-ccs" because I couldn't find a more descriptive video or document.

    I just want "plug&play"  board. My goal --> when i power to board, linux will boot up.

    Somehow i did this goal. ( modified "u-boot.bin" extension changed u-boot.img. as I explained above) But you said that is not right.

    Okey. But how can i do this ? (when i power to board, linux will boot up.)

     

    I tried creating SD Card with "Processor SDK - Windows SD Card Creation Guide.

    I plug this SD Card to our board. Anything on my terminal.

    Then I modified u-boot source code according to my hardware. I  built "am43xx_evm_config", "u-boot.bin" and "u-boot-spl.bin"

    "u-boot.bin" and "MLO" are created.  I changed "u-boot.bin" name to the "u-boot.img" I moved "u-boot.img" and "MLO" to SD Card.

    I plug SD Card my board. i powered to board, linux booted up.

     

    I think my question has become an infinite loop unfortunately..

    Regards,

    Mehmet

  • Hello Mehmet,

    Here are a couple of suggestions:

    1. The "Processor SDK - Windows SD Card Creation Guide" will format the SD card and load the pre-built images on the SD card. This will not work for you because the pre-built images are specific to the TI board. Since you have a custom board, please make the appropriate changes in the Uboot directory. Build Uboot and copy the newly generated images (MLO and u-boot.img) on the SD card. I usually use the guide to just format the SD card and manually update the images based on the board I am using. 

    After building Uboot, you should see a bunch of images such as u-boot.bin, u-boot.img, MLO and etc. I recommend copying u-boot.img and MLO to the boot partition of the SD card. (Please ignore the file u-boot.bin) 

    2. "Then I loaded u.boot.bin at 0x80800000. Changed PC to 0x80800000. Run" Please load the elf file "u-boot" and ignore the u-boot.bin file. If you just want to "plug&play", I recommend booting the board from SD card rather than CCS. CCS is only used if your custom board is having issues booting from the SD card. It is only useful for debugging Uboot related issues. 

    Regards,
    Krunal

  • Hello Krunal, 

    Thank you for your clear answer.

    I want to use "u-boot.img" too. 

    But there is not any "u-boot.img" file. 

    There is "u-boot.bin" file. 

    We need "u-boot.img" file so convert "u-boot.bin" to "u-boot.img"

    Can you say directory of the "u-boot.img" ?  Where is the auto-generated "u-boot.img" ?

    Regards,

    Mehmet

     

  • Hi Krunal,

    Screenshot of the home/ti-processor-sdk-linux-am437x-evm-05.03.00.07/board-support/u-boot-2018.01+gitAU.../ is

    There is not "u-boot.img" file.

     

    One more question: What do you mean by "elf file" ?

    Is it u-boot.bin with debug symbols?  (Is it between "TISDK-README" symbol and "u-boot.bin" symbol at above picture ? ) 

    Thanks,

    Mehmet

  • Hi Mehmet,

    Yes, based on the above picture "u-boot" is located between "TISDK-README" and "u-boot.bin". Also, I am not sure why the u-boot.img file is not generated and I am wondering if you could please share your steps for building Uboot. Here are a couple of references for building u-boot: ref1 and ref2.

    Regards,
    Krunal

  • Hi Krunal,

    if you could please share your steps for building Uboot.

    I had followed Modul6 for building U-boot. (see 5:49)

    But "u-boot.img" did not generated.

    As you suggested 

    at /home/xxx/ti...sdk/board-support/u-boot/ 

    export CROSS_COMPILE=arm-linux-gnueabihf-
    export ARCH=arm
    make am43x_evm_defconfig

    u-boot.img" is generated.!

    Thanks for your effort
    Best regards 
    Mehmet