diff options
Diffstat (limited to 'include/configs/siemens-am33x-common.h')
-rw-r--r-- | include/configs/siemens-am33x-common.h | 74 |
1 files changed, 55 insertions, 19 deletions
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index f37653f..4569fd4 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -254,11 +254,11 @@ #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 @@ -358,31 +358,38 @@ #define CONFIG_COMMON_ENV_SETTINGS \ "verify=no \0" \ "project_dir=systemone\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;" \ @@ -403,9 +410,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 +438,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,8 +449,9 @@ "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" @@ -457,4 +482,15 @@ #define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, " \ "press \"<Esc><Esc>\" 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 */ |