blob: 0523ff9a64b8b12149ac957cf4adb1ef0974769d [file] [log] [blame]
Sebastian Reichel64272ef2020-09-02 19:31:46 +02001/*
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
Sebastian Reichel64272ef2020-09-02 19:31:46 +020015/* UART */
16#define CONFIG_MXC_UART_BASE UART3_BASE
17
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 */
21#else
22/* UART3 requires CONFIG_DEBUG_UART_BASE=0x21ec000 */
23#define CONSOLE_DEVICE "ttymxc2" /* Base board debug connector */
24#endif
25
26/* USB */
Sebastian Reichel64272ef2020-09-02 19:31:46 +020027#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
28#define CONFIG_MXC_USB_FLAGS 0
Sebastian Reichel64272ef2020-09-02 19:31:46 +020029
Sebastian Reichel64272ef2020-09-02 19:31:46 +020030/* Memory */
31#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
32
Tom Riniaa6e94d2022-11-16 13:10:37 -050033#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini65cc0e22022-11-16 13:10:41 -050034#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
35#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Sebastian Reichel64272ef2020-09-02 19:31:46 +020036
Sebastian Reichel64272ef2020-09-02 19:31:46 +020037/* Command definition */
Tom Rini0613c362022-12-04 10:03:50 -050038#define CFG_EXTRA_ENV_SETTINGS \
Sebastian Reichel64272ef2020-09-02 19:31:46 +020039 "image=/boot/fitImage\0" \
40 "fdt_addr_r=0x18000000\0" \
41 "splash_addr_r=0x20000000\0" \
42 "mmcdev=2\0" \
43 "mmcpart=1\0" \
44 "console=console="CONSOLE_DEVICE",115200\0" \
45 "quiet=quiet loglevel=0\0" \
46 "rootdev=/dev/mmcblk1p\0" \
47 "setargs=setenv bootargs ${console} ${quiet} ${fsckforcerepair} " \
48 "bootcause=${bootcause} vt.global_cursor_default=0 vt.cur_default=1 " \
49 "root=${rootdev}${mmcpart} video=HDMI-A-1:${resolution} rootwait ro\0" \
50 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
51 "showsplashscreen=load mmc ${mmcdev}:${mmcpart} ${splash_addr_r} /boot/splashscreen-${resolution}.bmp; " \
52 "bmp display ${splash_addr_r};\0" \
53 "setconfidx=" \
54 "if test \"${devicetype}\" = \"B105v2\"; then " \
55 "setenv confidx 1; " \
56 "elif test \"${devicetype}\" = \"B125v2\"; then " \
57 "setenv confidx 2; " \
58 "elif test \"${devicetype}\" = \"B155v2\"; then " \
59 "setenv confidx 3; " \
60 "elif test \"${devicetype}\" = \"B105Pv2\"; then " \
61 "setenv confidx 4; " \
62 "elif test \"${devicetype}\" = \"B125Pv2\"; then " \
63 "setenv confidx 5; " \
64 "fi;\0" \
65 "set_default_type=setenv devicetype B155v2; setenv resolution 1366x768;" \
66 "setenv fdtfile imx6dl-b155v2.dtb; run setconfidx;\0" \
67 "checkconfidx=env exists confidx || run set_default_type;\0" \
68 "checkfsckforcerepair=" \
69 "if test \"${bootcount}\" > \"3\" ; then " \
70 "setenv fsckforcerepair fsck.repair=1; " \
71 "fi;\0" \
72 "helix=run setconfidx; run checkconfidx; run checkfsckforcerepair; run setargs; " \
73 "regulator dev LED_VCC; regulator enable; " \
74 "regulator dev 5V0_AUDIO; regulator enable; " \
75 "bootm ${loadaddr}#conf@${confidx};\0" \
76 "failbootcmd=" \
77 "echo reached failbootcmd;" \
78 "cls; setcurs 5 4; " \
79 "lcdputs \"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
80 "bootcount reset; \0" \
81 "hasfirstboot=" \
82 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
83 "/boot/bootcause/firstboot;\0" \
84 "swappartitions=" \
85 "setexpr mmcpart 3 - ${mmcpart};\0" \
86 "doboot=" \
87 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
88 "run helix;\0" \
89 "altbootcmd=" \
90 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
91 "run hasfirstboot || setenv mmcpart 0; " \
92 "if test ${mmcpart} != 0; then " \
93 "setenv bootcause REVERT; " \
94 "run swappartitions loadimage doboot; " \
95 "fi; " \
96 "run failbootcmd\0" \
97 "tryboot=" \
98 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
99 "run loadimage || run swappartitions && run loadimage || " \
100 "setenv mmcpart 0 && echo MISSING IMAGE;" \
101 "run showsplashscreen; sleep 1; " \
102 "run doboot; run failbootcmd;\0" \
103
Sebastian Reichel64272ef2020-09-02 19:31:46 +0200104#endif /* __GE_B1X5V2_CONFIG_H */