]>
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 | |
f9162b15 | 26 | |
f9162b15 | 27 | /* SATA Configs */ |
aacc10c5 | 28 | #ifdef CONFIG_CMD_SATA |
f9162b15 AB |
29 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
30 | #define CONFIG_DWC_AHSATA_PORT_ID 0 | |
31 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR | |
32 | #define CONFIG_LBA48 | |
aacc10c5 | 33 | #endif |
f9162b15 | 34 | |
f2ac6f77 | 35 | #ifdef CONFIG_CMD_NFS |
b026c826 JA |
36 | #define NETWORKBOOT \ |
37 | "setnetworkboot=" \ | |
38 | "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \ | |
39 | "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \ | |
40 | "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \ | |
41 | "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \ | |
42 | "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \ | |
4f1970f4 | 43 | "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \ |
b026c826 JA |
44 | "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \ |
45 | "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \ | |
46 | "networkboot=" \ | |
47 | "run setnetworkboot; " \ | |
48 | "nfs ${loadaddr} /srv/nfs/fitImage; " \ | |
c44d374b | 49 | "bootm ${loadaddr}\0" \ |
b026c826 | 50 | |
7ae1b080 | 51 | #define NETWORKBOOTCOMMAND \ |
b026c826 JA |
52 | "run networkboot; " \ |
53 | ||
54 | #else | |
55 | #define NETWORKBOOT \ | |
56 | ||
57 | #endif | |
58 | ||
f9162b15 | 59 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
b026c826 | 60 | NETWORKBOOT \ |
f07b3148 | 61 | "image=/boot/fitImage\0" \ |
9e41b54a | 62 | "dev=mmc\0" \ |
efc260a9 | 63 | "devnum=2\0" \ |
9e41b54a IR |
64 | "rootdev=mmcblk0p\0" \ |
65 | "quiet=quiet loglevel=0\0" \ | |
9e41b54a IR |
66 | "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \ |
67 | "ro rootwait cma=128M " \ | |
68 | "bootcause=${bootcause} " \ | |
a707281a | 69 | "${quiet} " \ |
06a3e438 | 70 | "${videoargs}" "\0" \ |
9e41b54a IR |
71 | "doquiet=" \ |
72 | "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \ | |
73 | "then setenv quiet; fi\0" \ | |
74 | "hasfirstboot=" \ | |
5e13def1 | 75 | "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \ |
9e41b54a IR |
76 | "swappartitions=" \ |
77 | "setexpr partnum 3 - ${partnum}\0" \ | |
78 | "failbootcmd=" \ | |
92faf43b | 79 | "cls; " \ |
c6b31ca1 IR |
80 | "setcurs 5 4; " \ |
81 | "lcdputs \"Monitor failed to start. " \ | |
82 | "Try again, or contact GE Service for support.\"; " \ | |
3a543558 IR |
83 | "bootcount reset; " \ |
84 | "while true; do sleep 1; done; \0" \ | |
9e41b54a IR |
85 | "altbootcmd=" \ |
86 | "run doquiet; " \ | |
87 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ | |
88 | "run hasfirstboot || setenv partnum 0; " \ | |
89 | "if test ${partnum} != 0; then " \ | |
9e41b54a IR |
90 | "run swappartitions loadimage doboot; " \ |
91 | "fi; " \ | |
92 | "run failbootcmd\0" \ | |
f9162b15 AB |
93 | "loadimage=" \ |
94 | "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \ | |
9e41b54a IR |
95 | "doboot=" \ |
96 | "echo Booting from ${dev}:${devnum}:${partnum} ...; " \ | |
f9162b15 | 97 | "run setargs; " \ |
c44d374b | 98 | "bootm ${loadaddr}\0" \ |
9e41b54a IR |
99 | "tryboot=" \ |
100 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ | |
101 | "run loadimage || run swappartitions && run loadimage || " \ | |
ee77bb57 | 102 | "setenv partnum 0 && echo MISSING IMAGE;" \ |
9e41b54a IR |
103 | "run doboot; " \ |
104 | "run failbootcmd\0" \ | |
f9162b15 | 105 | |
7ae1b080 | 106 | #define MMCBOOTCOMMAND \ |
ee77bb57 IR |
107 | "run doquiet; " \ |
108 | "run tryboot; " \ | |
fc44902a | 109 | |
f2ac6f77 | 110 | #ifdef CONFIG_CMD_NFS |
7ae1b080 | 111 | #define CONFIG_BOOTCOMMAND NETWORKBOOTCOMMAND |
fc44902a | 112 | #else |
7ae1b080 | 113 | #define CONFIG_BOOTCOMMAND MMCBOOTCOMMAND |
fc44902a AS |
114 | #endif |
115 | ||
f9162b15 | 116 | /* Physical Memory Map */ |
f9162b15 AB |
117 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
118 | ||
a19d7370 IR |
119 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */ |
120 | ||
f9162b15 AB |
121 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
122 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR | |
123 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE | |
124 | ||
125 | #define CONFIG_SYS_INIT_SP_OFFSET \ | |
126 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) | |
127 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
128 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) | |
129 | ||
e856bdcf | 130 | /* environment organization */ |
f9162b15 | 131 | |
f9162b15 AB |
132 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
133 | ||
134 | /* Framebuffer */ | |
9e41b54a | 135 | #define CONFIG_HIDE_LOGO_VERSION |
f9162b15 AB |
136 | #define CONFIG_IMX_HDMI |
137 | #define CONFIG_IMX_VIDEO_SKIP | |
138 | ||
54971ac6 AB |
139 | #define CONFIG_IMX6_PWM_PER_CLK 66000000 |
140 | ||
f9162b15 AB |
141 | #define CONFIG_PCI_SCAN_SHOW |
142 | #define CONFIG_PCIE_IMX | |
f9162b15 | 143 | #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5) |
f9162b15 | 144 | |
f9162b15 | 145 | #endif /* __GE_BX50V3_CONFIG_H */ |