]> git.sur5r.net Git - u-boot/blobdiff - include/configs/am335x_evm.h
gpio: omap5-uevm: Configure the tca6424 gpio expander
[u-boot] / include / configs / am335x_evm.h
index 3ca35c32dca768fb0b9d77fee8efe15aede8950d..e32066d786500b9953dc6ec1ddf4ec9e10a7814f 100644 (file)
@@ -37,6 +37,9 @@
 #define CONFIG_OF_LIBFDT
 #define CONFIG_CMD_BOOTZ
 #define CONFIG_CMDLINE_TAG             /* enable passing of ATAGs */
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_STACKSIZE               (128 * 1024)
+#define CONFIG_AUTO_COMPLETE
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
 
 #define CONFIG_CMD_ASKENV
 #define CONFIG_VERSION_VARIABLE
 
+#ifdef CONFIG_NAND
+#define NANDARGS \
+       "mtdids=" MTDIDS_DEFAULT "\0" \
+       "mtdparts=" MTDPARTS_DEFAULT "\0" \
+       "nandargs=setenv bootargs console=${console} " \
+               "${optargs} " \
+               "root=${nandroot} " \
+               "rootfstype=${nandrootfstype}\0" \
+       "dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \
+       "nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
+       "nandrootfstype=ubifs rootwait=1\0" \
+       "nandsrcaddr=0x280000\0" \
+               "nandboot=echo Booting from nand ...; " \
+               "run nandargs; " \
+               "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
+               "bootm ${loadaddr}\0" \
+       "nandimgsize=0x500000\0"
+#else
+#define NANDARGS ""
+#endif
+
 /* set to negative value for no autoboot */
 #define CONFIG_BOOTDELAY               1
 #define CONFIG_ENV_VARS_UBOOT_CONFIG
        "fdtfile=undefined\0" \
        "console=ttyO0,115200n8\0" \
        "optargs=\0" \
-       "mtdids=" MTDIDS_DEFAULT "\0" \
-       "mtdparts=" MTDPARTS_DEFAULT "\0" \
        "dfu_alt_info_mmc=" DFU_ALT_INFO_MMC "\0" \
        "dfu_alt_info_emmc=rawemmc mmc 0 3751936\0" \
-       "dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \
        "mmcdev=0\0" \
        "mmcroot=/dev/mmcblk0p2 ro\0" \
        "mmcrootfstype=ext4 rootwait\0" \
        "bootpart=0:2\0" \
-       "nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
-       "nandrootfstype=ubifs rootwait=1\0" \
-       "nandsrcaddr=0x280000\0" \
-       "nandimgsize=0x500000\0" \
        "rootpath=/export/rootfs\0" \
        "nfsopts=nolock\0" \
        "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
                "${optargs} " \
                "root=${mmcroot} " \
                "rootfstype=${mmcrootfstype}\0" \
-       "nandargs=setenv bootargs console=${console} " \
-               "${optargs} " \
-               "root=${nandroot} " \
-               "rootfstype=${nandrootfstype}\0" \
        "spiroot=/dev/mtdblock4 rw\0" \
        "spirootfstype=jffs2\0" \
        "spisrcaddr=0xe0000\0" \
        "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
        "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
-       "mmcboot=echo Booting from mmc ...; " \
-               "run mmcargs; " \
-               "bootm ${loadaddr} - ${fdtaddr}\0" \
-       "nandboot=echo Booting from nand ...; " \
-               "run nandargs; " \
-               "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
-               "bootm ${loadaddr}\0" \
+       "mmcboot=mmc dev ${mmcdev}; " \
+               "if mmc rescan; then " \
+                       "echo SD/MMC found on device ${mmcdev};" \
+                       "if run loadbootenv; then " \
+                               "echo Loaded environment from ${bootenv};" \
+                               "run importbootenv;" \
+                       "fi;" \
+                       "if test -n $uenvcmd; then " \
+                               "echo Running uenvcmd ...;" \
+                               "run uenvcmd;" \
+                       "fi;" \
+                       "if run loaduimage; then " \
+                               "run loadfdt;" \
+                               "run mmcargs; " \
+                               "bootm ${loadaddr} - ${fdtaddr};" \
+                       "fi;" \
+               "fi;\0" \
        "spiboot=echo Booting from spi ...; " \
                "run spiargs; " \
                "sf probe ${spibusno}:0; " \
                "if test $board_name = A335X_SK; then " \
                        "setenv fdtfile am335x-evmsk.dtb; fi; " \
                "if test $fdtfile = undefined; then " \
