1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2cb07d74eSMarkus Niebel /* 3468fb1e4SMarkus Niebel * Copyright (C) 2013, 2014, 2017 Markus Niebel <Markus.Niebel@tq-group.com> 4cb07d74eSMarkus Niebel * 5468fb1e4SMarkus Niebel * Configuration settings for the TQ Systems TQMa6<Q,D,DL,S> module. 6cb07d74eSMarkus Niebel */ 7cb07d74eSMarkus Niebel 8cb07d74eSMarkus Niebel #ifndef __CONFIG_H 9cb07d74eSMarkus Niebel #define __CONFIG_H 10cb07d74eSMarkus Niebel 1166cacc9dSMarkus Niebel #include <linux/kconfig.h> 121719d49cSMarkus Niebel /* SPL */ 131719d49cSMarkus Niebel /* #if defined(CONFIG_SPL_BUILD) */ 141719d49cSMarkus Niebel /* common IMX6 SPL configuration */ 151719d49cSMarkus Niebel #include "imx6_spl.h" 161719d49cSMarkus Niebel 171719d49cSMarkus Niebel /* #endif */ 181719d49cSMarkus Niebel 19cd6ddc48SFabio Estevam /* place code in last 4 MiB of RAM */ 20cd6ddc48SFabio Estevam 21cb07d74eSMarkus Niebel #include "mx6_common.h" 22cb07d74eSMarkus Niebel 23d4b349e4SMarkus Niebel #if defined(CONFIG_TQMA6S) 24cb07d74eSMarkus Niebel #define PHYS_SDRAM_SIZE (512u * SZ_1M) 25468fb1e4SMarkus Niebel #elif defined(CONFIG_TQMA6DL) 26468fb1e4SMarkus Niebel #define PHYS_SDRAM_SIZE (SZ_1G) 27d4b349e4SMarkus Niebel #elif defined(CONFIG_TQMA6Q) 28468fb1e4SMarkus Niebel #define PHYS_SDRAM_SIZE (SZ_1G) 29cb07d74eSMarkus Niebel #endif 30cb07d74eSMarkus Niebel 31cb07d74eSMarkus Niebel #define CONFIG_MXC_UART 32cb07d74eSMarkus Niebel 33cb07d74eSMarkus Niebel /* SPI Flash */ 34cb07d74eSMarkus Niebel 3552835468SMarkus Niebel #define TQMA6_SPI_FLASH_SECTOR_SIZE SZ_64K 3652835468SMarkus Niebel 37cb07d74eSMarkus Niebel /* I2C Configs */ 38cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C 39cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_MXC 4003544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ 4103544c66SAlbert ARIBAUD \\(3ADEV\\) #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ 42f8cb101eSYork Sun #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ 43cb07d74eSMarkus Niebel #define CONFIG_I2C_MULTI_BUS 44cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_SPEED 100000 45cb07d74eSMarkus Niebel 46cb07d74eSMarkus Niebel /* I2C EEPROM (M24C64) */ 47cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 48cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 49cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS 5 /* 32 Bytes */ 50cb07d74eSMarkus Niebel #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 51cb07d74eSMarkus Niebel 52cb07d74eSMarkus Niebel #define CONFIG_POWER 53cb07d74eSMarkus Niebel #define CONFIG_POWER_I2C 54cb07d74eSMarkus Niebel #define CONFIG_POWER_PFUZE100 55cb07d74eSMarkus Niebel #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 56cb07d74eSMarkus Niebel #define TQMA6_PFUZE100_I2C_BUS 2 57cb07d74eSMarkus Niebel 58cb07d74eSMarkus Niebel /* MMC Configs */ 59cb07d74eSMarkus Niebel #define CONFIG_SYS_FSL_ESDHC_ADDR 0 60cb07d74eSMarkus Niebel 61cb07d74eSMarkus Niebel /* USB Configs */ 62cb07d74eSMarkus Niebel #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 63911b5ea5SStefan Roese #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 64911b5ea5SStefan Roese #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ 65cb07d74eSMarkus Niebel 66cb07d74eSMarkus Niebel #define CONFIG_FEC_MXC 67cb07d74eSMarkus Niebel #define IMX_FEC_BASE ENET_BASE_ADDR 68cb07d74eSMarkus Niebel 69cb07d74eSMarkus Niebel #define CONFIG_ARP_TIMEOUT 200UL 70cb07d74eSMarkus Niebel 71cb07d74eSMarkus Niebel #define CONFIG_ENV_SIZE (SZ_8K) 72cb07d74eSMarkus Niebel /* Size of malloc() pool */ 73cb07d74eSMarkus Niebel #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * SZ_1M) 74cb07d74eSMarkus Niebel 75cb07d74eSMarkus Niebel #if defined(CONFIG_TQMA6X_MMC_BOOT) 76cb07d74eSMarkus Niebel 77cb07d74eSMarkus Niebel #define TQMA6_UBOOT_OFFSET SZ_1K 78cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_START 0x2 79cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_COUNT 0x7fe 80cb07d74eSMarkus Niebel 81cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET SZ_1M 82cb07d74eSMarkus Niebel #define CONFIG_SYS_MMC_ENV_DEV 0 83cb07d74eSMarkus Niebel 84cb07d74eSMarkus Niebel #define TQMA6_FDT_OFFSET (2 * SZ_1M) 85cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_START 0x1000 86cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_COUNT 0x800 87cb07d74eSMarkus Niebel 88cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_START 0x2000 89cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_COUNT 0x2000 90cb07d74eSMarkus Niebel 91cb07d74eSMarkus Niebel #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 92cb07d74eSMarkus Niebel "uboot_start="__stringify(TQMA6_UBOOT_SECTOR_START)"\0" \ 93cb07d74eSMarkus Niebel "uboot_size="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ 94cb07d74eSMarkus Niebel "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ 95cb07d74eSMarkus Niebel "fdt_size="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ 96cb07d74eSMarkus Niebel "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ 97cb07d74eSMarkus Niebel "kernel_size="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ 98cb07d74eSMarkus Niebel "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ 99cb07d74eSMarkus Niebel "loadimage=mmc dev ${mmcdev}; " \ 100cb07d74eSMarkus Niebel "mmc read ${loadaddr} ${kernel_start} ${kernel_size};\0" \ 101cb07d74eSMarkus Niebel "loadfdt=mmc dev ${mmcdev}; " \ 102cb07d74eSMarkus Niebel "mmc read ${fdt_addr} ${fdt_start} ${fdt_size};\0" \ 103cb07d74eSMarkus Niebel "update_uboot=if tftp ${uboot}; then " \ 104cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 105cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 106e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 107e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 108cb07d74eSMarkus Niebel "if itest ${blkc} <= ${uboot_size}; then " \ 109cb07d74eSMarkus Niebel "mmc write ${loadaddr} ${uboot_start} " \ 110cb07d74eSMarkus Niebel "${blkc}; " \ 111cb07d74eSMarkus Niebel "fi; " \ 112cb07d74eSMarkus Niebel "fi; fi; " \ 113cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 114cb07d74eSMarkus Niebel "update_kernel=run kernel_name; " \ 115cb07d74eSMarkus Niebel "if tftp ${kernel}; then " \ 116cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 117cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 118e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 119e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 120cb07d74eSMarkus Niebel "if itest ${blkc} <= ${kernel_size}; then " \ 121cb07d74eSMarkus Niebel "mmc write ${loadaddr} " \ 122cb07d74eSMarkus Niebel "${kernel_start} ${blkc}; " \ 123cb07d74eSMarkus Niebel "fi; " \ 124cb07d74eSMarkus Niebel "fi; " \ 125cb07d74eSMarkus Niebel "fi; " \ 126cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 127cb07d74eSMarkus Niebel "update_fdt=if tftp ${fdt_file}; then " \ 128cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 129cb07d74eSMarkus Niebel "mmc dev ${mmcdev}; mmc rescan; " \ 130e7203d77SMarkus Niebel "setexpr blkc ${filesize} + 0x1ff; " \ 131e7203d77SMarkus Niebel "setexpr blkc ${blkc} / 0x200; " \ 132cb07d74eSMarkus Niebel "if itest ${blkc} <= ${fdt_size}; then " \ 133cb07d74eSMarkus Niebel "mmc write ${loadaddr} ${fdt_start} ${blkc}; " \ 134cb07d74eSMarkus Niebel "fi; " \ 135cb07d74eSMarkus Niebel "fi; fi; " \ 136cb07d74eSMarkus Niebel "setenv filesize; setenv blkc \0" \ 137cb07d74eSMarkus Niebel 138cb07d74eSMarkus Niebel #define CONFIG_BOOTCOMMAND \ 139cb07d74eSMarkus Niebel "run mmcboot; run netboot; run panicboot" 140cb07d74eSMarkus Niebel 141cb07d74eSMarkus Niebel #elif defined(CONFIG_TQMA6X_SPI_BOOT) 142cb07d74eSMarkus Niebel 143cb07d74eSMarkus Niebel #define TQMA6_UBOOT_OFFSET 0x400 144cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_START 0x0 145cb07d74eSMarkus Niebel /* max u-boot size: 512k */ 14652835468SMarkus Niebel #define TQMA6_UBOOT_SECTOR_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE 147cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SECTOR_COUNT 0x8 148cb07d74eSMarkus Niebel #define TQMA6_UBOOT_SIZE (TQMA6_UBOOT_SECTOR_SIZE * \ 149cb07d74eSMarkus Niebel TQMA6_UBOOT_SECTOR_COUNT) 150cb07d74eSMarkus Niebel 151cb07d74eSMarkus Niebel #define CONFIG_SYS_REDUNDAND_ENVIRONMENT 152cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET (TQMA6_UBOOT_SIZE) 15352835468SMarkus Niebel #define CONFIG_ENV_SECT_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE 154cb07d74eSMarkus Niebel #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ 155cb07d74eSMarkus Niebel CONFIG_ENV_SECT_SIZE) 156cb07d74eSMarkus Niebel 157cb07d74eSMarkus Niebel #define TQMA6_FDT_OFFSET (CONFIG_ENV_OFFSET_REDUND + \ 158cb07d74eSMarkus Niebel CONFIG_ENV_SECT_SIZE) 15952835468SMarkus Niebel #define TQMA6_FDT_SECT_SIZE (TQMA6_SPI_FLASH_SECTOR_SIZE) 160cb07d74eSMarkus Niebel 161cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_START 0x0a /* 8 Sector u-boot, 2 Sector env */ 162cb07d74eSMarkus Niebel #define TQMA6_FDT_SECTOR_COUNT 0x01 163cb07d74eSMarkus Niebel 164cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_START 0x10 165cb07d74eSMarkus Niebel #define TQMA6_KERNEL_SECTOR_COUNT 0x60 166cb07d74eSMarkus Niebel 167cb07d74eSMarkus Niebel #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 168cb07d74eSMarkus Niebel "mmcblkdev=0\0" \ 169cb07d74eSMarkus Niebel "uboot_offset="__stringify(TQMA6_UBOOT_OFFSET)"\0" \ 170cb07d74eSMarkus Niebel "uboot_sectors="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ 171cb07d74eSMarkus Niebel "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ 172cb07d74eSMarkus Niebel "fdt_sectors="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ 173cb07d74eSMarkus Niebel "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ 174cb07d74eSMarkus Niebel "kernel_sectors="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ 175cb07d74eSMarkus Niebel "update_uboot=if tftp ${uboot}; then " \ 176cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 177cb07d74eSMarkus Niebel "setexpr blkc ${filesize} + " \ 178cb07d74eSMarkus Niebel __stringify(TQMA6_UBOOT_OFFSET) "; " \ 179cb07d74eSMarkus Niebel "setexpr size ${uboot_sectors} * " \ 18052835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 181cb07d74eSMarkus Niebel "if itest ${blkc} <= ${size}; then " \ 182cb07d74eSMarkus Niebel "sf probe; " \ 183cb07d74eSMarkus Niebel "sf erase 0 ${size}; " \ 184cb07d74eSMarkus Niebel "sf write ${loadaddr} ${uboot_offset} " \ 185cb07d74eSMarkus Niebel "${filesize}; " \ 186cb07d74eSMarkus Niebel "fi; " \ 187cb07d74eSMarkus Niebel "fi; fi; " \ 188cb07d74eSMarkus Niebel "setenv filesize 0; setenv blkc; setenv size \0" \ 189cb07d74eSMarkus Niebel "update_kernel=run kernel_name; if tftp ${kernel}; then " \ 190cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 191cb07d74eSMarkus Niebel "setexpr size ${kernel_sectors} * " \ 19252835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 193cb07d74eSMarkus Niebel "setexpr offset ${kernel_start} * " \ 19452835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 195cb07d74eSMarkus Niebel "if itest ${filesize} <= ${size}; then " \ 196cb07d74eSMarkus Niebel "sf probe; " \ 197cb07d74eSMarkus Niebel "sf erase ${offset} ${size}; " \ 198cb07d74eSMarkus Niebel "sf write ${loadaddr} ${offset} " \ 199cb07d74eSMarkus Niebel "${filesize}; " \ 200cb07d74eSMarkus Niebel "fi; " \ 201cb07d74eSMarkus Niebel "fi; fi; " \ 202cb07d74eSMarkus Niebel "setenv filesize 0; setenv size ; setenv offset\0" \ 203cb07d74eSMarkus Niebel "update_fdt=if tftp ${fdt_file}; then " \ 204cb07d74eSMarkus Niebel "if itest ${filesize} > 0; then " \ 205cb07d74eSMarkus Niebel "setexpr size ${fdt_sectors} * " \ 20652835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 207cb07d74eSMarkus Niebel "setexpr offset ${fdt_start} * " \ 20852835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 209cb07d74eSMarkus Niebel "if itest ${filesize} <= ${size}; then " \ 210cb07d74eSMarkus Niebel "sf probe; " \ 211cb07d74eSMarkus Niebel "sf erase ${offset} ${size}; " \ 212cb07d74eSMarkus Niebel "sf write ${loadaddr} ${offset} " \ 213cb07d74eSMarkus Niebel "${filesize}; " \ 214cb07d74eSMarkus Niebel "fi; " \ 215cb07d74eSMarkus Niebel "fi; fi; " \ 216cb07d74eSMarkus Niebel "setenv filesize 0; setenv size ; setenv offset\0" \ 217cb07d74eSMarkus Niebel "loadimage=sf probe; " \ 218cb07d74eSMarkus Niebel "setexpr size ${kernel_sectors} * " \ 21952835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 220cb07d74eSMarkus Niebel "setexpr offset ${kernel_start} * " \ 22152835468SMarkus Niebel __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ 222cb07d74eSMarkus Niebel "sf read ${loadaddr} ${offset} ${size}; " \ 223cb07d74eSMarkus Niebel "setenv size ; setenv offset\0" \ 224cb07d74eSMarkus Niebel "loadfdt=sf probe; " \ 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)"; " \ 2290b14f1a6SMarkus Niebel "sf read ${fdt_addr} ${offset} ${size}; " \ 230cb07d74eSMarkus Niebel "setenv size ; setenv offset\0" \ 231cb07d74eSMarkus Niebel 232cb07d74eSMarkus Niebel #define CONFIG_BOOTCOMMAND \ 233cb07d74eSMarkus Niebel "sf probe; run mmcboot; run netboot; run panicboot" \ 234cb07d74eSMarkus Niebel 235cb07d74eSMarkus Niebel #else 236cb07d74eSMarkus Niebel 237cb07d74eSMarkus Niebel #error "need to define boot source" 238cb07d74eSMarkus Niebel 239cb07d74eSMarkus Niebel #endif 240cb07d74eSMarkus Niebel 241cb07d74eSMarkus Niebel /* 128 MiB offset as in ARM related docu for linux suggested */ 242cb07d74eSMarkus Niebel #define TQMA6_FDT_ADDRESS 0x18000000 243cb07d74eSMarkus Niebel 2449e9846a4SMarkus Niebel /* set to a resonable value, changeable by user */ 2459e9846a4SMarkus Niebel #define TQMA6_CMA_SIZE 160M 2469e9846a4SMarkus Niebel 247cb07d74eSMarkus Niebel #define CONFIG_EXTRA_ENV_SETTINGS \ 248cb07d74eSMarkus Niebel "board=tqma6\0" \ 249cb07d74eSMarkus Niebel "uimage=uImage\0" \ 250cb07d74eSMarkus Niebel "zimage=zImage\0" \ 251cb07d74eSMarkus Niebel "boot_type=bootz\0" \ 252cb07d74eSMarkus Niebel "kernel_name=if test \"${boot_type}\" != bootz; then " \ 253cb07d74eSMarkus Niebel "setenv kernel ${uimage}; " \ 254cb07d74eSMarkus Niebel "else setenv kernel ${zimage}; fi\0" \ 255cb07d74eSMarkus Niebel "uboot=u-boot.imx\0" \ 256cb07d74eSMarkus Niebel "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ 257cb07d74eSMarkus Niebel "fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0" \ 25812ca05a3SSimon Glass "console=" CONSOLE_DEV "\0" \ 2599e9846a4SMarkus Niebel "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \ 260cb07d74eSMarkus Niebel "fdt_high=0xffffffff\0" \ 261cb07d74eSMarkus Niebel "initrd_high=0xffffffff\0" \ 26234713901SMarkus Niebel "rootfsmode=ro\0" \ 2639e9846a4SMarkus Niebel "addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \ 264cb07d74eSMarkus Niebel "addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \ 265cb07d74eSMarkus Niebel "addfb=setenv bootargs ${bootargs} " \ 266cb07d74eSMarkus Niebel "imx-fbdev.legacyfb_depth=32 consoleblank=0\0" \ 267cb07d74eSMarkus Niebel "mmcpart=2\0" \ 268cb07d74eSMarkus Niebel "mmcblkdev=0\0" \ 2699e9846a4SMarkus Niebel "mmcargs=run addmmc addtty addfb addcma\0" \ 270cb07d74eSMarkus Niebel "addmmc=setenv bootargs ${bootargs} " \ 27134713901SMarkus Niebel "root=/dev/mmcblk${mmcblkdev}p${mmcpart} ${rootfsmode} " \ 27234713901SMarkus Niebel "rootwait\0" \ 273cb07d74eSMarkus Niebel "mmcboot=echo Booting from mmc ...; " \ 274cb07d74eSMarkus Niebel "setenv bootargs; " \ 275cb07d74eSMarkus Niebel "run mmcargs; " \ 276cb07d74eSMarkus Niebel "run loadimage; " \ 277cb07d74eSMarkus Niebel "if run loadfdt; then " \ 278cb07d74eSMarkus Niebel "echo boot device tree kernel ...; " \ 279cb07d74eSMarkus Niebel "${boot_type} ${loadaddr} - ${fdt_addr}; " \ 280cb07d74eSMarkus Niebel "else " \ 281cb07d74eSMarkus Niebel "${boot_type}; " \ 282cb07d74eSMarkus Niebel "fi;\0" \ 283cb07d74eSMarkus Niebel "setenv bootargs \0" \ 284cb07d74eSMarkus Niebel "netdev=eth0\0" \ 285cb07d74eSMarkus Niebel "rootpath=/srv/nfs/tqma6\0" \ 286cb07d74eSMarkus Niebel "ipmode=static\0" \ 2879e9846a4SMarkus Niebel "netargs=run addnfs addip addtty addfb addcma\0" \ 288cb07d74eSMarkus Niebel "addnfs=setenv bootargs ${bootargs} " \ 289cb07d74eSMarkus Niebel "root=/dev/nfs rw " \ 290cb07d74eSMarkus Niebel "nfsroot=${serverip}:${rootpath},v3,tcp;\0" \ 291cb07d74eSMarkus Niebel "addip_static=setenv bootargs ${bootargs} " \ 292cb07d74eSMarkus Niebel "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ 293cb07d74eSMarkus Niebel "${hostname}:${netdev}:off\0" \ 294cb07d74eSMarkus Niebel "addip_dynamic=setenv bootargs ${bootargs} ip=dhcp\0" \ 295cb07d74eSMarkus Niebel "addip=if test \"${ipmode}\" != static; then " \ 296cb07d74eSMarkus Niebel "run addip_dynamic; else run addip_static; fi\0" \ 297cb07d74eSMarkus Niebel "set_getcmd=if test \"${ipmode}\" != static; then " \ 298cb07d74eSMarkus Niebel "setenv getcmd dhcp; setenv autoload yes; " \ 299cb07d74eSMarkus Niebel "else setenv getcmd tftp; setenv autoload no; fi\0" \ 300cb07d74eSMarkus Niebel "netboot=echo Booting from net ...; " \ 301cb07d74eSMarkus Niebel "run kernel_name; " \ 302cb07d74eSMarkus Niebel "run set_getcmd; " \ 303cb07d74eSMarkus Niebel "setenv bootargs; " \ 304cb07d74eSMarkus Niebel "run netargs; " \ 305cb07d74eSMarkus Niebel "if ${getcmd} ${kernel}; then " \ 306cb07d74eSMarkus Niebel "if ${getcmd} ${fdt_addr} ${fdt_file}; then " \ 307cb07d74eSMarkus Niebel "${boot_type} ${loadaddr} - ${fdt_addr}; " \ 308cb07d74eSMarkus Niebel "fi; " \ 309cb07d74eSMarkus Niebel "fi; " \ 310cb07d74eSMarkus Niebel "echo ... failed\0" \ 311cb07d74eSMarkus Niebel "panicboot=echo No boot device !!! reset\0" \ 312cb07d74eSMarkus Niebel TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ 313cb07d74eSMarkus Niebel 314cb07d74eSMarkus Niebel /* Physical Memory Map */ 315cb07d74eSMarkus Niebel #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 316cb07d74eSMarkus Niebel 317cb07d74eSMarkus Niebel #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 318cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 319cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 320cb07d74eSMarkus Niebel 321cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_SP_OFFSET \ 322cb07d74eSMarkus Niebel (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 323cb07d74eSMarkus Niebel #define CONFIG_SYS_INIT_SP_ADDR \ 324cb07d74eSMarkus Niebel (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 325cb07d74eSMarkus Niebel 3266b396b31SStefan Roese /* 3276b396b31SStefan Roese * All the defines above are for the TQMa6 SoM 3286b396b31SStefan Roese * 3296b396b31SStefan Roese * Now include the baseboard specific configuration 3306b396b31SStefan Roese */ 3316b396b31SStefan Roese #ifdef CONFIG_MBA6 3326b396b31SStefan Roese #include "tqma6_mba6.h" 333452308c0SStefan Roese #elif CONFIG_WRU4 334452308c0SStefan Roese #include "tqma6_wru4.h" 3356b396b31SStefan Roese #else 3366b396b31SStefan Roese #error "No baseboard for the TQMa6 defined!" 3376b396b31SStefan Roese #endif 3386b396b31SStefan Roese 3396b396b31SStefan Roese /* Support at least the sensor on TQMa6 SOM */ 3406b396b31SStefan Roese 341cb07d74eSMarkus Niebel #endif /* __CONFIG_H */ 342