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