-                       "echo WARNING: Could not determine device tree to use; fi; \0"
+                       "echo WARNING: Could not determine device tree to use; fi; \0" \
+       NANDARGS
 #endif
 
 #define CONFIG_BOOTCOMMAND \
        "run findfdt; " \
-       "mmc dev ${mmcdev}; if mmc rescan; then " \
-               "echo SD/MMC found on device ${mmcdev};" \
-               "if run loadbootenv; then " \
-                       "echo Loaded environment from ${bootenv};" \
-                       "run importbootenv;" \
-               "fi;" \
-               "if test -n $uenvcmd; then " \
-                       "echo Running uenvcmd ...;" \
-                       "run uenvcmd;" \
-               "fi;" \
-               "if run loaduimage; then " \
-                       "run loadfdt;" \
-                       "run mmcboot;" \
-               "fi;" \
-       "else " \
-               "run nandboot;" \
-       "fi;" \
+       "run mmcboot;" \
+       "setenv mmcdev 1; " \
+       "setenv bootpart 1:2; " \
+       "run mmcboot;" \
+       "run nandboot;"
 
 /* Clock Defines */
 #define V_OSCK                         24000000  /* Clock output from T2 */
 /* USB Device Firmware Update support */
 #define CONFIG_DFU_FUNCTION
 #define CONFIG_DFU_MMC
-#define CONFIG_DFU_NAND
 #define CONFIG_CMD_DFU
 #define DFU_ALT_INFO_MMC \
        "boot part 0 1;" \
        "spl-os-image fat 0 1;" \
        "u-boot.img fat 0 1;" \
        "uEnv.txt fat 0 1"
+#ifdef CONFIG_NAND
+#define CONFIG_DFU_NAND
 #define DFU_ALT_INFO_NAND \
        "SPL part 0 1;" \
        "SPL.backup1 part 0 2;" \
        "u-boot-spl-os part 0 6;" \
        "kernel part 0 8;" \
        "rootfs part 0 9"
+#endif
 
  /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS           1               /*  1 bank of DRAM */
 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x80    /* 64KiB */
 
 /* nand */
+#ifdef CONFIG_NAND
 #define CONFIG_CMD_SPL_NAND_OFS                        0x240000 /* end of u-boot */
 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS                0x280000
 #define CONFIG_CMD_SPL_WRITE_SIZE              0x2000
+#endif
 
 /* spl export command */
 #define CONFIG_CMD_SPL
 #define CONFIG_SPL_LDSCRIPT            "$(CPUDIR)/am33xx/u-boot-spl.lds"
 
 #define CONFIG_SPL_BOARD_INIT
+
+#ifdef CONFIG_NAND
 #define CONFIG_SPL_NAND_AM33XX_BCH
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
-#endif
 #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_U_BOOT_START   CONFIG_SYS_TEXT_BASE
 
 #define CONFIG_SYS_NAND_U_BOOT_OFFS    0x80000
+#endif
+#endif
 
 /*
  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
                                        "512k(u-boot),128k(u-boot-env1)," \
                                        "128k(u-boot-env2),3464k(kernel)," \
                                        "-(rootfs)"
-#endif /* SPI support */
+#elif defined(CONFIG_EMMC_BOOT)
+#undef CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV         1
+#define CONFIG_SYS_MMC_ENV_PART                2
+#endif
 
 /* Unsupported features */
 #undef CONFIG_USE_IRQ
 #define CONFIG_PHY_ADDR                        0
 #define CONFIG_PHY_SMSC
 
-#define CONFIG_NAND
 /* NAND support */
 #ifdef CONFIG_NAND
 #define CONFIG_CMD_NAND