diff options
Diffstat (limited to 'include/configs/simc-t2081.h')
-rw-r--r-- | include/configs/simc-t2081.h | 135 |
1 files changed, 85 insertions, 50 deletions
diff --git a/include/configs/simc-t2081.h b/include/configs/simc-t2081.h index 0e3908f..90a84ef 100644 --- a/include/configs/simc-t2081.h +++ b/include/configs/simc-t2081.h @@ -14,8 +14,6 @@ #ifndef __SIMC_T2081_H #define __SIMC_T2081_H -#define CONFIG_FSL_SATA_V2 - #include <generated/autoconf.h> #define CONFIG_MTD_UBI_WL_THRESHOLD 4096 @@ -36,11 +34,36 @@ #ifdef CONFIG_RAMBOOT_PBL -/* Todo boot sources */ +/* We have to specify all the PBL and RCW since they are used without being + * proccessed by the preprocessor */ +#if defined(CONFIG_SECURE_BOOT) && defined(CONFIG_NAND_FLASH_BOOT) +/* Secure boot from NAND flash */ +#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nand_secure_pbi.cfg +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nand_secure_rcw.cfg +#elif defined(CONFIG_SECURE_BOOT) && defined(CONFIG_NOR_FLASH_BOOT) +/* Secure boot from NOR flash */ +#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nor_secure_pbi.cfg +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nor_secure_rcw.cfg +#elif defined(CONFIG_NAND_FLASH_BOOT) +/* normal boot from NAND flash */ #define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nand_pbi.cfg - #define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nand_rcw.cfg -/* Todo boot sources */ +#elif defined(CONFIG_NOR_FLASH_BOOT) +/* normal boot from NOR flash */ +#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nor_pbi.cfg +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_nor_rcw.cfg +#elif defined(CONFIG_SPI_FLASH_BOOT) +/* normal boot frop SPI flash */ +#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_spi_pbi.cfg +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_spi_rcw.cfg +#elif defined(CONFIG_SDHC_FLASH_BOOT) +/* normal boot fro sdhc flash */ +#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_sdhc_pbi.cfg +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/scalys/simc-t2081/simc-t2081_sdhc_rcw.cfg +#else +/* unknown configuration, this should not happen */ +#error Invalid Boot configuration +#endif #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT #define CONFIG_SPL_ENV_SUPPORT @@ -76,10 +99,16 @@ #define CONFIG_SYS_NAND_U_BOOT_DST 0x30000000 #define CONFIG_SYS_NAND_U_BOOT_START 0x30000000 #define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) +#ifndef CONFIG_SDHC_FLASH_BOOT #define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds" #define CONFIG_SPL_NAND_BOOT +#endif #endif /* CONFIG_NAND */ +#ifdef CONFIG_SDHC_FLASH_BOOT +#define CONFIG_SDCARD +#endif + #ifdef CONFIG_SDCARD #define CONFIG_RESET_VECTOR_ADDRESS 0x30000FFC #define CONFIG_SPL_MMC_SUPPORT @@ -412,14 +441,17 @@ /* The lowest and highest voltage allowed for T208xRDB */ #define VDD_MV_MIN 819 #define VDD_MV_MAX 1212 + + /* * General PCI * Memory space is mapped 1-1, but I/O space must start from 0. */ -#define CONFIG_PCIE1 /* PCIE controller 1 */ -#define CONFIG_PCIE2 /* PCIE controller 2 */ -#define CONFIG_PCIE3 /* PCIE controller 3 */ -#define CONFIG_PCIE4 /* PCIE controller 4 */ +/* #define CONFIG_PCI */ /* Enable PCI/PCIE */ +#define CONFIG_PCIE1 /* PCIE controler 1 */ +#define CONFIG_PCIE2 /* PCIE controler 2 */ +#define CONFIG_PCIE3 /* PCIE controler 3 */ +#define CONFIG_PCIE4 /* PCIE controler 4 */ #define CONFIG_FSL_PCI_INIT /* Use common FSL init code */ #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */ /* controller 1, direct to uli, tgtid 3, Base address 20000 */ @@ -457,6 +489,7 @@ #define CONFIG_SYS_PCIE4_MEM_BUS 0xe0000000 #define CONFIG_SYS_PCIE4_MEM_PHYS 0xc40000000ull #define CONFIG_SYS_PCIE4_MEM_SIZE 0x10000000 /* 256M */ +#define CONFIG_SYS_PCIE4_IO_VIRT 0xf8030000 #define CONFIG_SYS_PCIE4_IO_BUS 0x00000000 #define CONFIG_SYS_PCIE4_IO_PHYS 0xff8030000ull #define CONFIG_SYS_PCIE4_IO_SIZE 0x00010000 /* 64k */ @@ -464,15 +497,14 @@ #ifdef CONFIG_PCI #define CONFIG_PCI_INDIRECT_BRIDGE #define CONFIG_FSL_PCIE_RESET /* need PCIe reset errata LSZ ADD */ - +#define CONFIG_NET_MULTI #define CONFIG_E1000 -#define CONFIG_E1000_SPI -#define CONFIG_CMD_E1000 - -#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ -/* #define CONFIG_DOS_PARTITION */ -#endif /* CONFIG_PCI */ +/*#define CONFIG_PCI_PNP*/ /* do pci plug-and-play */ +#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ +/* #define CONFIG_DOS_PARTITION */ +#endif +#if 0 /* T2081 has no SATA */ /* * SATA */ @@ -490,17 +522,21 @@ #define CONFIG_LBA48 /* #define CONFIG_DOS_PARTITION */ #endif +#endif /*#define CONFIG_SPI_FLASH_MTD*/ /* * USB */ -#ifdef CONFIG_USB_EHCI +#ifdef CONFIG_USB_EHCI_HCD #define CONFIG_USB_EHCI_FSL #define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_HAS_FSL_DR_USB -#endif /* CONFIG_USB_EHCI*/ +#if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#define CONFIG_EHCI_DESC_BIG_ENDIAN /* Endiannes fix for EHCI USB */ +#endif +#endif /* * SDHC @@ -511,7 +547,7 @@ #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT #define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33 -#define CONFIG_CMD_MMC +/*#define CONFIG_CMD_MMC*/ /* #define CONFIG_GENERIC_MMC */ #define CONFIG_CMD_EXT2 /*#define CONFIG_CMD_FAT*/ @@ -551,25 +587,29 @@ /* #define CONFIG_SYS_DPAA_RMAN */ #define CONFIG_SYS_INTERLAKEN -/*TODO: QE not supported on T2081??? +/*TODO: QE not supported on T2081 #define CONFIG_QE #define CONFIG_U_QE */ /* Default address of microcode for the Linux Fman driver */ -#if defined(CONFIG_SDCARD) -/* +/* TODO: move FMAN/QE ucode to boot source */ + +#if defined(CONFIG_SDHC_FLASH_BOOT) +/* * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is * about 1MB (2048 blocks), Env is stored after the image, and the env size is * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ -#define CONFIG_SYS_QE_FMAN_FW_IN_MMC +/*#define CONFIG_SYS_QE_FMAN_FW_IN_MMC #define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) -#elif defined(CONFIG_NAND_FLASH_BOOT) +#define CONFIG_SYS_QE_FW_ADDR (512 * 0x920)*/ #define CONFIG_SYS_QE_FMAN_FW_IN_NAND #define CONFIG_SYS_FMAN_FW_ADDR (0x240000) /* Refer to mtdparts: fman_ucode */ +#define CONFIG_SYS_QE_FW_ADDR (0x280000) /* Refer to mtdparts: qe_ucode */ -/* #define CONFIG_SYS_QE_FW_IN_NAND This define has been moved out of this file in this u-boot version */ -/* #define CONFIG_SYS_QE_FW_LENGTH (0x10000) This define has been moved out of this file in this u-boot version */ +#elif defined(CONFIG_NAND_FLASH_BOOT) +#define CONFIG_SYS_QE_FMAN_FW_IN_NAND +#define CONFIG_SYS_FMAN_FW_ADDR (0x240000) /* Refer to mtdparts: fman_ucode */ #define CONFIG_SYS_QE_FW_ADDR (0x280000) /* Refer to mtdparts: qe_ucode */ #else @@ -592,7 +632,7 @@ #define CONFIG_SYS_RGMII1_PHY_ADDR 0x00 #define CONFIG_SYS_RGMII2_PHY_ADDR 0x01 -#define FM1_10GEC1_PHY_ADDR 0x00 /* Todo implement further and test!! */ +#define FM1_10GEC1_PHY_ADDR 0x00 #define FM1_10GEC2_PHY_ADDR 0x01 #define CONFIG_MII /* MII PHY management */ @@ -697,8 +737,7 @@ #define MTDPART_DEFAULT_PARTITIONS \ "2M@0x0(u-boot)," \ "256k(env)," \ - "256k(fman_ucode)," \ - "256k(qe_ucode)," + "256k(fman_ucode)," #ifdef CONFIG_NAND_FLASH @@ -718,7 +757,7 @@ #ifdef CONFIG_NOR_FLASH #define NOR_ENV \ "update-uboot-nor-nw=" \ - "dhcp; tftp ${TFTP_PATH}/u-boot-with-spl-pbl.bin.nor;" \ + "tftp ${TFTP_PATH}/u-boot-with-spl-pbl.bin.nor;" \ "if test $? = \"0\"; then " \ "protect off 0xe8000000 0xe81fffff;" \ "erase 0xe8000000 0xe81fffff;" \ @@ -741,16 +780,8 @@ "erase 0xe8240000 0xe827ffff;" \ "cp.w ${loadaddr} 0xe8240000 ${filesize};" \ "fi\0" \ - "update-qe-ucode-nor-usb=" \ - "usb start;" \ - "fatload usb 0 ${loadaddr} iram_Type_A_T2080_r1.0.bin;" \ - "if test $? = \"0\"; then " \ - "protect off 0xe8280000 0xe82bffff;" \ - "erase 0xe8280000 0xe82bffff;" \ - "cp.w ${loadaddr} 0xe8280000 ${filesize};" \ - "fi\0" \ + \ "update-ubi-rootfs-nor="\ - "dhcp;" \ "ubi part ubipart_nor;" \ "if test $? = \"0\"; then " \ "tftp ${TFTP_PATH}/ubi_rootfs_image.nor.ubifs;" \ @@ -776,7 +807,6 @@ #ifdef CONFIG_NAND_FLASH #define NAND_ENV \ "update-uboot-nand-nw=" \ - "dhcp;" \ "tftp ${TFTP_PATH}/u-boot-with-spl-pbl.bin.nand;" \ "if test $? = \"0\"; then " \ "nand erase.part u-boot;" \ @@ -796,14 +826,7 @@ "nand write ${loadaddr} fman_ucode ${filesize};" \ "\0" \ \ - "update-qe-ucode-nand-usb=" \ - "usb start;" \ - "fatload usb 0 ${loadaddr} iram_Type_A_T2080_r1.0.bin;" \ - "nand erase.part qe_ucode;" \ - "nand write ${loadaddr} qe_ucode ${filesize};" \ - "\0" \ "update-ubi-rootfs-nand="\ - "dhcp;" \ "ubi part ubipart_nand;" \ "if test $? = \"0\"; then " \ "tftp ${TFTP_PATH}/ubi_rootfs_image.nand.ubifs;" \ @@ -821,6 +844,14 @@ "bootm ${fitaddr}#conf@1" \ "\0" \ \ + "sataboot-nand=" \ + "ubi part ubipart_nand;" \ + "ubifsmount ubi0:rootfs;" \ + "ubifsload ${fitaddr} /boot/fitImage.itb;" \ + "setenv bootargs ${bootargs} ${bootargs_sata};" \ + "bootm ${fitaddr}#conf@1" \ + "\0" \ + \ "set_ubiboot_args_nand=setenv bootargs ${bootargs} ${mtdparts} ubi.mtd=ubipart_nand ubi.fm_autoconvert=1 root=ubi0:rootfs rw rootfstype=ubifs \0" #else #define NAND_ENV @@ -844,13 +875,17 @@ "hwconfig=" \ "fsl_ddr:bank_intlv=null;"\ "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) ";"\ - "usb2:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\ + "usb2:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) ";"\ + "fsl_fm1_xaui_phy:xfi" "\0"\ \ "ethaddr=02:00:00:ba:be:01\0" \ "eth1addr=02:00:00:ba:be:02\0" \ "eth2addr=02:00:00:ba:be:03\0" \ "eth3addr=02:00:00:ba:be:04\0" \ "eth4addr=02:00:00:ba:be:05\0" \ + "eth5addr=02:00:00:ba:be:06\0" \ + "eth6addr=02:00:00:ba:be:07\0" \ + "eth7addr=02:00:00:ba:be:08\0" \ \ "autoload=no\0" \ "fitaddr="__stringify(CONFIG_LOADADDR)"\0" \ @@ -872,11 +907,11 @@ "setenv mtdparts \"${mtdparts};\"fe110000.spi:" MTDPART_DEFAULT_PARTITIONS "-(storage);"\ ";fi\0" \ \ - "netboot=dhcp; tftp ${fitaddr} ${TFTP_PATH}/fitImage.itb; bootm ${fitaddr}#conf@1\0" \ + "netboot=tftp ${fitaddr} ${TFTP_PATH}/fitImage.itb; bootm ${fitaddr}#conf@1\0" \ \ "bootcmd=run setfans; run "BOOTCMD"\0" \ \ - "bootargs_sata=rootfstype=ext3 root=/dev/sda1\0" \ + "bootargs_sata=rootfstype=ext4 root=/dev/sda1 rw\0" \ "bootargs=console=ttyS0,115200 rootwait panic=10\0" \ #endif /* SIMC_T2081_H */ |