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_SPL_TARGET "u-boot-with-spl.imx"
19 #define CONFIG_IMX6_PWM_PER_CLK 66000000
22 #define CONFIG_MXC_UART_BASE UART3_BASE
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 */
28 /* UART3 requires CONFIG_DEBUG_UART_BASE=0x21ec000 */
29 #define CONSOLE_DEVICE "ttymxc2" /* Base board debug connector */
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
40 #define CONFIG_HIDE_LOGO_VERSION
41 #define CONFIG_IMX_VIDEO_SKIP
44 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
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
50 #define CONFIG_SYS_INIT_SP_OFFSET \
51 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
52 #define CONFIG_SYS_INIT_SP_ADDR \
53 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
55 /* Command definition */
56 #define CONFIG_EXTRA_ENV_SETTINGS \
57 "image=/boot/fitImage\0" \
58 "fdt_addr_r=0x18000000\0" \
59 "splash_addr_r=0x20000000\0" \
62 "console=console="CONSOLE_DEVICE",115200\0" \
63 "quiet=quiet loglevel=0\0" \
64 "rootdev=/dev/mmcblk1p\0" \
65 "setargs=setenv bootargs ${console} ${quiet} ${fsckforcerepair} " \
66 "bootcause=${bootcause} vt.global_cursor_default=0 vt.cur_default=1 " \
67 "root=${rootdev}${mmcpart} video=HDMI-A-1:${resolution} rootwait ro\0" \
68 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
69 "showsplashscreen=load mmc ${mmcdev}:${mmcpart} ${splash_addr_r} /boot/splashscreen-${resolution}.bmp; " \
70 "bmp display ${splash_addr_r};\0" \
72 "if test \"${devicetype}\" = \"B105v2\"; then " \
73 "setenv confidx 1; " \
74 "elif test \"${devicetype}\" = \"B125v2\"; then " \
75 "setenv confidx 2; " \
76 "elif test \"${devicetype}\" = \"B155v2\"; then " \
77 "setenv confidx 3; " \
78 "elif test \"${devicetype}\" = \"B105Pv2\"; then " \
79 "setenv confidx 4; " \
80 "elif test \"${devicetype}\" = \"B125Pv2\"; then " \
81 "setenv confidx 5; " \
83 "set_default_type=setenv devicetype B155v2; setenv resolution 1366x768;" \
84 "setenv fdtfile imx6dl-b155v2.dtb; run setconfidx;\0" \
85 "checkconfidx=env exists confidx || run set_default_type;\0" \
86 "checkfsckforcerepair=" \
87 "if test \"${bootcount}\" > \"3\" ; then " \
88 "setenv fsckforcerepair fsck.repair=1; " \
90 "helix=run setconfidx; run checkconfidx; run checkfsckforcerepair; run setargs; " \
91 "regulator dev LED_VCC; regulator enable; " \
92 "regulator dev 5V0_AUDIO; regulator enable; " \
93 "bootm ${loadaddr}#conf@${confidx};\0" \
95 "echo reached failbootcmd;" \
96 "cls; setcurs 5 4; " \
97 "lcdputs \"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
98 "bootcount reset; \0" \
100 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
101 "/boot/bootcause/firstboot;\0" \
103 "setexpr mmcpart 3 - ${mmcpart};\0" \
105 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
108 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
109 "run hasfirstboot || setenv mmcpart 0; " \
110 "if test ${mmcpart} != 0; then " \
111 "setenv bootcause REVERT; " \
112 "run swappartitions loadimage doboot; " \
114 "run failbootcmd\0" \
116 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
117 "run loadimage || run swappartitions && run loadimage || " \
118 "setenv mmcpart 0 && echo MISSING IMAGE;" \
119 "run showsplashscreen; sleep 1; " \
120 "run doboot; run failbootcmd;\0" \
122 #define CONFIG_BOOTCOMMAND "run tryboot;"
124 #endif /* __GE_B1X5V2_CONFIG_H */