blob: 252ab5e7473d1e6c69a33064c8d68b66a656b320 [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
15#include "imx6_spl.h"
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +020016
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +020017/* PWM */
18#define CONFIG_IMX6_PWM_PER_CLK 66000000
19
20/* UART */
21#define CONFIG_MXC_UART_BASE UART3_BASE
22
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 */
26#else
27/* UART3 requires CONFIG_DEBUG_UART_BASE=0x21ec000 */
28#define CONSOLE_DEVICE "ttymxc2" /* Base board debug connector */
29#endif
30
31/* USB */
32#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
33#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
34#define CONFIG_MXC_USB_FLAGS 0
35#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */
36#define CONFIG_USBD_HS
37
38/* Video */
39#define CONFIG_HIDE_LOGO_VERSION
40#define CONFIG_IMX_VIDEO_SKIP
41
42/* Memory */
43#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
44
45#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
46#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
47#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
48
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +020049/* Command definition */
50#define CONFIG_EXTRA_ENV_SETTINGS \
51 "image=/boot/fitImage\0" \
52 "fdt_addr_r=0x18000000\0" \
53 "splash_addr_r=0x20000000\0" \
54 "mmcdev=2\0" \
55 "mmcpart=1\0" \
56 "console=console="CONSOLE_DEVICE",115200\0" \
57 "quiet=quiet loglevel=0\0" \
58 "rootdev=/dev/mmcblk1p\0" \
59 "setargs=setenv bootargs ${console} ${quiet} ${fsckforcerepair} " \
60 "bootcause=${bootcause} vt.global_cursor_default=0 vt.cur_default=1 " \
61 "root=${rootdev}${mmcpart} video=HDMI-A-1:${resolution} rootwait ro\0" \
62 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
63 "showsplashscreen=load mmc ${mmcdev}:${mmcpart} ${splash_addr_r} /boot/splashscreen-${resolution}.bmp; " \
64 "bmp display ${splash_addr_r};\0" \
65 "setconfidx=" \
66 "if test \"${devicetype}\" = \"B105v2\"; then " \
67 "setenv confidx 1; " \
68 "elif test \"${devicetype}\" = \"B125v2\"; then " \
69 "setenv confidx 2; " \
70 "elif test \"${devicetype}\" = \"B155v2\"; then " \
71 "setenv confidx 3; " \
72 "elif test \"${devicetype}\" = \"B105Pv2\"; then " \
73 "setenv confidx 4; " \
74 "elif test \"${devicetype}\" = \"B125Pv2\"; then " \
75 "setenv confidx 5; " \
76 "fi;\0" \
77 "set_default_type=setenv devicetype B155v2; setenv resolution 1366x768;" \
78 "setenv fdtfile imx6dl-b155v2.dtb; run setconfidx;\0" \
79 "checkconfidx=env exists confidx || run set_default_type;\0" \
80 "checkfsckforcerepair=" \
81 "if test \"${bootcount}\" > \"3\" ; then " \
82 "setenv fsckforcerepair fsck.repair=1; " \
83 "fi;\0" \
84 "helix=run setconfidx; run checkconfidx; run checkfsckforcerepair; run setargs; " \
85 "regulator dev LED_VCC; regulator enable; " \
86 "regulator dev 5V0_AUDIO; regulator enable; " \
87 "bootm ${loadaddr}#conf@${confidx};\0" \
88 "failbootcmd=" \
89 "echo reached failbootcmd;" \
90 "cls; setcurs 5 4; " \
91 "lcdputs \"Monitor failed to start. Try again, or contact GE Service for support.\"; " \
92 "bootcount reset; \0" \
93 "hasfirstboot=" \
94 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
95 "/boot/bootcause/firstboot;\0" \
96 "swappartitions=" \
97 "setexpr mmcpart 3 - ${mmcpart};\0" \
98 "doboot=" \
99 "echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
100 "run helix;\0" \
101 "altbootcmd=" \
102 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
103 "run hasfirstboot || setenv mmcpart 0; " \
104 "if test ${mmcpart} != 0; then " \
105 "setenv bootcause REVERT; " \
106 "run swappartitions loadimage doboot; " \
107 "fi; " \
108 "run failbootcmd\0" \
109 "tryboot=" \
110 "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
111 "run loadimage || run swappartitions && run loadimage || " \
112 "setenv mmcpart 0 && echo MISSING IMAGE;" \
113 "run showsplashscreen; sleep 1; " \
114 "run doboot; run failbootcmd;\0" \
115
Sebastian Reichel7cab6fe2020-09-02 19:31:46 +0200116#endif /* __GE_B1X5V2_CONFIG_H */