Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 2 | /* |
Markus Niebel | 468fb1e | 2017-02-28 16:37:33 +0100 | [diff] [blame] | 3 | * Copyright (C) 2013, 2014, 2017 Markus Niebel <Markus.Niebel@tq-group.com> |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 4 | * |
Markus Niebel | 468fb1e | 2017-02-28 16:37:33 +0100 | [diff] [blame] | 5 | * Configuration settings for the TQ Systems TQMa6<Q,D,DL,S> module. |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __CONFIG_H |
| 9 | #define __CONFIG_H |
| 10 | |
Markus Niebel | 66cacc9 | 2015-06-04 17:25:30 +0200 | [diff] [blame] | 11 | #include <linux/kconfig.h> |
Markus Niebel | 1719d49 | 2014-10-23 15:47:05 +0200 | [diff] [blame] | 12 | /* SPL */ |
| 13 | /* #if defined(CONFIG_SPL_BUILD) */ |
Markus Niebel | 1719d49 | 2014-10-23 15:47:05 +0200 | [diff] [blame] | 14 | /* common IMX6 SPL configuration */ |
| 15 | #include "imx6_spl.h" |
| 16 | |
| 17 | /* #endif */ |
| 18 | |
Fabio Estevam | cd6ddc4 | 2015-05-28 12:33:34 -0300 | [diff] [blame] | 19 | /* place code in last 4 MiB of RAM */ |
Fabio Estevam | cd6ddc4 | 2015-05-28 12:33:34 -0300 | [diff] [blame] | 20 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 21 | #include "mx6_common.h" |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 22 | |
Markus Niebel | d4b349e | 2017-02-28 16:37:32 +0100 | [diff] [blame] | 23 | #if defined(CONFIG_TQMA6S) |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 24 | #define PHYS_SDRAM_SIZE (512u * SZ_1M) |
Markus Niebel | 468fb1e | 2017-02-28 16:37:33 +0100 | [diff] [blame] | 25 | #elif defined(CONFIG_TQMA6DL) |
| 26 | #define PHYS_SDRAM_SIZE (SZ_1G) |
Markus Niebel | d4b349e | 2017-02-28 16:37:32 +0100 | [diff] [blame] | 27 | #elif defined(CONFIG_TQMA6Q) |
Markus Niebel | 468fb1e | 2017-02-28 16:37:33 +0100 | [diff] [blame] | 28 | #define PHYS_SDRAM_SIZE (SZ_1G) |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 29 | #endif |
| 30 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 31 | #define CONFIG_MXC_UART |
| 32 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 33 | /* SPI Flash */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 34 | |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 35 | #define TQMA6_SPI_FLASH_SECTOR_SIZE SZ_64K |
| 36 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 37 | #define CONFIG_SF_DEFAULT_BUS 0 |
Markus Niebel | 1719d49 | 2014-10-23 15:47:05 +0200 | [diff] [blame] | 38 | #define CONFIG_SF_DEFAULT_CS 0 |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 39 | #define CONFIG_SF_DEFAULT_SPEED 50000000 |
| 40 | #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) |
| 41 | |
| 42 | /* I2C Configs */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 43 | #define CONFIG_SYS_I2C |
| 44 | #define CONFIG_SYS_I2C_MXC |
Albert ARIBAUD \\(3ADEV\\) | 03544c6 | 2015-09-21 22:43:38 +0200 | [diff] [blame] | 45 | #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ |
| 46 | #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ |
York Sun | f8cb101 | 2015-03-20 10:20:40 -0700 | [diff] [blame] | 47 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 48 | #define CONFIG_I2C_MULTI_BUS |
| 49 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 50 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 51 | /* I2C EEPROM (M24C64) */ |
| 52 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 53 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
| 54 | #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS 5 /* 32 Bytes */ |
| 55 | #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 56 | |
| 57 | #define CONFIG_POWER |
| 58 | #define CONFIG_POWER_I2C |
| 59 | #define CONFIG_POWER_PFUZE100 |
| 60 | #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 |
| 61 | #define TQMA6_PFUZE100_I2C_BUS 2 |
| 62 | |
| 63 | /* MMC Configs */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 64 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 65 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 66 | /* USB Configs */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 67 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
Stefan Roese | 911b5ea | 2015-03-12 13:34:29 +0100 | [diff] [blame] | 68 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 69 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 70 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 71 | #define CONFIG_FEC_MXC |
| 72 | #define IMX_FEC_BASE ENET_BASE_ADDR |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 73 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 74 | #define CONFIG_ARP_TIMEOUT 200UL |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 75 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 76 | #define CONFIG_ENV_SIZE (SZ_8K) |
| 77 | /* Size of malloc() pool */ |
| 78 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * SZ_1M) |
| 79 | |
| 80 | #if defined(CONFIG_TQMA6X_MMC_BOOT) |
| 81 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 82 | #define TQMA6_UBOOT_OFFSET SZ_1K |
| 83 | #define TQMA6_UBOOT_SECTOR_START 0x2 |
| 84 | #define TQMA6_UBOOT_SECTOR_COUNT 0x7fe |
| 85 | |
| 86 | #define CONFIG_ENV_OFFSET SZ_1M |
| 87 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 88 | |
| 89 | #define TQMA6_FDT_OFFSET (2 * SZ_1M) |
| 90 | #define TQMA6_FDT_SECTOR_START 0x1000 |
| 91 | #define TQMA6_FDT_SECTOR_COUNT 0x800 |
| 92 | |
| 93 | #define TQMA6_KERNEL_SECTOR_START 0x2000 |
| 94 | #define TQMA6_KERNEL_SECTOR_COUNT 0x2000 |
| 95 | |
| 96 | #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ |
| 97 | "uboot_start="__stringify(TQMA6_UBOOT_SECTOR_START)"\0" \ |
| 98 | "uboot_size="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ |
| 99 | "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ |
| 100 | "fdt_size="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ |
| 101 | "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ |
| 102 | "kernel_size="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ |
| 103 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
| 104 | "loadimage=mmc dev ${mmcdev}; " \ |
| 105 | "mmc read ${loadaddr} ${kernel_start} ${kernel_size};\0" \ |
| 106 | "loadfdt=mmc dev ${mmcdev}; " \ |
| 107 | "mmc read ${fdt_addr} ${fdt_start} ${fdt_size};\0" \ |
| 108 | "update_uboot=if tftp ${uboot}; then " \ |
| 109 | "if itest ${filesize} > 0; then " \ |
| 110 | "mmc dev ${mmcdev}; mmc rescan; " \ |
Markus Niebel | e7203d7 | 2017-02-03 16:14:02 +0100 | [diff] [blame] | 111 | "setexpr blkc ${filesize} + 0x1ff; " \ |
| 112 | "setexpr blkc ${blkc} / 0x200; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 113 | "if itest ${blkc} <= ${uboot_size}; then " \ |
| 114 | "mmc write ${loadaddr} ${uboot_start} " \ |
| 115 | "${blkc}; " \ |
| 116 | "fi; " \ |
| 117 | "fi; fi; " \ |
| 118 | "setenv filesize; setenv blkc \0" \ |
| 119 | "update_kernel=run kernel_name; " \ |
| 120 | "if tftp ${kernel}; then " \ |
| 121 | "if itest ${filesize} > 0; then " \ |
| 122 | "mmc dev ${mmcdev}; mmc rescan; " \ |
Markus Niebel | e7203d7 | 2017-02-03 16:14:02 +0100 | [diff] [blame] | 123 | "setexpr blkc ${filesize} + 0x1ff; " \ |
| 124 | "setexpr blkc ${blkc} / 0x200; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 125 | "if itest ${blkc} <= ${kernel_size}; then " \ |
| 126 | "mmc write ${loadaddr} " \ |
| 127 | "${kernel_start} ${blkc}; " \ |
| 128 | "fi; " \ |
| 129 | "fi; " \ |
| 130 | "fi; " \ |
| 131 | "setenv filesize; setenv blkc \0" \ |
| 132 | "update_fdt=if tftp ${fdt_file}; then " \ |
| 133 | "if itest ${filesize} > 0; then " \ |
| 134 | "mmc dev ${mmcdev}; mmc rescan; " \ |
Markus Niebel | e7203d7 | 2017-02-03 16:14:02 +0100 | [diff] [blame] | 135 | "setexpr blkc ${filesize} + 0x1ff; " \ |
| 136 | "setexpr blkc ${blkc} / 0x200; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 137 | "if itest ${blkc} <= ${fdt_size}; then " \ |
| 138 | "mmc write ${loadaddr} ${fdt_start} ${blkc}; " \ |
| 139 | "fi; " \ |
| 140 | "fi; fi; " \ |
| 141 | "setenv filesize; setenv blkc \0" \ |
| 142 | |
| 143 | #define CONFIG_BOOTCOMMAND \ |
| 144 | "run mmcboot; run netboot; run panicboot" |
| 145 | |
| 146 | #elif defined(CONFIG_TQMA6X_SPI_BOOT) |
| 147 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 148 | #define TQMA6_UBOOT_OFFSET 0x400 |
| 149 | #define TQMA6_UBOOT_SECTOR_START 0x0 |
| 150 | /* max u-boot size: 512k */ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 151 | #define TQMA6_UBOOT_SECTOR_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 152 | #define TQMA6_UBOOT_SECTOR_COUNT 0x8 |
| 153 | #define TQMA6_UBOOT_SIZE (TQMA6_UBOOT_SECTOR_SIZE * \ |
| 154 | TQMA6_UBOOT_SECTOR_COUNT) |
| 155 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 156 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
| 157 | #define CONFIG_ENV_OFFSET (TQMA6_UBOOT_SIZE) |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 158 | #define CONFIG_ENV_SECT_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 159 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ |
| 160 | CONFIG_ENV_SECT_SIZE) |
| 161 | |
| 162 | #define CONFIG_ENV_SPI_BUS (CONFIG_SF_DEFAULT_BUS) |
| 163 | #define CONFIG_ENV_SPI_CS (CONFIG_SF_DEFAULT_CS) |
| 164 | #define CONFIG_ENV_SPI_MAX_HZ (CONFIG_SF_DEFAULT_SPEED) |
| 165 | #define CONFIG_ENV_SPI_MODE (CONFIG_SF_DEFAULT_MODE) |
| 166 | |
| 167 | #define TQMA6_FDT_OFFSET (CONFIG_ENV_OFFSET_REDUND + \ |
| 168 | CONFIG_ENV_SECT_SIZE) |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 169 | #define TQMA6_FDT_SECT_SIZE (TQMA6_SPI_FLASH_SECTOR_SIZE) |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 170 | |
| 171 | #define TQMA6_FDT_SECTOR_START 0x0a /* 8 Sector u-boot, 2 Sector env */ |
| 172 | #define TQMA6_FDT_SECTOR_COUNT 0x01 |
| 173 | |
| 174 | #define TQMA6_KERNEL_SECTOR_START 0x10 |
| 175 | #define TQMA6_KERNEL_SECTOR_COUNT 0x60 |
| 176 | |
| 177 | #define TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ |
| 178 | "mmcblkdev=0\0" \ |
| 179 | "uboot_offset="__stringify(TQMA6_UBOOT_OFFSET)"\0" \ |
| 180 | "uboot_sectors="__stringify(TQMA6_UBOOT_SECTOR_COUNT)"\0" \ |
| 181 | "fdt_start="__stringify(TQMA6_FDT_SECTOR_START)"\0" \ |
| 182 | "fdt_sectors="__stringify(TQMA6_FDT_SECTOR_COUNT)"\0" \ |
| 183 | "kernel_start="__stringify(TQMA6_KERNEL_SECTOR_START)"\0" \ |
| 184 | "kernel_sectors="__stringify(TQMA6_KERNEL_SECTOR_COUNT)"\0" \ |
| 185 | "update_uboot=if tftp ${uboot}; then " \ |
| 186 | "if itest ${filesize} > 0; then " \ |
| 187 | "setexpr blkc ${filesize} + " \ |
| 188 | __stringify(TQMA6_UBOOT_OFFSET) "; " \ |
| 189 | "setexpr size ${uboot_sectors} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 190 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 191 | "if itest ${blkc} <= ${size}; then " \ |
| 192 | "sf probe; " \ |
| 193 | "sf erase 0 ${size}; " \ |
| 194 | "sf write ${loadaddr} ${uboot_offset} " \ |
| 195 | "${filesize}; " \ |
| 196 | "fi; " \ |
| 197 | "fi; fi; " \ |
| 198 | "setenv filesize 0; setenv blkc; setenv size \0" \ |
| 199 | "update_kernel=run kernel_name; if tftp ${kernel}; then " \ |
| 200 | "if itest ${filesize} > 0; then " \ |
| 201 | "setexpr size ${kernel_sectors} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 202 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 203 | "setexpr offset ${kernel_start} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 204 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 205 | "if itest ${filesize} <= ${size}; then " \ |
| 206 | "sf probe; " \ |
| 207 | "sf erase ${offset} ${size}; " \ |
| 208 | "sf write ${loadaddr} ${offset} " \ |
| 209 | "${filesize}; " \ |
| 210 | "fi; " \ |
| 211 | "fi; fi; " \ |
| 212 | "setenv filesize 0; setenv size ; setenv offset\0" \ |
| 213 | "update_fdt=if tftp ${fdt_file}; then " \ |
| 214 | "if itest ${filesize} > 0; then " \ |
| 215 | "setexpr size ${fdt_sectors} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 216 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 217 | "setexpr offset ${fdt_start} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 218 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 219 | "if itest ${filesize} <= ${size}; then " \ |
| 220 | "sf probe; " \ |
| 221 | "sf erase ${offset} ${size}; " \ |
| 222 | "sf write ${loadaddr} ${offset} " \ |
| 223 | "${filesize}; " \ |
| 224 | "fi; " \ |
| 225 | "fi; fi; " \ |
| 226 | "setenv filesize 0; setenv size ; setenv offset\0" \ |
| 227 | "loadimage=sf probe; " \ |
| 228 | "setexpr size ${kernel_sectors} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 229 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 230 | "setexpr offset ${kernel_start} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 231 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 232 | "sf read ${loadaddr} ${offset} ${size}; " \ |
| 233 | "setenv size ; setenv offset\0" \ |
| 234 | "loadfdt=sf probe; " \ |
| 235 | "setexpr size ${fdt_sectors} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 236 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 237 | "setexpr offset ${fdt_start} * " \ |
Markus Niebel | 5283546 | 2014-11-18 13:22:54 +0100 | [diff] [blame] | 238 | __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ |
Markus Niebel | 0b14f1a | 2017-02-03 16:14:00 +0100 | [diff] [blame] | 239 | "sf read ${fdt_addr} ${offset} ${size}; " \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 240 | "setenv size ; setenv offset\0" \ |
| 241 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 242 | #define CONFIG_BOOTCOMMAND \ |
| 243 | "sf probe; run mmcboot; run netboot; run panicboot" \ |
| 244 | |
| 245 | #else |
| 246 | |
| 247 | #error "need to define boot source" |
| 248 | |
| 249 | #endif |
| 250 | |
| 251 | /* 128 MiB offset as in ARM related docu for linux suggested */ |
| 252 | #define TQMA6_FDT_ADDRESS 0x18000000 |
| 253 | |
Markus Niebel | 9e9846a | 2017-02-03 16:13:58 +0100 | [diff] [blame] | 254 | /* set to a resonable value, changeable by user */ |
| 255 | #define TQMA6_CMA_SIZE 160M |
| 256 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 257 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 258 | "board=tqma6\0" \ |
| 259 | "uimage=uImage\0" \ |
| 260 | "zimage=zImage\0" \ |
| 261 | "boot_type=bootz\0" \ |
| 262 | "kernel_name=if test \"${boot_type}\" != bootz; then " \ |
| 263 | "setenv kernel ${uimage}; " \ |
| 264 | "else setenv kernel ${zimage}; fi\0" \ |
| 265 | "uboot=u-boot.imx\0" \ |
| 266 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
| 267 | "fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0" \ |
Markus Niebel | dc05e47 | 2017-02-03 16:14:03 +0100 | [diff] [blame] | 268 | "console=" CONSOLE_DEV "\0" \ |
Markus Niebel | 9e9846a | 2017-02-03 16:13:58 +0100 | [diff] [blame] | 269 | "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 270 | "fdt_high=0xffffffff\0" \ |
| 271 | "initrd_high=0xffffffff\0" \ |
Markus Niebel | 3471390 | 2017-02-03 16:14:01 +0100 | [diff] [blame] | 272 | "rootfsmode=ro\0" \ |
Markus Niebel | 9e9846a | 2017-02-03 16:13:58 +0100 | [diff] [blame] | 273 | "addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 274 | "addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \ |
| 275 | "addfb=setenv bootargs ${bootargs} " \ |
| 276 | "imx-fbdev.legacyfb_depth=32 consoleblank=0\0" \ |
| 277 | "mmcpart=2\0" \ |
| 278 | "mmcblkdev=0\0" \ |
Markus Niebel | 9e9846a | 2017-02-03 16:13:58 +0100 | [diff] [blame] | 279 | "mmcargs=run addmmc addtty addfb addcma\0" \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 280 | "addmmc=setenv bootargs ${bootargs} " \ |
Markus Niebel | 3471390 | 2017-02-03 16:14:01 +0100 | [diff] [blame] | 281 | "root=/dev/mmcblk${mmcblkdev}p${mmcpart} ${rootfsmode} " \ |
| 282 | "rootwait\0" \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 283 | "mmcboot=echo Booting from mmc ...; " \ |
| 284 | "setenv bootargs; " \ |
| 285 | "run mmcargs; " \ |
| 286 | "run loadimage; " \ |
| 287 | "if run loadfdt; then " \ |
| 288 | "echo boot device tree kernel ...; " \ |
| 289 | "${boot_type} ${loadaddr} - ${fdt_addr}; " \ |
| 290 | "else " \ |
| 291 | "${boot_type}; " \ |
| 292 | "fi;\0" \ |
| 293 | "setenv bootargs \0" \ |
| 294 | "netdev=eth0\0" \ |
| 295 | "rootpath=/srv/nfs/tqma6\0" \ |
| 296 | "ipmode=static\0" \ |
Markus Niebel | 9e9846a | 2017-02-03 16:13:58 +0100 | [diff] [blame] | 297 | "netargs=run addnfs addip addtty addfb addcma\0" \ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 298 | "addnfs=setenv bootargs ${bootargs} " \ |
| 299 | "root=/dev/nfs rw " \ |
| 300 | "nfsroot=${serverip}:${rootpath},v3,tcp;\0" \ |
| 301 | "addip_static=setenv bootargs ${bootargs} " \ |
| 302 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ |
| 303 | "${hostname}:${netdev}:off\0" \ |
| 304 | "addip_dynamic=setenv bootargs ${bootargs} ip=dhcp\0" \ |
| 305 | "addip=if test \"${ipmode}\" != static; then " \ |
| 306 | "run addip_dynamic; else run addip_static; fi\0" \ |
| 307 | "set_getcmd=if test \"${ipmode}\" != static; then " \ |
| 308 | "setenv getcmd dhcp; setenv autoload yes; " \ |
| 309 | "else setenv getcmd tftp; setenv autoload no; fi\0" \ |
| 310 | "netboot=echo Booting from net ...; " \ |
| 311 | "run kernel_name; " \ |
| 312 | "run set_getcmd; " \ |
| 313 | "setenv bootargs; " \ |
| 314 | "run netargs; " \ |
| 315 | "if ${getcmd} ${kernel}; then " \ |
| 316 | "if ${getcmd} ${fdt_addr} ${fdt_file}; then " \ |
| 317 | "${boot_type} ${loadaddr} - ${fdt_addr}; " \ |
| 318 | "fi; " \ |
| 319 | "fi; " \ |
| 320 | "echo ... failed\0" \ |
| 321 | "panicboot=echo No boot device !!! reset\0" \ |
| 322 | TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \ |
| 323 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 324 | /* Physical Memory Map */ |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 325 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 326 | |
| 327 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 328 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 329 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 330 | |
| 331 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 332 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 333 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 334 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 335 | |
Stefan Roese | 6b396b3 | 2015-03-12 16:34:16 +0100 | [diff] [blame] | 336 | /* |
| 337 | * All the defines above are for the TQMa6 SoM |
| 338 | * |
| 339 | * Now include the baseboard specific configuration |
| 340 | */ |
| 341 | #ifdef CONFIG_MBA6 |
| 342 | #include "tqma6_mba6.h" |
Stefan Roese | 452308c | 2015-07-06 13:36:33 +0200 | [diff] [blame] | 343 | #elif CONFIG_WRU4 |
| 344 | #include "tqma6_wru4.h" |
Stefan Roese | 6b396b3 | 2015-03-12 16:34:16 +0100 | [diff] [blame] | 345 | #else |
| 346 | #error "No baseboard for the TQMa6 defined!" |
| 347 | #endif |
| 348 | |
| 349 | /* Support at least the sensor on TQMa6 SOM */ |
Stefan Roese | 6b396b3 | 2015-03-12 16:34:16 +0100 | [diff] [blame] | 350 | |
Markus Niebel | cb07d74 | 2014-07-18 16:52:44 +0200 | [diff] [blame] | 351 | #endif /* __CONFIG_H */ |