Convert CONFIG_SYS_LOAD_ADDR to Kconfig
[platform/kernel/u-boot.git] / include / configs / ge_bx50v3.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
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.
9  */
10
11 #ifndef __GE_BX50V3_CONFIG_H
12 #define __GE_BX50V3_CONFIG_H
13
14 #include <asm/arch/imx-regs.h>
15 #include <asm/mach-imx/gpio.h>
16
17 #define CONFIG_BOARD_NAME       "General Electric Bx50v3"
18
19 #include "mx6_common.h"
20 #include <linux/sizes.h>
21
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
28 /* SATA Configs */
29 #ifdef CONFIG_CMD_SATA
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
34 #endif
35
36 #ifdef CONFIG_CMD_NFS
37 #define NETWORKBOOT \
38         "setnetworkboot=" \
39                 "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \
40                 "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \
41                 "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \
42                 "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \
43                 "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \
44                 "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \
45                 "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \
46                 "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \
47         "networkboot=" \
48                 "run setnetworkboot; " \
49                 "nfs ${loadaddr} /srv/nfs/fitImage; " \
50                 "bootm ${loadaddr}\0" \
51
52 #define NETWORKBOOTCOMMAND \
53         "run networkboot; " \
54
55 #else
56 #define NETWORKBOOT \
57
58 #endif
59
60 #define CONFIG_EXTRA_ENV_SETTINGS \
61         NETWORKBOOT \
62         "image=/boot/fitImage\0" \
63         "dev=mmc\0" \
64         "devnum=2\0" \
65         "rootdev=mmcblk0p\0" \
66         "quiet=quiet loglevel=0\0" \
67         "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \
68                 "ro rootwait cma=128M " \
69                 "bootcause=${bootcause} " \
70                 "${quiet} " \
71                 "${videoargs}" "\0" \
72         "doquiet=" \
73                 "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
74                         "then setenv quiet; fi\0" \
75         "hasfirstboot=" \
76                 "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \
77         "swappartitions=" \
78                 "setexpr partnum 3 - ${partnum}\0" \
79         "failbootcmd=" \
80                 "cls; " \
81                 "setcurs 5 4; " \
82                 "lcdputs \"Monitor failed to start. " \
83                 "Try again, or contact GE Service for support.\"; " \
84                 "bootcount reset; " \
85                 "while true; do sleep 1; done; \0" \
86         "altbootcmd=" \
87                 "run doquiet; " \
88                 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
89                 "run hasfirstboot || setenv partnum 0; " \
90                 "if test ${partnum} != 0; then " \
91                         "run swappartitions loadimage doboot; " \
92                 "fi; " \
93                 "run failbootcmd\0" \
94         "loadimage=" \
95                 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
96         "doboot=" \
97                 "echo Booting from ${dev}:${devnum}:${partnum} ...; " \
98                 "run setargs; " \
99                 "bootm ${loadaddr}\0" \
100         "tryboot=" \
101                 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
102                 "run loadimage || run swappartitions && run loadimage || " \
103                         "setenv partnum 0 && echo MISSING IMAGE;" \
104                 "run doboot; " \
105                 "run failbootcmd\0" \
106
107 #define MMCBOOTCOMMAND \
108         "run doquiet; " \
109         "run tryboot; " \
110
111 #ifdef CONFIG_CMD_NFS
112 #define CONFIG_BOOTCOMMAND NETWORKBOOTCOMMAND
113 #else
114 #define CONFIG_BOOTCOMMAND MMCBOOTCOMMAND
115 #endif
116
117 /* Physical Memory Map */
118 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
119
120 #define CONFIG_SYS_BOOTMAPSZ (256 << 20)     /* 256M */
121
122 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
123 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
124 #define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
125
126 #define CONFIG_SYS_INIT_SP_OFFSET \
127         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
128 #define CONFIG_SYS_INIT_SP_ADDR \
129         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
130
131 /* environment organization */
132
133 #define CONFIG_SYS_FSL_USDHC_NUM        3
134
135 /* Framebuffer */
136 #define CONFIG_HIDE_LOGO_VERSION
137 #define CONFIG_IMX_HDMI
138 #define CONFIG_IMX_VIDEO_SKIP
139
140 #define CONFIG_IMX6_PWM_PER_CLK 66000000
141
142 #define CONFIG_PCI_SCAN_SHOW
143 #define CONFIG_PCIE_IMX
144 #define CONFIG_PCIE_IMX_POWER_GPIO      IMX_GPIO_NR(1, 5)
145
146 #endif  /* __GE_BX50V3_CONFIG_H */