1 /* 2 * Copyright (C) 2015 Freescale Semiconductor, Inc. 3 * 4 * Configuration settings for the Freescale i.MX7D SABRESD board. 5 * 6 * SPDX-License-Identifier: GPL-2.0+ 7 */ 8 9 #ifndef __MX7D_SABRESD_CONFIG_H 10 #define __MX7D_SABRESD_CONFIG_H 11 12 #include "mx7_common.h" 13 14 #define CONFIG_DBG_MONITOR 15 #define PHYS_SDRAM_SIZE SZ_1G 16 17 /* Network */ 18 #define CONFIG_CMD_MII 19 #define CONFIG_FEC_MXC 20 #define CONFIG_MII 21 #define CONFIG_FEC_XCV_TYPE RGMII 22 #define CONFIG_ETHPRIME "FEC" 23 #define CONFIG_FEC_MXC_PHYADDR 0 24 25 #define CONFIG_PHYLIB 26 #define CONFIG_PHY_BROADCOM 27 #define CONFIG_FEC_DMA_MINALIGN 64 28 /* ENET1 */ 29 #define IMX_FEC_BASE ENET_IPS_BASE_ADDR 30 31 /* MMC Config*/ 32 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 33 34 /* PMIC */ 35 #define CONFIG_POWER 36 #define CONFIG_POWER_I2C 37 #define CONFIG_POWER_PFUZE3000 38 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 39 40 #undef CONFIG_BOOTM_NETBSD 41 #undef CONFIG_BOOTM_PLAN9 42 #undef CONFIG_BOOTM_RTEMS 43 44 #undef CONFIG_CMD_EXPORTENV 45 #undef CONFIG_CMD_IMPORTENV 46 47 /* I2C configs */ 48 #define CONFIG_CMD_I2C 49 #define CONFIG_SYS_I2C 50 #define CONFIG_SYS_I2C_MXC 51 #define CONFIG_SYS_I2C_MXC_I2C1 52 #define CONFIG_SYS_I2C_SPEED 100000 53 54 #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */ 55 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 56 57 #define CONFIG_MFG_ENV_SETTINGS \ 58 "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ 59 "rdinit=/linuxrc " \ 60 "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ 61 "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ 62 "g_mass_storage.iSerialNumber=\"\" "\ 63 "clk_ignore_unused "\ 64 "\0" \ 65 "initrd_addr=0x83800000\0" \ 66 "initrd_high=0xffffffff\0" \ 67 "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \ 68 69 #define CONFIG_EXTRA_ENV_SETTINGS \ 70 CONFIG_MFG_ENV_SETTINGS \ 71 "script=boot.scr\0" \ 72 "image=zImage\0" \ 73 "console=ttymxc0\0" \ 74 "fdt_high=0xffffffff\0" \ 75 "initrd_high=0xffffffff\0" \ 76 "fdt_file=imx7d-sdb.dtb\0" \ 77 "fdt_addr=0x83000000\0" \ 78 "boot_fdt=try\0" \ 79 "ip_dyn=yes\0" \ 80 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ 81 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ 82 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ 83 "mmcautodetect=yes\0" \ 84 "mmcargs=setenv bootargs console=${console},${baudrate} " \ 85 "root=${mmcroot}\0" \ 86 "loadbootscript=" \ 87 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 88 "bootscript=echo Running bootscript from mmc ...; " \ 89 "source\0" \ 90 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ 91 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ 92 "mmcboot=echo Booting from mmc ...; " \ 93 "run mmcargs; " \ 94 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 95 "if run loadfdt; then " \ 96 "bootz ${loadaddr} - ${fdt_addr}; " \ 97 "else " \ 98 "if test ${boot_fdt} = try; then " \ 99 "bootz; " \ 100 "else " \ 101 "echo WARN: Cannot load the DT; " \ 102 "fi; " \ 103 "fi; " \ 104 "else " \ 105 "bootz; " \ 106 "fi;\0" \ 107 "netargs=setenv bootargs console=${console},${baudrate} " \ 108 "root=/dev/nfs " \ 109 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ 110 "netboot=echo Booting from net ...; " \ 111 "run netargs; " \ 112 "if test ${ip_dyn} = yes; then " \ 113 "setenv get_cmd dhcp; " \ 114 "else " \ 115 "setenv get_cmd tftp; " \ 116 "fi; " \ 117 "${get_cmd} ${image}; " \ 118 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 119 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ 120 "bootz ${loadaddr} - ${fdt_addr}; " \ 121 "else " \ 122 "if test ${boot_fdt} = try; then " \ 123 "bootz; " \ 124 "else " \ 125 "echo WARN: Cannot load the DT; " \ 126 "fi; " \ 127 "fi; " \ 128 "else " \ 129 "bootz; " \ 130 "fi;\0" 131 132 #define CONFIG_BOOTCOMMAND \ 133 "mmc dev ${mmcdev};" \ 134 "mmc dev ${mmcdev}; if mmc rescan; then " \ 135 "if run loadbootscript; then " \ 136 "run bootscript; " \ 137 "else " \ 138 "if run loadimage; then " \ 139 "run mmcboot; " \ 140 "else run netboot; " \ 141 "fi; " \ 142 "fi; " \ 143 "else run netboot; fi" 144 145 #define CONFIG_CMD_MEMTEST 146 #define CONFIG_SYS_MEMTEST_START 0x80000000 147 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x20000000) 148 149 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 150 #define CONFIG_SYS_HZ 1000 151 152 #define CONFIG_STACKSIZE SZ_128K 153 154 /* Physical Memory Map */ 155 #define CONFIG_NR_DRAM_BANKS 1 156 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 157 158 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 159 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 160 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 161 162 #define CONFIG_SYS_INIT_SP_OFFSET \ 163 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 164 #define CONFIG_SYS_INIT_SP_ADDR \ 165 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 166 167 /* FLASH and environment organization */ 168 #define CONFIG_SYS_NO_FLASH 169 #define CONFIG_ENV_SIZE SZ_8K 170 #define CONFIG_ENV_IS_IN_MMC 171 #define CONFIG_ENV_OFFSET (8 * SZ_64K) 172 #define CONFIG_SYS_FSL_USDHC_NUM 2 173 174 #define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */ 175 #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ 176 #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */ 177 178 #define CONFIG_CMD_BMODE 179 180 /* USB Configs */ 181 #define CONFIG_CMD_USB 182 #define CONFIG_USB_EHCI 183 #define CONFIG_USB_EHCI_MX7 184 #define CONFIG_USB_STORAGE 185 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET 186 #define CONFIG_USB_HOST_ETHER 187 #define CONFIG_USB_ETHER_ASIX 188 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 189 #define CONFIG_MXC_USB_FLAGS 0 190 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 191 192 #define CONFIG_IMX_THERMAL 193 194 #endif /* __CONFIG_H */ 195