]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
f9162b15 AB |
2 | /* |
3 | * Copyright (C) 2015 Timesys Corporation | |
4 | * Copyright (C) 2015 General Electric Company | |
5 | * Copyright (C) 2014 Advantech | |
6 | * Copyright (C) 2012 Freescale Semiconductor, Inc. | |
7 | * | |
8 | * Configuration settings for the GE MX6Q Bx50v3 boards. | |
f9162b15 AB |
9 | */ |
10 | ||
11 | #ifndef __GE_BX50V3_CONFIG_H | |
12 | #define __GE_BX50V3_CONFIG_H | |
13 | ||
14 | #include <asm/arch/imx-regs.h> | |
552a848e | 15 | #include <asm/mach-imx/gpio.h> |
f9162b15 | 16 | |
51a42bea | 17 | #define CONFIG_BOARD_NAME "General Electric Bx50v3" |
f9162b15 | 18 | |
f9162b15 AB |
19 | #include "mx6_common.h" |
20 | #include <linux/sizes.h> | |
21 | ||
f9162b15 AB |
22 | #define CONFIG_CMDLINE_TAG |
23 | #define CONFIG_SETUP_MEMORY_TAGS | |
24 | #define CONFIG_INITRD_TAG | |
25 | #define CONFIG_REVISION_TAG | |
26 | #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) | |
27 | ||
f9162b15 | 28 | /* SATA Configs */ |
aacc10c5 | 29 | #ifdef CONFIG_CMD_SATA |
f9162b15 AB |
30 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
31 | #define CONFIG_DWC_AHSATA_PORT_ID 0 | |
32 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR | |
33 | #define CONFIG_LBA48 | |
aacc10c5 | 34 | #endif |
f9162b15 | 35 | |
f9162b15 | 36 | /* Serial Flash */ |
f9162b15 | 37 | |
f9162b15 | 38 | #define CONFIG_LOADADDR 0x12000000 |
f9162b15 | 39 | |
f2ac6f77 | 40 | #ifdef CONFIG_CMD_NFS |
b026c826 JA |
41 | #define NETWORKBOOT \ |
42 | "setnetworkboot=" \ | |
43 | "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \ | |
44 | "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \ | |
45 | "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \ | |
46 | "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \ | |
47 | "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \ | |
4f1970f4 | 48 | "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \ |
b026c826 JA |
49 | "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \ |
50 | "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \ | |
51 | "networkboot=" \ | |
52 | "run setnetworkboot; " \ | |
53 | "nfs ${loadaddr} /srv/nfs/fitImage; " \ | |
c44d374b | 54 | "bootm ${loadaddr}\0" \ |
b026c826 | 55 | |
7ae1b080 | 56 | #define NETWORKBOOTCOMMAND \ |
b026c826 JA |
57 | "run networkboot; " \ |
58 | ||
59 | #else | |
60 | #define NETWORKBOOT \ | |
61 | ||
62 | #endif | |
63 | ||
f9162b15 | 64 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
b026c826 | 65 | NETWORKBOOT \ |
f07b3148 | 66 | "image=/boot/fitImage\0" \ |
9e41b54a | 67 | "dev=mmc\0" \ |
efc260a9 | 68 | "devnum=2\0" \ |
9e41b54a IR |
69 | "rootdev=mmcblk0p\0" \ |
70 | "quiet=quiet loglevel=0\0" \ | |
9e41b54a IR |
71 | "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \ |
72 | "ro rootwait cma=128M " \ | |
73 | "bootcause=${bootcause} " \ | |
a707281a | 74 | "${quiet} " \ |
06a3e438 | 75 | "${videoargs}" "\0" \ |
9e41b54a IR |
76 | "doquiet=" \ |
77 | "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \ | |
78 | "then setenv quiet; fi\0" \ | |
79 | "hasfirstboot=" \ | |
5e13def1 | 80 | "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \ |
9e41b54a IR |
81 | "swappartitions=" \ |
82 | "setexpr partnum 3 - ${partnum}\0" \ | |
83 | "failbootcmd=" \ | |
92faf43b | 84 | "cls; " \ |
c6b31ca1 IR |
85 | "setcurs 5 4; " \ |
86 | "lcdputs \"Monitor failed to start. " \ | |
87 | "Try again, or contact GE Service for support.\"; " \ | |
3a543558 IR |
88 | "bootcount reset; " \ |
89 | "while true; do sleep 1; done; \0" \ | |
9e41b54a IR |
90 | "altbootcmd=" \ |
91 | "run doquiet; " \ | |
92 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ | |
93 | "run hasfirstboot || setenv partnum 0; " \ | |
94 | "if test ${partnum} != 0; then " \ | |
9e41b54a IR |
95 | "run swappartitions loadimage doboot; " \ |
96 | "fi; " \ | |
97 | "run failbootcmd\0" \ | |
f9162b15 AB |
98 | "loadimage=" \ |
99 | "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \ | |
9e41b54a IR |
100 | "doboot=" \ |
101 | "echo Booting from ${dev}:${devnum}:${partnum} ...; " \ | |
f9162b15 | 102 | "run setargs; " \ |
c44d374b | 103 | "bootm ${loadaddr}\0" \ |
9e41b54a IR |
104 | "tryboot=" \ |
105 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ | |
106 | "run loadimage || run swappartitions && run loadimage || " \ | |
ee77bb57 | 107 | "setenv partnum 0 && echo MISSING IMAGE;" \ |
9e41b54a IR |
108 | "run doboot; " \ |
109 | "run failbootcmd\0" \ | |
f9162b15 | 110 | |
7ae1b080 | 111 | #define MMCBOOTCOMMAND \ |
ee77bb57 IR |
112 | "run doquiet; " \ |
113 | "run tryboot; " \ | |
fc44902a | 114 | |
f2ac6f77 | 115 | #ifdef CONFIG_CMD_NFS |
7ae1b080 | 116 | #define CONFIG_BOOTCOMMAND NETWORKBOOTCOMMAND |
fc44902a | 117 | #else |
7ae1b080 | 118 | #define CONFIG_BOOTCOMMAND MMCBOOTCOMMAND |
fc44902a AS |
119 | #endif |
120 | ||
f9162b15 AB |
121 | |
122 | /* Miscellaneous configurable options */ | |
f9162b15 | 123 | |
f9162b15 AB |
124 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
125 | ||
f9162b15 | 126 | /* Physical Memory Map */ |
f9162b15 AB |
127 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
128 | ||
a19d7370 IR |
129 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */ |
130 | ||
f9162b15 AB |
131 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
132 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR | |
133 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE | |
134 | ||
135 | #define CONFIG_SYS_INIT_SP_OFFSET \ | |
136 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) | |
137 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
138 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) | |
139 | ||
e856bdcf | 140 | /* environment organization */ |
f9162b15 | 141 | |
f9162b15 AB |
142 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
143 | ||
144 | /* Framebuffer */ | |
9e41b54a | 145 | #define CONFIG_HIDE_LOGO_VERSION |
f9162b15 AB |
146 | #define CONFIG_IMX_HDMI |
147 | #define CONFIG_IMX_VIDEO_SKIP | |
148 | ||
54971ac6 AB |
149 | #define CONFIG_IMX6_PWM_PER_CLK 66000000 |
150 | ||
f9162b15 AB |
151 | #define CONFIG_PCI_SCAN_SHOW |
152 | #define CONFIG_PCIE_IMX | |
f9162b15 | 153 | #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5) |
f9162b15 | 154 | |
f9162b15 | 155 | #endif /* __GE_BX50V3_CONFIG_H */ |