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