Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Timesys Corporation |
| 4 | * Copyright (C) 2015 General Electric Company |
| 5 | * Copyright (C) 2014 Advantech |
| 6 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
| 7 | * |
| 8 | * Configuration settings for the GE MX6Q Bx50v3 boards. |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __GE_BX50V3_CONFIG_H |
| 12 | #define __GE_BX50V3_CONFIG_H |
| 13 | |
| 14 | #include <asm/arch/imx-regs.h> |
Stefano Babic | 33731bc | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 15 | #include <asm/mach-imx/gpio.h> |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 16 | |
Ian Ray | 467778a | 2018-04-25 16:57:04 +0200 | [diff] [blame] | 17 | #define CONFIG_BOARD_NAME "General Electric Bx50v3" |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 18 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 19 | #include "mx6_common.h" |
| 20 | #include <linux/sizes.h> |
| 21 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 22 | #define CONFIG_CMDLINE_TAG |
| 23 | #define CONFIG_SETUP_MEMORY_TAGS |
| 24 | #define CONFIG_INITRD_TAG |
| 25 | #define CONFIG_REVISION_TAG |
| 26 | #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) |
| 27 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 28 | /* SATA Configs */ |
Andrew Shadura | 6da4f98 | 2016-05-24 15:56:21 +0200 | [diff] [blame] | 29 | #ifdef CONFIG_CMD_SATA |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 30 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
| 31 | #define CONFIG_DWC_AHSATA_PORT_ID 0 |
| 32 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR |
| 33 | #define CONFIG_LBA48 |
Andrew Shadura | 6da4f98 | 2016-05-24 15:56:21 +0200 | [diff] [blame] | 34 | #endif |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 35 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 36 | /* Serial Flash */ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 37 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 38 | #define CONFIG_LOADADDR 0x12000000 |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 39 | |
Ian Ray | 656d8d5 | 2020-11-04 17:18:39 +0100 | [diff] [blame] | 40 | #ifdef CONFIG_CMD_NFS |
Joonas Aijala | 667f25f | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 41 | #define NETWORKBOOT \ |
| 42 | "setnetworkboot=" \ |
| 43 | "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \ |
| 44 | "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \ |
| 45 | "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \ |
| 46 | "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \ |
| 47 | "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \ |
Ian Ray | a8203cc | 2020-11-04 17:18:43 +0100 | [diff] [blame] | 48 | "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \ |
Joonas Aijala | 667f25f | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 49 | "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \ |
| 50 | "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \ |
| 51 | "networkboot=" \ |
| 52 | "run setnetworkboot; " \ |
| 53 | "nfs ${loadaddr} /srv/nfs/fitImage; " \ |
Sebastian Reichel | 9945390 | 2020-12-15 00:41:56 +0100 | [diff] [blame] | 54 | "bootm ${loadaddr}\0" \ |
Joonas Aijala | 667f25f | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 55 | |
| 56 | #define CONFIG_NETWORKBOOTCOMMAND \ |
| 57 | "run networkboot; " \ |
| 58 | |
| 59 | #else |
| 60 | #define NETWORKBOOT \ |
| 61 | |
| 62 | #endif |
| 63 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 64 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Joonas Aijala | 667f25f | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 65 | NETWORKBOOT \ |
Ian Ray | b52e252 | 2018-01-10 20:31:33 +0100 | [diff] [blame] | 66 | "image=/boot/fitImage\0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 67 | "dev=mmc\0" \ |
Ian Ray | 3a97ec0 | 2019-01-31 16:21:12 +0200 | [diff] [blame] | 68 | "devnum=2\0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 69 | "rootdev=mmcblk0p\0" \ |
| 70 | "quiet=quiet loglevel=0\0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 71 | "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \ |
| 72 | "ro rootwait cma=128M " \ |
| 73 | "bootcause=${bootcause} " \ |
Robert Beckett | 8022cbd | 2020-01-31 15:08:01 +0200 | [diff] [blame] | 74 | "${quiet} " \ |
Ian Ray | d8c6099 | 2018-04-25 16:57:03 +0200 | [diff] [blame] | 75 | "${videoargs}" "\0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 76 | "doquiet=" \ |
| 77 | "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \ |
| 78 | "then setenv quiet; fi\0" \ |
| 79 | "hasfirstboot=" \ |
Robert Beckett | f3270fb | 2020-01-31 15:08:03 +0200 | [diff] [blame] | 80 | "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 81 | "swappartitions=" \ |
| 82 | "setexpr partnum 3 - ${partnum}\0" \ |
| 83 | "failbootcmd=" \ |
Robert Beckett | b2185d2 | 2020-01-31 15:07:59 +0200 | [diff] [blame] | 84 | "cls; " \ |
Ian Ray | b7f9625 | 2019-11-12 19:15:15 +0000 | [diff] [blame] | 85 | "setcurs 5 4; " \ |
| 86 | "lcdputs \"Monitor failed to start. " \ |
| 87 | "Try again, or contact GE Service for support.\"; " \ |
Ian Ray | 75c38f7 | 2021-04-23 16:15:13 +0200 | [diff] [blame] | 88 | "bootcount reset; " \ |
| 89 | "while true; do sleep 1; done; \0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 90 | "altbootcmd=" \ |
| 91 | "run doquiet; " \ |
| 92 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ |
| 93 | "run hasfirstboot || setenv partnum 0; " \ |
| 94 | "if test ${partnum} != 0; then " \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 95 | "run swappartitions loadimage doboot; " \ |
| 96 | "fi; " \ |
| 97 | "run failbootcmd\0" \ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 98 | "loadimage=" \ |
| 99 | "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 100 | "doboot=" \ |
| 101 | "echo Booting from ${dev}:${devnum}:${partnum} ...; " \ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 102 | "run setargs; " \ |
Sebastian Reichel | 9945390 | 2020-12-15 00:41:56 +0100 | [diff] [blame] | 103 | "bootm ${loadaddr}\0" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 104 | "tryboot=" \ |
| 105 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ |
| 106 | "run loadimage || run swappartitions && run loadimage || " \ |
Ian Ray | 8355e8c | 2021-04-23 16:15:12 +0200 | [diff] [blame] | 107 | "setenv partnum 0 && echo MISSING IMAGE;" \ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 108 | "run doboot; " \ |
| 109 | "run failbootcmd\0" \ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 110 | |
Andrew Shadura | af628af | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 111 | #define CONFIG_MMCBOOTCOMMAND \ |
Ian Ray | 8355e8c | 2021-04-23 16:15:12 +0200 | [diff] [blame] | 112 | "run doquiet; " \ |
| 113 | "run tryboot; " \ |
Andrew Shadura | af628af | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 114 | |
Ian Ray | 656d8d5 | 2020-11-04 17:18:39 +0100 | [diff] [blame] | 115 | #ifdef CONFIG_CMD_NFS |
Joonas Aijala | 667f25f | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 116 | #define CONFIG_BOOTCOMMAND CONFIG_NETWORKBOOTCOMMAND |
Andrew Shadura | af628af | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 117 | #else |
| 118 | #define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND |
| 119 | #endif |
| 120 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 121 | |
| 122 | /* Miscellaneous configurable options */ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 123 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 124 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 125 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 126 | /* Physical Memory Map */ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 127 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 128 | |
Ian Ray | e5818ae | 2020-01-31 15:08:04 +0200 | [diff] [blame] | 129 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */ |
| 130 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 131 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 132 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 133 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 134 | |
| 135 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 136 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 137 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 138 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 139 | |
Masahiro Yamada | 8cea9b5 | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 140 | /* environment organization */ |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 141 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 142 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
| 143 | |
| 144 | /* Framebuffer */ |
Ian Ray | 7084676 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 145 | #define CONFIG_HIDE_LOGO_VERSION |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 146 | #define CONFIG_IMX_HDMI |
| 147 | #define CONFIG_IMX_VIDEO_SKIP |
| 148 | |
Akshay Bhat | 5d64362 | 2016-04-12 18:13:59 -0400 | [diff] [blame] | 149 | #define CONFIG_IMX6_PWM_PER_CLK 66000000 |
| 150 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 151 | #define CONFIG_PCI_SCAN_SHOW |
| 152 | #define CONFIG_PCIE_IMX |
| 153 | #define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(7, 12) |
| 154 | #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5) |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 155 | |
Akshay Bhat | 197f987 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 156 | #endif /* __GE_BX50V3_CONFIG_H */ |