Migrate CUSTOM_SYS_INIT_SP_ADDR to Kconfig using system-constants.h
[platform/kernel/u-boot.git] / include / configs / ge_b1x5v2.h
1 /*
2  * GE B1x5v2
3  *
4  * Copyright 2018-2020 GE Inc.
5  * Copyright 2018-2020 Collabora Ltd.
6  *
7  * SPDX-License-Identifier:    GPL-2.0+
8  */
9
10 #ifndef __GE_B1X5V2_CONFIG_H
11 #define __GE_B1X5V2_CONFIG_H
12
13 #include "mx6_common.h"
14
15 #include "imx6_spl.h"
16 #define CONFIG_SPL_TARGET               "u-boot-with-spl.imx"
17
18 /* PWM */
19 #define CONFIG_IMX6_PWM_PER_CLK         66000000
20
21 /* UART */
22 #define CONFIG_MXC_UART_BASE            UART3_BASE
23
24 #if CONFIG_MXC_UART_BASE == UART2_BASE
25 /* UART2 requires CONFIG_DEBUG_UART_BASE=0x21e8000 */
26 #define CONSOLE_DEVICE "ttymxc1" /* System on Module debug connector */
27 #else
28 /* UART3 requires CONFIG_DEBUG_UART_BASE=0x21ec000 */
29 #define CONSOLE_DEVICE "ttymxc2" /* Base board debug connector */
30 #endif
31
32 /* USB */
33 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
34 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
35 #define CONFIG_MXC_USB_FLAGS            0
36 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */
37 #define CONFIG_USBD_HS
38
39 /* Video */
40 #define CONFIG_HIDE_LOGO_VERSION
41 #define CONFIG_IMX_VIDEO_SKIP
42
43 /* Memory */
44 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
45
46 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
47 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
48 #define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
49
50 /* Command definition */
51 #define CONFIG_EXTRA_ENV_SETTINGS \
52         "image=/boot/fitImage\0" \
53         "fdt_addr_r=0x18000000\0" \
54         "splash_addr_r=0x20000000\0" \
55         "mmcdev=2\0" \
56         "mmcpart=1\0" \
57         "console=console="CONSOLE_DEVICE",115200\0" \
58         "quiet=quiet loglevel=0\0" \
59         "rootdev=/dev/mmcblk1p\0" \
60         "setargs=setenv bootargs ${console} ${quiet} ${fsckforcerepair} " \
61                 "bootcause=${bootcause} vt.global_cursor_default=0 vt.cur_default=1 " \
62                 "root=${rootdev}${mmcpart} video=HDMI-A-1:${resolution} rootwait ro\0" \
63         "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
64         "showsplashscreen=load mmc ${mmcdev}:${mmcpart} ${splash_addr_r} /boot/splashscreen-${resolution}.bmp; " \
65                 "bmp display ${splash_addr_r};\0" \
66         "setconfidx=" \
67                 "if test \"${devicetype}\" = \"B105v2\"; then " \
68                         "setenv confidx 1; " \
69                 "elif test \"${devicetype}\" = \"B125v2\"; then " \
70                         "setenv confidx 2; " \
71                 "elif test \"${devicetype}\" = \"B155v2\"; then " \
72                         "setenv confidx 3; " \
73                 "elif test \"${devicetype}\" = \"B105Pv2\"; then " \
74                         "setenv confidx 4; " \
75                 "elif test \"${devicetype}\" = \"B125Pv2\"; then " \
76                         "setenv confidx 5; " \
77                 "fi;\0" \
78         "set_default_type=setenv devicetype B155v2; setenv resolution 1366x768;" \
79                 "setenv fdtfile imx6dl-b155v2.dtb; run setconfidx;\0" \
80         "checkconfidx=env exists confidx || run set_default_type;\0" \
81         "checkfsckforcerepair=" \
82                 "if test \"${bootcount}\" > \"3\" ; then " \
83                         "setenv fsckforcerepair fsck.repair=1; " \
84                 "fi;\0" \
85         "helix=run setconfidx; run checkconfidx; run checkfsckforcerepair; run setargs; " \
86                 "regulator dev LED_VCC; regulator enable; " \
87                 "regulator dev 5V0_AUDIO; regulator enable; " \
88                 "bootm ${loadaddr}#conf@${confidx};\0" \
89         "failbootcmd=" \
90                 "echo reached failbootcmd;" \
91                 "cls; setcurs 5 4; " \
92                 "lcdputs \"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
93                 "bootcount reset; \0" \
94         "hasfirstboot=" \
95                 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
96                 "/boot/bootcause/firstboot;\0" \
97         "swappartitions=" \
98                 "setexpr mmcpart 3 - ${mmcpart};\0" \
99         "doboot=" \
100                 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
101                 "run helix;\0" \
102         "altbootcmd=" \
103                 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
104                 "run hasfirstboot || setenv mmcpart 0; " \
105                 "if test ${mmcpart} != 0; then " \
106                         "setenv bootcause REVERT; " \
107                         "run swappartitions loadimage doboot; " \
108                 "fi; " \
109                 "run failbootcmd\0" \
110         "tryboot=" \
111                 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
112                 "run loadimage || run swappartitions && run loadimage || " \
113                 "setenv mmcpart 0 && echo MISSING IMAGE;" \
114                 "run showsplashscreen; sleep 1; " \
115                 "run doboot; run failbootcmd;\0" \
116
117 #endif /* __GE_B1X5V2_CONFIG_H */