1cb07d74eSMarkus Niebel /* 2*468fb1e4SMarkus Niebel * Copyright (C) 2013, 2014, 2017 Markus Niebel <Markus.Niebel@tq-group.com> 3cb07d74eSMarkus Niebel * 4*468fb1e4SMarkus Niebel * Configuration settings for the TQ Systems TQMa6<Q,D,DL,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 */ 21d4b349e4SMarkus Niebel #if defined(CONFIG_TQMA6S) 22cd6ddc48SFabio Estevam #define CONFIG_SYS_TEXT_BASE 0x2fc00000 23*468fb1e4SMarkus Niebel #elif defined(CONFIG_TQMA6Q) || defined(CONFIG_TQMA6DL) 24cd6ddc48SFabio Estevam #define CONFIG_SYS_TEXT_BASE 0x4fc00000 25cd6ddc48SFabio Estevam #endif 26cd6ddc48SFabio Estevam 27cb07d74eSMarkus Niebel #include "mx6_common.h" 28cb07d74eSMarkus Niebel 29d4b349e4SMarkus Niebel #if defined(CONFIG_TQMA6S) 30cb07d74eSMarkus Niebel #define PHYS_SDRAM_SIZE (512u * SZ_1M) 31*468fb1e4SMarkus Niebel #elif defined(CONFIG_TQMA6DL) 32*468fb1e4SMarkus Niebel #define PHYS_SDRAM_SIZE (SZ_1G) 33d4b349e4SMarkus Niebel #elif defined(CONFIG_TQMA6Q) 34*468fb1e4SMarkus Niebel #define PHYS_SDRAM_SIZE (SZ_1G) 35cb07d74eSMarkus Niebel #endif 36cb07d74eSMarkus Niebel 37cb07d74eSMarkus Niebel #define CONFIG_MXC_UART 38cb07d74eSMarkus Niebel 39cb07d74eSMarkus Niebel /* SPI */ 40cb07d74eSMarkus Niebel #define CONFIG_MXC_SPI 41cb07d74eSMarkus Niebel 42cb07d74eSMarkus Niebel /* SPI Flash */ 43cb07d74eSMarkus Niebel 4452835468SMarkus Niebel #define TQMA6_SPI_FLASH_SECTOR_SIZE SZ_64K 4552835468SMarkus Niebel 46cb07d74eSMarkus Niebel #define CONFIG_SF_DEFAULT_BUS 0 471719d49cSMarkus Niebel #define CONFIG_SF_DEFAULT_CS 0 48cb07d74eSMarkus Niebel #define CONFIG_SF_DEFAULT_SPEED 50000000 49cb07d74eSMarkus Niebel #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) 50cb07d74eSMarkus Niebel 51cb07d74eSMarkus Niebel /* I2C Configs */ 52cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C 53cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_MXC 5403544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ 5503544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ 56f8cb101eSYork Sun #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ 57cb07d74eSMarkus Niebel #define CONFIG_I2C_MULTI_BUS 58cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_SPEED 100000 59cb07d74eSMarkus Niebel 60cb07d74eSMarkus Niebel /* I2C EEPROM (M24C64) */ 61cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 62cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 63cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS 5 /* 32 Bytes */ 64cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 65cb07d74eSMarkus Niebel 66cb07d74eSMarkus Niebel #define CONFIG_POWER 67cb07d74eSMarkus Niebel #define CONFIG_POWER_I2C 68cb07d74eSMarkus Niebel #define CONFIG_POWER_PFUZE100 69cb07d74eSMarkus Niebel #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 70cb07d74eSMarkus Niebel #define TQMA6_PFUZE100_I2C_BUS 2 71cb07d74eSMarkus Niebel 72cb07d74eSMarkus Niebel /* MMC Configs */ 73cb07d74eSMarkus Niebel #define CONFIG_SYS_FSL_ESDHC_ADDR 0 74cb07d74eSMarkus Niebel 75cb07d74eSMarkus Niebel /* USB Configs */ 76cb07d74eSMarkus Niebel #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 77911b5ea5SStefan Roese #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 78911b5ea5SStefan Roese #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ 79cb07d74eSMarkus Niebel 80cb07d74eSMarkus Niebel #define CONFIG_FEC_MXC 81cb07d74eSMarkus Niebel #define IMX_FEC_BASE ENET_BASE_ADDR 82cb07d74eSMarkus Niebel #define CONFIG_MII 83cb07d74eSMarkus Niebel 84cb07d74eSMarkus Niebel #define CONFIG_ARP_TIMEOUT 200UL 85cb07d74eSMarkus Niebel 86cb07d74eSMarkus Niebel #define CONFIG_ENV_SIZE (SZ_8K) 87cb07d74eSMarkus Niebel /* Size of malloc() pool */ 88cb07d74eSMarkus Niebel #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * SZ_1M) 89cb07d74eSMarkus Niebel 90cb07d74eSMarkus Niebel #if defined(CONFIG_TQMA6X_MMC_BOOT) 91cb07d74eSMarkus Niebel 92cb07d74eSMarkus Niebel #define TQMA6_UBOOT_OFFSET SZ_1K 93cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_START 0x2 94cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_COUNT 0x7fe 95cb07d74eSMarkus Niebel 96cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET SZ_1M 97cb07d74eSMarkus Niebel #define CONFIG_SYS_MMC_ENV_DEV 0 98cb07d74eSMarkus Niebel 99cb07d74eSMarkus Niebel #define TQMA6_FDT_OFFSET (2 * SZ_1M) 100cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_START 0x1000 101cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_COUNT 0x800 102cb07d74eSMarkus Niebel 103cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_START 0x2000 104cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_COUNT 0x2000 105cb07d74eSMarkus Niebel 106cb07d74eSMarkus Niebel #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 107cb07d74eSMarkus Niebel "uboot_start="__stringify(TQMA6_UBOOT_SECTOR_START)"\0" \ 108cb07d74eSMarkus Niebel "uboot_size="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ 109cb07d74eSMarkus Niebel "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ 110cb07d74eSMarkus Niebel "fdt_size="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ 111cb07d74eSMarkus Niebel "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ 112cb07d74eSMarkus Niebel "kernel_size="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ 113cb07d74eSMarkus Niebel "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ 114cb07d74eSMarkus Niebel "loadimage=mmc dev ${mmcdev}; " \ 115cb07d74eSMarkus Niebel "mmc read ${loadaddr} ${kernel_start} ${kernel_size};\0" \ 116cb07d74eSMarkus Niebel "loadfdt=mmc dev ${mmcdev}; " \ 117cb07d74eSMarkus Niebel "mmc read ${fdt_addr} ${fdt_start} ${fdt_size};\0" \ 118cb07d74eSMarkus Niebel "update_uboot=if tftp ${uboot}; then " \ 119cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 120cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 121e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 122e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 123cb07d74eSMarkus Niebel "if itest ${blkc} <= ${uboot_size}; then " \ 124cb07d74eSMarkus Niebel "mmc write ${loadaddr} ${uboot_start} " \ 125cb07d74eSMarkus Niebel "${blkc}; " \ 126cb07d74eSMarkus Niebel "fi; " \ 127cb07d74eSMarkus Niebel "fi; fi; " \ 128cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 129cb07d74eSMarkus Niebel "update_kernel=run kernel_name; " \ 130cb07d74eSMarkus Niebel "if tftp ${kernel}; then " \ 131cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 132cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 133e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 134e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 135cb07d74eSMarkus Niebel "if itest ${blkc} <= ${kernel_size}; then " \ 136cb07d74eSMarkus Niebel "mmc write ${loadaddr} " \ 137cb07d74eSMarkus Niebel "${kernel_start} ${blkc}; " \ 138cb07d74eSMarkus Niebel "fi; " \ 139cb07d74eSMarkus Niebel "fi; " \ 140cb07d74eSMarkus Niebel "fi; " \ 141cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 142cb07d74eSMarkus Niebel "update_fdt=if tftp ${fdt_file}; then " \ 143cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 144cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 145e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 146e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 147cb07d74eSMarkus Niebel "if itest ${blkc} <= ${fdt_size}; then " \ 148cb07d74eSMarkus Niebel "mmc write ${loadaddr} ${fdt_start} ${blkc}; " \ 149cb07d74eSMarkus Niebel "fi; " \ 150cb07d74eSMarkus Niebel "fi; fi; " \ 151cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 152cb07d74eSMarkus Niebel 153cb07d74eSMarkus Niebel #define CONFIG_BOOTCOMMAND \ 154cb07d74eSMarkus Niebel "run mmcboot; run netboot; run panicboot" 155cb07d74eSMarkus Niebel 156cb07d74eSMarkus Niebel #elif defined(CONFIG_TQMA6X_SPI_BOOT) 157cb07d74eSMarkus Niebel 158cb07d74eSMarkus Niebel #define TQMA6_UBOOT_OFFSET 0x400 159cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_START 0x0 160cb07d74eSMarkus Niebel /* max u-boot size: 512k */ 16152835468SMarkus Niebel #define TQMA6_UBOOT_SECTOR_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE 162cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_COUNT 0x8 163cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SIZE (TQMA6_UBOOT_SECTOR_SIZE * \ 164cb07d74eSMarkus Niebel TQMA6_UBOOT_SECTOR_COUNT) 165cb07d74eSMarkus Niebel 166cb07d74eSMarkus Niebel #define CONFIG_SYS_REDUNDAND_ENVIRONMENT 167cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET (TQMA6_UBOOT_SIZE) 16852835468SMarkus Niebel #define CONFIG_ENV_SECT_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE 169cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ 170cb07d74eSMarkus Niebel CONFIG_ENV_SECT_SIZE) 171cb07d74eSMarkus Niebel 172cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_BUS (CONFIG_SF_DEFAULT_BUS) 173cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_CS (CONFIG_SF_DEFAULT_CS) 174cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_MAX_HZ (CONFIG_SF_DEFAULT_SPEED) 175cb07d74eSMarkus Niebel #define CONFIG_ENV_SPI_MODE (CONFIG_SF_DEFAULT_MODE) 176cb07d74eSMarkus Niebel 177cb07d74eSMarkus Niebel #define TQMA6_FDT_OFFSET (CONFIG_ENV_OFFSET_REDUND + \ 178cb07d74eSMarkus Niebel CONFIG_ENV_SECT_SIZE) 17952835468SMarkus Niebel #define TQMA6_FDT_SECT_SIZE (TQMA6_SPI_FLASH_SECTOR_SIZE) 180cb07d74eSMarkus Niebel 181cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_START 0x0a /* 8 Sector u-boot, 2 Sector env */ 182cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_COUNT 0x01 183cb07d74eSMarkus Niebel 184cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_START 0x10 185cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_COUNT 0x60 186cb07d74eSMarkus Niebel 187cb07d74eSMarkus Niebel #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 188cb07d74eSMarkus Niebel "mmcblkdev=0\0" \ 189cb07d74eSMarkus Niebel "uboot_offset="__stringify(TQMA6_UBOOT_OFFSET)"\0" \ 190cb07d74eSMarkus Niebel "uboot_sectors="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ 191cb07d74eSMarkus Niebel "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ 192cb07d74eSMarkus Niebel "fdt_sectors="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ 193cb07d74eSMarkus Niebel "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ 194cb07d74eSMarkus Niebel "kernel_sectors="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ 195cb07d74eSMarkus Niebel "update_uboot=if tftp ${uboot}; then " \ 196cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 197cb07d74eSMarkus Niebel "setexpr blkc ${filesize} + " \ 198cb07d74eSMarkus Niebel __stringify(TQMA6_UBOOT_OFFSET) "; " \ 199cb07d74eSMarkus Niebel "setexpr size ${uboot_sectors} * " \ 20052835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 201cb07d74eSMarkus Niebel "if itest ${blkc} <= ${size}; then " \ 202cb07d74eSMarkus Niebel "sf probe; " \ 203cb07d74eSMarkus Niebel "sf erase 0 ${size}; " \ 204cb07d74eSMarkus Niebel "sf write ${loadaddr} ${uboot_offset} " \ 205cb07d74eSMarkus Niebel "${filesize}; " \ 206cb07d74eSMarkus Niebel "fi; " \ 207cb07d74eSMarkus Niebel "fi; fi; " \ 208cb07d74eSMarkus Niebel "setenv filesize 0; setenv blkc; setenv size \0" \ 209cb07d74eSMarkus Niebel "update_kernel=run kernel_name; if tftp ${kernel}; then " \ 210cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 211cb07d74eSMarkus Niebel "setexpr size ${kernel_sectors} * " \ 21252835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 213cb07d74eSMarkus Niebel "setexpr offset ${kernel_start} * " \ 21452835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 215cb07d74eSMarkus Niebel "if itest ${filesize} <= ${size}; then " \ 216cb07d74eSMarkus Niebel "sf probe; " \ 217cb07d74eSMarkus Niebel "sf erase ${offset} ${size}; " \ 218cb07d74eSMarkus Niebel "sf write ${loadaddr} ${offset} " \ 219cb07d74eSMarkus Niebel "${filesize}; " \ 220cb07d74eSMarkus Niebel "fi; " \ 221cb07d74eSMarkus Niebel "fi; fi; " \ 222cb07d74eSMarkus Niebel "setenv filesize 0; setenv size ; setenv offset\0" \ 223cb07d74eSMarkus Niebel "update_fdt=if tftp ${fdt_file}; then " \ 224cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 225cb07d74eSMarkus Niebel "setexpr size ${fdt_sectors} * " \ 22652835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 227cb07d74eSMarkus Niebel "setexpr offset ${fdt_start} * " \ 22852835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 229cb07d74eSMarkus Niebel "if itest ${filesize} <= ${size}; then " \ 230cb07d74eSMarkus Niebel "sf probe; " \ 231cb07d74eSMarkus Niebel "sf erase ${offset} ${size}; " \ 232cb07d74eSMarkus Niebel "sf write ${loadaddr} ${offset} " \ 233cb07d74eSMarkus Niebel "${filesize}; " \ 234cb07d74eSMarkus Niebel "fi; " \ 235cb07d74eSMarkus Niebel "fi; fi; " \ 236cb07d74eSMarkus Niebel "setenv filesize 0; setenv size ; setenv offset\0" \ 237cb07d74eSMarkus Niebel "loadimage=sf probe; " \ 238cb07d74eSMarkus Niebel "setexpr size ${kernel_sectors} * " \ 23952835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 240cb07d74eSMarkus Niebel "setexpr offset ${kernel_start} * " \ 24152835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 242cb07d74eSMarkus Niebel "sf read ${loadaddr} ${offset} ${size}; " \ 243cb07d74eSMarkus Niebel "setenv size ; setenv offset\0" \ 244cb07d74eSMarkus Niebel "loadfdt=sf probe; " \ 245cb07d74eSMarkus Niebel "setexpr size ${fdt_sectors} * " \ 24652835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 247cb07d74eSMarkus Niebel "setexpr offset ${fdt_start} * " \ 24852835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 2490b14f1a6SMarkus Niebel "sf read ${fdt_addr} ${offset} ${size}; " \ 250cb07d74eSMarkus Niebel "setenv size ; setenv offset\0" \ 251cb07d74eSMarkus Niebel 252cb07d74eSMarkus Niebel #define CONFIG_BOOTCOMMAND \ 253cb07d74eSMarkus Niebel "sf probe; run mmcboot; run netboot; run panicboot" \ 254cb07d74eSMarkus Niebel 255cb07d74eSMarkus Niebel #else 256cb07d74eSMarkus Niebel 257cb07d74eSMarkus Niebel #error "need to define boot source" 258cb07d74eSMarkus Niebel 259cb07d74eSMarkus Niebel #endif 260cb07d74eSMarkus Niebel 261cb07d74eSMarkus Niebel /* 128 MiB offset as in ARM related docu for linux suggested */ 262cb07d74eSMarkus Niebel #define TQMA6_FDT_ADDRESS 0x18000000 263cb07d74eSMarkus Niebel 2649e9846a4SMarkus Niebel /* set to a resonable value, changeable by user */ 2659e9846a4SMarkus Niebel #define TQMA6_CMA_SIZE 160M 2669e9846a4SMarkus Niebel 267cb07d74eSMarkus Niebel #define CONFIG_EXTRA_ENV_SETTINGS \ 268cb07d74eSMarkus Niebel "board=tqma6\0" \ 269cb07d74eSMarkus Niebel "uimage=uImage\0" \ 270cb07d74eSMarkus Niebel "zimage=zImage\0" \ 271cb07d74eSMarkus Niebel "boot_type=bootz\0" \ 272cb07d74eSMarkus Niebel "kernel_name=if test \"${boot_type}\" != bootz; then " \ 273cb07d74eSMarkus Niebel "setenv kernel ${uimage}; " \ 274cb07d74eSMarkus Niebel "else setenv kernel ${zimage}; fi\0" \ 275cb07d74eSMarkus Niebel "uboot=u-boot.imx\0" \ 276cb07d74eSMarkus Niebel "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ 277cb07d74eSMarkus Niebel "fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0" \ 27812ca05a3SSimon Glass "console=" CONSOLE_DEV "\0" \ 2799e9846a4SMarkus Niebel "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \ 280cb07d74eSMarkus Niebel "fdt_high=0xffffffff\0" \ 281cb07d74eSMarkus Niebel "initrd_high=0xffffffff\0" \ 28234713901SMarkus Niebel "rootfsmode=ro\0" \ 2839e9846a4SMarkus Niebel "addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \ 284cb07d74eSMarkus Niebel "addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \ 285cb07d74eSMarkus Niebel "addfb=setenv bootargs ${bootargs} " \ 286cb07d74eSMarkus Niebel "imx-fbdev.legacyfb_depth=32 consoleblank=0\0" \ 287cb07d74eSMarkus Niebel "mmcpart=2\0" \ 288cb07d74eSMarkus Niebel "mmcblkdev=0\0" \ 2899e9846a4SMarkus Niebel "mmcargs=run addmmc addtty addfb addcma\0" \ 290cb07d74eSMarkus Niebel "addmmc=setenv bootargs ${bootargs} " \ 29134713901SMarkus Niebel "root=/dev/mmcblk${mmcblkdev}p${mmcpart} ${rootfsmode} " \ 29234713901SMarkus Niebel "rootwait\0" \ 293cb07d74eSMarkus Niebel "mmcboot=echo Booting from mmc ...; " \ 294cb07d74eSMarkus Niebel "setenv bootargs; " \ 295cb07d74eSMarkus Niebel "run mmcargs; " \ 296cb07d74eSMarkus Niebel "run loadimage; " \ 297cb07d74eSMarkus Niebel "if run loadfdt; then " \ 298cb07d74eSMarkus Niebel "echo boot device tree kernel ...; " \ 299cb07d74eSMarkus Niebel "${boot_type} ${loadaddr} - ${fdt_addr}; " \ 300cb07d74eSMarkus Niebel "else " \ 301cb07d74eSMarkus Niebel "${boot_type}; " \ 302cb07d74eSMarkus Niebel "fi;\0" \ 303cb07d74eSMarkus Niebel "setenv bootargs \0" \ 304cb07d74eSMarkus Niebel "netdev=eth0\0" \ 305cb07d74eSMarkus Niebel "rootpath=/srv/nfs/tqma6\0" \ 306cb07d74eSMarkus Niebel "ipmode=static\0" \ 3079e9846a4SMarkus Niebel "netargs=run addnfs addip addtty addfb addcma\0" \ 308cb07d74eSMarkus Niebel "addnfs=setenv bootargs ${bootargs} " \ 309cb07d74eSMarkus Niebel "root=/dev/nfs rw " \ 310cb07d74eSMarkus Niebel "nfsroot=${serverip}:${rootpath},v3,tcp;\0" \ 311cb07d74eSMarkus Niebel "addip_static=setenv bootargs ${bootargs} " \ 312cb07d74eSMarkus Niebel "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ 313cb07d74eSMarkus Niebel "${hostname}:${netdev}:off\0" \ 314cb07d74eSMarkus Niebel "addip_dynamic=setenv bootargs ${bootargs} ip=dhcp\0" \ 315cb07d74eSMarkus Niebel "addip=if test \"${ipmode}\" != static; then " \ 316cb07d74eSMarkus Niebel "run addip_dynamic; else run addip_static; fi\0" \ 317cb07d74eSMarkus Niebel "set_getcmd=if test \"${ipmode}\" != static; then " \ 318cb07d74eSMarkus Niebel "setenv getcmd dhcp; setenv autoload yes; " \ 319cb07d74eSMarkus Niebel "else setenv getcmd tftp; setenv autoload no; fi\0" \ 320cb07d74eSMarkus Niebel "netboot=echo Booting from net ...; " \ 321cb07d74eSMarkus Niebel "run kernel_name; " \ 322cb07d74eSMarkus Niebel "run set_getcmd; " \ 323cb07d74eSMarkus Niebel "setenv bootargs; " \ 324cb07d74eSMarkus Niebel "run netargs; " \ 325cb07d74eSMarkus Niebel "if ${getcmd} ${kernel}; then " \ 326cb07d74eSMarkus Niebel "if ${getcmd} ${fdt_addr} ${fdt_file}; then " \ 327cb07d74eSMarkus Niebel "${boot_type} ${loadaddr} - ${fdt_addr}; " \ 328cb07d74eSMarkus Niebel "fi; " \ 329cb07d74eSMarkus Niebel "fi; " \ 330cb07d74eSMarkus Niebel "echo ... failed\0" \ 331cb07d74eSMarkus Niebel "panicboot=echo No boot device !!! reset\0" \ 332cb07d74eSMarkus Niebel TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 333cb07d74eSMarkus Niebel 334cb07d74eSMarkus Niebel /* Physical Memory Map */ 335cb07d74eSMarkus Niebel #define CONFIG_NR_DRAM_BANKS 1 336cb07d74eSMarkus Niebel #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 337cb07d74eSMarkus Niebel 338cb07d74eSMarkus Niebel #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 339cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 340cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 341cb07d74eSMarkus Niebel 342cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_SP_OFFSET \ 343cb07d74eSMarkus Niebel (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 344cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_SP_ADDR \ 345cb07d74eSMarkus Niebel (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 346cb07d74eSMarkus Niebel 3476b396b31SStefan Roese /* 3486b396b31SStefan Roese * All the defines above are for the TQMa6 SoM 3496b396b31SStefan Roese * 3506b396b31SStefan Roese * Now include the baseboard specific configuration 3516b396b31SStefan Roese */ 3526b396b31SStefan Roese #ifdef CONFIG_MBA6 3536b396b31SStefan Roese #include "tqma6_mba6.h" 354452308c0SStefan Roese #elif CONFIG_WRU4 355452308c0SStefan Roese #include "tqma6_wru4.h" 3566b396b31SStefan Roese #else 3576b396b31SStefan Roese #error "No baseboard for the TQMa6 defined!" 3586b396b31SStefan Roese #endif 3596b396b31SStefan Roese 3606b396b31SStefan Roese /* Support at least the sensor on TQMa6 SOM */ 3616b396b31SStefan Roese 362cb07d74eSMarkus Niebel #endif /* __CONFIG_H */ 363