ef672a27b7da5446a81eacf05a195a09869b7a85
[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
27 /* SATA Configs */
28 #ifdef CONFIG_CMD_SATA
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
33 #endif
34
35 #ifdef CONFIG_CMD_NFS
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 " \
43                 "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \
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; " \
49                 "bootm ${loadaddr}\0" \
50
51 #define NETWORKBOOTCOMMAND \
52         "run networkboot; " \
53
54 #else
55 #define NETWORKBOOT \
56
57 #endif
58
59 #define CONFIG_EXTRA_ENV_SETTINGS \
60         NETWORKBOOT \
61         "image=/boot/fitImage\0" \
62         "dev=mmc\0" \
63         "devnum=2\0" \
64         "rootdev=mmcblk0p\0" \
65         "quiet=quiet loglevel=0\0" \
66         "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \
67                 "ro rootwait cma=128M " \
68                 "bootcause=${bootcause} " \
69                 "${quiet} " \
70                 "${videoargs}" "\0" \
71         "doquiet=" \
72                 "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
73                         "then setenv quiet; fi\0" \
74         "hasfirstboot=" \
75                 "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \
76         "swappartitions=" \
77                 "setexpr partnum 3 - ${partnum}\0" \
78         "failbootcmd=" \
79                 "cls; " \
80                 "setcurs 5 4; " \
81                 "lcdputs \"Monitor failed to start. " \
82                 "Try again, or contact GE Service for support.\"; " \
83                 "bootcount reset; " \
84                 "while true; do sleep 1; done; \0" \
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 " \
90                         "run swappartitions loadimage doboot; " \
91                 "fi; " \
92                 "run failbootcmd\0" \
93         "loadimage=" \
94                 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
95         "doboot=" \
96                 "echo Booting from ${dev}:${devnum}:${partnum} ...; " \
97                 "run setargs; " \
98                 "bootm ${loadaddr}\0" \
99         "tryboot=" \
100                 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
101                 "run loadimage || run swappartitions && run loadimage || " \
102                         "setenv partnum 0 && echo MISSING IMAGE;" \
103                 "run doboot; " \
104                 "run failbootcmd\0" \
105
106 #define MMCBOOTCOMMAND \
107         "run doquiet; " \
108         "run tryboot; " \
109
110 #ifdef CONFIG_CMD_NFS
111 #define CONFIG_BOOTCOMMAND NETWORKBOOTCOMMAND
112 #else
113 #define CONFIG_BOOTCOMMAND MMCBOOTCOMMAND
114 #endif
115
116 /* Physical Memory Map */
117 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
118
119 #define CONFIG_SYS_BOOTMAPSZ (256 << 20)     /* 256M */
120
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
130 /* environment organization */
131
132 #define CONFIG_SYS_FSL_USDHC_NUM        3
133
134 /* Framebuffer */
135 #define CONFIG_HIDE_LOGO_VERSION
136 #define CONFIG_IMX_HDMI
137 #define CONFIG_IMX_VIDEO_SKIP
138
139 #define CONFIG_IMX6_PWM_PER_CLK 66000000
140
141 #define CONFIG_PCI_SCAN_SHOW
142 #define CONFIG_PCIE_IMX
143 #define CONFIG_PCIE_IMX_POWER_GPIO      IMX_GPIO_NR(1, 5)
144
145 #endif  /* __GE_BX50V3_CONFIG_H */