blob: 1458b187de28e99770bf61a6baca46babd7b32cf [file] [log] [blame]
Sebastian Reichel7cab6fe2020-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 Reichel7cab6fe2020-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 Reichel7cab6fe2020-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 Reichel7cab6fe2020-09-02 19:31:46 +020029#define CONFIG_USBD_HS
30
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +020031/* Memory */
32#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
33
Tom Rinibb4dd962022-11-16 13:10:37 -050034#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini6a5dccc2022-11-16 13:10:41 -050035#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
36#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +020037
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +020038/* Command definition */
39#define CONFIG_EXTRA_ENV_SETTINGS \
40 "image=/boot/fitImage\0" \
41 "fdt_addr_r=0x18000000\0" \
42 "splash_addr_r=0x20000000\0" \
43 "mmcdev=2\0" \
44 "mmcpart=1\0" \
45 "console=console="CONSOLE_DEVICE",115200\0" \
46 "quiet=quiet loglevel=0\0" \
47 "rootdev=/dev/mmcblk1p\0" \
48 "setargs=setenv bootargs ${console} ${quiet} ${fsckforcerepair} " \
49 "bootcause=${bootcause} vt.global_cursor_default=0 vt.cur_default=1 " \
50 "root=${rootdev}${mmcpart} video=HDMI-A-1:${resolution} rootwait ro\0" \
51 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
52 "showsplashscreen=load mmc ${mmcdev}:${mmcpart} ${splash_addr_r} /boot/splashscreen-${resolution}.bmp; " \
53 "bmp display ${splash_addr_r};\0" \
54 "setconfidx=" \
55 "if test \"${devicetype}\" = \"B105v2\"; then " \
56 "setenv confidx 1; " \
57 "elif test \"${devicetype}\" = \"B125v2\"; then " \
58 "setenv confidx 2; " \
59 "elif test \"${devicetype}\" = \"B155v2\"; then " \
60 "setenv confidx 3; " \
61 "elif test \"${devicetype}\" = \"B105Pv2\"; then " \
62 "setenv confidx 4; " \
63 "elif test \"${devicetype}\" = \"B125Pv2\"; then " \
64 "setenv confidx 5; " \
65 "fi;\0" \
66 "set_default_type=setenv devicetype B155v2; setenv resolution 1366x768;" \
67 "setenv fdtfile imx6dl-b155v2.dtb; run setconfidx;\0" \
68 "checkconfidx=env exists confidx || run set_default_type;\0" \
69 "checkfsckforcerepair=" \
70 "if test \"${bootcount}\" > \"3\" ; then " \
71 "setenv fsckforcerepair fsck.repair=1; " \
72 "fi;\0" \
73 "helix=run setconfidx; run checkconfidx; run checkfsckforcerepair; run setargs; " \
74 "regulator dev LED_VCC; regulator enable; " \
75 "regulator dev 5V0_AUDIO; regulator enable; " \
76 "bootm ${loadaddr}#conf@${confidx};\0" \
77 "failbootcmd=" \
78 "echo reached failbootcmd;" \
79 "cls; setcurs 5 4; " \
80 "lcdputs \"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
81 "bootcount reset; \0" \
82 "hasfirstboot=" \
83 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
84 "/boot/bootcause/firstboot;\0" \
85 "swappartitions=" \
86 "setexpr mmcpart 3 - ${mmcpart};\0" \
87 "doboot=" \
88 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
89 "run helix;\0" \
90 "altbootcmd=" \
91 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
92 "run hasfirstboot || setenv mmcpart 0; " \
93 "if test ${mmcpart} != 0; then " \
94 "setenv bootcause REVERT; " \
95 "run swappartitions loadimage doboot; " \
96 "fi; " \
97 "run failbootcmd\0" \
98 "tryboot=" \
99 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
100 "run loadimage || run swappartitions && run loadimage || " \
101 "setenv mmcpart 0 && echo MISSING IMAGE;" \
102 "run showsplashscreen; sleep 1; " \
103 "run doboot; run failbootcmd;\0" \
104
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +0200105#endif /* __GE_B1X5V2_CONFIG_H */