X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=include%2Fconfigs%2Ftx6.h;h=8b1b05be803d1dd3e4c138c78bb444fee0ff90b8;hp=52ca7a705de4387ce0c1607f4eea0b9a6cd65ac4;hb=5c27b3b75988f13e313e028dc6849c5c531a5f75;hpb=23a3382f25e518d2ca10bae4cec08ca82524cdf0 diff --git a/include/configs/tx6.h b/include/configs/tx6.h index 52ca7a705d..8b1b05be80 100644 --- a/include/configs/tx6.h +++ b/include/configs/tx6.h @@ -84,7 +84,20 @@ #define CONFIG_SYS_SDRAM_BUS_WIDTH 64 #endif #endif /* CONFIG_SYS_SDRAM_BUS_WIDTH */ -#define PHYS_SDRAM_1_SIZE (SZ_512M / 32 * CONFIG_SYS_SDRAM_BUS_WIDTH) +#ifdef __ASSEMBLY__ +#define _AC(x,s) x +#else +#define _AC(x,s) (x##s) +#endif +#define UL(x) _AC(x,UL) +#define PHYS_SDRAM_1_SIZE (UL(CONFIG_SYS_SDRAM_CHIP_SIZE) * SZ_1M \ + / 32 * CONFIG_SYS_SDRAM_BUS_WIDTH) +#if PHYS_SDRAM_1_SIZE > SZ_1G +#define FDT_HIGH_STR "fdt_high=ffffffff\0" +#else +#define FDT_HIGH_STR "" +#endif + #ifdef CONFIG_SOC_MX6Q #define CONFIG_SYS_SDRAM_CLK 528 #else @@ -213,7 +226,8 @@ EMMC_BOOT_PART_STR \ EMMC_BOOT_ACK_STR \ "fdtaddr=" xstr(CONFIG_FDTADDR) "\0" \ - CONFIG_SYS_FDTSAVE_CMD \ + FDT_HIGH_STR \ + FDTSAVE_CMD_STR \ "mtdids=" MTDIDS_DEFAULT "\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ "nfsroot=/tftpboot/rootfs\0" \ @@ -227,7 +241,7 @@ #define CONFIG_SYS_DEFAULT_BOOT_MODE "nand" #define CONFIG_SYS_BOOT_CMD_NAND \ "bootcmd_nand=setenv autostart no;run bootargs_ubifs;nboot linux\0" -#define CONFIG_SYS_FDTSAVE_CMD \ +#define FDTSAVE_CMD_STR \ "fdtsave=fdt resize;nand erase.part dtb" \ ";nand write ${fdtaddr} dtb ${fdtsize}\0" #define MTD_NAME "gpmi-nand" @@ -241,7 +255,7 @@ #define CONFIG_SYS_DEFAULT_BOOT_MODE "mmc" #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #define CONFIG_SYS_BOOT_CMD_NAND "" -#define CONFIG_SYS_FDTSAVE_CMD \ +#define FDTSAVE_CMD_STR \ "fdtsave=mmc partconf 0 ${emmc_boot_ack} ${emmc_boot_part} ${emmc_boot_part}" \ ";mmc write ${fdtaddr} " xstr(CONFIG_SYS_DTB_BLKNO) " 80" \ ";mmc partconf 0 ${emmc_boot_ack} ${emmc_boot_part} 0\0" @@ -305,15 +319,22 @@ #else /* CONFIG_TX6_REV */ /* autodetect which PMIC is present to derive TX6_REV */ #ifdef CONFIG_SOC_MX6UL +#ifndef CONFIG_TX6_UBOOT_NOENV +/* NOENV U-Boot is used for initial bootstrap. + * Since the TAMPER_PIN_DISABLE fuses have to be programmed + * to be able to use the TAMPER pins as GPIO to access the + * PMIC I2C bus, this is not possible on virgin hardware. + */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_SOFT #define CONFIG_SYS_I2C_SOFT_SPEED 400000 #define CONFIG_SOFT_I2C_GPIO_SCL IMX_GPIO_NR(5, 0) #define CONFIG_SOFT_I2C_GPIO_SDA IMX_GPIO_NR(5, 1) #define CONFIG_SOFT_I2C_READ_REPEATED_START -#else +#endif /* CONFIG_TX6_UBOOT_NOENV */ +#else /* !CONFIG_SOC_MX6UL */ #define CONFIG_LTC3676 /* TX6_REV == 1 */ -#endif +#endif /* CONFIG_SOC_MX6UL */ #define CONFIG_RN5T567 /* TX6_REV == 3 */ #endif /* CONFIG_TX6_REV */