X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fconfigs%2Fsiemens-am33x-common.h;h=53816a60257a706497f53eef11feb815ea94e716;hb=5835823da3a357468bc90c2b74bad3193555b918;hp=f37653fea3f0ee89647762e9c33ea9bb538abab2;hpb=faca8ff55f4a2cf45fb906cc37f44601149fc00e;p=u-boot diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index f37653fea3..53816a6025 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -46,6 +46,8 @@ #define CONFIG_CMD_ECHO #define CONFIG_CMD_CACHE +#define CONFIG_SYS_GENERIC_BOARD + #define CONFIG_ENV_VARS_UBOOT_CONFIG #ifndef CONFIG_SPL_BUILD #define CONFIG_ROOTPATH "/opt/eldk" @@ -254,17 +256,18 @@ #define CONFIG_USB_GADGET #define CONFIG_USBDOWNLOAD_GADGET -/* USB TI's IDs */ +/* USB DRACO ID as default */ #define CONFIG_USBD_HS -#define CONFIG_G_DNL_VENDOR_NUM 0x0525 -#define CONFIG_G_DNL_PRODUCT_NUM 0x4a47 -#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments" +#define CONFIG_G_DNL_VENDOR_NUM 0x0908 +#define CONFIG_G_DNL_PRODUCT_NUM 0x02d2 +#define CONFIG_G_DNL_MANUFACTURER "Siemens AG" /* USB Device Firmware Update support */ #define CONFIG_DFU_FUNCTION #define CONFIG_DFU_NAND #define CONFIG_CMD_DFU #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1 << 20) +#define DFU_MANIFEST_POLL_TIMEOUT 25000 #endif /* CONFIG_SPL_BUILD */ @@ -357,32 +360,39 @@ #define CONFIG_COMMON_ENV_SETTINGS \ "verify=no \0" \ - "project_dir=systemone\0" \ + "project_dir=targetdir\0" \ + "upgrade_available=0\0" \ + "altbootcmd=run bootcmd\0" \ + "bootlimit=3\0" \ + "partitionset_active=A\0" \ "loadaddr=0x82000000\0" \ "kloadaddr=0x81000000\0" \ "script_addr=0x81900000\0" \ - "console=console=ttyMTD,mtdoops console=ttyO0,115200n8\0" \ - "active_set=a\0" \ + "console=console=ttyMTD,mtdoops console=ttyO0,115200n8 panic=5\0" \ "nand_active_ubi_vol=rootfs_a\0" \ + "nand_active_ubi_vol_A=rootfs_a\0" \ + "nand_active_ubi_vol_B=rootfs_b\0" \ "nand_root_fs_type=ubifs rootwait=1\0" \ "nand_src_addr=0x280000\0" \ - "nand_src_addr_a=0x280000\0" \ - "nand_src_addr_b=0x780000\0" \ + "nand_src_addr_A=0x280000\0" \ + "nand_src_addr_B=0x780000\0" \ "nfsopts=nolock rw mem=128M\0" \ "ip_method=none\0" \ "bootenv=uEnv.txt\0" \ "bootargs_defaults=setenv bootargs " \ "console=${console} " \ + "${testargs} " \ "${optargs}\0" \ "nand_args=run bootargs_defaults;" \ "mtdparts default;" \ - "setenv nand_active_ubi_vol rootfs_${active_set};" \ - "setenv ${active_set} true;" \ - "if test -n ${a}; then " \ - "setenv nand_src_addr ${nand_src_addr_a};" \ + "setenv ${partitionset_active} true;" \ + "if test -n ${A}; then " \ + "setenv nand_active_ubi_vol ${nand_active_ubi_vol_A};" \ + "setenv nand_src_addr ${nand_src_addr_A};" \ "fi;" \ - "if test -n ${b}; then " \ - "setenv nand_src_addr ${nand_src_addr_b};" \ + "if test -n ${B}; then " \ + "setenv nand_active_ubi_vol ${nand_active_ubi_vol_B};" \ + "setenv nand_src_addr ${nand_src_addr_B};" \ "fi;" \ "setenv nand_root ubi0:${nand_active_ubi_vol} rw " \ "ubi.mtd=9,2048;" \ @@ -394,7 +404,11 @@ "dfu_args=run bootargs_defaults;" \ "setenv bootargs ${bootargs} ;" \ "mtdparts default; " \ - "dfu nand 0; \0" \ + "led dfu 1;" \ + "led stat 0;" \ + "dfu 0 nand 0;" \ + "led dfu 0;" \ + "led stat 1;\0" \ "dfu_alt_info=" DFU_ALT_INFO_NAND "\0" \ "net_args=run bootargs_defaults;" \ "mtdparts default;" \ @@ -403,9 +417,26 @@ "setenv bootargs ${bootargs} " \ "root=/dev/nfs ${mtdparts} " \ "nfsroot=${serverip}:${rootpath},${nfsopts} " \ - "addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:" \ + "ip=${ipaddr}:${serverip}:" \ "${gatewayip}:${netmask}:${hostname}:eth0:off\0" \ - "nand_boot=echo Booting from nand, active set ${active_set} ...; " \ + "nand_boot=echo Booting from nand; " \ + "if test ${upgrade_available} -eq 1; then " \ + "if test ${bootcount} -gt ${bootlimit}; " \ + "then " \ + "setenv upgrade_available 0;" \ + "setenv ${partitionset_active} true;" \ + "if test -n ${A}; then " \ + "setenv partitionset_active B; " \ + "env delete A; " \ + "fi;" \ + "if test -n ${B}; then " \ + "setenv partitionset_active A; " \ + "env delete B; " \ + "fi;" \ + "saveenv; " \ + "fi;" \ + "fi;" \ + "echo set ${partitionset_active}...;" \ "run nand_args; " \ "nand read.i ${kloadaddr} ${nand_src_addr} " \ "${nand_img_size}; bootm ${kloadaddr}\0" \ @@ -414,7 +445,7 @@ "tftpboot ${kloadaddr} ${serverip}:${bootfile}; " \ "bootm ${kloadaddr}\0" \ "flash_self=run nand_boot\0" \ - "flash_self_test=setenv bootargs_defaults ${bootargs_defaults} test; " \ + "flash_self_test=setenv testargs test; " \ "run nand_boot\0" \ "dfu_start=echo Preparing for dfu mode ...; " \ "run dfu_args; \0" \ @@ -425,14 +456,14 @@ "mode; echo Not ready yet: 'run flash_nfs' to use kernel " \ "from memory and root filesystem over NFS; echo Type " \ "'run net_nfs' to get Kernel over TFTP and mount root " \ - "filesystem over NFS; echo Set active_set variable to 'a' " \ - "or 'b' to select kernel and rootfs partition; " \ + "filesystem over NFS; " \ + "echo Set partitionset_active variable to 'A' " \ + "or 'B' to select kernel and rootfs partition; " \ "echo" \ "\0" #define CONFIG_NAND_OMAP_GPMC #define CONFIG_NAND_OMAP_ELM -#define GPMC_NAND_ECC_LP_x16_LAYOUT 1 #define CONFIG_SYS_NAND_BASE (0x08000000) /* physical address */ /* to access nand at */ /* CS0 */ @@ -457,4 +488,15 @@ #define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, " \ "press \"\" to stop\n", bootdelay +/* Reboot after 60 sec if bootcmd fails */ +#define CONFIG_RESET_TO_RETRY +#define CONFIG_BOOT_RETRY_TIME 60 + +#define CONFIG_BOOTCOUNT_LIMIT +#define CONFIG_BOOTCOUNT_ENV + +/* Enable Device-Tree (FDT) support */ +#define CONFIG_OF_LIBFDT +#define CONFIG_CMD_FDT + #endif /* ! __CONFIG_SIEMENS_AM33X_COMMON_H */