1cb07d74eSMarkus Niebel /* 2cb07d74eSMarkus Niebel * Copyright (C) 2013, 2014 Markus Niebel <Markus.Niebel@tq-group.com> 3cb07d74eSMarkus Niebel * 4cb07d74eSMarkus Niebel * Configuration settings for the TQ Systems TQMa6<Q,S> module. 5cb07d74eSMarkus Niebel * 6cb07d74eSMarkus Niebel * SPDX-License-Identifier: GPL-2.0+ 7cb07d74eSMarkus Niebel */ 8cb07d74eSMarkus Niebel 9cb07d74eSMarkus Niebel #ifndef __CONFIG_H 10cb07d74eSMarkus Niebel #define __CONFIG_H 11cb07d74eSMarkus Niebel 1266cacc9dSMarkus Niebel #include <linux/kconfig.h> 131719d49cSMarkus Niebel /* SPL */ 141719d49cSMarkus Niebel /* #if defined(CONFIG_SPL_BUILD) */ 151719d49cSMarkus Niebel /* common IMX6 SPL configuration */ 161719d49cSMarkus Niebel #include "imx6_spl.h" 171719d49cSMarkus Niebel 181719d49cSMarkus Niebel /* #endif */ 191719d49cSMarkus Niebel 20cd6ddc48SFabio Estevam /* place code in last 4 MiB of RAM */ 21*d4b349e4SMarkus Niebel #if defined(CONFIG_TQMA6S) 22cd6ddc48SFabio Estevam #define CONFIG_SYS_TEXT_BASE 0x2fc00000 23*d4b349e4SMarkus Niebel #elif defined(CONFIG_TQMA6Q) 24cd6ddc48SFabio Estevam #define CONFIG_SYS_TEXT_BASE 0x4fc00000 25cd6ddc48SFabio Estevam #endif 26cd6ddc48SFabio Estevam 27cb07d74eSMarkus Niebel #include "mx6_common.h" 28cb07d74eSMarkus Niebel 29*d4b349e4SMarkus Niebel #if defined(CONFIG_TQMA6S) 30cb07d74eSMarkus Niebel #define PHYS_SDRAM_SIZE (512u * SZ_1M) 31*d4b349e4SMarkus Niebel #elif defined(CONFIG_TQMA6Q) 32cb07d74eSMarkus Niebel #define PHYS_SDRAM_SIZE (1024u * SZ_1M) 33cb07d74eSMarkus Niebel #endif 34cb07d74eSMarkus Niebel 35cb07d74eSMarkus Niebel #define CONFIG_MXC_UART 36cb07d74eSMarkus Niebel 37cb07d74eSMarkus Niebel /* SPI */ 38cb07d74eSMarkus Niebel #define CONFIG_MXC_SPI 39cb07d74eSMarkus Niebel 40cb07d74eSMarkus Niebel /* SPI Flash */ 41cb07d74eSMarkus Niebel 4252835468SMarkus Niebel #define TQMA6_SPI_FLASH_SECTOR_SIZE SZ_64K 4352835468SMarkus Niebel 44cb07d74eSMarkus Niebel #define CONFIG_SF_DEFAULT_BUS 0 451719d49cSMarkus Niebel #define CONFIG_SF_DEFAULT_CS 0 46cb07d74eSMarkus Niebel #define CONFIG_SF_DEFAULT_SPEED 50000000 47cb07d74eSMarkus Niebel #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) 48cb07d74eSMarkus Niebel 49cb07d74eSMarkus Niebel /* I2C Configs */ 50cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C 51cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_MXC 5203544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ 5303544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ 54f8cb101eSYork Sun #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ 55cb07d74eSMarkus Niebel #define CONFIG_I2C_MULTI_BUS 56cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_SPEED 100000 57cb07d74eSMarkus Niebel 58cb07d74eSMarkus Niebel /* I2C SYSMON (LM75) */ 59cb07d74eSMarkus Niebel #define CONFIG_DTT_LM75 60cb07d74eSMarkus Niebel #define CONFIG_DTT_MAX_TEMP 70 61cb07d74eSMarkus Niebel #define CONFIG_DTT_MIN_TEMP -30 62cb07d74eSMarkus Niebel #define CONFIG_DTT_HYSTERESIS 3 63cb07d74eSMarkus Niebel #define CONFIG_CMD_DTT 64cb07d74eSMarkus Niebel 65cb07d74eSMarkus Niebel /* I2C EEPROM (M24C64) */ 66cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 67cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 68cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS 5 /* 32 Bytes */ 69cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 70cb07d74eSMarkus Niebel #define CONFIG_CMD_EEPROM 71cb07d74eSMarkus Niebel 72cb07d74eSMarkus Niebel #define CONFIG_POWER 73cb07d74eSMarkus Niebel #define CONFIG_POWER_I2C 74cb07d74eSMarkus Niebel #define CONFIG_POWER_PFUZE100 75cb07d74eSMarkus Niebel #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 76cb07d74eSMarkus Niebel #define TQMA6_PFUZE100_I2C_BUS 2 77cb07d74eSMarkus Niebel 78cb07d74eSMarkus Niebel /* MMC Configs */ 79cb07d74eSMarkus Niebel #define CONFIG_SYS_FSL_ESDHC_ADDR 0 80cb07d74eSMarkus Niebel 81cb07d74eSMarkus Niebel /* USB Configs */ 82cb07d74eSMarkus Niebel #define CONFIG_USB_EHCI 83cb07d74eSMarkus Niebel #define CONFIG_USB_EHCI_MX6 84cb07d74eSMarkus Niebel #define CONFIG_USB_HOST_ETHER 85cb07d74eSMarkus Niebel #define CONFIG_USB_ETHER_SMSC95XX 86cb07d74eSMarkus Niebel #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 87911b5ea5SStefan Roese #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 88911b5ea5SStefan Roese #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ 89cb07d74eSMarkus Niebel 90cb07d74eSMarkus Niebel #define CONFIG_FEC_MXC 91cb07d74eSMarkus Niebel #define IMX_FEC_BASE ENET_BASE_ADDR 92cb07d74eSMarkus Niebel #define CONFIG_PHYLIB 93cb07d74eSMarkus Niebel #define CONFIG_MII 94cb07d74eSMarkus Niebel 95cb07d74eSMarkus Niebel #define CONFIG_ARP_TIMEOUT 200UL 96cb07d74eSMarkus Niebel 97cb07d74eSMarkus Niebel /* Command definition */ 98cb07d74eSMarkus Niebel #define CONFIG_CMD_BMODE 99cb07d74eSMarkus Niebel 100cb07d74eSMarkus Niebel #define CONFIG_ENV_SIZE (SZ_8K) 101cb07d74eSMarkus Niebel /* Size of malloc() pool */ 102cb07d74eSMarkus Niebel #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * SZ_1M) 103cb07d74eSMarkus Niebel 104cb07d74eSMarkus Niebel #if defined(CONFIG_TQMA6X_MMC_BOOT) 105cb07d74eSMarkus Niebel 106cb07d74eSMarkus Niebel #define CONFIG_ENV_IS_IN_MMC 107cb07d74eSMarkus Niebel #define TQMA6_UBOOT_OFFSET SZ_1K 108cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_START 0x2 109cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_COUNT 0x7fe 110cb07d74eSMarkus Niebel 111cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET SZ_1M 112cb07d74eSMarkus Niebel #define CONFIG_SYS_MMC_ENV_DEV 0 113cb07d74eSMarkus Niebel 114cb07d74eSMarkus Niebel #define TQMA6_FDT_OFFSET (2 * SZ_1M) 115cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_START 0x1000 116cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_COUNT 0x800 117cb07d74eSMarkus Niebel 118cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_START 0x2000 119cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_COUNT 0x2000 120cb07d74eSMarkus Niebel 121cb07d74eSMarkus Niebel #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 122cb07d74eSMarkus Niebel "uboot_start="__stringify(TQMA6_UBOOT_SECTOR_START)"\0" \ 123cb07d74eSMarkus Niebel "uboot_size="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ 124cb07d74eSMarkus Niebel "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ 125cb07d74eSMarkus Niebel "fdt_size="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ 126cb07d74eSMarkus Niebel "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ 127cb07d74eSMarkus Niebel "kernel_size="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ 128cb07d74eSMarkus Niebel "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ 129cb07d74eSMarkus Niebel "loadimage=mmc dev ${mmcdev}; " \ 130cb07d74eSMarkus Niebel "mmc read ${loadaddr} ${kernel_start} ${kernel_size};\0" \ 131cb07d74eSMarkus Niebel "loadfdt=mmc dev ${mmcdev}; " \ 132cb07d74eSMarkus Niebel "mmc read ${fdt_addr} ${fdt_start} ${fdt_size};\0" \ 133cb07d74eSMarkus Niebel "update_uboot=if tftp ${uboot}; then " \ 134cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 135cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 136e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 137e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 138cb07d74eSMarkus Niebel "if itest ${blkc} <= ${uboot_size}; then " \ 139cb07d74eSMarkus Niebel "mmc write ${loadaddr} ${uboot_start} " \ 140cb07d74eSMarkus Niebel "${blkc}; " \ 141cb07d74eSMarkus Niebel "fi; " \ 142cb07d74eSMarkus Niebel "fi; fi; " \ 143cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 144cb07d74eSMarkus Niebel "update_kernel=run kernel_name; " \ 145cb07d74eSMarkus Niebel "if tftp ${kernel}; then " \ 146cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 147cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 148e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 149e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 150cb07d74eSMarkus Niebel "if itest ${blkc} <= ${kernel_size}; then " \ 151cb07d74eSMarkus Niebel "mmc write ${loadaddr} " \ 152cb07d74eSMarkus Niebel "${kernel_start} ${blkc}; " \ 153cb07d74eSMarkus Niebel "fi; " \ 154cb07d74eSMarkus Niebel "fi; " \ 155cb07d74eSMarkus Niebel "fi; " \ 156cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 157cb07d74eSMarkus Niebel "update_fdt=if tftp ${fdt_file}; then " \ 158cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 159cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 160e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 161e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 162cb07d74eSMarkus Niebel "if itest ${blkc} <= ${fdt_size}; then " \ 163cb07d74eSMarkus Niebel "mmc write ${loadaddr} ${fdt_start} ${blkc}; " \ 164cb07d74eSMarkus Niebel "fi; " \ 165cb07d74eSMarkus Niebel "fi; fi; " \ 166cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 167cb07d74eSMarkus Niebel 168cb07d74eSMarkus Niebel #define CONFIG_BOOTCOMMAND \ 169cb07d74eSMarkus Niebel "run mmcboot; run netboot; run panicboot" 170cb07d74eSMarkus Niebel 171cb07d74eSMarkus Niebel #elif defined(CONFIG_TQMA6X_SPI_BOOT) 172cb07d74eSMarkus Niebel 173cb07d74eSMarkus Niebel #define TQMA6_UBOOT_OFFSET 0x400 174cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_START 0x0 175cb07d74eSMarkus Niebel /* max u-boot size: 512k */ 17652835468SMarkus Niebel #define TQMA6_UBOOT_SECTOR_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE 177cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_COUNT 0x8 178cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SIZE (TQMA6_UBOOT_SECTOR_SIZE * \ 179cb07d74eSMarkus Niebel TQMA6_UBOOT_SECTOR_COUNT) 180cb07d74eSMarkus Niebel 181cb07d74eSMarkus Niebel #define CONFIG_ENV_IS_IN_SPI_FLASH 182cb07d74eSMarkus Niebel #define CONFIG_SYS_REDUNDAND_ENVIRONMENT 183cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET (TQMA6_UBOOT_SIZE) 18452835468SMarkus Niebel #define CONFIG_ENV_SECT_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE 185cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ 186cb07d74eSMarkus Niebel CONFIG_ENV_SECT_SIZE) 187cb07d74eSMarkus Niebel 188cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_BUS (CONFIG_SF_DEFAULT_BUS) 189cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_CS (CONFIG_SF_DEFAULT_CS) 190cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_MAX_HZ (CONFIG_SF_DEFAULT_SPEED) 191cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_MODE (CONFIG_SF_DEFAULT_MODE) 192cb07d74eSMarkus Niebel 193cb07d74eSMarkus Niebel #define TQMA6_FDT_OFFSET (CONFIG_ENV_OFFSET_REDUND + \ 194cb07d74eSMarkus Niebel CONFIG_ENV_SECT_SIZE) 19552835468SMarkus Niebel #define TQMA6_FDT_SECT_SIZE (TQMA6_SPI_FLASH_SECTOR_SIZE) 196cb07d74eSMarkus Niebel 197cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_START 0x0a /* 8 Sector u-boot, 2 Sector env */ 198cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_COUNT 0x01 199cb07d74eSMarkus Niebel 200cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_START 0x10 201cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_COUNT 0x60 202cb07d74eSMarkus Niebel 203cb07d74eSMarkus Niebel #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 204cb07d74eSMarkus Niebel "mmcblkdev=0\0" \ 205cb07d74eSMarkus Niebel "uboot_offset="__stringify(TQMA6_UBOOT_OFFSET)"\0" \ 206cb07d74eSMarkus Niebel "uboot_sectors="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ 207cb07d74eSMarkus Niebel "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ 208cb07d74eSMarkus Niebel "fdt_sectors="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ 209cb07d74eSMarkus Niebel "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ 210cb07d74eSMarkus Niebel "kernel_sectors="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ 211cb07d74eSMarkus Niebel "update_uboot=if tftp ${uboot}; then " \ 212cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 213cb07d74eSMarkus Niebel "setexpr blkc ${filesize} + " \ 214cb07d74eSMarkus Niebel __stringify(TQMA6_UBOOT_OFFSET) "; " \ 215cb07d74eSMarkus Niebel "setexpr size ${uboot_sectors} * " \ 21652835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 217cb07d74eSMarkus Niebel "if itest ${blkc} <= ${size}; then " \ 218cb07d74eSMarkus Niebel "sf probe; " \ 219cb07d74eSMarkus Niebel "sf erase 0 ${size}; " \ 220cb07d74eSMarkus Niebel "sf write ${loadaddr} ${uboot_offset} " \ 221cb07d74eSMarkus Niebel "${filesize}; " \ 222cb07d74eSMarkus Niebel "fi; " \ 223cb07d74eSMarkus Niebel "fi; fi; " \ 224cb07d74eSMarkus Niebel "setenv filesize 0; setenv blkc; setenv size \0" \ 225cb07d74eSMarkus Niebel "update_kernel=run kernel_name; if tftp ${kernel}; then " \ 226cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 227cb07d74eSMarkus Niebel "setexpr size ${kernel_sectors} * " \ 22852835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 229cb07d74eSMarkus Niebel "setexpr offset ${kernel_start} * " \ 23052835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 231cb07d74eSMarkus Niebel "if itest ${filesize} <= ${size}; then " \ 232cb07d74eSMarkus Niebel "sf probe; " \ 233cb07d74eSMarkus Niebel "sf erase ${offset} ${size}; " \ 234cb07d74eSMarkus Niebel "sf write ${loadaddr} ${offset} " \ 235cb07d74eSMarkus Niebel "${filesize}; " \ 236cb07d74eSMarkus Niebel "fi; " \ 237cb07d74eSMarkus Niebel "fi; fi; " \ 238cb07d74eSMarkus Niebel "setenv filesize 0; setenv size ; setenv offset\0" \ 239cb07d74eSMarkus Niebel "update_fdt=if tftp ${fdt_file}; then " \ 240cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 241cb07d74eSMarkus Niebel "setexpr size ${fdt_sectors} * " \ 24252835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 243cb07d74eSMarkus Niebel "setexpr offset ${fdt_start} * " \ 24452835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 245cb07d74eSMarkus Niebel "if itest ${filesize} <= ${size}; then " \ 246cb07d74eSMarkus Niebel "sf probe; " \ 247cb07d74eSMarkus Niebel "sf erase ${offset} ${size}; " \ 248cb07d74eSMarkus Niebel "sf write ${loadaddr} ${offset} " \ 249cb07d74eSMarkus Niebel "${filesize}; " \ 250cb07d74eSMarkus Niebel "fi; " \ 251cb07d74eSMarkus Niebel "fi; fi; " \ 252cb07d74eSMarkus Niebel "setenv filesize 0; setenv size ; setenv offset\0" \ 253cb07d74eSMarkus Niebel "loadimage=sf probe; " \ 254cb07d74eSMarkus Niebel "setexpr size ${kernel_sectors} * " \ 25552835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 256cb07d74eSMarkus Niebel "setexpr offset ${kernel_start} * " \ 25752835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 258cb07d74eSMarkus Niebel "sf read ${loadaddr} ${offset} ${size}; " \ 259cb07d74eSMarkus Niebel "setenv size ; setenv offset\0" \ 260cb07d74eSMarkus Niebel "loadfdt=sf probe; " \ 261cb07d74eSMarkus Niebel "setexpr size ${fdt_sectors} * " \ 26252835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 263cb07d74eSMarkus Niebel "setexpr offset ${fdt_start} * " \ 26452835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 2650b14f1a6SMarkus Niebel "sf read ${fdt_addr} ${offset} ${size}; " \ 266cb07d74eSMarkus Niebel "setenv size ; setenv offset\0" \ 267cb07d74eSMarkus Niebel 268cb07d74eSMarkus Niebel #define CONFIG_BOOTCOMMAND \ 269cb07d74eSMarkus Niebel "sf probe; run mmcboot; run netboot; run panicboot" \ 270cb07d74eSMarkus Niebel 271cb07d74eSMarkus Niebel #else 272cb07d74eSMarkus Niebel 273cb07d74eSMarkus Niebel #error "need to define boot source" 274cb07d74eSMarkus Niebel 275cb07d74eSMarkus Niebel #endif 276cb07d74eSMarkus Niebel 277cb07d74eSMarkus Niebel /* 128 MiB offset as in ARM related docu for linux suggested */ 278cb07d74eSMarkus Niebel #define TQMA6_FDT_ADDRESS 0x18000000 279cb07d74eSMarkus Niebel 2809e9846a4SMarkus Niebel /* set to a resonable value, changeable by user */ 2819e9846a4SMarkus Niebel #define TQMA6_CMA_SIZE 160M 2829e9846a4SMarkus Niebel 283cb07d74eSMarkus Niebel #define CONFIG_EXTRA_ENV_SETTINGS \ 284cb07d74eSMarkus Niebel "board=tqma6\0" \ 285cb07d74eSMarkus Niebel "uimage=uImage\0" \ 286cb07d74eSMarkus Niebel "zimage=zImage\0" \ 287cb07d74eSMarkus Niebel "boot_type=bootz\0" \ 288cb07d74eSMarkus Niebel "kernel_name=if test \"${boot_type}\" != bootz; then " \ 289cb07d74eSMarkus Niebel "setenv kernel ${uimage}; " \ 290cb07d74eSMarkus Niebel "else setenv kernel ${zimage}; fi\0" \ 291cb07d74eSMarkus Niebel "uboot=u-boot.imx\0" \ 292cb07d74eSMarkus Niebel "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ 293cb07d74eSMarkus Niebel "fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0" \ 29412ca05a3SSimon Glass "console=" CONSOLE_DEV "\0" \ 2959e9846a4SMarkus Niebel "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \ 296cb07d74eSMarkus Niebel "fdt_high=0xffffffff\0" \ 297cb07d74eSMarkus Niebel "initrd_high=0xffffffff\0" \ 29834713901SMarkus Niebel "rootfsmode=ro\0" \ 2999e9846a4SMarkus Niebel "addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \ 300cb07d74eSMarkus Niebel "addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \ 301cb07d74eSMarkus Niebel "addfb=setenv bootargs ${bootargs} " \ 302cb07d74eSMarkus Niebel "imx-fbdev.legacyfb_depth=32 consoleblank=0\0" \ 303cb07d74eSMarkus Niebel "mmcpart=2\0" \ 304cb07d74eSMarkus Niebel "mmcblkdev=0\0" \ 3059e9846a4SMarkus Niebel "mmcargs=run addmmc addtty addfb addcma\0" \ 306cb07d74eSMarkus Niebel "addmmc=setenv bootargs ${bootargs} " \ 30734713901SMarkus Niebel "root=/dev/mmcblk${mmcblkdev}p${mmcpart} ${rootfsmode} " \ 30834713901SMarkus Niebel "rootwait\0" \ 309cb07d74eSMarkus Niebel "mmcboot=echo Booting from mmc ...; " \ 310cb07d74eSMarkus Niebel "setenv bootargs; " \ 311cb07d74eSMarkus Niebel "run mmcargs; " \ 312cb07d74eSMarkus Niebel "run loadimage; " \ 313cb07d74eSMarkus Niebel "if run loadfdt; then " \ 314cb07d74eSMarkus Niebel "echo boot device tree kernel ...; " \ 315cb07d74eSMarkus Niebel "${boot_type} ${loadaddr} - ${fdt_addr}; " \ 316cb07d74eSMarkus Niebel "else " \ 317cb07d74eSMarkus Niebel "${boot_type}; " \ 318cb07d74eSMarkus Niebel "fi;\0" \ 319cb07d74eSMarkus Niebel "setenv bootargs \0" \ 320cb07d74eSMarkus Niebel "netdev=eth0\0" \ 321cb07d74eSMarkus Niebel "rootpath=/srv/nfs/tqma6\0" \ 322cb07d74eSMarkus Niebel "ipmode=static\0" \ 3239e9846a4SMarkus Niebel "netargs=run addnfs addip addtty addfb addcma\0" \ 324cb07d74eSMarkus Niebel "addnfs=setenv bootargs ${bootargs} " \ 325cb07d74eSMarkus Niebel "root=/dev/nfs rw " \ 326cb07d74eSMarkus Niebel "nfsroot=${serverip}:${rootpath},v3,tcp;\0" \ 327cb07d74eSMarkus Niebel "addip_static=setenv bootargs ${bootargs} " \ 328cb07d74eSMarkus Niebel "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ 329cb07d74eSMarkus Niebel "${hostname}:${netdev}:off\0" \ 330cb07d74eSMarkus Niebel "addip_dynamic=setenv bootargs ${bootargs} ip=dhcp\0" \ 331cb07d74eSMarkus Niebel "addip=if test \"${ipmode}\" != static; then " \ 332cb07d74eSMarkus Niebel "run addip_dynamic; else run addip_static; fi\0" \ 333cb07d74eSMarkus Niebel "set_getcmd=if test \"${ipmode}\" != static; then " \ 334cb07d74eSMarkus Niebel "setenv getcmd dhcp; setenv autoload yes; " \ 335cb07d74eSMarkus Niebel "else setenv getcmd tftp; setenv autoload no; fi\0" \ 336cb07d74eSMarkus Niebel "netboot=echo Booting from net ...; " \ 337cb07d74eSMarkus Niebel "run kernel_name; " \ 338cb07d74eSMarkus Niebel "run set_getcmd; " \ 339cb07d74eSMarkus Niebel "setenv bootargs; " \ 340cb07d74eSMarkus Niebel "run netargs; " \ 341cb07d74eSMarkus Niebel "if ${getcmd} ${kernel}; then " \ 342cb07d74eSMarkus Niebel "if ${getcmd} ${fdt_addr} ${fdt_file}; then " \ 343cb07d74eSMarkus Niebel "${boot_type} ${loadaddr} - ${fdt_addr}; " \ 344cb07d74eSMarkus Niebel "fi; " \ 345cb07d74eSMarkus Niebel "fi; " \ 346cb07d74eSMarkus Niebel "echo ... failed\0" \ 347cb07d74eSMarkus Niebel "panicboot=echo No boot device !!! reset\0" \ 348cb07d74eSMarkus Niebel TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 349cb07d74eSMarkus Niebel 350cb07d74eSMarkus Niebel #define CONFIG_STACKSIZE (128u * SZ_1K) 351cb07d74eSMarkus Niebel 352cb07d74eSMarkus Niebel /* Physical Memory Map */ 353cb07d74eSMarkus Niebel #define CONFIG_NR_DRAM_BANKS 1 354cb07d74eSMarkus Niebel #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 355cb07d74eSMarkus Niebel 356cb07d74eSMarkus Niebel #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 357cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 358cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 359cb07d74eSMarkus Niebel 360cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_SP_OFFSET \ 361cb07d74eSMarkus Niebel (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 362cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_SP_ADDR \ 363cb07d74eSMarkus Niebel (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 364cb07d74eSMarkus Niebel 3656b396b31SStefan Roese /* 3666b396b31SStefan Roese * All the defines above are for the TQMa6 SoM 3676b396b31SStefan Roese * 3686b396b31SStefan Roese * Now include the baseboard specific configuration 3696b396b31SStefan Roese */ 3706b396b31SStefan Roese #ifdef CONFIG_MBA6 3716b396b31SStefan Roese #include "tqma6_mba6.h" 372452308c0SStefan Roese #elif CONFIG_WRU4 373452308c0SStefan Roese #include "tqma6_wru4.h" 3746b396b31SStefan Roese #else 3756b396b31SStefan Roese #error "No baseboard for the TQMa6 defined!" 3766b396b31SStefan Roese #endif 3776b396b31SStefan Roese 3786b396b31SStefan Roese /* Support at least the sensor on TQMa6 SOM */ 3796b396b31SStefan Roese #if !defined(CONFIG_DTT_SENSORS) 3806b396b31SStefan Roese #define CONFIG_DTT_SENSORS { 0 } 3816b396b31SStefan Roese #endif 3826b396b31SStefan Roese 383cb07d74eSMarkus Niebel #endif /* __CONFIG_H */ 384