4 * Copyright 2018-2020 GE Inc.
5 * Copyright 2018-2020 Collabora Ltd.
7 * SPDX-License-Identifier: GPL-2.0+
10 #ifndef __GE_B1X5V2_CONFIG_H
11 #define __GE_B1X5V2_CONFIG_H
13 #include "mx6_common.h"
16 #define CONFIG_MXC_UART_BASE UART3_BASE
18 #if CONFIG_MXC_UART_BASE == UART2_BASE
19 /* UART2 requires CONFIG_DEBUG_UART_BASE=0x21e8000 */
20 #define CONSOLE_DEVICE "ttymxc1" /* System on Module debug connector */
22 /* UART3 requires CONFIG_DEBUG_UART_BASE=0x21ec000 */
23 #define CONSOLE_DEVICE "ttymxc2" /* Base board debug connector */
27 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
28 #define CONFIG_MXC_USB_FLAGS 0
29 #define CONFIG_USBD_HS
32 #define CONFIG_IMX_VIDEO_SKIP
35 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
37 #define CFG_SYS_SDRAM_BASE PHYS_SDRAM
38 #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
39 #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
41 /* Command definition */
42 #define CONFIG_EXTRA_ENV_SETTINGS \
43 "image=/boot/fitImage\0" \
44 "fdt_addr_r=0x18000000\0" \
45 "splash_addr_r=0x20000000\0" \
48 "console=console="CONSOLE_DEVICE",115200\0" \
49 "quiet=quiet loglevel=0\0" \
50 "rootdev=/dev/mmcblk1p\0" \
51 "setargs=setenv bootargs ${console} ${quiet} ${fsckforcerepair} " \
52 "bootcause=${bootcause} vt.global_cursor_default=0 vt.cur_default=1 " \
53 "root=${rootdev}${mmcpart} video=HDMI-A-1:${resolution} rootwait ro\0" \
54 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
55 "showsplashscreen=load mmc ${mmcdev}:${mmcpart} ${splash_addr_r} /boot/splashscreen-${resolution}.bmp; " \
56 "bmp display ${splash_addr_r};\0" \
58 "if test \"${devicetype}\" = \"B105v2\"; then " \
59 "setenv confidx 1; " \
60 "elif test \"${devicetype}\" = \"B125v2\"; then " \
61 "setenv confidx 2; " \
62 "elif test \"${devicetype}\" = \"B155v2\"; then " \
63 "setenv confidx 3; " \
64 "elif test \"${devicetype}\" = \"B105Pv2\"; then " \
65 "setenv confidx 4; " \
66 "elif test \"${devicetype}\" = \"B125Pv2\"; then " \
67 "setenv confidx 5; " \
69 "set_default_type=setenv devicetype B155v2; setenv resolution 1366x768;" \
70 "setenv fdtfile imx6dl-b155v2.dtb; run setconfidx;\0" \
71 "checkconfidx=env exists confidx || run set_default_type;\0" \
72 "checkfsckforcerepair=" \
73 "if test \"${bootcount}\" > \"3\" ; then " \
74 "setenv fsckforcerepair fsck.repair=1; " \
76 "helix=run setconfidx; run checkconfidx; run checkfsckforcerepair; run setargs; " \
77 "regulator dev LED_VCC; regulator enable; " \
78 "regulator dev 5V0_AUDIO; regulator enable; " \
79 "bootm ${loadaddr}#conf@${confidx};\0" \
81 "echo reached failbootcmd;" \
82 "cls; setcurs 5 4; " \
83 "lcdputs \"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
84 "bootcount reset; \0" \
86 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
87 "/boot/bootcause/firstboot;\0" \
89 "setexpr mmcpart 3 - ${mmcpart};\0" \
91 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
94 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
95 "run hasfirstboot || setenv mmcpart 0; " \
96 "if test ${mmcpart} != 0; then " \
97 "setenv bootcause REVERT; " \
98 "run swappartitions loadimage doboot; " \
100 "run failbootcmd\0" \
102 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
103 "run loadimage || run swappartitions && run loadimage || " \
104 "setenv mmcpart 0 && echo MISSING IMAGE;" \
105 "run showsplashscreen; sleep 1; " \
106 "run doboot; run failbootcmd;\0" \
108 #endif /* __GE_B1X5V2_CONFIG_H */