Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Akshay Bhat | f9162b1 | 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 | f9162b1 | 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 | 552a848 | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 15 | #include <asm/mach-imx/gpio.h> |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 16 | |
Ian Ray | 51a42be | 2018-04-25 16:57:04 +0200 | [diff] [blame] | 17 | #define CONFIG_BOARD_NAME "General Electric Bx50v3" |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 18 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 19 | #include "mx6_common.h" |
| 20 | #include <linux/sizes.h> |
| 21 | |
Akshay Bhat | f9162b1 | 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 | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 28 | /* SATA Configs */ |
Andrew Shadura | aacc10c | 2016-05-24 15:56:21 +0200 | [diff] [blame] | 29 | #ifdef CONFIG_CMD_SATA |
Akshay Bhat | f9162b1 | 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 | aacc10c | 2016-05-24 15:56:21 +0200 | [diff] [blame] | 34 | #endif |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 35 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 36 | /* USB Configs */ |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 37 | #ifdef CONFIG_USB |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 38 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 39 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 40 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 41 | #define CONFIG_MXC_USB_FLAGS 0 |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 42 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 43 | #define CONFIG_USBD_HS |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 44 | #define CONFIG_USB_GADGET_MASS_STORAGE |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 45 | #endif |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 46 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 47 | /* Serial Flash */ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 48 | |
| 49 | /* allow to overwrite serial and ethaddr */ |
| 50 | #define CONFIG_ENV_OVERWRITE |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 51 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 52 | #define CONFIG_LOADADDR 0x12000000 |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 53 | |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 54 | #ifdef CONFIG_NFS_CMD |
| 55 | #define NETWORKBOOT \ |
| 56 | "setnetworkboot=" \ |
| 57 | "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \ |
| 58 | "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \ |
| 59 | "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \ |
| 60 | "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \ |
| 61 | "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \ |
Robert Beckett | a707281 | 2020-01-31 15:08:01 +0200 | [diff] [blame] | 62 | "setenv bootargs $bootargs cma=128M bootcause=POR ${videoargs} " \ |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 63 | "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \ |
| 64 | "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \ |
| 65 | "networkboot=" \ |
| 66 | "run setnetworkboot; " \ |
| 67 | "nfs ${loadaddr} /srv/nfs/fitImage; " \ |
| 68 | "bootm ${loadaddr}#conf@${confidx}\0" \ |
| 69 | |
| 70 | #define CONFIG_NETWORKBOOTCOMMAND \ |
| 71 | "run networkboot; " \ |
| 72 | |
| 73 | #else |
| 74 | #define NETWORKBOOT \ |
| 75 | |
| 76 | #endif |
| 77 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 78 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 79 | NETWORKBOOT \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 80 | "bootcause=POR\0" \ |
Ian Ray | f07b314 | 2018-01-10 20:31:33 +0100 | [diff] [blame] | 81 | "image=/boot/fitImage\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 82 | "dev=mmc\0" \ |
Ian Ray | efc260a | 2019-01-31 16:21:12 +0200 | [diff] [blame] | 83 | "devnum=2\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 84 | "rootdev=mmcblk0p\0" \ |
| 85 | "quiet=quiet loglevel=0\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 86 | "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \ |
| 87 | "ro rootwait cma=128M " \ |
| 88 | "bootcause=${bootcause} " \ |
Robert Beckett | a707281 | 2020-01-31 15:08:01 +0200 | [diff] [blame] | 89 | "${quiet} " \ |
Ian Ray | 06a3e43 | 2018-04-25 16:57:03 +0200 | [diff] [blame] | 90 | "${videoargs}" "\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 91 | "doquiet=" \ |
| 92 | "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \ |
| 93 | "then setenv quiet; fi\0" \ |
| 94 | "hasfirstboot=" \ |
Robert Beckett | 5e13def | 2020-01-31 15:08:03 +0200 | [diff] [blame] | 95 | "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 96 | "swappartitions=" \ |
| 97 | "setexpr partnum 3 - ${partnum}\0" \ |
| 98 | "failbootcmd=" \ |
Ian Ray | c6b31ca | 2019-11-12 19:15:15 +0000 | [diff] [blame] | 99 | "echo reached failbootcmd; " \ |
Robert Beckett | 92faf43 | 2020-01-31 15:07:59 +0200 | [diff] [blame] | 100 | "cls; " \ |
Ian Ray | c6b31ca | 2019-11-12 19:15:15 +0000 | [diff] [blame] | 101 | "setcurs 5 4; " \ |
| 102 | "lcdputs \"Monitor failed to start. " \ |
| 103 | "Try again, or contact GE Service for support.\"; " \ |
Robert Beckett | 41613a7 | 2020-01-31 15:07:55 +0200 | [diff] [blame] | 104 | "bootcount reset; \0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 105 | "altbootcmd=" \ |
| 106 | "run doquiet; " \ |
| 107 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ |
| 108 | "run hasfirstboot || setenv partnum 0; " \ |
| 109 | "if test ${partnum} != 0; then " \ |
| 110 | "setenv bootcause REVERT; " \ |
| 111 | "run swappartitions loadimage doboot; " \ |
| 112 | "fi; " \ |
| 113 | "run failbootcmd\0" \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 114 | "loadimage=" \ |
| 115 | "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 116 | "doboot=" \ |
| 117 | "echo Booting from ${dev}:${devnum}:${partnum} ...; " \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 118 | "run setargs; " \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 119 | "bootm ${loadaddr}#conf@${confidx}\0" \ |
| 120 | "tryboot=" \ |
| 121 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ |
| 122 | "run loadimage || run swappartitions && run loadimage || " \ |
| 123 | "setenv partnum 0 && echo MISSING IMAGE;" \ |
| 124 | "run doboot; " \ |
| 125 | "run failbootcmd\0" \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 126 | |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 127 | #define CONFIG_MMCBOOTCOMMAND \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 128 | "if mmc dev ${devnum}; then " \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 129 | "run doquiet; " \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 130 | "run tryboot; " \ |
| 131 | "fi; " \ |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 132 | |
| 133 | #define CONFIG_USBBOOTCOMMAND \ |
Ian Ray | f07b314 | 2018-01-10 20:31:33 +0100 | [diff] [blame] | 134 | "echo Unsupported; " \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 135 | |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 136 | #ifdef CONFIG_NFS_CMD |
| 137 | #define CONFIG_BOOTCOMMAND CONFIG_NETWORKBOOTCOMMAND |
| 138 | #elif CONFIG_CMD_USB |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 139 | #define CONFIG_BOOTCOMMAND CONFIG_USBBOOTCOMMAND |
| 140 | #else |
| 141 | #define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND |
| 142 | #endif |
| 143 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 144 | |
| 145 | /* Miscellaneous configurable options */ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 146 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 147 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 148 | #define CONFIG_SYS_MEMTEST_END 0x10010000 |
| 149 | #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000 |
| 150 | |
| 151 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 152 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 153 | /* Physical Memory Map */ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 154 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 155 | |
Ian Ray | a19d737 | 2020-01-31 15:08:04 +0200 | [diff] [blame] | 156 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */ |
| 157 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 158 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 159 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 160 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 161 | |
| 162 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 163 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 164 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 165 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 166 | |
Masahiro Yamada | e856bdc | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 167 | /* environment organization */ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 168 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 169 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
| 170 | |
| 171 | /* Framebuffer */ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 172 | #define CONFIG_HIDE_LOGO_VERSION |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 173 | #define CONFIG_IMX_HDMI |
| 174 | #define CONFIG_IMX_VIDEO_SKIP |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 175 | #define CONFIG_CMD_BMP |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 176 | |
Akshay Bhat | 54971ac | 2016-04-12 18:13:59 -0400 | [diff] [blame] | 177 | #define CONFIG_IMX6_PWM_PER_CLK 66000000 |
| 178 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 179 | #define CONFIG_PCI_SCAN_SHOW |
| 180 | #define CONFIG_PCIE_IMX |
| 181 | #define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(7, 12) |
| 182 | #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5) |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 183 | |
Ian Ray | be2808c | 2017-08-22 09:03:54 +0300 | [diff] [blame] | 184 | #define CONFIG_BCH |
| 185 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 186 | #endif /* __GE_BX50V3_CONFIG_H */ |