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.

AM355x Booting Issue

Other Parts Discussed in Thread: AM3352

Hi All,

We are working in a project which is having AM3352 as a CPU. We are working on upgrading of the current SDK to the latest SDK release done by TI.

The SDK features:

Kernel Version: 4.4.12

Uboot : uboot 2016-02

Buildroot : buildroot-2016-08

Tool Chain: Linaro GCC 5.3 2016.02 hard-float toolchain

We have compiled the SDK with this configuration but we are not able to flash and bring up the board using the Linaro tool Chain.

But if we compile the SDK with the buildroot internal tool chain then we are able to boot the device.

Please provide the solution ASAP.

  • I will forward this to the software team. They will respond here.
  • Hi Parveen,

    Not sure what you mean by:

    " if we compile the SDK with the buildroot internal tool chain then we are able to boot the device."

    but you need to build the sdk sources with the toolchain provided in: linux-devkit/sysroots/x86_64-arago-linux/usr/bin.

    Best Regards,
    Yordan
  • Hi Yordan,

    The buildroot contains its own toolchain. If we compile the uboot with its own toolchain which is "arm-buildroot-linux-gnueabi-" we are able to bring up the board with our coustom changes in uboot according to our board.
    But if we use the linaro toolchain which is "arm-linux-gnueabihf-" then we are not getting the board flashed.
    It is getting stucked after flashing the second stage boot loader.

    I think this gives you a clear picture of my question.
  • Hi,

    This is strange, I've always built my SDK with the supplied linaro toolchaing located in linux-devkit/sysroots/x86_64-arago-linux/usr/bin (this is the arm-linux-gnueabihf-) and never had problem flashing my boards..

    Could you verify your environment: PATH, ARCH, CROSS_COMPILE ? Also verify the u-boot config file that you use, it should be am335x_evm.h.

    Can you try building your sdk with the toplevel make file (from ~/ti-processor-sdk-linux-am335x-evm-03.00.00.04):
    cd ~/ti-processor-sdk-linux-am335x-evm-03.00.00.04
    make clean
    make u-boot-spl //builds u-boot-spl
    make u-boot //builds MLO & u-boot.img
    make linux //builds zImage & dtb

    Best Regards,
    Yordan
  • Hi Yordan,

    I have compiled the source code again but still no success.
    I am not using the complete SDK from TI. I am using buildroot 2016-08 to make the file system and the uboot and linux kernel from the TI release.
    As you said you have used ti-processor-sdk-linux-am335x-evm-03.00.00.04 SDK , So does it make difference. If so then i will try it with the complete SDK.

    But if still you can give some other points on this it will be very helpful.
    i am
  • Hi,

    The complete sdk uses Linaro Toolchain (gcc) 5.3 2016.02 hard-float, see:
    processors.wiki.ti.com/.../Processor_SDK_Linux_Release_Notes

    If you download this toolchain from linaro, you should be able to compile & run the sdk.

    Best Regards,
    Yordan
  • Hi Yordan,

    I have checked the release note. The SDK is using yocto but i am using buildroot 2016-08. I think i can use any one of these for the filesystem creation.

    In release section we have two things:
    1) ti-processor-sdk-linux-am335x-evm-03.00.00.04-Linux-x86-Install.bin
    2) am335x-evm-linux-sdk-src-03.00.00.04.tar.gz

    which one should i download. What is the difference in these two?

    With regard,
    Parveen
  • Hi Parveen,

    Download & install the ti-processor-sdk-linux-am335x-evm-03.00.00.04-Linux-x86-Install.bin, as it installs all the sources (Yocto filesystem, u-boot, kernel & linaro toolchain) needed to build working images for AM335x boards.

    Best Regards,
    Yordan
  • HI Yordan,

    Is their any solution why it is not working with the buildroot 2016-08.
    Do i really need to move to yocto.
    I have used the previous releases with the buildroot but that doesnt created any issue with any other tool chain that was released by TI.

    Well I will try to go with yocto but it will change the entire strucrure as i have to change many other files for my board.

    Can we have a solution for the buildroot 2016-08 with the linaro tool chain.
    As the filesystem created by using linaro tool chain and buildroot is working fine but the uboot is not getting up when i use the buildroot.

    Is their any dependencied betwen the filesystem and uboot.

    With regard,
    Parveen
  • Hi Parveen

    Is their any dependencied betwen the filesystem and uboot.

    No, there shouldn't be any dependencies between filesystem and u-boot. I guess the problem is the actual toolcain used in buildroot...
    I am not familiar with buildroot 2016-08, can you post the repositofy from where you download your filesystem, kernel & u-boot sources ?

    Best Regards,
    Yordan
  • HI Yordan,

    I have tried with the "gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi" tool-chain but it is without Hardflaot.
    The version of both the tool chain is same as that is provided by the TI SDK and with this tool chain the u-boot is getting flashed and is also booting.

    So is this the issue due to the Hardfloat?
    We have tried everything to our best.
    Is their need to be any special configuration to be done for the hardfloat in uboot.

    Please provide me the .config and the dts file that you are using in your case whike compiling with the linaro hf toolchain.

    With Regards,
    Parveen kumar yadav
  • Hi Parveen,

    Find the u-boot .config file, also kernel dts & u-boot am335x_evm.h files: 

    #
    # Automatically generated file; DO NOT EDIT.
    # U-Boot 2016.05 Configuration
    #
    CONFIG_CREATE_ARCH_SYMLINK=y
    CONFIG_HAVE_GENERIC_BOARD=y
    CONFIG_SYS_GENERIC_BOARD=y
    # CONFIG_ARC is not set
    CONFIG_ARM=y
    # CONFIG_AVR32 is not set
    # CONFIG_BLACKFIN is not set
    # CONFIG_M68K is not set
    # CONFIG_MICROBLAZE is not set
    # CONFIG_MIPS is not set
    # CONFIG_NDS32 is not set
    # CONFIG_NIOS2 is not set
    # CONFIG_OPENRISC is not set
    # CONFIG_PPC is not set
    # CONFIG_SANDBOX is not set
    # CONFIG_SH is not set
    # CONFIG_SPARC is not set
    # CONFIG_X86 is not set
    CONFIG_SYS_ARCH="arm"
    CONFIG_SYS_CPU="armv7"
    CONFIG_SYS_SOC="am33xx"
    CONFIG_SYS_VENDOR="ti"
    CONFIG_SYS_BOARD="am335x"
    CONFIG_SYS_CONFIG_NAME="am335x_evm"
    
    #
    # ARM architecture
    #
    CONFIG_HAS_VBAR=y
    CONFIG_HAS_THUMB2=y
    CONFIG_CPU_V7=y
    # CONFIG_SEMIHOSTING is not set
    # CONFIG_SYS_L2CACHE_OFF is not set
    # CONFIG_ARCH_AT91 is not set
    # CONFIG_TARGET_EDB93XX is not set
    # CONFIG_TARGET_VCMA9 is not set
    # CONFIG_TARGET_SMDK2410 is not set
    # CONFIG_TARGET_ASPENITE is not set
    # CONFIG_TARGET_GPLUGD is not set
    # CONFIG_ARCH_DAVINCI is not set
    # CONFIG_KIRKWOOD is not set
    # CONFIG_ARCH_MVEBU is not set
    # CONFIG_TARGET_DEVKIT3250 is not set
    # CONFIG_TARGET_WORK_92105 is not set
    # CONFIG_TARGET_MX25PDK is not set
    # CONFIG_TARGET_ZMX25 is not set
    # CONFIG_TARGET_APF27 is not set
    # CONFIG_TARGET_APX4DEVKIT is not set
    # CONFIG_TARGET_XFI3 is not set
    # CONFIG_TARGET_M28EVK is not set
    # CONFIG_TARGET_MX23EVK is not set
    # CONFIG_TARGET_MX28EVK is not set
    # CONFIG_TARGET_MX23_OLINUXINO is not set
    # CONFIG_TARGET_BG0900 is not set
    # CONFIG_TARGET_SANSA_FUZE_PLUS is not set
    # CONFIG_TARGET_SC_SPS_1 is not set
    # CONFIG_ORION5X is not set
    # CONFIG_TARGET_SPEAR300 is not set
    # CONFIG_TARGET_SPEAR310 is not set
    # CONFIG_TARGET_SPEAR320 is not set
    # CONFIG_TARGET_SPEAR600 is not set
    # CONFIG_TARGET_STV0991 is not set
    # CONFIG_TARGET_X600 is not set
    # CONFIG_TARGET_IMX31_PHYCORE is not set
    # CONFIG_TARGET_MX31ADS is not set
    # CONFIG_TARGET_MX31PDK is not set
    # CONFIG_TARGET_WOODBURN is not set
    # CONFIG_TARGET_WOODBURN_SD is not set
    # CONFIG_TARGET_FLEA3 is not set
    # CONFIG_TARGET_MX35PDK is not set
    # CONFIG_ARCH_BCM283X is not set
    # CONFIG_TARGET_VEXPRESS_CA15_TC2 is not set
    # CONFIG_TARGET_VEXPRESS_CA5X2 is not set
    # CONFIG_TARGET_VEXPRESS_CA9X4 is not set
    # CONFIG_TARGET_KWB is not set
    # CONFIG_TARGET_TSERIES is not set
    # CONFIG_TARGET_CM_T335 is not set
    # CONFIG_TARGET_PEPPER is not set
    # CONFIG_TARGET_AM335X_IGEP0033 is not set
    # CONFIG_TARGET_PCM051 is not set
    # CONFIG_TARGET_DRACO is not set
    # CONFIG_TARGET_THUBAN is not set
    # CONFIG_TARGET_RASTABAN is not set
    # CONFIG_TARGET_PXM2 is not set
    # CONFIG_TARGET_RUT is not set
    # CONFIG_TARGET_PENGWYN is not set
    # CONFIG_TARGET_AM335X_BALTOS is not set
    CONFIG_TARGET_AM335X_EVM=y
    # CONFIG_TARGET_AM335X_SL50 is not set
    # CONFIG_TARGET_BAV335X is not set
    # CONFIG_TARGET_TI814X_EVM is not set
    # CONFIG_TARGET_TI816X_EVM is not set
    # CONFIG_TARGET_BCM28155_AP is not set
    # CONFIG_TARGET_BCMCYGNUS is not set
    # CONFIG_TARGET_BCMNSP is not set
    # CONFIG_ARCH_EXYNOS is not set
    # CONFIG_ARCH_S5PC1XX is not set
    # CONFIG_ARCH_HIGHBANK is not set
    # CONFIG_ARCH_INTEGRATOR is not set
    # CONFIG_ARCH_KEYSTONE is not set
    # CONFIG_ARCH_MX7 is not set
    # CONFIG_ARCH_MX6 is not set
    # CONFIG_ARCH_MX5 is not set
    # CONFIG_TARGET_M53EVK is not set
    # CONFIG_TARGET_MX51EVK is not set
    # CONFIG_TARGET_MX53ARD is not set
    # CONFIG_TARGET_MX53EVK is not set
    # CONFIG_TARGET_MX53LOCO is not set
    # CONFIG_TARGET_MX53SMD is not set
    # CONFIG_OMAP34XX is not set
    # CONFIG_OMAP44XX is not set
    # CONFIG_OMAP54XX is not set
    # CONFIG_AM43XX is not set
    # CONFIG_RMOBILE is not set
    # CONFIG_ARCH_SNAPDRAGON is not set
    # CONFIG_ARCH_SOCFPGA is not set
    # CONFIG_TARGET_CM_T43 is not set
    # CONFIG_ARCH_SUNXI is not set
    # CONFIG_TARGET_TS4800 is not set
    # CONFIG_TARGET_VF610TWR is not set
    # CONFIG_TARGET_COLIBRI_VF is not set
    # CONFIG_TARGET_PCM052 is not set
    # CONFIG_ARCH_ZYNQ is not set
    # CONFIG_ARCH_ZYNQMP is not set
    # CONFIG_TEGRA is not set
    # CONFIG_TARGET_VEXPRESS64_AEMV8A is not set
    # CONFIG_TARGET_VEXPRESS64_BASE_FVP is not set
    # CONFIG_TARGET_VEXPRESS64_BASE_FVP_DRAM is not set
    # CONFIG_TARGET_VEXPRESS64_JUNO is not set
    # CONFIG_TARGET_LS2080A_EMU is not set
    # CONFIG_TARGET_LS2080A_SIMU is not set
    # CONFIG_TARGET_LS2080AQDS is not set
    # CONFIG_TARGET_LS2080ARDB is not set
    # CONFIG_TARGET_HIKEY is not set
    # CONFIG_TARGET_LS1021AQDS is not set
    # CONFIG_TARGET_LS1021ATWR is not set
    # CONFIG_TARGET_LS1043AQDS is not set
    # CONFIG_TARGET_LS1043ARDB is not set
    # CONFIG_TARGET_H2200 is not set
    # CONFIG_TARGET_ZIPITZ2 is not set
    # CONFIG_TARGET_COLIBRI_PXA270 is not set
    # CONFIG_ARCH_UNIPHIER is not set
    # CONFIG_STM32 is not set
    # CONFIG_ARCH_ROCKCHIP is not set
    # CONFIG_TARGET_THUNDERX_88XX is not set
    CONFIG_SYS_MALLOC_F_LEN=0x400
    CONFIG_CONS_INDEX=1
    CONFIG_TI_I2C_BOARD_DETECT=y
    CONFIG_SYS_MALLOC_F=y
    # CONFIG_SPL_SYS_MALLOC_SIMPLE is not set
    # CONFIG_SPL_DM is not set
    CONFIG_DM_SERIAL=y
    # CONFIG_DM_SPI is not set
    # CONFIG_DM_I2C is not set
    CONFIG_DM_GPIO=y
    # CONFIG_ARMV7_LPAE is not set
    CONFIG_SPL_STACK_R_ADDR=0x82000000
    # CONFIG_NOR is not set
    
    #
    # ARM debug
    #
    # CONFIG_DEBUG_LL is not set
    # CONFIG_DM_KEYBOARD is not set
    CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
    
    #
    # General setup
    #
    CONFIG_LOCALVERSION=""
    CONFIG_LOCALVERSION_AUTO=y
    CONFIG_CC_OPTIMIZE_FOR_SIZE=y
    CONFIG_EXPERT=y
    CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y
    
    #
    # Boot images
    #
    CONFIG_SUPPORT_SPL=y
    CONFIG_SPL=y
    CONFIG_SPL_STACK_R=y
    # CONFIG_SPL_SEPARATE_BSS is not set
    CONFIG_FIT=y
    # CONFIG_FIT_VERBOSE is not set
    # CONFIG_FIT_SIGNATURE is not set
    # CONFIG_FIT_BEST_MATCH is not set
    CONFIG_OF_BOARD_SETUP=y
    # CONFIG_OF_SYSTEM_SETUP is not set
    # CONFIG_OF_STDOUT_VIA_ALIAS is not set
    CONFIG_SYS_EXTRA_OPTIONS="NAND"
    CONFIG_SPL_LOAD_FIT=y
    
    #
    # Boot timing
    #
    # CONFIG_BOOTSTAGE is not set
    CONFIG_BOOTSTAGE_USER_COUNT=20
    CONFIG_BOOTSTAGE_STASH_ADDR=0
    CONFIG_BOOTSTAGE_STASH_SIZE=4096
    # CONFIG_CONSOLE_RECORD is not set
    
    #
    # Command line interface
    #
    CONFIG_CMDLINE=y
    CONFIG_HUSH_PARSER=y
    CONFIG_SYS_HUSH_PARSER=y
    CONFIG_SYS_PROMPT="=> "
    
    #
    # Autoboot options
    #
    CONFIG_AUTOBOOT_KEYED=y
    CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
    # CONFIG_AUTOBOOT_ENCRYPTION is not set
    CONFIG_AUTOBOOT_DELAY_STR="d"
    CONFIG_AUTOBOOT_STOP_STR=" "
    # CONFIG_AUTOBOOT_KEYED_CTRLC is not set
    
    #
    # Commands
    #
    
    #
    # Info commands
    #
    CONFIG_CMD_BDI=y
    CONFIG_CMD_CONSOLE=y
    # CONFIG_CMD_CPU is not set
    # CONFIG_CMD_LICENSE is not set
    
    #
    # Boot commands
    #
    CONFIG_CMD_BOOTD=y
    CONFIG_CMD_BOOTM=y
    CONFIG_CMD_BOOTZ=y
    CONFIG_CMD_BOOTEFI=y
    CONFIG_CMD_ELF=y
    CONFIG_CMD_FDT=y
    CONFIG_CMD_GO=y
    CONFIG_CMD_RUN=y
    CONFIG_CMD_IMI=y
    # CONFIG_CMD_IMLS is not set
    CONFIG_CMD_XIMG=y
    
    #
    # Environment commands
    #
    CONFIG_CMD_ASKENV=y
    CONFIG_CMD_EXPORTENV=y
    CONFIG_CMD_IMPORTENV=y
    CONFIG_CMD_EDITENV=y
    # CONFIG_CMD_GREPENV is not set
    CONFIG_CMD_SAVEENV=y
    CONFIG_CMD_ENV_EXISTS=y
    
    #
    # Memory commands
    #
    CONFIG_CMD_MEMORY=y
    CONFIG_CMD_CRC32=y
    # CONFIG_LOOPW is not set
    # CONFIG_CMD_MEMTEST is not set
    # CONFIG_CMD_MX_CYCLIC is not set
    # CONFIG_CMD_MEMINFO is not set
    
    #
    # Device access commands
    #
    CONFIG_CMD_DM=y
    # CONFIG_CMD_DEMO is not set
    CONFIG_CMD_LOADB=y
    CONFIG_CMD_LOADS=y
    # CONFIG_CMD_FLASH is not set
    # CONFIG_CMD_ARMFLASH is not set
    CONFIG_CMD_MMC=y
    # CONFIG_CMD_NAND is not set
    CONFIG_CMD_SF=y
    CONFIG_CMD_SPI=y
    CONFIG_CMD_I2C=y
    CONFIG_CMD_USB=y
    CONFIG_CMD_DFU=y
    # CONFIG_CMD_USB_MASS_STORAGE is not set
    CONFIG_CMD_FPGA=y
    CONFIG_CMD_GPIO=y
    
    #
    # Shell scripting commands
    #
    CONFIG_CMD_ECHO=y
    CONFIG_CMD_ITEST=y
    CONFIG_CMD_SOURCE=y
    # CONFIG_CMD_SETEXPR is not set
    
    #
    # Network commands
    #
    CONFIG_CMD_NET=y
    # CONFIG_CMD_TFTPPUT is not set
    # CONFIG_CMD_TFTPSRV is not set
    # CONFIG_CMD_RARP is not set
    CONFIG_CMD_DHCP=y
    CONFIG_CMD_NFS=y
    CONFIG_CMD_MII=y
    CONFIG_CMD_PING=y
    # CONFIG_CMD_CDP is not set
    # CONFIG_CMD_SNTP is not set
    # CONFIG_CMD_DNS is not set
    # CONFIG_CMD_LINK_LOCAL is not set
    
    #
    # Misc commands
    #
    # CONFIG_CMD_CACHE is not set
    CONFIG_CMD_TIME=y
    CONFIG_CMD_MISC=y
    # CONFIG_CMD_TIMER is not set
    
    #
    # Power commands
    #
    
    #
    # Security commands
    #
    
    #
    # Filesystem commands
    #
    CONFIG_CMD_EXT2=y
    CONFIG_CMD_EXT4=y
    CONFIG_CMD_EXT4_WRITE=y
    CONFIG_CMD_FAT=y
    CONFIG_CMD_FS_GENERIC=y
    CONFIG_SUPPORT_OF_CONTROL=y
    
    #
    # Device Tree Control
    #
    CONFIG_OF_CONTROL=y
    # CONFIG_SPL_OF_CONTROL is not set
    CONFIG_OF_SEPARATE=y
    # CONFIG_OF_EMBED is not set
    CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2"
    CONFIG_NET=y
    # CONFIG_NET_RANDOM_ETHADDR is not set
    # CONFIG_NETCONSOLE is not set
    CONFIG_NET_TFTP_VARS=y
    
    #
    # Device Drivers
    #
    
    #
    # Generic Driver Options
    #
    CONFIG_DM=y
    CONFIG_DM_WARN=y
    CONFIG_DM_DEVICE_REMOVE=y
    CONFIG_DM_STDIO=y
    CONFIG_DM_SEQ_ALIAS=y
    # CONFIG_SPL_DM_SEQ_ALIAS is not set
    # CONFIG_REGMAP is not set
    # CONFIG_SPL_REGMAP is not set
    # CONFIG_DEVRES is not set
    CONFIG_SIMPLE_BUS=y
    CONFIG_OF_TRANSLATE=y
    # CONFIG_ADC is not set
    # CONFIG_ADC_EXYNOS is not set
    # CONFIG_ADC_SANDBOX is not set
    # CONFIG_BLK is not set
    CONFIG_DISK=y
    # CONFIG_BLOCK_CACHE is not set
    # CONFIG_DWC_AHCI is not set
    
    #
    # Clock
    #
    # CONFIG_CLK is not set
    # CONFIG_CPU is not set
    
    #
    # Hardware crypto devices
    #
    # CONFIG_FSL_CAAM is not set
    
    #
    # Demo for driver model
    #
    # CONFIG_DM_DEMO is not set
    
    #
    # DFU support
    #
    # CONFIG_DFU_TFTP is not set
    
    #
    # DMA Support
    #
    # CONFIG_DMA is not set
    # CONFIG_TI_EDMA3 is not set
    
    #
    # GPIO Support
    #
    # CONFIG_ALTERA_PIO is not set
    # CONFIG_DWAPB_GPIO is not set
    # CONFIG_ATMEL_PIO4 is not set
    # CONFIG_INTEL_BROADWELL_GPIO is not set
    # CONFIG_LPC32XX_GPIO is not set
    # CONFIG_MSM_GPIO is not set
    # CONFIG_ROCKCHIP_GPIO is not set
    # CONFIG_VYBRID_GPIO is not set
    
    #
    # I2C support
    #
    # CONFIG_DM_I2C_COMPAT is not set
    # CONFIG_CROS_EC_KEYB is not set
    
    #
    # LED Support
    #
    # CONFIG_LED is not set
    
    #
    # Memory Controller drivers
    #
    
    #
    # Multifunction device drivers
    #
    CONFIG_MISC=y
    # CONFIG_ALTERA_SYSID is not set
    # CONFIG_CROS_EC is not set
    # CONFIG_FSL_SEC_MON is not set
    # CONFIG_MXC_OCOTP is not set
    # CONFIG_PWRSEQ is not set
    # CONFIG_PCA9551_LED is not set
    # CONFIG_RESET is not set
    # CONFIG_WINBOND_W83627 is not set
    
    #
    # MMC Host controller Support
    #
    CONFIG_DM_MMC=y
    # CONFIG_MSM_SDHCI is not set
    # CONFIG_ROCKCHIP_DWMMC is not set
    # CONFIG_ZYNQ_SDHCI is not set
    
    #
    # MTD Support
    #
    # CONFIG_MTD is not set
    
    #
    # NAND Device Support
    #
    CONFIG_DM_NAND=y
    # CONFIG_NAND_DENALI is not set
    # CONFIG_NAND_VF610_NFC is not set
    # CONFIG_NAND_PXA3XX is not set
    # CONFIG_NAND_ARASAN is not set
    
    #
    # Generic NAND options
    #
    # CONFIG_SPL_NAND_DENALI is not set
    
    #
    # SPI Flash Support
    #
    CONFIG_SPI_FLASH=y
    # CONFIG_SPI_FLASH_BAR is not set
    # CONFIG_SPI_FLASH_ATMEL is not set
    # CONFIG_SPI_FLASH_EON is not set
    # CONFIG_SPI_FLASH_GIGADEVICE is not set
    # CONFIG_SPI_FLASH_MACRONIX is not set
    # CONFIG_SPI_FLASH_SPANSION is not set
    # CONFIG_SPI_FLASH_STMICRO is not set
    # CONFIG_SPI_FLASH_SST is not set
    CONFIG_SPI_FLASH_WINBOND=y
    CONFIG_SPI_FLASH_USE_4K_SECTORS=y
    # CONFIG_SPI_FLASH_MTD is not set
    CONFIG_DM_ETH=y
    # CONFIG_PHYLIB is not set
    CONFIG_NETDEVICES=y
    # CONFIG_ALTERA_TSE is not set
    # CONFIG_E1000 is not set
    # CONFIG_ETH_DESIGNWARE is not set
    # CONFIG_RTL8139 is not set
    # CONFIG_RTL8169 is not set
    
    #
    # PCI
    #
    # CONFIG_DM_PCI is not set
    
    #
    # Pin controllers
    #
    # CONFIG_PINCTRL is not set
    
    #
    # Power
    #
    # CONFIG_DM_PMIC is not set
    # CONFIG_DM_REGULATOR is not set
    # CONFIG_DM_PWM is not set
    # CONFIG_RAM is not set
    
    #
    # Remote Processor drivers
    #
    
    #
    # Real Time Clock
    #
    # CONFIG_DM_RTC is not set
    
    #
    # Serial drivers
    #
    CONFIG_REQUIRE_SERIAL_CONSOLE=y
    CONFIG_SERIAL_PRESENT=y
    CONFIG_SPL_SERIAL_PRESENT=y
    # CONFIG_DEBUG_UART is not set
    # CONFIG_DEBUG_UART_SKIP_INIT is not set
    # CONFIG_ALTERA_JTAG_UART is not set
    # CONFIG_ALTERA_UART is not set
    # CONFIG_FSL_LPUART is not set
    CONFIG_SYS_NS16550=y
    # CONFIG_MSM_SERIAL is not set
    
    #
    # Sound support
    #
    # CONFIG_SOUND is not set
    
    #
    # SPI Support
    #
    # CONFIG_FSL_ESPI is not set
    # CONFIG_TI_QSPI is not set
    
    #
    # SPMI support
    #
    # CONFIG_SPMI is not set
    # CONFIG_DM_THERMAL is not set
    
    #
    # Timer Support
    #
    CONFIG_TIMER=y
    # CONFIG_TIMER_EARLY is not set
    # CONFIG_ALTERA_TIMER is not set
    CONFIG_OMAP_TIMER=y
    
    #
    # TPM support
    #
    CONFIG_USB=y
    CONFIG_DM_USB=y
    
    #
    # USB Host Controller Drivers
    #
    # CONFIG_USB_XHCI_HCD is not set
    # CONFIG_USB_XHCI is not set
    # CONFIG_USB_OHCI_GENERIC is not set
    # CONFIG_USB_EHCI_HCD is not set
    # CONFIG_USB_EHCI is not set
    # CONFIG_USB_DWC3 is not set
    
    #
    # MUSB Controller Driver
    #
    CONFIG_USB_MUSB_HOST=y
    CONFIG_USB_MUSB_GADGET=y
    CONFIG_USB_MUSB_TI=y
    
    #
    # ULPI drivers
    #
    
    #
    # USB peripherals
    #
    # CONFIG_USB_STORAGE is not set
    # CONFIG_USB_KEYBOARD is not set
    CONFIG_USB_GADGET=y
    # CONFIG_USB_GADGET_ATMEL_USBA is not set
    # CONFIG_USB_GADGET_DWC2_OTG is not set
    # CONFIG_CI_UDC is not set
    CONFIG_USB_GADGET_VBUS_DRAW=2
    CONFIG_USB_GADGET_DUALSPEED=y
    CONFIG_USB_GADGET_DOWNLOAD=y
    CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
    CONFIG_G_DNL_VENDOR_NUM=0x0451
    CONFIG_G_DNL_PRODUCT_NUM=0xd022
    
    #
    # Graphics support
    #
    # CONFIG_DM_VIDEO is not set
    
    #
    # TrueType Fonts
    #
    # CONFIG_VIDEO_VESA is not set
    # CONFIG_VIDEO_LCD_ANX9804 is not set
    # CONFIG_VIDEO_LCD_SSD2828 is not set
    # CONFIG_VIDEO_MVEBU is not set
    # CONFIG_DISPLAY is not set
    # CONFIG_VIDEO_TEGRA20 is not set
    # CONFIG_VIDEO_BRIDGE is not set
    # CONFIG_PHYS_TO_BUS is not set
    
    #
    # File systems
    #
    
    #
    # Library routines
    #
    # CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set
    CONFIG_HAVE_PRIVATE_LIBGCC=y
    # CONFIG_USE_PRIVATE_LIBGCC is not set
    CONFIG_SYS_HZ=1000
    # CONFIG_USE_TINY_PRINTF is not set
    CONFIG_REGEX=y
    # CONFIG_LIB_RAND is not set
    # CONFIG_CMD_DHRYSTONE is not set
    CONFIG_RSA=y
    CONFIG_RSA_SOFTWARE_EXP=y
    # CONFIG_TPM is not set
    
    #
    # Hashing Support
    #
    # CONFIG_SHA1 is not set
    # CONFIG_SHA256 is not set
    # CONFIG_SHA_HW_ACCEL is not set
    
    #
    # Compression Support
    #
    # CONFIG_LZ4 is not set
    # CONFIG_ERRNO_STR is not set
    CONFIG_OF_LIBFDT=y
    CONFIG_SPL_OF_LIBFDT=y
    CONFIG_EFI_LOADER=y
    # CONFIG_UNIT_TEST is not set
    
     
    /*
     * am335x_evm.h
     *
     * 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.
     */
    
    #ifndef __CONFIG_AM335X_EVM_H
    #define __CONFIG_AM335X_EVM_H
    
    #include <configs/ti_am335x_common.h>
    
    #ifndef CONFIG_SPL_BUILD
    # define CONFIG_TIMESTAMP
    # define CONFIG_LZO
    #endif
    
    #define CONFIG_SYS_BOOTM_LEN		(16 << 20)
    
    #define MACH_TYPE_TIAM335EVM		3589	/* Until the next sync */
    #define CONFIG_MACH_TYPE		MACH_TYPE_TIAM335EVM
    #define CONFIG_BOARD_LATE_INIT
    
    /* Clock Defines */
    #define V_OSCK				24000000  /* Clock output from T2 */
    #define V_SCLK				(V_OSCK)
    
    /* Custom script for NOR */
    #define CONFIG_SYS_LDSCRIPT		"board/ti/am335x/u-boot.lds"
    
    /* Always 128 KiB env size */
    #define CONFIG_ENV_SIZE			(128 << 10)
    
    /* Enhance our eMMC support / experience. */
    #define CONFIG_CMD_GPT
    #define CONFIG_EFI_PARTITION
    
    /* Enable Atheros phy driver */
    #define CONFIG_PHY_ATHEROS
    
    #ifdef CONFIG_NAND
    #define NANDARGS \
    	"mtdids=" MTDIDS_DEFAULT "\0" \
    	"mtdparts=" MTDPARTS_DEFAULT "\0" \
    	"nandargs=setenv bootargs console=${console} " \
    		"${optargs} " \
    		"root=${nandroot} " \
    		"rootfstype=${nandrootfstype}\0" \
    	"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
    	"nandrootfstype=ubifs rootwait=1\0" \
    	"nandboot=echo Booting from nand ...; " \
    		"run nandargs; " \
    		"nand read ${fdtaddr} NAND.u-boot-spl-os; " \
    		"nand read ${loadaddr} NAND.kernel; " \
    		"bootz ${loadaddr} - ${fdtaddr}\0"
    #else
    #define NANDARGS ""
    #endif
    
    #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
    
    #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
    	"bootcmd_" #devtypel #instance "=" \
    	"setenv mmcdev " #instance"; "\
    	"setenv bootpart " #instance":2 ; "\
    	"run mmcboot\0"
    
    #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
    	#devtypel #instance " "
    
    #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
    	"bootcmd_" #devtypel "=" \
    	"run nandboot\0"
    
    #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
    	#devtypel #instance " "
    
    #define BOOT_TARGET_DEVICES(func) \
    	func(MMC, mmc, 0) \
    	func(LEGACY_MMC, legacy_mmc, 0) \
    	func(MMC, mmc, 1) \
    	func(LEGACY_MMC, legacy_mmc, 1) \
    	func(NAND, nand, 0) \
    	func(PXE, pxe, na) \
    	func(DHCP, dhcp, na)
    
    #define CONFIG_BOOTCOMMAND \
    	"run findfdt; " \
    	"run init_console; " \
    	"run envboot; " \
    	"run distro_bootcmd"
    
    #include <config_distro_bootcmd.h>
    
    #ifndef CONFIG_SPL_BUILD
    #define CONFIG_EXTRA_ENV_SETTINGS \
    	DEFAULT_LINUX_BOOT_ENV \
    	DEFAULT_MMC_TI_ARGS \
    	"boot_fdt=try\0" \
    	"bootpart=0:2\0" \
    	"bootdir=/boot\0" \
    	"bootfile=zImage\0" \
    	"fdtfile=undefined\0" \
    	"console=ttyO0,115200n8\0" \
    	"partitions=" \
    		"uuid_disk=${uuid_gpt_disk};" \
    		"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
    	"optargs=\0" \
    	"ramroot=/dev/ram0 rw\0" \
    	"ramrootfstype=ext2\0" \
    	"spiroot=/dev/mtdblock4 rw\0" \
    	"spirootfstype=jffs2\0" \
    	"spisrcaddr=0xe0000\0" \
    	"spiimgsize=0x362000\0" \
    	"spibusno=0\0" \
    	"spiargs=setenv bootargs console=${console} " \
    		"${optargs} " \
    		"root=${spiroot} " \
    		"rootfstype=${spirootfstype}\0" \
    	"ramargs=setenv bootargs console=${console} " \
    		"${optargs} " \
    		"root=${ramroot} " \
    		"rootfstype=${ramrootfstype}\0" \
    	"loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
    	"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
    	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
    	"mmcloados=run args_mmc; " \
    		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
    			"if run loadfdt; then " \
    				"bootz ${loadaddr} - ${fdtaddr}; " \
    			"else " \
    				"if test ${boot_fdt} = try; then " \
    					"bootz; " \
    				"else " \
    					"echo WARN: Cannot load the DT; " \
    				"fi; " \
    			"fi; " \
    		"else " \
    			"bootz; " \
    		"fi;\0" \
    	"mmcboot=mmc dev ${mmcdev}; " \
    		"if mmc rescan; then " \
    			"echo SD/MMC found on device ${mmcdev};" \
    			"run envboot; " \
    			"if run loadimage; then " \
    				"run mmcloados;" \
    			"fi;" \
    		"fi;\0" \
    	"spiboot=echo Booting from spi ...; " \
    		"run spiargs; " \
    		"sf probe ${spibusno}:0; " \
    		"sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
    		"bootz ${loadaddr}\0" \
    	"ramboot=echo Booting from ramdisk ...; " \
    		"run ramargs; " \
    		"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
    	"findfdt="\
    		"if test $board_name = A335BONE; then " \
    			"setenv fdtfile am335x-bone.dtb; fi; " \
    		"if test $board_name = A335BNLT; then " \
    			"setenv fdtfile am335x-boneblack.dtb; fi; " \
    		"if test $board_name = BBG1; then " \
    			"setenv fdtfile am335x-bonegreen.dtb; fi; " \
    		"if test $board_name = A33515BB; then " \
    			"setenv fdtfile am335x-evm.dtb; fi; " \
    		"if test $board_name = A335X_SK; then " \
    			"setenv fdtfile am335x-evmsk.dtb; fi; " \
    		"if test $board_name = A335_ICE; then " \
    			"setenv fdtfile am335x-icev2.dtb; fi; " \
    		"if test $fdtfile = undefined; then " \
    			"echo WARNING: Could not determine device tree to use; fi; \0" \
    	"init_console=" \
    		"if test $board_name = A335_ICE; then "\
    			"setenv console ttyO3,115200n8;" \
    		"else " \
    			"setenv console ttyO0,115200n8;" \
    		"fi;\0" \
    	NANDARGS \
    	NETARGS \
    	DFUARGS \
    	BOOTENV
    #endif
    
    /* NS16550 Configuration */
    #define CONFIG_SYS_NS16550_COM1		0x44e09000	/* Base EVM has UART0 */
    #define CONFIG_SYS_NS16550_COM2		0x48022000	/* UART1 */
    #define CONFIG_SYS_NS16550_COM3		0x48024000	/* UART2 */
    #define CONFIG_SYS_NS16550_COM4		0x481a6000	/* UART3 */
    #define CONFIG_SYS_NS16550_COM5		0x481a8000	/* UART4 */
    #define CONFIG_SYS_NS16550_COM6		0x481aa000	/* UART5 */
    #define CONFIG_BAUDRATE			115200
    
    #define CONFIG_CMD_EEPROM
    #define CONFIG_ENV_EEPROM_IS_ON_I2C
    #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50	/* Main EEPROM */
    #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	2
    
    /* PMIC support */
    #define CONFIG_POWER_TPS65217
    #define CONFIG_POWER_TPS65910
    
    /* SPL */
    #ifndef CONFIG_NOR_BOOT
    #define CONFIG_SPL_POWER_SUPPORT
    #define CONFIG_SPL_YMODEM_SUPPORT
    
    /* Bootcount using the RTC block */
    #define CONFIG_BOOTCOUNT_LIMIT
    #define CONFIG_BOOTCOUNT_AM33XX
    #define CONFIG_SYS_BOOTCOUNT_BE
    
    /* USB gadget RNDIS */
    #define CONFIG_SPL_MUSB_NEW_SUPPORT
    
    #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/am33xx/u-boot-spl.lds"
    #endif
    
    #ifdef CONFIG_NAND
    /* NAND: device related configs */
    #define CONFIG_SYS_NAND_5_ADDR_CYCLE
    #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
    					 CONFIG_SYS_NAND_PAGE_SIZE)
    #define CONFIG_SYS_NAND_PAGE_SIZE	2048
    #define CONFIG_SYS_NAND_OOBSIZE		64
    #define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
    /* NAND: driver related configs */
    #define CONFIG_NAND_OMAP_GPMC
    #define CONFIG_NAND_OMAP_GPMC_PREFETCH
    #define CONFIG_NAND_OMAP_ELM
    #define CONFIG_SYS_NAND_BAD_BLOCK_POS	NAND_LARGE_BADBLOCK_POS
    #define CONFIG_SYS_NAND_ECCPOS		{ 2, 3, 4, 5, 6, 7, 8, 9, \
    					 10, 11, 12, 13, 14, 15, 16, 17, \
    					 18, 19, 20, 21, 22, 23, 24, 25, \
    					 26, 27, 28, 29, 30, 31, 32, 33, \
    					 34, 35, 36, 37, 38, 39, 40, 41, \
    					 42, 43, 44, 45, 46, 47, 48, 49, \
    					 50, 51, 52, 53, 54, 55, 56, 57, }
    
    #define CONFIG_SYS_NAND_ECCSIZE		512
    #define CONFIG_SYS_NAND_ECCBYTES	14
    #define CONFIG_SYS_NAND_ONFI_DETECTION
    #define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_BCH8_CODE_HW
    #define MTDIDS_DEFAULT			"nand0=nand.0"
    #define MTDPARTS_DEFAULT		"mtdparts=nand.0:" \
    					"128k(NAND.SPL)," \
    					"128k(NAND.SPL.backup1)," \
    					"128k(NAND.SPL.backup2)," \
    					"128k(NAND.SPL.backup3)," \
    					"256k(NAND.u-boot-spl-os)," \
    					"1m(NAND.u-boot)," \
    					"128k(NAND.u-boot-env)," \
    					"128k(NAND.u-boot-env.backup1)," \
    					"8m(NAND.kernel)," \
    					"-(NAND.file-system)"
    #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
    /* NAND: SPL related configs */
    #ifdef CONFIG_SPL_NAND_SUPPORT
    #define CONFIG_SPL_NAND_AM33XX_BCH
    #endif
    #ifdef CONFIG_SPL_OS_BOOT
    #define CONFIG_CMD_SPL_NAND_OFS	0x00080000 /* os parameters */
    #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS	0x00200000 /* kernel offset */
    #define CONFIG_CMD_SPL_WRITE_SIZE	0x2000
    #endif
    #endif /* !CONFIG_NAND */
    
    /*
     * For NOR boot, we must set this to the start of where NOR is mapped
     * in memory.
     */
    #ifdef CONFIG_NOR_BOOT
    #define CONFIG_SYS_TEXT_BASE		0x08000000
    #endif
    
    /*
     * 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_USB_MUSB_PIO_ONLY
    #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
    #define CONFIG_AM335X_USB0
    #define CONFIG_AM335X_USB0_MODE	MUSB_PERIPHERAL
    #define CONFIG_AM335X_USB1
    #define CONFIG_AM335X_USB1_MODE MUSB_HOST
    
    #ifndef CONFIG_SPL_USBETH_SUPPORT
    /* Fastboot */
    #define CONFIG_USB_FUNCTION_FASTBOOT
    #define CONFIG_CMD_FASTBOOT
    #define CONFIG_ANDROID_BOOT_IMAGE
    #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
    #define CONFIG_FASTBOOT_BUF_SIZE	0x07000000
    
    /* To support eMMC booting */
    #define CONFIG_STORAGE_EMMC
    #define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
    #endif
    
    #ifdef CONFIG_USB_MUSB_HOST
    #define CONFIG_USB_STORAGE
    #endif
    
    #ifdef CONFIG_USB_MUSB_GADGET
    #define CONFIG_USB_ETHER
    #define CONFIG_USB_ETH_RNDIS
    #define CONFIG_USBNET_HOST_ADDR	"de:ad:be:af:00:00"
    #endif /* CONFIG_USB_MUSB_GADGET */
    
    /*
     * Disable MMC DM for SPL build and can be re-enabled after adding
     * DM support in SPL
     */
    #ifdef CONFIG_SPL_BUILD
    #undef CONFIG_DM_MMC
    #undef CONFIG_TIMER
    #undef CONFIG_DM_NAND
    #undef CONFIG_DM_USB
    #endif
    
    #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
    /* Remove other SPL modes. */
    #undef CONFIG_SPL_YMODEM_SUPPORT
    #undef CONFIG_SPL_NAND_SUPPORT
    #undef CONFIG_SPL_MMC_SUPPORT
    #define CONFIG_ENV_IS_NOWHERE
    #undef CONFIG_ENV_IS_IN_NAND
    /* disable host part of MUSB in SPL */
    /* disable EFI partitions and partition UUID support */
    #undef CONFIG_PARTITION_UUIDS
    #undef CONFIG_EFI_PARTITION
    /* General network SPL  */
    #define CONFIG_SPL_NET_SUPPORT
    #define CONFIG_SPL_ENV_SUPPORT
    #define CONFIG_SPL_NET_VCI_STRING	"AM335x U-Boot SPL"
    #endif
    
    /* USB Device Firmware Update support */
    #ifndef CONFIG_SPL_BUILD
    #define CONFIG_USB_FUNCTION_DFU
    #define CONFIG_DFU_MMC
    #define DFU_ALT_INFO_MMC \
    	"dfu_alt_info_mmc=" \
    	"boot part 0 1;" \
    	"rootfs part 0 2;" \
    	"MLO fat 0 1;" \
    	"MLO.raw raw 0x100 0x100;" \
    	"u-boot.img.raw raw 0x300 0x400;" \
    	"spl-os-args.raw raw 0x80 0x80;" \
    	"spl-os-image.raw raw 0x900 0x2000;" \
    	"spl-os-args fat 0 1;" \
    	"spl-os-image fat 0 1;" \
    	"u-boot.img fat 0 1;" \
    	"uEnv.txt fat 0 1\0"
    #ifdef CONFIG_NAND
    #define CONFIG_DFU_NAND
    #define DFU_ALT_INFO_NAND \
    	"dfu_alt_info_nand=" \
    	"SPL part 0 1;" \
    	"SPL.backup1 part 0 2;" \
    	"SPL.backup2 part 0 3;" \
    	"SPL.backup3 part 0 4;" \
    	"u-boot part 0 5;" \
    	"u-boot-spl-os part 0 6;" \
    	"kernel part 0 8;" \
    	"rootfs part 0 9\0"
    #else
    #define DFU_ALT_INFO_NAND ""
    #endif
    #define CONFIG_DFU_RAM
    #define DFU_ALT_INFO_RAM \
    	"dfu_alt_info_ram=" \
    	"kernel ram 0x80200000 0xD80000;" \
    	"fdt ram 0x80F80000 0x80000;" \
    	"ramdisk ram 0x81000000 0x4000000\0"
    #define DFUARGS \
    	"dfu_alt_info_emmc=rawemmc raw 0 3751936\0" \
    	DFU_ALT_INFO_MMC \
    	DFU_ALT_INFO_RAM \
    	DFU_ALT_INFO_NAND
    #endif
    
    /*
     * Default to using SPI for environment, etc.
     * 0x000000 - 0x020000 : SPL (128KiB)
     * 0x020000 - 0x0A0000 : U-Boot (512KiB)
     * 0x0A0000 - 0x0BFFFF : First copy of U-Boot Environment (128KiB)
     * 0x0C0000 - 0x0DFFFF : Second copy of U-Boot Environment (128KiB)
     * 0x0E0000 - 0x442000 : Linux Kernel
     * 0x442000 - 0x800000 : Userland
     */
    #if defined(CONFIG_SPI_BOOT)
    /* SPL related */
    #undef CONFIG_SPL_OS_BOOT		/* Not supported by existing map */
    #define CONFIG_SPL_SPI_SUPPORT
    #define CONFIG_SPL_SPI_FLASH_SUPPORT
    #define CONFIG_SPL_SPI_LOAD
    #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
    
    #define CONFIG_ENV_IS_IN_SPI_FLASH
    #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
    #define CONFIG_ENV_SPI_MAX_HZ		CONFIG_SF_DEFAULT_SPEED
    #define CONFIG_ENV_SECT_SIZE		(4 << 10) /* 4 KB sectors */
    #define CONFIG_ENV_OFFSET		(768 << 10) /* 768 KiB in */
    #define CONFIG_ENV_OFFSET_REDUND	(896 << 10) /* 896 KiB in */
    #define MTDIDS_DEFAULT			"nor0=m25p80-flash.0"
    #define MTDPARTS_DEFAULT		"mtdparts=m25p80-flash.0:128k(SPL)," \
    					"512k(u-boot),128k(u-boot-env1)," \
    					"128k(u-boot-env2),3464k(kernel)," \
    					"-(rootfs)"
    #elif defined(CONFIG_EMMC_BOOT)
    #define CONFIG_ENV_IS_IN_MMC
    #define CONFIG_SPL_ENV_SUPPORT
    #define CONFIG_SYS_MMC_ENV_DEV		1
    #define CONFIG_SYS_MMC_ENV_PART		2
    #define CONFIG_ENV_OFFSET		0x0
    #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
    #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
    #elif defined(CONFIG_NOR_BOOT)
    #define CONFIG_ENV_IS_IN_FLASH
    #define CONFIG_ENV_SECT_SIZE		(128 << 10)	/* 128 KiB */
    #define CONFIG_ENV_OFFSET		(512 << 10)	/* 512 KiB */
    #define CONFIG_ENV_OFFSET_REDUND	(768 << 10)	/* 768 KiB */
    #define MTDIDS_DEFAULT			"nor0=physmap-flash.0"
    #define MTDPARTS_DEFAULT		"mtdparts=physmap-flash.0:" \
    					"512k(u-boot)," \
    					"128k(u-boot-env1)," \
    					"128k(u-boot-env2)," \
    					"4m(kernel),-(rootfs)"
    #elif defined(CONFIG_ENV_IS_IN_NAND)
    #define CONFIG_ENV_OFFSET		0x001c0000
    #define CONFIG_ENV_OFFSET_REDUND	0x001e0000
    #define CONFIG_SYS_ENV_SECT_SIZE	CONFIG_SYS_NAND_BLOCK_SIZE
    #elif !defined(CONFIG_ENV_IS_NOWHERE)
    /* Not NAND, SPI, NOR or eMMC env, so put ENV in a file on FAT */
    #define CONFIG_ENV_IS_IN_FAT
    #define FAT_ENV_INTERFACE		"mmc"
    #define FAT_ENV_DEVICE_AND_PART		"0:1"
    #define FAT_ENV_FILE			"uboot.env"
    #endif
    
    /* SPI flash. */
    #define CONFIG_SF_DEFAULT_SPEED		24000000
    
    /*Config spi cmd*/
    #define CONFIG_SPI_CMD
    
    /* Network. */
    #define CONFIG_PHY_GIGE
    #define CONFIG_PHYLIB
    #define CONFIG_PHY_SMSC
    
    /*
     * NOR Size = 16 MiB
     * Number of Sectors/Blocks = 128
     * Sector Size = 128 KiB
     * Word length = 16 bits
     * Default layout:
     * 0x000000 - 0x07FFFF : U-Boot (512 KiB)
     * 0x080000 - 0x09FFFF : First copy of U-Boot Environment (128 KiB)
     * 0x0A0000 - 0x0BFFFF : Second copy of U-Boot Environment (128 KiB)
     * 0x0C0000 - 0x4BFFFF : Linux Kernel (4 MiB)
     * 0x4C0000 - 0xFFFFFF : Userland (11 MiB + 256 KiB)
     */
    #if defined(CONFIG_NOR)
    #undef CONFIG_SYS_NO_FLASH
    #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
    #define CONFIG_SYS_FLASH_PROTECTION
    #define CONFIG_SYS_FLASH_CFI
    #define CONFIG_FLASH_CFI_DRIVER
    #define CONFIG_FLASH_CFI_MTD
    #define CONFIG_SYS_MAX_FLASH_SECT	128
    #define CONFIG_SYS_MAX_FLASH_BANKS	1
    #define CONFIG_SYS_FLASH_BASE		(0x08000000)
    #define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
    #define CONFIG_SYS_FLASH_SIZE		0x01000000
    #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
    #endif  /* NOR support */
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    #define CONFIG_CLOCK_SYNTHESIZER
    #define CLK_SYNTHESIZER_I2C_ADDR 0x65
    #endif
    
    #endif	/* ! __CONFIG_AM335X_EVM_H */
    
     
    /*
     * 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-bone-common.dtsi"
    #include <dt-bindings/display/tda998x.h>
    
    / {
    	model = "TI AM335x BeagleBone Black";
    	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
    };
    
    &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>;
    	status = "okay";
    };
    
    &cpu0_opp_table {
    	/*
    	 * All PG 2.0 silicon may not support 1GHz but some of the early
    	 * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
    	 * to support 1GHz OPP so enable it for PG 2.0 on this board.
    	 */
    	oppnitro@1000000000 {
    		opp-supported-hw = <0x06 0x0100>;
    	};
    };
    
    &am33xx_pinmux {
    	nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
    		pinctrl-single,pins = <
    			0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
    			0xa0 0x08       /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xa4 0x08       /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xa8 0x08       /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xac 0x08       /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xb0 0x08       /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xb4 0x08       /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xb8 0x08       /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xbc 0x08       /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xc0 0x08       /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xc4 0x08       /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xc8 0x08       /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xcc 0x08       /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xd0 0x08       /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xd4 0x08       /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xd8 0x08       /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xdc 0x08       /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
    			0xe0 0x00       /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
    			0xe4 0x00       /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
    			0xe8 0x00       /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
    			0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
    		>;
    	};
    	nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
    		pinctrl-single,pins = <
    			0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
    		>;
    	};
    
    	mcasp0_pins: mcasp0_pins {
    		pinctrl-single,pins = <
    			AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
    			AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
    			AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */
    			AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
    			AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */
    		>;
    	};
    };
    
    &lcdc {
    	status = "okay";
    	port {
    		lcdc_0: endpoint@0 {
    			remote-endpoint = <&hdmi_0>;
    		};
    	};
    };
    
    &i2c0 {
    	tda19988: tda19988 {
    		compatible = "nxp,tda998x";
    		reg = <0x70>;
    
    		pinctrl-names = "default", "off";
    		pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
    		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
    
    		#sound-dai-cells = <0>;
    		audio-ports = <	AFMT_I2S	0x03>;
    
    		ports {
    			port@0 {
    				hdmi_0: endpoint@0 {
    					remote-endpoint = <&lcdc_0>;
    				};
    			};
    		};
    	};
    };
    
    &rtc {
    	system-power-controller;
    };
    
    &mcasp0	{
    	#sound-dai-cells = <0>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcasp0_pins>;
    	status = "okay";
    	op-mode = <0>;	/* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    	serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
    			0 0 1 0
    		>;
    	tx-num-evt = <32>;
    	rx-num-evt = <32>;
    };
    
    &sgx {
    	status = "okay";
    };
    
    / {
    	clk_mcasp0_fixed: clk_mcasp0_fixed {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <24576000>;
    	};
    
    	clk_mcasp0: clk_mcasp0 {
    		#clock-cells = <0>;
    		compatible = "gpio-gate-clock";
    		clocks = <&clk_mcasp0_fixed>;
    		enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
    	};
    
    	sound {
    		compatible = "simple-audio-card";
    		simple-audio-card,name = "TI BeagleBone Black";
    		simple-audio-card,format = "i2s";
    		simple-audio-card,bitclock-master = <&dailink0_master>;
    		simple-audio-card,frame-master = <&dailink0_master>;
    
    		dailink0_master: simple-audio-card,cpu {
    			sound-dai = <&mcasp0>;
    			clocks = <&clk_mcasp0>;
    		};
    
    		simple-audio-card,codec {
    			sound-dai = <&tda19988>;
    		};
    	};
    };
    
     
    /*
     * 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.
     */
    
    / {
    	cpus {
    		cpu@0 {
    			cpu0-supply = <&dcdc2_reg>;
    		};
    	};
    
    	memory {
    		device_type = "memory";
    		reg = <0x80000000 0x10000000>; /* 256 MB */
    	};
    
    	leds {
    		pinctrl-names = "default", "sleep";
    		pinctrl-0 = <&user_leds_default>;
    		pinctrl-1 = <&user_leds_sleep>;
    
    		compatible = "gpio-leds";
    
    		led@2 {
    			label = "beaglebone:green:heartbeat";
    			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "heartbeat";
    			default-state = "off";
    		};
    
    		led@3 {
    			label = "beaglebone:green:mmc0";
    			gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "mmc0";
    			default-state = "off";
    		};
    
    		led@4 {
    			label = "beaglebone:green:usr2";
    			gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "cpu0";
    			default-state = "off";
    		};
    
    		led@5 {
    			label = "beaglebone:green:usr3";
    			gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "mmc1";
    			default-state = "off";
    		};
    	};
    
    	vmmcsd_fixed: fixedregulator@0 {
    		compatible = "regulator-fixed";
    		regulator-name = "vmmcsd_fixed";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    	};
    };
    
    &am33xx_pinmux {
    	pinctrl-names = "default";
    	pinctrl-0 = <&clkout2_pin>;
    
    	user_leds_default: user_leds_default {
    		pinctrl-single,pins = <
    			0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a5.gpio1_21 */
    			0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_a6.gpio1_22 */
    			0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a7.gpio1_23 */
    			0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_a8.gpio1_24 */
    		>;
    	};
    
    	user_leds_sleep: user_leds_sleep {
    		pinctrl-single,pins = <
    			0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a5.gpio1_21 */
    			0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a6.gpio1_22 */
    			0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a7.gpio1_23 */
    			0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a8.gpio1_24 */
    		>;
    	};
    
    	i2c0_pins: pinmux_i2c0_pins {
    		pinctrl-single,pins = <
    			0x188 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
    			0x18c (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
    		>;
    	};
    
    	//i2c2_pins: pinmux_i2c2_pins {
            gpio0_pins: pinmux_gpio0_pins { 
    		pinctrl-single,pins = <
    			0x178 (PIN_INPUT | MUX_MODE7)	/* uart1_ctsn.i2c2_sda */
    			0x17c (PIN_INPUT | MUX_MODE7)	/* uart1_rtsn.i2c2_scl */
    		>;
    	};
         
            uart1_pins: pinmux_uart1_pins { 
                    pinctrl-single,pins = <
                            0x180 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
    			0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
                    >;
            };
    
    	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 */
    		>;
    	};
    
    	clkout2_pin: pinmux_clkout2_pin {
    		pinctrl-single,pins = <
    			0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr1.clkout2 */
    		>;
    	};
    
    	cpsw_default: cpsw_default {
    		pinctrl-single,pins = <
    			/* Slave 1 */
    			0x110 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxerr.mii1_rxerr */
    			0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txen.mii1_txen */
    			0x118 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxdv.mii1_rxdv */
    			0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd3.mii1_txd3 */
    			0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd2.mii1_txd2 */
    			0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd1.mii1_txd1 */
    			0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd0.mii1_txd0 */
    			0x12c (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_txclk.mii1_txclk */
    			0x130 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxclk.mii1_rxclk */
    			0x134 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd3.mii1_rxd3 */
    			0x138 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd2.mii1_rxd2 */
    			0x13c (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd1.mii1_rxd1 */
    			0x140 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd0.mii1_rxd0 */
    		>;
    	};
    
    	cpsw_sleep: cpsw_sleep {
    		pinctrl-single,pins = <
    			/* Slave 1 reset value */
    			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	davinci_mdio_default: davinci_mdio_default {
    		pinctrl-single,pins = <
    			/* MDIO */
    			0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
    			0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
    		>;
    	};
    
    	davinci_mdio_sleep: davinci_mdio_sleep {
    		pinctrl-single,pins = <
    			/* MDIO reset value */
    			0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	mmc1_pins: pinmux_mmc1_pins {
    		pinctrl-single,pins = <
    			0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
    		>;
    	};
    
    	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 */
    		>;
    	};
    };
    &uart1 { 
            pinctrl-names = "default";
    	pinctrl-0 = <&uart1_pins>;
            status = "okay";
    };
    
    &gpio0 { 
            pinctrl-names = "default";
            pinctrl-0 = <&gpio0_pins>;
    };
    
    &uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart0_pins>;
    
    	status = "okay";
    };
    
    &usb {
    	status = "okay";
    };
    
    &usb_ctrl_mod {
    	status = "okay";
    };
    
    &usb0_phy {
    	status = "okay";
    };
    
    &usb1_phy {
    	status = "okay";
    };
    
    &usb0 {
    	status = "okay";
    	dr_mode = "peripheral";
    };
    
    &usb1 {
    	status = "okay";
    	dr_mode = "host";
    };
    
    &cppi41dma  {
    	status = "okay";
    };
    
    &i2c0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c0_pins>;
    
    	status = "okay";
    	clock-frequency = <400000>;
    
    	tps: tps@24 {
    		reg = <0x24>;
    	};
    
    	baseboard_eeprom: baseboard_eeprom@50 {
    		compatible = "at,24c256";
    		reg = <0x50>;
    
    		#address-cells = <1>;
    		#size-cells = <1>;
    		baseboard_data: baseboard_data@0 {
    			reg = <0 0x100>;
    		};
    	};
    };
    
    /*my custom additions*/
    
    
    /*&i2c2 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c2_pins>;
    
    	status = "okay";
    	clock-frequency = <100000>;
    
    	cape_eeprom0: cape_eeprom0@54 {
    		compatible = "at,24c256";
    		reg = <0x54>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		cape0_data: cape_data@0 {
    			reg = <0 0x100>;
    		};
    	};
    
    	cape_eeprom1: cape_eeprom1@55 {
    		compatible = "at,24c256";
    		reg = <0x55>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		cape1_data: cape_data@0 {
    			reg = <0 0x100>;
    		};
    	};
    
    	cape_eeprom2: cape_eeprom2@56 {
    		compatible = "at,24c256";
    		reg = <0x56>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		cape2_data: cape_data@0 {
    			reg = <0 0x100>;
    		};
    	};
    
    	cape_eeprom3: cape_eeprom3@57 {
    		compatible = "at,24c256";
    		reg = <0x57>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		cape3_data: cape_data@0 {
    			reg = <0 0x100>;
    		};
    	};
    };*/
    
    
    /include/ "tps65217.dtsi"
    
    &tps {
    	/*
    	 * Configure pmic to enter OFF-state instead of SLEEP-state ("RTC-only
    	 * mode") at poweroff.  Most BeagleBone versions do not support RTC-only
    	 * mode and risk hardware damage if this mode is entered.
    	 *
    	 * For details, see linux-omap mailing list May 2015 thread
    	 *	[PATCH] ARM: dts: am335x-bone* enable pmic-shutdown-controller
    	 * In particular, messages:
    	 *	http://www.spinics.net/lists/linux-omap/msg118585.html
    	 *	http://www.spinics.net/lists/linux-omap/msg118615.html
    	 *
    	 * You can override this later with
    	 *	&tps {  /delete-property/ ti,pmic-shutdown-controller;  }
    	 * if you want to use RTC-only mode and made sure you are not affected
    	 * by the hardware problems. (Tip: double-check by performing a current
    	 * measurement after shutdown: it should be less than 1 mA.)
    	 */
    	ti,pmic-shutdown-controller;
    
    	regulators {
    		dcdc1_reg: regulator@0 {
    			regulator-name = "vdds_dpr";
    			regulator-always-on;
    		};
    
    		dcdc2_reg: regulator@1 {
    			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
    			regulator-name = "vdd_mpu";
    			regulator-min-microvolt = <925000>;
    			regulator-max-microvolt = <1351500>;
    			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-name = "vio,vrtc,vdds";
    			regulator-always-on;
    		};
    
    		ldo2_reg: regulator@4 {
    			regulator-name = "vdd_3v3aux";
    			regulator-always-on;
    		};
    
    		ldo3_reg: regulator@5 {
    			regulator-name = "vdd_1v8";
    			regulator-always-on;
    		};
    
    		ldo4_reg: regulator@6 {
    			regulator-name = "vdd_3v3a";
    			regulator-always-on;
    		};
    	};
    };
    
    &cpsw_emac0 {
    	phy_id = <&davinci_mdio>, <0>;
    	phy-mode = "mii";
    };
    
    &cpsw_emac1 {
    	phy_id = <&davinci_mdio>, <1>;
    	phy-mode = "mii";
    };
    
    &mac {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&cpsw_default>;
    	pinctrl-1 = <&cpsw_sleep>;
    	status = "okay";
    };
    
    &davinci_mdio {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&davinci_mdio_default>;
    	pinctrl-1 = <&davinci_mdio_sleep>;
    	status = "okay";
    };
    
    &mmc1 {
    	status = "okay";
    	bus-width = <0x4>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mmc1_pins>;
    	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    };
    
    &aes {
    	status = "okay";
    };
    
    &sham {
    	status = "okay";
    };
    
    &wkup_m3_ipc {
    	ti,scale-data-fw = "am335x-bone-scale-data.bin";
    };
    
    &rtc {
    	system-power-controller;
    };
    

    The steps I use to build my sources are: 
       cd ~/ti-processor-sdk-linux-am335x-evm-03.00.00.04

       export ARCH=arm

       export PATH=~/ti-processor-sdk-linux-am335x-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

       export CROSS_COMPILE=arm-linux-gnueabihf-                             //NOTE that this should be a hard float cross compiler 

       make u-boot

       make linux

    Best Regards, 
    Yordan