blob: b4f94992e64621a62b64a71709fc5772ecd2c1a1 [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
15#include "imx6_spl.h"
16#define CONFIG_SPL_TARGET "u-boot-with-spl.imx"
17
Sebastian Reichel64272ef2020-09-02 19:31:46 +020018/* PWM */
19#define CONFIG_IMX6_PWM_PER_CLK 66000000
20
21/* UART */
22#define CONFIG_MXC_UART_BASE UART3_BASE
23
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 */
27#else
28/* UART3 requires CONFIG_DEBUG_UART_BASE=0x21ec000 */
29#define CONSOLE_DEVICE "ttymxc2" /* Base board debug connector */
30#endif
31
32/* USB */
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
38
39/* Video */
40#define CONFIG_HIDE_LOGO_VERSION
41#define CONFIG_IMX_VIDEO_SKIP
42
43/* Memory */
44#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
45
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
49
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)
54
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" \
60 "mmcdev=2\0" \
61 "mmcpart=1\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" \
71 "setconfidx=" \
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; " \
82 "fi;\0" \
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; " \
89 "fi;\0" \
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" \
94 "failbootcmd=" \
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" \
99 "hasfirstboot=" \
100 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
101 "/boot/bootcause/firstboot;\0" \
102 "swappartitions=" \
103 "setexpr mmcpart 3 - ${mmcpart};\0" \
104 "doboot=" \
105 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
106 "run helix;\0" \
107 "altbootcmd=" \
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; " \
113 "fi; " \
114 "run failbootcmd\0" \
115 "tryboot=" \
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" \
121
Sebastian Reichel64272ef2020-09-02 19:31:46 +0200122#endif /* __GE_B1X5V2_CONFIG_H */