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.

USB0 and USB1 u-boot to allow booting from USB flash drive AM335x

Other Parts Discussed in Thread: TPS65217

I would like to be able to boot from the USB0(ROM loader) into U-Boot then boot from a USB drive on USB1 is this possible?  This would only be until I get the eMMC loaded with the proper files.

Another solution could be the DFU but it appears to not be in the latest u-boot in sdk 7.0.

Also porting u-boot for a am335x is in note straight forward and something a simple as moving I2C from 0 to 1 is quite difficult.

Any tips would be great thanks

  • The AM335x ROM code does not support booting from a USB drive.

    Regards,
    Paul

  • Paul, I think Joshua wants to boot peripheral USB0 for SPL and u-boot and then have u-boot load the kernel from USB1 host memory stick. It sounds do-able with some changes to u-boot.

    Joshua, looking at the SDK 7.0 include/configs/am335x_evm.h there are #define for DFU...I just have not tested them yet. Also, can you explain your difficulties in modifying this u-boot? Maybe I can help out.

    Steve K.

  •  I just read you post again and realized you were not wanting to boot from a USB drive when you power-up.

    Are you are wanting to boot from a PC connected to USB0 operating in peripheral mode then have another boot loader perform the final boot from a USB drive connected to USB1 operating as USB host?

    Regards,
    Paul

  • peaves said:

    Are you are wanting to boot from a PC connected to USB0 operating in peripheral mode then have another boot loader perform the final boot from a USB drive connected to USB1 operating as USB host.

    Correct, as my board comes with the eMMC blank and booting from UART is slow so I now have atftpd to load the spl and u-boot.img, but as far as getting a kernel to load is quite difficult with no rootfs, dts, etc....
     
    Steve- I am having trouble getting I2C1 bus to be used for the TPS65217 rather than I2C0.  I can get the pinmux corrected for this but can not get i2c_init to use i2c1 bus.  Also my board does not have eeprom for storing board info, maybe the u-boot for am335x "bare metal" would be good if one existed.
    I have taken most of the design from BBB but used the AM335x-SK for reference to.  My board does have a SPI FRAM I could possibly use but I do not see needing it as if we have a different board it will have its own bootloader...
  • Hi Joshua,

    For the USB question, I've never tested this, but I'd suggest formatting the USB memory stick with an ext file system, fill it with a root file system, put the zImage and .dtb file in the /boot directory. Then modify your u-boot environment to load the zImage into ram, load the .dtb into ram, make sure the bootargs have root=/dev/sda1, and bootz with the correct addresses. If I have some time today I'll see what I can test out.

    For the i2c question, before the i2c_init you can use i2c_set_bus_num(1) to change to bus 1. Then the init/read/write should be for bus 1. Again, untested.

    Steve K.

  • I seem to have read the PMIC now but U-Boot still will not boot

    I added a bunch of puts() to help find where it was failing but nkow it seems to be right after this function am33xx_spl_board_init()

    I will attach files i have modified from sdk7.0.

    6131.board.c
    /*
     * board.c
     *
     * Board functions for TI AM335X based boards
     *
     * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
     *
     * SPDX-License-Identifier:	GPL-2.0+
     */
    
    #include <common.h>
    #include <errno.h>
    #include <spl.h>
    #include <asm/arch/cpu.h>
    #include <asm/arch/hardware.h>
    #include <asm/arch/omap.h>
    #include <asm/arch/ddr_defs.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/mmc_host_def.h>
    #include <asm/arch/sys_proto.h>
    #include <asm/arch/mem.h>
    #include <asm/io.h>
    #include <asm/emif.h>
    #include <asm/gpio.h>
    #include <i2c.h>
    #include <miiphy.h>
    #include <cpsw.h>
    #include <power/tps65217.h>
    #include <power/tps65910.h>
    #include "board.h"
    
    DECLARE_GLOBAL_DATA_PTR;
    
    /* GPIO that controls power to DDR on EVM-SK */
    #define GPIO_DDR_VTT_EN		7
    
    static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
    
    /*
     * Read header information from EEPROM into global structure.
     */
    static int read_eeprom(struct am335x_baseboard_id *header)
    {
    	/* Check if baseboard eeprom is available */
    	if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
    		puts("Could not probe the EEPROM; something fundamentally "
    			"wrong on the I2C bus.\n");
    		return -ENODEV;
    	}
    
    	/* read the eeprom using i2c */
    	if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, (uchar *)header,
    		     sizeof(struct am335x_baseboard_id))) {
    		puts("Could not read the EEPROM; something fundamentally"
    			" wrong on the I2C bus.\n");
    		return -EIO;
    	}
    
    	if (header->magic != 0xEE3355AA) {
    		/*
    		 * read the eeprom using i2c again,
    		 * but use only a 1 byte address
    		 */
    		if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1, (uchar *)header,
    			     sizeof(struct am335x_baseboard_id))) {
    			puts("Could not read the EEPROM; something "
    				"fundamentally wrong on the I2C bus.\n");
    			return -EIO;
    		}
    
    		if (header->magic != 0xEE3355AA) {
    			printf("Incorrect magic number (0x%x) in EEPROM\n",
    					header->magic);
    			return -EINVAL;
    		}
    	}
    
    	return 0;
    }
    
    #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
    static const struct ddr_data ddr2_data = {
    	.datardsratio0 = ((MT47H128M16RT25E_RD_DQS<<30) |
    			  (MT47H128M16RT25E_RD_DQS<<20) |
    			  (MT47H128M16RT25E_RD_DQS<<10) |
    			  (MT47H128M16RT25E_RD_DQS<<0)),
    	.datawdsratio0 = ((MT47H128M16RT25E_WR_DQS<<30) |
    			  (MT47H128M16RT25E_WR_DQS<<20) |
    			  (MT47H128M16RT25E_WR_DQS<<10) |
    			  (MT47H128M16RT25E_WR_DQS<<0)),
    	.datawiratio0 = ((MT47H128M16RT25E_PHY_WRLVL<<30) |
    			 (MT47H128M16RT25E_PHY_WRLVL<<20) |
    			 (MT47H128M16RT25E_PHY_WRLVL<<10) |
    			 (MT47H128M16RT25E_PHY_WRLVL<<0)),
    	.datagiratio0 = ((MT47H128M16RT25E_PHY_GATELVL<<30) |
    			 (MT47H128M16RT25E_PHY_GATELVL<<20) |
    			 (MT47H128M16RT25E_PHY_GATELVL<<10) |
    			 (MT47H128M16RT25E_PHY_GATELVL<<0)),
    	.datafwsratio0 = ((MT47H128M16RT25E_PHY_FIFO_WE<<30) |
    			  (MT47H128M16RT25E_PHY_FIFO_WE<<20) |
    			  (MT47H128M16RT25E_PHY_FIFO_WE<<10) |
    			  (MT47H128M16RT25E_PHY_FIFO_WE<<0)),
    	.datawrsratio0 = ((MT47H128M16RT25E_PHY_WR_DATA<<30) |
    			  (MT47H128M16RT25E_PHY_WR_DATA<<20) |
    			  (MT47H128M16RT25E_PHY_WR_DATA<<10) |
    			  (MT47H128M16RT25E_PHY_WR_DATA<<0)),
    };
    
    static const struct cmd_control ddr2_cmd_ctrl_data = {
    	.cmd0csratio = MT47H128M16RT25E_RATIO,
    	.cmd0iclkout = MT47H128M16RT25E_INVERT_CLKOUT,
    
    	.cmd1csratio = MT47H128M16RT25E_RATIO,
    	.cmd1iclkout = MT47H128M16RT25E_INVERT_CLKOUT,
    
    	.cmd2csratio = MT47H128M16RT25E_RATIO,
    	.cmd2iclkout = MT47H128M16RT25E_INVERT_CLKOUT,
    };
    
    static const struct emif_regs ddr2_emif_reg_data = {
    	.sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
    	.ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
    	.sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
    	.sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
    	.sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
    	.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
    };
    
    static const struct ddr_data ddr3_data = {
    	.datardsratio0 = MT41J128MJT125_RD_DQS,
    	.datawdsratio0 = MT41J128MJT125_WR_DQS,
    	.datafwsratio0 = MT41J128MJT125_PHY_FIFO_WE,
    	.datawrsratio0 = MT41J128MJT125_PHY_WR_DATA,
    };
    
    static const struct ddr_data ddr3_beagleblack_data = {
    	.datardsratio0 = MT41K256M16HA125E_RD_DQS,
    	.datawdsratio0 = MT41K256M16HA125E_WR_DQS,
    	.datafwsratio0 = MT41K256M16HA125E_PHY_FIFO_WE,
    	.datawrsratio0 = MT41K256M16HA125E_PHY_WR_DATA,
    };
    
    static const struct ddr_data ddr3_evm_data = {
    	.datardsratio0 = MT41J512M8RH125_RD_DQS,
    	.datawdsratio0 = MT41J512M8RH125_WR_DQS,
    	.datafwsratio0 = MT41J512M8RH125_PHY_FIFO_WE,
    	.datawrsratio0 = MT41J512M8RH125_PHY_WR_DATA,
    };
    
    static const struct cmd_control ddr3_cmd_ctrl_data = {
    	.cmd0csratio = MT41J128MJT125_RATIO,
    	.cmd0iclkout = MT41J128MJT125_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41J128MJT125_RATIO,
    	.cmd1iclkout = MT41J128MJT125_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41J128MJT125_RATIO,
    	.cmd2iclkout = MT41J128MJT125_INVERT_CLKOUT,
    };
    
    static const struct cmd_control ddr3_beagleblack_cmd_ctrl_data = {
    	.cmd0csratio = MT41K256M16HA125E_RATIO,
    	.cmd0iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41K256M16HA125E_RATIO,
    	.cmd1iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41K256M16HA125E_RATIO,
    	.cmd2iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    };
    
    static const struct cmd_control ddr3_evm_cmd_ctrl_data = {
    	.cmd0csratio = MT41J512M8RH125_RATIO,
    	.cmd0iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41J512M8RH125_RATIO,
    	.cmd1iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41J512M8RH125_RATIO,
    	.cmd2iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    };
    
    static struct emif_regs ddr3_emif_reg_data = {
    	.sdram_config = MT41J128MJT125_EMIF_SDCFG,
    	.ref_ctrl = MT41J128MJT125_EMIF_SDREF,
    	.sdram_tim1 = MT41J128MJT125_EMIF_TIM1,
    	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
    	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
    	.zq_config = MT41J128MJT125_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
    				PHY_EN_DYN_PWRDN,
    };
    
    static struct emif_regs ddr3_beagleblack_emif_reg_data = {
    	.sdram_config = MT41K256M16HA125E_EMIF_SDCFG,
    	.ref_ctrl = MT41K256M16HA125E_EMIF_SDREF,
    	.sdram_tim1 = MT41K256M16HA125E_EMIF_TIM1,
    	.sdram_tim2 = MT41K256M16HA125E_EMIF_TIM2,
    	.sdram_tim3 = MT41K256M16HA125E_EMIF_TIM3,
    	.zq_config = MT41K256M16HA125E_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41K256M16HA125E_EMIF_READ_LATENCY,
    };
    
    static struct emif_regs ddr3_evm_emif_reg_data = {
    	.sdram_config = MT41J512M8RH125_EMIF_SDCFG,
    	.ref_ctrl = MT41J512M8RH125_EMIF_SDREF,
    	.sdram_tim1 = MT41J512M8RH125_EMIF_TIM1,
    	.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
    	.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
    	.zq_config = MT41J512M8RH125_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
    				PHY_EN_DYN_PWRDN,
    };
    
    #ifdef CONFIG_SPL_OS_BOOT
    int spl_start_uboot(void)
    {
    	/* break into full u-boot on 'c' */
    	return (serial_tstc() && serial_getc() == 'c');
    }
    #endif
    
    #define OSC	(V_OSCK/1000000)
    const struct dpll_params dpll_ddr = {
    		266, OSC-1, 1, -1, -1, -1, -1};
    const struct dpll_params dpll_ddr_evm_sk = {
    		303, OSC-1, 1, -1, -1, -1, -1};
    const struct dpll_params dpll_ddr_bone_black = {
    		400, OSC-1, 1, -1, -1, -1, -1};
    
    void am33xx_spl_board_init(void)
    {
    	struct am335x_baseboard_id header;
    	int mpu_vdd;
    
    //jdv	if (read_eeprom(&header) < 0)
    		puts("\nhello spl init here\n\n");
    
    	/* Get the frequency */
    	dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);
    
    	//jdvif (board_is_bone(&header) || board_is_bone_lt(&header)) {
    		/* BeagleBone PMIC Code */
    		int usb_cur_lim;
    
    		/*
    		 * Only perform PMIC configurations if board rev > A1
    		 * on Beaglebone White
    		 */
    	//	if (board_is_bone(&header) && !strncmp(header.version,
    	//					       "00A1", 4))
    	//		return;
    
    		if (i2c_probe(TPS65217_CHIP_PM))
    		   {
                puts("No PMIC comms...\n");
             	return;
             }
             
    
    		/*
    		 * On Beaglebone White we need to ensure we have AC power
    		 * before increasing the frequency.
    		 */
    //		if (board_is_bone(&header)) {
    //			uchar pmic_status_reg;
    //			if (tps65217_reg_read(TPS65217_STATUS,
    //					      &pmic_status_reg))
    //				return;
    //			if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {
    //				puts("No AC power, disabling frequency switch\n");
    //				return;
    //			}
    //		}
    
    		/*
    		 * Override what we have detected since we know if we have
    		 * a Beaglebone Black it supports 1GHz.
    		 */
    //		if (board_is_bone_lt(&header))
    //			dpll_mpu_opp100.m = MPUPLL_M_1000;
    
    		/*
    		 * Increase USB current limit to 1300mA or 1800mA and set
    		 * the MPU voltage controller as needed.
    		 */
    //		if (dpll_mpu_opp100.m == MPUPLL_M_1000) {
    //			usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
    //			mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
    //		} else {
    //			usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    //			mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
    //		}
    
    	//	if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
    	//			       TPS65217_POWER_PATH,
    	//			       usb_cur_lim,
    	//			       TPS65217_USB_INPUT_CUR_LIMIT_MASK))
    	//		puts("tps65217_reg_write failure\n");
    
    		/* Set DCDC3 (CORE) voltage to 1.125V */
    		if (tps65217_voltage_update(TPS65217_DEFDCDC3,
    					    TPS65217_DCDC_VOLT_SEL_1125MV)) {
    			puts("tps65217_voltage_update failure\n");
    			return;
    		}
    
    		/* Set CORE Frequencies to OPP100 */
    		do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
    
          mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;//jdv
    
    		/* Set DCDC2 (MPU) voltage */
    		if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
    			puts("tps65217_voltage_update failure\n");
    			return;
    		}
    
    		/*
    		 * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
    		 * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
    		 */
    	//	if (board_is_bone(&header)) {
    	//		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    	//				       TPS65217_DEFLS1,
    	//				       TPS65217_LDO_VOLTAGE_OUT_3_3,
    	//				       TPS65217_LDO_MASK))
    	//			puts("tps65217_reg_write failure\n");
    	//	} else {
    			if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    					       TPS65217_DEFLS1,
    					       TPS65217_LDO_VOLTAGE_OUT_1_8,
    					       TPS65217_LDO_MASK))
    				puts("tps65217_reg_write failure\n");
    //		}
    
    		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    				       TPS65217_DEFLS2,
    				       TPS65217_LDO_VOLTAGE_OUT_3_3,
    				       TPS65217_LDO_MASK))
    			puts("tps65217_reg_write failure\n");
    //	} else {
    //		int sil_rev;
    
    		/*
    		 * The GP EVM, IDK and EVM SK use a TPS65910 PMIC.  For all
    		 * MPU frequencies we support we use a CORE voltage of
    		 * 1.1375V.  For MPU voltage we need to switch based on
    		 * the frequency we are running at.
    		 */
    //		if (i2c_probe(TPS65910_CTRL_I2C_ADDR))
    //			return;
    
    		/*
    		 * Depending on MPU clock and PG we will need a different
    		 * VDD to drive at that speed.
    		 */
    //		sil_rev = readl(&cdev->deviceid) >> 28;
    //		mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev,
    //						      dpll_mpu_opp100.m);
    
    		/* Tell the TPS65910 to use i2c */
    //		tps65910_set_i2c_control();
    
    		/* First update MPU voltage. */
    //		if (tps65910_voltage_update(MPU, mpu_vdd))
    //			return;
    
    		/* Second, update the CORE voltage. */
    //		if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_3))
    //			return;
    
    		/* Set CORE Frequencies to OPP100 */
    //		do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
    //	}
    
    	/* Set MPU Frequency to what we detected now that voltages are set */
    	do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
    }
    
    const struct dpll_params *get_dpll_ddr_params(void)
    {
    	struct am335x_baseboard_id header;
    
    	//jdvenable_i2c0_pin_mux();
    	enable_i2c1_pin_mux();//jdv
       i2c_set_bus_num(1);//jdv
    	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
    	if (read_eeprom(&header) < 0)
    		puts("Could not get board ID.\nI am here but thats OK!!\n\n");
    
    	if (board_is_evm_sk(&header))
    		return &dpll_ddr_evm_sk;
    	else if (board_is_bone_lt(&header))
    		return &dpll_ddr_bone_black;
    	else if (board_is_evm_15_or_later(&header))
    		return &dpll_ddr_evm_sk;
    	else
    		return &dpll_ddr_bone_black;//jdv &dpll_ddr;
    }
    
    void set_uart_mux_conf(void)
    {
    #ifdef CONFIG_SERIAL1
    	enable_uart0_pin_mux();
    #endif /* CONFIG_SERIAL1 */
    #ifdef CONFIG_SERIAL2
    	enable_uart1_pin_mux();
    #endif /* CONFIG_SERIAL2 */
    #ifdef CONFIG_SERIAL3
    	enable_uart2_pin_mux();
    #endif /* CONFIG_SERIAL3 */
    #ifdef CONFIG_SERIAL4
    	enable_uart3_pin_mux();
    #endif /* CONFIG_SERIAL4 */
    #ifdef CONFIG_SERIAL5
    	enable_uart4_pin_mux();
    #endif /* CONFIG_SERIAL5 */
    #ifdef CONFIG_SERIAL6
    	enable_uart5_pin_mux();
    #endif /* CONFIG_SERIAL6 */
    }
    
    void set_mux_conf_regs(void)
    {
    	__maybe_unused struct am335x_baseboard_id header;
    
    	if (read_eeprom(&header) < 0)
    		puts("Could not get board ID.\n");
    
    	enable_board_pin_mux(&header);
    }
    
    void sdram_init(void)
    {
    	__maybe_unused struct am335x_baseboard_id header;
    
    	if (read_eeprom(&header) < 0)
    		puts("Could not get board ID.\n");
    
    	if (board_is_evm_sk(&header)) {
    		/*
    		 * EVM SK 1.2A and later use gpio0_7 to enable DDR3.
    		 * This is safe enough to do on older revs.
    		 */
    		gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
    		gpio_direction_output(GPIO_DDR_VTT_EN, 1);
    	}
    
    	if (board_is_evm_sk(&header))
    		config_ddr(303, MT41J128MJT125_IOCTRL_VALUE, &ddr3_data,
    			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
    	else if (board_is_bone_lt(&header))
    		config_ddr(400, MT41K256M16HA125E_IOCTRL_VALUE,
    			   &ddr3_beagleblack_data,
    			   &ddr3_beagleblack_cmd_ctrl_data,
    			   &ddr3_beagleblack_emif_reg_data, 0);
    	else if (board_is_evm_15_or_later(&header))
    		config_ddr(303, MT41J512M8RH125_IOCTRL_VALUE, &ddr3_evm_data,
    			   &ddr3_evm_cmd_ctrl_data, &ddr3_evm_emif_reg_data, 0);
    	else
    		{
             config_ddr(400, MT41K256M16HA125E_IOCTRL_VALUE,
    			   &ddr3_beagleblack_data,
    			   &ddr3_beagleblack_cmd_ctrl_data,
    			   &ddr3_beagleblack_emif_reg_data, 0);
           puts("DDR config'ed\n");
          }
    }
    #endif
    
    /*
     * Basic board specific setup.  Pinmux has been handled already.
     */
    int board_init(void)
    {
    	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
    #if defined(CONFIG_NOR) || defined(CONFIG_NAND)
    	gpmc_init();
    #endif
    	return 0;
    }
    
    #ifdef CONFIG_BOARD_LATE_INIT
    int board_late_init(void)
    {
    #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
    	char safe_string[HDR_NAME_LEN + 1];
    	struct am335x_baseboard_id header;
    
    	if (read_eeprom(&header) < 0)
    		puts("Could not get board ID.\n");
    
    	/* Now set variables based on the header. */
    	strncpy(safe_string, (char *)header.name, sizeof(header.name));
    	safe_string[sizeof(header.name)] = 0;
    	setenv("board_name", safe_string);
    
    	strncpy(safe_string, (char *)header.version, sizeof(header.version));
    	safe_string[sizeof(header.version)] = 0;
    	setenv("board_rev", safe_string);
    #endif
    
    	return 0;
    }
    #endif
    
    #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    static void cpsw_control(int enabled)
    {
    	/* VTP can be added here */
    
    	return;
    }
    
    static struct cpsw_slave_data cpsw_slaves[] = {
    	{
    		.slave_reg_ofs	= 0x208,
    		.sliver_reg_ofs	= 0xd80,
    		.phy_addr	= 0,
    	},
    	{
    		.slave_reg_ofs	= 0x308,
    		.sliver_reg_ofs	= 0xdc0,
    		.phy_addr	= 1,
    	},
    };
    
    static struct cpsw_platform_data cpsw_data = {
    	.mdio_base		= CPSW_MDIO_BASE,
    	.cpsw_base		= CPSW_BASE,
    	.mdio_div		= 0xff,
    	.channels		= 8,
    	.cpdma_reg_ofs		= 0x800,
    	.slaves			= 1,
    	.slave_data		= cpsw_slaves,
    	.ale_reg_ofs		= 0xd00,
    	.ale_entries		= 1024,
    	.host_port_reg_ofs	= 0x108,
    	.hw_stats_reg_ofs	= 0x900,
    	.bd_ram_ofs		= 0x2000,
    	.mac_control		= (1 << 5),
    	.control		= cpsw_control,
    	.host_port_num		= 0,
    	.version		= CPSW_CTRL_VERSION_2,
    };
    #endif
    
    #if defined(CONFIG_DRIVER_TI_CPSW) || \
    	(defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
    int board_eth_init(bd_t *bis)
    {
    	int rv, n = 0;
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    	__maybe_unused struct am335x_baseboard_id header;
    
    	/* 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 (!getenv("ethaddr")) {
    		printf("<ethaddr> not set. Validating first E-fuse MAC\n");
    
    		if (is_valid_ether_addr(mac_addr))
    			eth_setenv_enetaddr("ethaddr", mac_addr);
    	}
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    
    	mac_lo = readl(&cdev->macid1l);
    	mac_hi = readl(&cdev->macid1h);
    	mac_addr[0] = mac_hi & 0xFF;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    	mac_addr[4] = mac_lo & 0xFF;
    	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
    
    	if (!getenv("eth1addr")) {
    		if (is_valid_ether_addr(mac_addr))
    			eth_setenv_enetaddr("eth1addr", mac_addr);
    	}
    
    	if (read_eeprom(&header) < 0)
    		puts("Could not get board ID.\n");
    
    	if (board_is_bone(&header) || board_is_bone_lt(&header) ||
    	    board_is_idk(&header)) {
    		writel(MII_MODE_ENABLE, &cdev->miisel);
    		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    				PHY_INTERFACE_MODE_MII;
    	} else {
    		writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel);
    		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    				PHY_INTERFACE_MODE_RGMII;
    	}
    
    	rv = cpsw_register(&cpsw_data);
    	if (rv < 0)
    		printf("Error %d registering CPSW switch\n", rv);
    	else
    		n += rv;
    #endif
    
    	/*
    	 *
    	 * CPSW RGMII Internal Delay Mode is not supported in all PVT
    	 * operating points.  So we must set the TX clock delay feature
    	 * in the AR8051 PHY.  Since we only support a single ethernet
    	 * device in U-Boot, we only do this for the first instance.
    	 */
    #define AR8051_PHY_DEBUG_ADDR_REG	0x1d
    #define AR8051_PHY_DEBUG_DATA_REG	0x1e
    #define AR8051_DEBUG_RGMII_CLK_DLY_REG	0x5
    #define AR8051_RGMII_TX_CLK_DLY		0x100
    
    	if (board_is_evm_sk(&header) || board_is_gp_evm(&header)) {
    		const char *devname;
    		devname = miiphy_get_current_dev();
    
    		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_ADDR_REG,
    				AR8051_DEBUG_RGMII_CLK_DLY_REG);
    		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_DATA_REG,
    				AR8051_RGMII_TX_CLK_DLY);
    	}
    #endif
    #if defined(CONFIG_USB_ETHER) && \
    	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
    	if (is_valid_ether_addr(mac_addr))
    		eth_setenv_enetaddr("usbnet_devaddr", mac_addr);
    
    	rv = usb_eth_initialize(bis);
    	if (rv < 0)
    		printf("Error %d registering USB_ETHER\n", rv);
    	else
    		n += rv;
    #endif
    	return n;
    }
    #endif
    
    8176.board.h
    0820.mux.c
    /*
     * mux.c
     *
     * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation version 2.
     *
     * This program is distributed "as is" WITHOUT ANY WARRANTY of any
     * kind, whether express or implied; without even the implied warranty
     * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     * GNU General Public License for more details.
     */
    
    #include <common.h>
    #include <asm/arch/sys_proto.h>
    #include <asm/arch/hardware.h>
    #include <asm/arch/mux.h>
    #include <asm/io.h>
    #include <i2c.h>
    #include "board.h"
    
    static struct module_pin_mux uart0_pin_mux[] = {
    	{OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* UART0_RXD */
    	{OFFSET(uart0_txd), (MODE(0) | PULLUDEN)},		/* UART0_TXD */
    	{-1},
    };
    
    static struct module_pin_mux uart1_pin_mux[] = {
    	{OFFSET(uart1_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* UART1_RXD */
    	{OFFSET(uart1_txd), (MODE(0) | PULLUDEN)},		/* UART1_TXD */
    	{-1},
    };
    
    static struct module_pin_mux uart2_pin_mux[] = {
    	{OFFSET(spi0_sclk), (MODE(1) | PULLUP_EN | RXACTIVE)},	/* UART2_RXD */
    	{OFFSET(spi0_d0), (MODE(1) | PULLUDEN)},		/* UART2_TXD */
    	{-1},
    };
    
    static struct module_pin_mux uart3_pin_mux[] = {
    	{OFFSET(spi0_cs1), (MODE(1) | PULLUP_EN | RXACTIVE)},	/* UART3_RXD */
    	{OFFSET(ecap0_in_pwm0_out), (MODE(1) | PULLUDEN)},	/* UART3_TXD */
    	{-1},
    };
    
    static struct module_pin_mux uart4_pin_mux[] = {
    	{OFFSET(gpmc_wait0), (MODE(6) | PULLUP_EN | RXACTIVE)},	/* UART4_RXD */
    	{OFFSET(gpmc_wpn), (MODE(6) | PULLUDEN)},		/* UART4_TXD */
    	{-1},
    };
    
    static struct module_pin_mux uart5_pin_mux[] = {
    	{OFFSET(lcd_data9), (MODE(4) | PULLUP_EN | RXACTIVE)},	/* UART5_RXD */
    	{OFFSET(lcd_data8), (MODE(4) | PULLUDEN)},		/* UART5_TXD */
    	{-1},
    };
    
    static struct module_pin_mux mmc0_pin_mux[] = {
    	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
    	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
    	{OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT1 */
    	{OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT0 */
    	{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CLK */
    	{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CMD */
    	{OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)},		/* MMC0_WP */
    	{OFFSET(spi0_cs1), (MODE(5) | RXACTIVE | PULLUP_EN)},	/* MMC0_CD */
    	{-1},
    };
    
    static struct module_pin_mux mmc0_no_cd_pin_mux[] = {
    	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
    	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
    	{OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT1 */
    	{OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT0 */
    	{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CLK */
    	{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CMD */
    	{OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)},		/* MMC0_WP */
    	{-1},
    };
    
    static struct module_pin_mux mmc0_pin_mux_sk_evm[] = {
    	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
    	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
    	{OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT1 */
    	{OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT0 */
    	{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CLK */
    	{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CMD */
    	{OFFSET(spi0_cs1), (MODE(5) | RXACTIVE | PULLUP_EN)},	/* MMC0_CD */
    	{-1},
    };
    
    static struct module_pin_mux mmc1_pin_mux[] = {
    	{OFFSET(gpmc_ad3), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT3 */
    	{OFFSET(gpmc_ad2), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT2 */
    	{OFFSET(gpmc_ad1), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT1 */
    	{OFFSET(gpmc_ad0), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT0 */
    	{OFFSET(gpmc_csn1), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CLK */
    	{OFFSET(gpmc_csn2), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CMD */
    	{OFFSET(gpmc_csn0), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* MMC1_WP */
    	{OFFSET(gpmc_advn_ale), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* MMC1_CD */
    	{-1},
    };
    static struct module_pin_mux mmc1_blue_pin_mux[] = {
    	{OFFSET(gpmc_ad3), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT3 */
    	{OFFSET(gpmc_ad2), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT2 */
    	{OFFSET(gpmc_ad1), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT1 */
    	{OFFSET(gpmc_ad0), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT0 */
    	{OFFSET(gpmc_csn1), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CLK */
    	{OFFSET(gpmc_csn2), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CMD */
    	{-1},
    };
    
    static struct module_pin_mux i2c0_pin_mux[] = {
    	{OFFSET(i2c0_sda), (MODE(0) | RXACTIVE |
    			PULLUDEN | SLEWCTRL)}, /* I2C_DATA */
    	{OFFSET(i2c0_scl), (MODE(0) | RXACTIVE |
    			PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */
    	{-1},
    };
    
    static struct module_pin_mux i2c1_pin_mux[] = {
    	{OFFSET(uart1_rxd), (MODE(3) | RXACTIVE |
    			PULLUDEN | SLEWCTRL)},	/* I2C_DATA */
    	{OFFSET(uart1_txd), (MODE(3) | RXACTIVE |
    			PULLUDEN | SLEWCTRL)},	/* I2C_SCLK */
    	{-1},
    };
    
    static struct module_pin_mux spi0_pin_mux[] = {
    	{OFFSET(spi0_sclk), (MODE(0) | RXACTIVE | PULLUDEN)},	/* SPI0_SCLK */
    	{OFFSET(spi0_d0), (MODE(0) | RXACTIVE |
    			PULLUDEN | PULLUP_EN)},			/* SPI0_D0 */
    	{OFFSET(spi0_d1), (MODE(0) | RXACTIVE | PULLUDEN)},	/* SPI0_D1 */
    	{OFFSET(spi0_cs0), (MODE(0) | RXACTIVE |
    			PULLUDEN | PULLUP_EN)},			/* SPI0_CS0 */
    	{-1},
    };
    
    static struct module_pin_mux gpio0_7_pin_mux[] = {
    	{OFFSET(ecap0_in_pwm0_out), (MODE(7) | PULLUDEN)},	/* GPIO0_7 */
    	{-1},
    };
    
    static struct module_pin_mux rgmii1_pin_mux[] = {
    	{OFFSET(mii1_txen), MODE(2)},			/* RGMII1_TCTL */
    	{OFFSET(mii1_rxdv), MODE(2) | RXACTIVE},	/* RGMII1_RCTL */
    	{OFFSET(mii1_txd3), MODE(2)},			/* RGMII1_TD3 */
    	{OFFSET(mii1_txd2), MODE(2)},			/* RGMII1_TD2 */
    	{OFFSET(mii1_txd1), MODE(2)},			/* RGMII1_TD1 */
    	{OFFSET(mii1_txd0), MODE(2)},			/* RGMII1_TD0 */
    	{OFFSET(mii1_txclk), MODE(2)},			/* RGMII1_TCLK */
    	{OFFSET(mii1_rxclk), MODE(2) | RXACTIVE},	/* RGMII1_RCLK */
    	{OFFSET(mii1_rxd3), MODE(2) | RXACTIVE},	/* RGMII1_RD3 */
    	{OFFSET(mii1_rxd2), MODE(2) | RXACTIVE},	/* RGMII1_RD2 */
    	{OFFSET(mii1_rxd1), MODE(2) | RXACTIVE},	/* RGMII1_RD1 */
    	{OFFSET(mii1_rxd0), MODE(2) | RXACTIVE},	/* RGMII1_RD0 */
    	{OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN},/* MDIO_DATA */
    	{OFFSET(mdio_clk), MODE(0) | PULLUP_EN},	/* MDIO_CLK */
    	{-1},
    };
    
    static struct module_pin_mux mii1_pin_mux[] = {
    	{OFFSET(mii1_rxerr), MODE(0) | RXACTIVE},	/* MII1_RXERR */
    	{OFFSET(mii1_txen), MODE(0)},			/* MII1_TXEN */
    	{OFFSET(mii1_rxdv), MODE(0) | RXACTIVE},	/* MII1_RXDV */
    	{OFFSET(mii1_txd3), MODE(0)},			/* MII1_TXD3 */
    	{OFFSET(mii1_txd2), MODE(0)},			/* MII1_TXD2 */
    	{OFFSET(mii1_txd1), MODE(0)},			/* MII1_TXD1 */
    	{OFFSET(mii1_txd0), MODE(0)},			/* MII1_TXD0 */
    	{OFFSET(mii1_txclk), MODE(0) | RXACTIVE},	/* MII1_TXCLK */
    	{OFFSET(mii1_rxclk), MODE(0) | RXACTIVE},	/* MII1_RXCLK */
    	{OFFSET(mii1_rxd3), MODE(0) | RXACTIVE},	/* MII1_RXD3 */
    	{OFFSET(mii1_rxd2), MODE(0) | RXACTIVE},	/* MII1_RXD2 */
    	{OFFSET(mii1_rxd1), MODE(0) | RXACTIVE},	/* MII1_RXD1 */
    	{OFFSET(mii1_rxd0), MODE(0) | RXACTIVE},	/* MII1_RXD0 */
    	{OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */
    	{OFFSET(mdio_clk), MODE(0) | PULLUP_EN},	/* MDIO_CLK */
    	{-1},
    };
    
    static struct module_pin_mux nand_pin_mux[] = {
    	{OFFSET(gpmc_ad0), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD0 */
    	{OFFSET(gpmc_ad1), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD1 */
    	{OFFSET(gpmc_ad2), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD2 */
    	{OFFSET(gpmc_ad3), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD3 */
    	{OFFSET(gpmc_ad4), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD4 */
    	{OFFSET(gpmc_ad5), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD5 */
    	{OFFSET(gpmc_ad6), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD6 */
    	{OFFSET(gpmc_ad7), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD7 */
    	{OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* NAND WAIT */
    	{OFFSET(gpmc_wpn), (MODE(7) | PULLUP_EN | RXACTIVE)},	/* NAND_WPN */
    	{OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN)},	/* NAND_CS0 */
    	{OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN)}, /* NAND_ADV_ALE */
    	{OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN)},	/* NAND_OE */
    	{OFFSET(gpmc_wen), (MODE(0) | PULLUDEN)},	/* NAND_WEN */
    	{OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN)},	/* NAND_BE_CLE */
    	{-1},
    };
    
    #if defined(CONFIG_NOR) && !defined(CONFIG_NOR_BOOT)
    static struct module_pin_mux bone_norcape_pin_mux[] = {
    	{OFFSET(lcd_data0), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A0 */
    	{OFFSET(lcd_data1), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A1 */
    	{OFFSET(lcd_data2), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A2 */
    	{OFFSET(lcd_data3), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A3 */
    	{OFFSET(lcd_data4), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A4 */
    	{OFFSET(lcd_data5), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A5 */
    	{OFFSET(lcd_data6), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A6 */
    	{OFFSET(lcd_data7), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A7 */
    	{OFFSET(lcd_vsync), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A8 */
    	{OFFSET(lcd_hsync), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A9 */
    	{OFFSET(lcd_pclk), MODE(1)| PULLUDEN | RXACTIVE},       /* NOR_A10 */
    	{OFFSET(lcd_ac_bias_en), MODE(1)| PULLUDEN | RXACTIVE}, /* NOR_A11 */
    	{OFFSET(lcd_data8), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A12 */
    	{OFFSET(lcd_data9), MODE(1) | PULLUDEN | RXACTIVE},     /* NOR_A13 */
    	{OFFSET(lcd_data10), MODE(1) | PULLUDEN | RXACTIVE},    /* NOR_A14 */
    	{OFFSET(lcd_data11), MODE(1) | PULLUDEN | RXACTIVE},    /* NOR_A15 */
    	{OFFSET(lcd_data12), MODE(1) | PULLUDEN | RXACTIVE},    /* NOR_A16 */
    	{OFFSET(lcd_data13), MODE(1) | PULLUDEN | RXACTIVE},    /* NOR_A17 */
    	{OFFSET(lcd_data14), MODE(1) | PULLUDEN | RXACTIVE},    /* NOR_A18 */
    	{OFFSET(lcd_data15), MODE(1) | PULLUDEN | RXACTIVE},    /* NOR_A19 */
    	{OFFSET(gpmc_ad0), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD0 */
    	{OFFSET(gpmc_ad1), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD1 */
    	{OFFSET(gpmc_ad2), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD2 */
    	{OFFSET(gpmc_ad3), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD3 */
    	{OFFSET(gpmc_ad4), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD4 */
    	{OFFSET(gpmc_ad5), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD5 */
    	{OFFSET(gpmc_ad6), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD6 */
    	{OFFSET(gpmc_ad7), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD7 */
    	{OFFSET(gpmc_ad8), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD8 */
    	{OFFSET(gpmc_ad9), MODE(0) | PULLUDEN | RXACTIVE},      /* NOR_AD9 */
    	{OFFSET(gpmc_ad10), MODE(0) | PULLUDEN | RXACTIVE},     /* NOR_AD10 */
    	{OFFSET(gpmc_ad11), MODE(0) | PULLUDEN | RXACTIVE},     /* NOR_AD11 */
    	{OFFSET(gpmc_ad12), MODE(0) | PULLUDEN | RXACTIVE},     /* NOR_AD12 */
    	{OFFSET(gpmc_ad13), MODE(0) | PULLUDEN | RXACTIVE},     /* NOR_AD13 */
    	{OFFSET(gpmc_ad14), MODE(0) | PULLUDEN | RXACTIVE},     /* NOR_AD14 */
    	{OFFSET(gpmc_ad15), MODE(0) | PULLUDEN | RXACTIVE},     /* NOR_AD15 */
    
    	{OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN) | RXACTIVE},   /* NOR_CE */
    	{OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN) | RXACTIVE}, /* NOR_ADVN_ALE */
    	{OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN | RXACTIVE)},/* NOR_OE */
    	{OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN | RXACTIVE)},/* NOR_BE0N_CLE */
    	{OFFSET(gpmc_wen), (MODE(0) | PULLUDEN | RXACTIVE)},    /* NOR_WEN */
    	{OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUDEN)}, /* NOR WAIT */
    	{-1},
    };
    #endif
    
    #if defined(CONFIG_NOR_BOOT)
    void enable_norboot_pin_mux(void)
    {
    	/*
    	 * The ROM will only have set up sufficient pinmux to allow for the
    	 * first 4KiB NOR to be read, we must finish doing what we know of
    	 * the NOR mux in this space in order to continue.  We do this in
    	 * assembly to avoid having to play linker games to ensure that all
    	 * functions and data sections are in this special area.
    	 */
    	asm("stmfd      sp!, {r2 - r4}");
    	asm("movw       r4, #0x8A4");
    	asm("movw       r3, #0x44E1");
    	asm("orr        r4, r4, r3, lsl #16");
    	asm("mov        r2, #9");
    	asm("mov        r3, #8");
    	asm("gpmc_mux:  str     r2, [r4], #4");
    	asm("subs       r3, r3, #1");
    	asm("bne        gpmc_mux");
    	asm("ldmfd      sp!, {r2 - r4}");
    }
    #endif
    
    void enable_uart0_pin_mux(void)
    {
    	configure_module_pin_mux(uart0_pin_mux);
    }
    
    void enable_uart1_pin_mux(void)
    {
    	configure_module_pin_mux(uart1_pin_mux);
    }
    
    void enable_uart2_pin_mux(void)
    {
    	configure_module_pin_mux(uart2_pin_mux);
    }
    
    void enable_uart3_pin_mux(void)
    {
    	configure_module_pin_mux(uart3_pin_mux);
    }
    
    void enable_uart4_pin_mux(void)
    {
    	configure_module_pin_mux(uart4_pin_mux);
    }
    
    void enable_uart5_pin_mux(void)
    {
    	configure_module_pin_mux(uart5_pin_mux);
    }
    
    void enable_i2c0_pin_mux(void)
    {
    	configure_module_pin_mux(i2c0_pin_mux);
    }
    void enable_i2c1_pin_mux(void)
    {
    	configure_module_pin_mux(i2c1_pin_mux);
    }
    
    /*
     * The AM335x GP EVM, if daughter card(s) are connected, can have 8
     * different profiles.  These profiles determine what peripherals are
     * valid and need pinmux to be configured.
     */
    #define PROFILE_NONE	0x0
    #define PROFILE_0	(1 << 0)
    #define PROFILE_1	(1 << 1)
    #define PROFILE_2	(1 << 2)
    #define PROFILE_3	(1 << 3)
    #define PROFILE_4	(1 << 4)
    #define PROFILE_5	(1 << 5)
    #define PROFILE_6	(1 << 6)
    #define PROFILE_7	(1 << 7)
    #define PROFILE_MASK	0x7
    #define PROFILE_ALL	0xFF
    
    /* CPLD registers */
    #define I2C_CPLD_ADDR	0x35
    #define CFG_REG		0x10
    
    static unsigned short detect_daughter_board_profile(void)
    {
    	unsigned short val;
    
    	if (i2c_probe(I2C_CPLD_ADDR))
    		return PROFILE_NONE;
    
    	if (i2c_read(I2C_CPLD_ADDR, CFG_REG, 1, (unsigned char *)(&val), 2))
    		return PROFILE_NONE;
    
    	return (1 << (val & PROFILE_MASK));
    }
    
    void enable_board_pin_mux(struct am335x_baseboard_id *header)
    {
    	/* Do board-specific muxes. */
    	if (board_is_bone(header)) {
    		/* Beaglebone pinmux */
    		configure_module_pin_mux(i2c1_pin_mux);
    		configure_module_pin_mux(mii1_pin_mux);
    		configure_module_pin_mux(mmc0_pin_mux);
    #ifndef CONFIG_NOR
    		configure_module_pin_mux(mmc1_pin_mux);
    #endif
    #if defined(CONFIG_NOR) && !defined(CONFIG_NOR_BOOT)
    		configure_module_pin_mux(bone_norcape_pin_mux);
    #endif
    	} else if (board_is_gp_evm(header)) {
    		/* General Purpose EVM */
    		unsigned short profile = detect_daughter_board_profile();
    		configure_module_pin_mux(rgmii1_pin_mux);
    		configure_module_pin_mux(mmc0_pin_mux);
    		/* In profile #2 i2c1 and spi0 conflict. */
    		if (profile & ~PROFILE_2)
    			configure_module_pin_mux(i2c1_pin_mux);
    		/* Profiles 2 & 3 don't have NAND */
    		if (profile & ~(PROFILE_2 | PROFILE_3))
    			configure_module_pin_mux(nand_pin_mux);
    		else if (profile == PROFILE_2) {
    			configure_module_pin_mux(mmc1_pin_mux);
    			configure_module_pin_mux(spi0_pin_mux);
    		}
    	} else if (board_is_idk(header)) {
    		/*
    		 * Industrial Motor Control (IDK)
    		 * note: IDK console is on UART3 by default.
    		 *       So u-boot mus be build with CONFIG_SERIAL4 and
    		 *       CONFIG_CONS_INDEX=4
    		 */
    		configure_module_pin_mux(mii1_pin_mux);
    		configure_module_pin_mux(mmc0_no_cd_pin_mux);
    	} else if (board_is_evm_sk(header)) {
    		/* Starter Kit EVM */
    		configure_module_pin_mux(i2c1_pin_mux);
    		configure_module_pin_mux(gpio0_7_pin_mux);
    		configure_module_pin_mux(rgmii1_pin_mux);
    		configure_module_pin_mux(mmc0_pin_mux_sk_evm);
    	} else if (board_is_bone_lt(header)) {
    		/* Beaglebone LT pinmux */
    		configure_module_pin_mux(i2c1_pin_mux);
    		configure_module_pin_mux(mii1_pin_mux);
    		configure_module_pin_mux(mmc0_pin_mux);
    		configure_module_pin_mux(mmc1_pin_mux);
    	} else {
    		//puts("Unknown board, cannot configure pinmux.");
    		//hang();
          puts("\n\nI is Blue and that is cool!!!\n\n");
          configure_module_pin_mux(mmc1_blue_pin_mux);
          
    
    	}
    }
    

    Hope you can help... also what/where should i define the second USB port(attach my config so far)

    4760.am335x_evm.h

    This is my output to uart0...I am booting from USB0 over tftp

    CCCC                                                                            
    U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Apr 16 2014 - 15:32:52)                
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.       
    Could not get board ID.                                                         
    I am here but thats OK!!                                                        
                                                                                    
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.       
    Could not get board ID.                                                         
                                                                                    
                                                                                    
    I is Blue and that is cool!!!                                                   
                                                                                    
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.       
    Could not get board ID.                                                         
    DDR config'ed                                                                   
                                                                                    
    hello spl init here                                                             
                                                                                    
    ### ERROR ### Please RESET the board ### 

  • Without looking at  your files yet, I suspect you are seeing the ### ERROR ### message from common/spl/spl.c calling hang(). If you enable debug in that file you can verify it, but I am pretty sure of it:

    214                 debug("SPL: Un-supported Boot Device\n");
    215                 hang();

    I'm guessing this is because CONFIG_SPL_USBETH_SUPPORT is not set. Look in boards.cfg and you'll see a build target, am335x_evm_usbspl, that includes this define. So try "make am335x_evm_usbspl" and test it out. I'm fairly sure this is the issue why you get the ### ERROR ###

    Steve K.

  • Steve Kipisz said:

    I'm guessing this is because CONFIG_SPL_USBETH_SUPPORT is not set. Look in boards.cfg and you'll see a build target, am335x_evm_usbspl, that includes this define. So try "make am335x_evm_usbspl" and test it out. I'm fairly sure this is the issue why you get the ### ERROR ###

    Correct,  it appears you can not have CONFIG_SPL_USBETH_SUPPORT with CONFIG_MUSB_HOST as it #undef the MUSB it there is USBETH...

    /*
     * USB configuration.  We enable MUSB support, both for host and for
     * gadget.  We set USB0 as peripheral and USB1 as host, based on the
     * board schematic and physical port wired to each.  Then for host we
     * add mass storage support and for gadget we add both RNDIS ethernet
     * and DFU.
     */
    #define CONFIG_USB_MUSB_DSPS
    #define CONFIG_ARCH_MISC_INIT
    #define CONFIG_MUSB_GADGET
    #define CONFIG_MUSB_PIO_ONLY
    #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
    #define CONFIG_USB_GADGET
    #define CONFIG_USBDOWNLOAD_GADGET
    #define CONFIG_USB_GADGET_DUALSPEED
    #define CONFIG_USB_GADGET_VBUS_DRAW	2
    #define CONFIG_MUSB_HOST
    #define CONFIG_AM335X_USB0
    #define CONFIG_AM335X_USB0_MODE	MUSB_PERIPHERAL
    #define CONFIG_AM335X_USB1
    #define CONFIG_AM335X_USB1_MODE MUSB_HOST
    
    #ifdef CONFIG_MUSB_HOST
    #define CONFIG_CMD_USB
    #define CONFIG_USB_STORAGE
    #endif
    
    #ifdef CONFIG_MUSB_GADGET
    #define CONFIG_USB_ETHER
    #define CONFIG_USB_ETH_RNDIS
    #define CONFIG_USBNET_HOST_ADDR	"de:ad:be:af:00:00"
    
    /* USB TI's IDs */
    #define CONFIG_G_DNL_VENDOR_NUM 0x0403
    #define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
    #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
    #endif /* CONFIG_MUSB_GADGET */
    
    #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
    /* disable host part of MUSB in SPL */
    #undef CONFIG_MUSB_HOST
    /*
     * Disable CPSW SPL support so we fit within the 101KiB limit.
     */
    #undef CONFIG_SPL_ETH_SUPPORT
    #endif

    I only want the USB1 HOST after uboot.img how would i go about enabling it?

    In the meantime i will try getting the NFS to work so i can boot the kernel...

    Thanks

  • Looks like USB1 is there but u-boot crashes if i have a USB drive connected when i do a #usb start?

    here is the minicom capture...I removes most of the timeouts (where do i disable this as it seems to be a waste of time for boot up)

    U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Apr 23 2014 - 08:55:59)
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    I am here but thats OK!!
    
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    
    
    I is Blue and that is cool!!!
    
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    DDR config'ed
    
    hello spl init here
    
    Using default environment
    
    usb_ether
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC d0:ff:50:29:0b:56
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    musb-hdrc: peripheral reset irq lost!
    high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
    USB RNDIS network up!
    BOOTP broadcast 1
    BOOTP broadcast 2
    Using usb_ether device
    TFTP from server 192.168.3.1; our IP address is 192.168.3.101
    Filename 'u-boot.img'.
    Load address: 0x807fffc0
    Loading: *###########################
    	 837.9 KiB/s
    done
    Bytes transferred = 389780 (5f294 hex)
    
    
    U-Boot 2013.10-00189-g78d8ebd-dirty (Apr 23 2014 - 08:55:59)
    
    I2C:   ready
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Error - No Valid Environment Area found
    *** Warning - bad CRC, using default environment
    
    i2c_probe: pads on bus 0 probably not configured (status=0x10)
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    i2c_probe: pads on bus 0 probably not configured (status=0x10)
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    wait_for_user_access Timeout
    wait_for_user_access Timeout
    
    cpsw, usb_ether
    Hit any key to stop autoboot:  3  2  0 
    U-Boot# usb start
    (Re)start USB...
    USB0:   scanning bus 0 for devices... 

    ...

    When this hangs it takes the UART down to?

  • I can not enable #define Debug in common.h due to code size restriction... in SPL.

    Any help would be greatly appreciated.

    Thanks

    Josh

  • Are you using the SDK 7.0 u-boot? I would have expected to see a u-boot message like

    U-Boot 2013.10-ti2013.12.00 (Apr 25 2014 - 12:56:59)

    Instead of

    U-Boot 2013.10-00189-g78d8ebd-dirty (Apr 23 2014 - 08:55:59)

    Anyway, if you look in common/usb.c you can find the printf that prints the scanning message. I would sprinkle some printf around that code to see where it is hanging. I'm guessing you could be in an infinite loop or you had an abort for some reason. The code in common/usb.c looks like this

      82                 /*
      83                  * lowlevel init is OK, now scan the bus for devices
      84                  * i.e. search HUBs and configure them
      85                  */
      86                 start_index = dev_index;
      87                 printf("scanning bus %d for devices... ", i);
      88                 dev = usb_alloc_new_device(ctrl);
      89                 /*
      90                  * device 0 is always present
      91                  * (root hub, so let it analyze)
      92                  */
      93                 if (dev)
      94                         usb_new_device(dev);
      95
      96                 if (start_index == dev_index)
      97                         puts("No USB Device found\n");
      98                 else
      99                         printf("%d USB Device(s) found\n",
     100                                 dev_index - start_index);
     101
     102                 usb_started = 1;

    I've tested the SDK 6.0 and SDK 7.0 and the usb start command works fine on both, with or without a memory stick plugged in.

    Steve K.

  • CCCCCC
    U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Apr 28 2014 - 07:06:05)
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    I am here but thats OK!!
    
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    
    
    I is Blue and that is cool!!!
    
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    DDR config'ed
    
    hello spl init here
    
    Using default environment
    
    usb_ether
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC d0:ff:50:29:0b:56
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    musb-hdrc: peripheral reset irq lost!
    high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
    USB RNDIS network up!
    BOOTP broadcast 1
    BOOTP broadcast 2
    Using usb_ether device
    TFTP from server 192.168.3.1; our IP address is 192.168.3.101
    Filename 'u-boot.img'.
    Load address: 0x807fffc0
    Loading: *###########################
    	 816.4 KiB/s
    done
    Bytes transferred = 389872 (5f2f0 hex)
    
    
    U-Boot 2013.10-00189-g78d8ebd-dirty (Apr 28 2014 - 07:06:05)
    
    I2C:   ready
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Error - No Valid Environment Area found
    *** Warning - bad CRC, using default environment
    
    i2c_probe: pads on bus 0 probably not configured (status=0x10)
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    i2c_probe: pads on bus 0 probably not configured (status=0x10)
    Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
    Could not get board ID.
    wait_for_user_access Timeout
    PHY reset timed out
    wait_for_user_access Timeout
    cpsw, usb_ether
    Hit any key to stop autoboot:  3  0 
    U-Boot# 
    U-Boot# usb start
    (Re)start USB...
    MADE IT PAST USB HUB RESET
    USB0:   scanning bus 0 for devices... 1 USB Device(s) found
    finished init
           scanning usb for storage devices... 0 Storage Device(s) found
    U-Boot# 
    (Re)start USB...
    MADE IT PAST USB HUB RESET
    USB0:   scanning bus 0 for devices... 1 USB Device(s) found
    finished init
           scanning usb for storage devices... 0 Storage Device(s) found
    U-Boot# usb start
    (Re)start USB...
    MADE IT PAST USB HUB RESET
    USB0:   scanning bus 0 for devices... data abort
    
        MAYBE you should read doc/README.arm-unaligned-accesses
    
    pc : [<9f77f330>]	   lr : [<9f77fbf4>]
    sp : 9f32d9e0  ip : 9ffbc770	 fp : 00000000
    r10: 9f330390  r9 : 9f32df38	 r8 : 47401c00
    r7 : 9f32f29c  r6 : 9f32f0b0	 r5 : 9f32f0b0  r4 : 9ffbc780
    r3 : 00000000  r2 : 00000001	 r1 : 00000001  r0 : 9f32f29c
    Flags: nZCv  IRQs off  FIQs on  Mode SVC_32
    Resetting CPU ...
    
    resetting ...
    CCCCC
    U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Apr 28 2014 - 07:06:05)
    

    I did a USB restart without the drive connected and the power was enabled from USB1_DRVVBUS once i connect a device it takes USB1_DRVVBUS low...

    It takes almost 5 minutes for the next usb start to finish.

    I then removed the drive and issues another usb start and get a reset data abort.

    I will continue adding print statements...  is there anyway to force USB1 into host only mode so the usb1_drvvbus stays high or not needed.

  • The drvvbus stays up for about 300ms. with a drive installed off the hub.

    and with just the hub it stays up?

  • Joshua,

    It is not clear if it is hw or sw issue at this point of time. If it was hw issue, it would be difficult to debug it in u-boot. Is it possible to boot the board into Linux then we could debug from there? Can you load kernel and root filesystem from NAND, eMMC, SD card, or tftp/NFS?

  • I am booting the u-boot over USB0 tftp.  

    I have tried to setup for the kernel with NFS but have not found this to be as straight forward.
    I can use the USB0 ether gadget to get the NFS right?

    The other question is can u point me to where the dts file is so I can modify it or is there a barebones dts to get me going?

     

    Thanks

  • Joshua,

    I believe I have done an experiment with NFS over USB ether. I will try to find my uEnv.txt and get you back.

    The dts files for AM335x are arch/arm/boot/dts/am33xx.dtsi and arch/arm/boot/dts/am335x-evm.dts.

  • Joshua,

    Here is the guidelines to run NFS over USB Ethernet on SDK 7.0.

    1. Build zImage with musb_hdrc, musb_dsps, musb_am335x, and g_ether drivers built-in so that the usb Ethernet gadget is ready before the root filesystem is mounted. There are two issues in this step.

    1.a When doing menuconfig to make g_ether built-in, CONFIG_USB_MIDI_GADGET = m, which causes g_ether not built into zImage, you have to manually modify .config to unset CONFIG_USB_MIDI_GADGET.

    1.b You have to use MUSB PIO mode right now. When DMA is enabled, the g_ether driver is not initialized properly.

    I have reported these two issues to our development team.

    2. In u-boot bootargs variable, set 'root=/dev/nfs nfsroot=${serverip}:${rootpath},nolock rw ip=${ipaddr}:::::usb0', so that the usb0 interface uses static IP ${ipaddr}.

    3. Add option 'g_ether.host_addr=<a MAC address>' to uboot bootargs as while to not use random MAC address on host usb0 interface, so Ubuntu Network Manager can manage it.

    3. On Ubuntu host, set a static IP for the MAC address for 'g_ether.host_addr'.

  • Please have a look at this capture and let me know where to look...

    U-Boot# setenv ethact usb_ether
    U-Boot# setenv autoload no
    U-Boot# setenv serverip 192.168.3.1
    U-Boot# setenv ipaddr 192.168.3.2
    U-Boot# setenv gatewayip 192.168.3.1
    U-Boot# setenv netmask 255.255.255.0
    U-Boot# setenv kfile zImage
    U-Boot# setenv fdtfile am335x-boneblacknblue.dtb  
    U-Boot# setenv netargs 'setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=${ipaddr} g_ether.host_addr=fe:ed:de:ad:be:ef'
    U-Boot# setenv netboot 'echo Booting from network ...; setenv autoload no;tftp ${loadaddr} ${kfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}'
    U-Boot# run netboot
    Booting from network ...
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC d0:ff:50:29:0b:58
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    musb-hdrc: peripheral reset irq lost!
    high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
    USB RNDIS network up!
    Using usb_ether device
    TFTP from server 192.168.3.1; our IP address is 192.168.3.2
    Filename 'zImage'.
    Load address: 0x80200000
    Loading: *#################################################################
    	 #################################################################
    	 #################################################################
    	 #################################################################
    	 #########################
    	 3.7 MiB/s
    done
    Bytes transferred = 4178088 (3fc0a8 hex)
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC d0:ff:50:29:0b:58
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
    USB RNDIS network up!
    Using usb_ether device
    TFTP from server 192.168.3.1; our IP address is 192.168.3.2
    Filename 'am335x-boneblacknblue.dtb'.
    Load address: 0x80f80000
    Loading: *###
    	 2.3 MiB/s
    done
    Bytes transferred = 31286 (7a36 hex)
    Kernel image @ 0x80200000 [ 0x000000 - 0x3fc0a8 ]
    ## Flattened Device Tree blob at 80f80000
       Booting using the fdt blob at 0x80f80000
       Loading Device Tree to 9f322000, end 9f32ca35 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 3.12.10-ti2013.12.01 (blue@blueserver) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #2 Tue Apr 29 08:36:04 EDT 2014
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: Generic AM33XX (Flattened Device Tree), model: TI AM335x BeagleBone
    [    0.000000] cma: CMA: reserved 24 MiB at 9d800000
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (sgx neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129280
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/nfs nfsroot=192.168.3.1:/export/rootfs,nolock rw ip=192.168.3.2 g_ether.host_addr=fe:ed:de:ad:be:ef
    [    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: 483236K/521216K available (5643K kernel code, 563K rwdata, 1904K rodata, 347K init, 225K bss, 37980K reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 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 - 0xc076704c   (7549 kB)
    [    0.000000]       .init : 0xc0768000 - 0xc07beeb8   ( 348 kB)
    [    0.000000]       .data : 0xc07c0000 - 0xc084cdd8   ( 564 kB)
    [    0.000000]        .bss : 0xc084cdd8 - 0xc08854c0   ( 226 kB)
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] Total of 128 interrupts on 1 active controller
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
    [    0.000000] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000000] Console: colour dummy device 80x30
    [    0.000282] Calibrating delay loop... 531.66 BogoMIPS (lpj=2658304)
    [    0.049787] pid_max: default: 32768 minimum: 301
    [    0.049881] Security Framework initialized
    [    0.049928] Mount-cache hash table entries: 512
    [    0.056307] CPU: Testing write buffer coherency: ok
    [    0.056658] Setting up static identity map for 0xc0588468 - 0xc05884d8
    [    0.057439] devtmpfs: initialized
    [    0.059129] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.107426] omap_hwmod: debugss: _wait_target_disable failed
    [    0.108067] pinctrl core: initialized pinctrl subsystem
    [    0.108838] regulator-dummy: no parameters
    [    0.111104] NET: Registered protocol family 16
    [    0.113125] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.115508] cpuidle: using governor ladder
    [    0.115522] cpuidle: using governor menu
    [    0.123448] platform mpu.1: FIXME: clock-name 'fck' DOES NOT exist in dt!
    [    0.124430] platform 49000000.edma: FIXME: clock-name 'fck' DOES NOT exist in dt!
    [    0.125531] OMAP GPIO hardware version 0.1
    [    0.132505] platform 56000000.sgx: FIXME: clock-name 'fck' DOES NOT exist in dt!
    [    0.133758] DSS not supported on this SoC
    [    0.133772] No ATAGs?
    [    0.133782] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.156587] bio: create slab <bio-0> at 0
    [    0.169734] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    [    0.170521] vmmcsd_fixed: 3300 mV 
    [    0.172962] vgaarb: loaded
    [    0.174101] SCSI subsystem initialized
    [    0.175293] usbcore: registered new interface driver usbfs
    [    0.175459] usbcore: registered new interface driver hub
    [    0.175640] usbcore: registered new device driver usb
    [    0.176471] omap_i2c 4802a000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c1_pins, deferring probe
    [    0.176498] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
    [    0.176691] media: Linux media interface: v0.10
    [    0.176846] Linux video capture interface: v2.00
    [    0.177081] pps_core: LinuxPPS API ver. 1 registered
    [    0.177091] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.177207] PTP clock support registered
    [    0.179547] Switched to clocksource timer1
    [    0.196727] NET: Registered protocol family 2
    [    0.197330] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    [    0.197414] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.197461] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.197524] TCP: reno registered
    [    0.197537] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.197556] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.197741] NET: Registered protocol family 1
    [    0.198092] RPC: Registered named UNIX socket transport module.
    [    0.198105] RPC: Registered udp transport module.
    [    0.198111] RPC: Registered tcp transport module.
    [    0.198118] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.198935] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.199458] PM: Loading am335x-pm-firmware.bin
    [    0.341909] VFS: Disk quotas dquot_6.5.2
    [    0.341977] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.342563] NFS: Registering the id_resolver key type
    [    0.342645] Key type id_resolver registered
    [    0.342653] Key type id_legacy registered
    [    0.342692] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    [    0.342871] msgmni has been set to 991
    [    0.344328] NET: Registered protocol family 38
    [    0.344365] io scheduler noop registered
    [    0.344373] io scheduler deadline registered
    [    0.344394] io scheduler cfq registered (default)
    [    0.346054] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.351686] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [    0.354149] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
    [    0.957591] console [ttyO0] enabled
    [    0.962538] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    0.978574] brd: module loaded
    [    0.986603] loop: module loaded
    [    0.992823] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.002767] usbcore: registered new interface driver asix
    [    1.008684] usbcore: registered new interface driver ax88179_178a
    [    1.015302] usbcore: registered new interface driver cdc_ether
    [    1.021652] usbcore: registered new interface driver r815x
    [    1.027636] usbcore: registered new interface driver smsc95xx
    [    1.033855] usbcore: registered new interface driver net1080
    [    1.040007] usbcore: registered new interface driver cdc_subset
    [    1.046439] usbcore: registered new interface driver zaurus
    [    1.052531] usbcore: registered new interface driver cdc_ncm
    [    1.058958] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    1.065900] ehci-pci: EHCI PCI platform driver
    [    1.070796] ehci-omap: OMAP-EHCI Host Controller driver
    [    1.077070] usbcore: registered new interface driver cdc_wdm
    [    1.083280] usbcore: registered new interface driver usb-storage
    [    1.092787] musb-hdrc musb-hdrc.0.auto: Enabled SW babble control
    [    1.099392] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [    1.105957] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [    1.114493] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    1.121706] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.129357] usb usb1: Product: MUSB HDRC host driver
    [    1.134623] usb usb1: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd
    [    1.141636] usb usb1: SerialNumber: musb-hdrc.0.auto
    [    1.147682] hub 1-0:1.0: USB hub found
    [    1.151751] hub 1-0:1.0: 1 port detected
    [    1.158340] musb-hdrc musb-hdrc.1.auto: Enabled SW babble control
    [    1.165058] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [    1.171546] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    [    1.180058] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [    1.187247] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.194919] usb usb2: Product: MUSB HDRC host driver
    [    1.200186] usb usb2: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd
    [    1.207188] usb usb2: SerialNumber: musb-hdrc.1.auto
    [    1.213226] hub 2-0:1.0: USB hub found
    [    1.217280] hub 2-0:1.0: 1 port detected
    [    1.234255] using random self ethernet address
    [    1.238971] using random host ethernet address
    [    1.243728] using host ethernet address: fe:ed:de:ad:be:ef
    [    1.250476] usb0: HOST MAC fe:ed:de:ad:be:ef
    [    1.255288] usb0: MAC 92:fe:a7:53:eb:01
    [    1.259393] using random self ethernet address
    [    1.264137] using random host ethernet address
    [    1.269064] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [    1.276100] g_ether gadget: g_ether ready
    [    1.281340] mousedev: PS/2 mouse device common for all mice
    [    1.290053] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [    1.298253] i2c /dev entries driver
    [    1.302494] Driver for 1-wire Dallas network protocol.
    [    1.310022] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    1.320826] edma-dma-engine edma-dma-engine.0: allocated channel for 0:3
    [    1.328001] edma-dma-engine edma-dma-engine.0: allocated channel for 0:2
    [    1.370342] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.376996] edma-dma-engine edma-dma-engine.0: allocated channel for 0:36
    [    1.385359] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [    1.395002] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [    1.401220] edma-dma-engine edma-dma-engine.0: allocated channel for 0:5
    [    1.408382] edma-dma-engine edma-dma-engine.0: allocated channel for 0:6
    [    1.416956] usbcore: registered new interface driver usbhid
    [    1.422891] usbhid: USB HID core driver
    [    1.432054] oprofile: no performance counters
    [    1.437018] oprofile: using timer interrupt.
    [    1.441888] TCP: cubic registered
    [    1.445395] Initializing XFRM netlink socket
    [    1.449978] NET: Registered protocol family 17
    [    1.454745] NET: Registered protocol family 15
    [    1.459500] 8021q: 802.1Q VLAN Support v1.8
    [    1.464034] Key type dns_resolver registered
    [    1.469124] cpu cpu0: cpu0 regulator not ready, retry
    [    1.474615] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
    [    1.482628] ------------[ cut here ]------------
    [    1.487549] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_device.c:888 omap_device_get_by_hwmod_name+0x94/0xb4()
    [    1.498803] omap_device_get_by_hwmod_name: no omap_device for i2c1
    [    1.505365] Modules linked in:
    [    1.508606] CPU: 0 PID: 1 Comm: swapper Not tainted 3.12.10-ti2013.12.01 #2
    [    1.515990] Backtrace: 
    [    1.518595] [<c0017880>] (dump_backtrace+0x0/0x10c) from [<c0017a1c>] (show_stack+0x18/0x1c)
    [    1.527542]  r6:c002f564 r5:00000009 r4:dd083e28 r3:00000000
    [    1.533567] [<c0017a04>] (show_stack+0x0/0x1c) from [<c0580ba4>] (dump_stack+0x20/0x28)
    [    1.542068] [<c0580b84>] (dump_stack+0x0/0x28) from [<c0046d08>] (warn_slowpath_common+0x70/0x90)
    [    1.551480] [<c0046c98>] (warn_slowpath_common+0x0/0x90) from [<c0046dcc>] (warn_slowpath_fmt+0x38/0x40)
    [    1.561528]  r8:c076b3fc r7:c0768410 r6:c0c8c9ac r5:c084df08 r4:c06b9fa4
    [    1.568647] [<c0046d94>] (warn_slowpath_fmt+0x0/0x40) from [<c002f564>] (omap_device_get_by_hwmod_name+0x94/0xb4)
    [    1.579523]  r3:c058be8c r2:c06b6584
    [    1.583341] [<c002f4d0>] (omap_device_get_by_hwmod_name+0x0/0xb4) from [<c0778280>] (am33xx_pm_init+0x204/0x45c)
    [    1.594120]  r4:00000000
    [    1.596808] [<c077807c>] (am33xx_pm_init+
    

  • Joshua,

    The log looks promising. 

    Joshua Vanderpool said:
    [ 1.482628] ------------[ cut here ]------------ [ 1.487549] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_device.c:888 omap_device_get_by_hwmod_name+0x94/0xb4()

    What happened after this warning? Kernel hangs or you got the login prompt?

    Did you see usb0 on the host?

  • It hung...the interface popped up for a second until the hang.

    I noticed the i2c1 was not configuiring and that coul dbe the reason for the hang?

    Attached is the DTS files.

    7713.am335x-boneblacknblue.dts.txt
    /*
     * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    /dts-v1/;
    
    #include "am33xx.dtsi"
    #include "am335x-bonenblue-common.dtsi"
    
    &ldo3_reg {
    	regulator-min-microvolt = <1800000>;
    	regulator-max-microvolt = <1800000>;
    	regulator-always-on;
    };
    
    &mmc1 {
    	vmmc-supply = <&vmmcsd_fixed>;
    };
    
    &mmc2 {
    	vmmc-supply = <&vmmcsd_fixed>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&emmc_pins>;
    	bus-width = <8>;
    	ti,non-removable;
    	status = "okay";
    };
    
    &i2c0 {
    	hdmi1: hdmi@70 {
    	      compatible = "nxp,tda998x";
    	      reg = <0x70>;
    	};
    };
    

    6811.am335x-bonenblue-common.dtsi.txt
    /*
     * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    
    / {
    	model = "TI AM335x BeagleBone";
    	compatible = "ti,am335x-bone", "ti,am33xx";
    
    	cpus {
    		cpu@0 {
    			cpu0-supply = <&dcdc2_reg>;
    		};
    	};
    
    	memory {
    		device_type = "memory";
    		reg = <0x80000000 0x20000000>; /* 512 MB jdv** */
    	};
    
    	am33xx_pinmux: pinmux@44e10800 {
    		pinctrl-names = "default";
    
    
    
          i2c1_pins: pinmux_i2c1_pins {
    			pinctrl-single,pins = <
    				0x180 (PIN_INPUT_PULLUP | MUX_MODE3)	/* uart1_rx.i2c1_sda */
    				0x184 (PIN_INPUT_PULLUP | MUX_MODE3)	/* uart1_tx.i2c1_scl */
    			>;
    		};
    
    		uart0_pins: pinmux_uart0_pins {
    			pinctrl-single,pins = <
    				0x170 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
    				0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
    			>;
    		};
    
    
    
    
    		emmc_pins: pinmux_emmc_pins {
    			pinctrl-single,pins = <
    				0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
    				0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
    				0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
    				0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
    				0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
    				0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
    				0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
    				0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
    				0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
    				0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
    			>;
    		};
    	};
    
    	ocp {
    		uart0: serial@44e09000 {
    			pinctrl-names = "default";
    			pinctrl-0 = <&uart0_pins>;
    
    			status = "okay";
    		};
    
    		musb: usb@47400000 {
    			status = "okay";
    
    			control@44e10000 {
    				status = "okay";
    			};
    
    			usb-phy@47401300 {
    				status = "okay";
    			};
    
    			usb-phy@47401b00 {
    				status = "okay";
    			};
    
    			usb@47401000 {
    				status = "okay";
    			};
    
    			usb@47401800 {
    				status = "okay";
    				dr_mode = "host";
    			};
    
    			dma-controller@07402000  {
    				status = "okay";
    			};
    		};
    
    		i2c1: i2c@4802a000 {
    			pinctrl-names = "default";
    			pinctrl-0 = <&i2c1_pins>;
    			status = "okay";
    			clock-frequency = <400000>;
    
    			/* Set OPP50 (0.95V) for VDD core */
    			sleep-sequence = /bits/ 8 <
    				0x02 0x24 0x0b 0x6d /* Password unlock 1 */
    				0x02 0x24 0x10 0x02 /* Set DCDC3 to 0.95V */
    				0x02 0x24 0x0b 0x6d /* Password unlock 2 */
    				0x02 0x24 0x10 0x02 /* Set DCDC3 to 0.95V */
    				0x02 0x24 0x0b 0x6c /* Password unlock 1 */
    				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
    				0x02 0x24 0x0b 0x6c /* Password unlock 2 */
    				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
    			>;
    
    			/* Set OPP100 (1.10V) for VDD core */
    			wake-sequence = /bits/ 8 <
    				0x02 0x24 0x0b 0x6d /* Password unlock 1 */
    				0x02 0x24 0x10 0x08 /* Set DCDC3 to 1.1V */
    				0x02 0x24 0x0b 0x6d /* Password unlock 2 */
    				0x02 0x24 0x10 0x08 /* Set DCDC3 to 1.1V */
    				0x02 0x24 0x0b 0x6c /* Password unlock 1 */
    				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
    				0x02 0x24 0x0b 0x6c /* Password unlock 2 */
    				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
    			>;
    
    			tps: tps@24 {
    				reg = <0x24>;
    			};
    
    		};
    	};
    	vmmcsd_fixed: fixedregulator@0 {
    		compatible = "regulator-fixed";
    		regulator-name = "vmmcsd_fixed";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    	};
    };
    
    #include "tps65217.dtsi"
    
    &tps {
    	regulators {
    		dcdc1_reg: regulator@0 {
    			regulator-always-on;
    		};
    
    		dcdc2_reg: regulator@1 {
    			/* VDD_MPU voltage limits 0.95V - 1.325V with +/-4% tolerance */
    			regulator-name = "vdd_mpu";
    			regulator-min-microvolt = <925000>;
    			regulator-max-microvolt = <1378000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc3_reg: regulator@2 {
    			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
    			regulator-name = "vdd_core";
    			regulator-min-microvolt = <925000>;
    			regulator-max-microvolt = <1150000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		ldo1_reg: regulator@3 {
    			regulator-always-on;
    		};
    
    		ldo2_reg: regulator@4 {
    			regulator-always-on;
    		};
    
    		ldo3_reg: regulator@5 {
    			regulator-always-on;
    		};
    
    		ldo4_reg: regulator@6 {
    			regulator-always-on;
    		};
    	};
    };
    
    
    
    
    
    
    
    

  • Ok, that seems telling the usb system works fine, but I am not sure if the i2c1 problem causes the hang.

    What is on the i2c1 bus? Is it possible to disable it for now?

  • USB0 is working fine not USB1 yet...

    The PMIC is on I2C1 TP65217...

    In the DTS it calls for i2c settings on the PMIC can I just remove all of that?

  • Joshua Vanderpool said:
    USB0 is working fine not USB1 yet...

    Yes, I meant usb0. We are focusing on NFS over usb0 so that we can debug usb1.

    Joshua Vanderpool said:
    In the DTS it calls for i2c settings on the PMIC can I just remove all of that?

    Well, usb is the only module I have expertise on. I am not sure how to fix this i2c problem. PMIC is a fundamental component of a system, I am not sure if the system will work if PMIC is disabled...

  • Note: is the Power Managment requires sleep and wake I2C0 must be used in hardware as the PM firmware blob only uses that, this is noted in pm33xx.c

    I did finaly get a clean boot and the USB1 works with the hub and detects a drive hot plugged.

    Does this must mean that u-boot does not support?

    Stopping Bootlog daemon: bootlogd.
    
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am335x-evm ttyO0
    
    Arago 2013.12 am335x-evm ttyO0
    
    am335x-evm login: root
    root@am335x-evm:~# lsusb
    Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    root@am335x-evm:~# [   42.961131] usb 2-1.4: new high-speed USB device number 3 using musb-hdrc
    [   43.082981] usb 2-1.4: New USB device found, idVendor=090c, idProduct=1000
    [   43.090267] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [   43.098031] usb 2-1.4: SerialNumber: B1212140000490
    [   43.105326] usb-storage 2-1.4:1.0: USB Mass Storage device detected
    [   43.118073] scsi0 : usb-storage 2-1.4:1.0
    [   44.294971] scsi 0:0:0:0: Direct-Access                               1100 PQ: 0 ANSI: 4
    [   44.308925] sd 0:0:0:0: [sda] 15810560 512-byte logical blocks: (8.09 GB/7.53 GiB)
    [   44.319686] sd 0:0:0:0: [sda] Write Protect is off
    [   44.327246] sd 0:0:0:0: [sda] No Caching mode page found
    [   44.332945] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [   44.348214] sd 0:0:0:0: [sda] No Caching mode page found
    [   44.353930] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [   44.362990]  sda: sda1 sda2
    [   44.379302] sd 0:0:0:0: [sda] No Caching mode page found
    [   44.385015] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [   44.391489] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [   44.985290] EXT4-fs (sda2): recovery complete
    [   44.989943] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
    

    Now that i have this method of boot i will not require the USB in u-boot other than the usb_ether that is working.

    Thanks for the support, now on the the tps65217_bl...

  • I am new to this but I think my question is related to the task you want to do. I want to flash my eMMC(MMC1) with a debian. I want it to use USB1. But the Sysboot option only has USB0 which does not support mass storage. Upon reading your approach, I just want to clarify something. When you boot from USB_ether, did you have u-boot in eMMC or somewhere else? I also realized that I don't have to boot from USB mass storage if I can make booting from USB ether works but I really have no idea on the u-boot side.