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