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"
18 #define CONFIG_IMX6_PWM_PER_CLK 66000000
21 #define CONFIG_MXC_UART_BASE UART3_BASE
23 #if CONFIG_MXC_UART_BASE == UART2_BASE
24 /* UART2 requires CONFIG_DEBUG_UART_BASE=0x21e8000 */
25 #define CONSOLE_DEVICE "ttymxc1" /* System on Module debug connector */
27 /* UART3 requires CONFIG_DEBUG_UART_BASE=0x21ec000 */
28 #define CONSOLE_DEVICE "ttymxc2" /* Base board debug connector */
32 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
33 #define CONFIG_MXC_USB_FLAGS 0
34 #define CONFIG_USBD_HS
37 #define CONFIG_HIDE_LOGO_VERSION
38 #define CONFIG_IMX_VIDEO_SKIP
41 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
43 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
44 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
45 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
47 /* Command definition */
48 #define CONFIG_EXTRA_ENV_SETTINGS \
49 "image=/boot/fitImage\0" \
50 "fdt_addr_r=0x18000000\0" \
51 "splash_addr_r=0x20000000\0" \
54 "console=console="CONSOLE_DEVICE",115200\0" \
55 "quiet=quiet loglevel=0\0" \
56 "rootdev=/dev/mmcblk1p\0" \
57 "setargs=setenv bootargs ${console} ${quiet} ${fsckforcerepair} " \
58 "bootcause=${bootcause} vt.global_cursor_default=0 vt.cur_default=1 " \
59 "root=${rootdev}${mmcpart} video=HDMI-A-1:${resolution} rootwait ro\0" \
60 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
61 "showsplashscreen=load mmc ${mmcdev}:${mmcpart} ${splash_addr_r} /boot/splashscreen-${resolution}.bmp; " \
62 "bmp display ${splash_addr_r};\0" \
64 "if test \"${devicetype}\" = \"B105v2\"; then " \
65 "setenv confidx 1; " \
66 "elif test \"${devicetype}\" = \"B125v2\"; then " \
67 "setenv confidx 2; " \
68 "elif test \"${devicetype}\" = \"B155v2\"; then " \
69 "setenv confidx 3; " \
70 "elif test \"${devicetype}\" = \"B105Pv2\"; then " \
71 "setenv confidx 4; " \
72 "elif test \"${devicetype}\" = \"B125Pv2\"; then " \
73 "setenv confidx 5; " \
75 "set_default_type=setenv devicetype B155v2; setenv resolution 1366x768;" \
76 "setenv fdtfile imx6dl-b155v2.dtb; run setconfidx;\0" \
77 "checkconfidx=env exists confidx || run set_default_type;\0" \
78 "checkfsckforcerepair=" \
79 "if test \"${bootcount}\" > \"3\" ; then " \
80 "setenv fsckforcerepair fsck.repair=1; " \
82 "helix=run setconfidx; run checkconfidx; run checkfsckforcerepair; run setargs; " \
83 "regulator dev LED_VCC; regulator enable; " \
84 "regulator dev 5V0_AUDIO; regulator enable; " \
85 "bootm ${loadaddr}#conf@${confidx};\0" \
87 "echo reached failbootcmd;" \
88 "cls; setcurs 5 4; " \
89 "lcdputs \"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
90 "bootcount reset; \0" \
92 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
93 "/boot/bootcause/firstboot;\0" \
95 "setexpr mmcpart 3 - ${mmcpart};\0" \
97 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
100 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
101 "run hasfirstboot || setenv mmcpart 0; " \
102 "if test ${mmcpart} != 0; then " \
103 "setenv bootcause REVERT; " \
104 "run swappartitions loadimage doboot; " \
106 "run failbootcmd\0" \
108 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
109 "run loadimage || run swappartitions && run loadimage || " \
110 "setenv mmcpart 0 && echo MISSING IMAGE;" \
111 "run showsplashscreen; sleep 1; " \
112 "run doboot; run failbootcmd;\0" \
114 #endif /* __GE_B1X5V2_CONFIG_H */