blob: 2d854af9a06db9d0ffffc7a3be177a07126e7c5d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Akshay Bhat197f9872016-01-29 15:16:40 -05002/*
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 Bhat197f9872016-01-29 15:16:40 -05009 */
10
11#ifndef __GE_BX50V3_CONFIG_H
12#define __GE_BX50V3_CONFIG_H
13
14#include <asm/arch/imx-regs.h>
Stefano Babic33731bc2017-06-29 10:16:06 +020015#include <asm/mach-imx/gpio.h>
Akshay Bhat197f9872016-01-29 15:16:40 -050016
Ian Ray467778a2018-04-25 16:57:04 +020017#define CONFIG_BOARD_NAME "General Electric Bx50v3"
Akshay Bhat197f9872016-01-29 15:16:40 -050018
Akshay Bhat197f9872016-01-29 15:16:40 -050019#include "mx6_common.h"
20#include <linux/sizes.h>
21
Akshay Bhat197f9872016-01-29 15:16:40 -050022#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 Bhat197f9872016-01-29 15:16:40 -050028/* SATA Configs */
Andrew Shadura6da4f982016-05-24 15:56:21 +020029#ifdef CONFIG_CMD_SATA
Akshay Bhat197f9872016-01-29 15:16:40 -050030#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 Shadura6da4f982016-05-24 15:56:21 +020034#endif
Akshay Bhat197f9872016-01-29 15:16:40 -050035
Akshay Bhat197f9872016-01-29 15:16:40 -050036/* USB Configs */
Andrew Shaduraaf628af2016-05-24 15:56:19 +020037#ifdef CONFIG_USB
Akshay Bhat197f9872016-01-29 15:16:40 -050038#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 Bhat197f9872016-01-29 15:16:40 -050042
Akshay Bhat197f9872016-01-29 15:16:40 -050043#define CONFIG_USBD_HS
Akshay Bhat197f9872016-01-29 15:16:40 -050044#define CONFIG_USB_GADGET_MASS_STORAGE
Andrew Shaduraaf628af2016-05-24 15:56:19 +020045#endif
Akshay Bhat197f9872016-01-29 15:16:40 -050046
Akshay Bhat197f9872016-01-29 15:16:40 -050047/* Serial Flash */
Akshay Bhat197f9872016-01-29 15:16:40 -050048
Akshay Bhat197f9872016-01-29 15:16:40 -050049#define CONFIG_LOADADDR 0x12000000
Akshay Bhat197f9872016-01-29 15:16:40 -050050
Ian Ray656d8d52020-11-04 17:18:39 +010051#ifdef CONFIG_CMD_NFS
Joonas Aijala667f25f2019-01-31 16:21:20 +020052#define NETWORKBOOT \
53 "setnetworkboot=" \
54 "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \
55 "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \
56 "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \
57 "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \
58 "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \
Ian Raya8203cc2020-11-04 17:18:43 +010059 "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \
Joonas Aijala667f25f2019-01-31 16:21:20 +020060 "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \
61 "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \
62 "networkboot=" \
63 "run setnetworkboot; " \
64 "nfs ${loadaddr} /srv/nfs/fitImage; " \
Sebastian Reichel99453902020-12-15 00:41:56 +010065 "bootm ${loadaddr}\0" \
Joonas Aijala667f25f2019-01-31 16:21:20 +020066
67#define CONFIG_NETWORKBOOTCOMMAND \
68 "run networkboot; " \
69
70#else
71#define NETWORKBOOT \
72
73#endif
74
Akshay Bhat197f9872016-01-29 15:16:40 -050075#define CONFIG_EXTRA_ENV_SETTINGS \
Joonas Aijala667f25f2019-01-31 16:21:20 +020076 NETWORKBOOT \
Ian Rayb52e2522018-01-10 20:31:33 +010077 "image=/boot/fitImage\0" \
Ian Ray70846762018-01-10 20:31:37 +010078 "dev=mmc\0" \
Ian Ray3a97ec02019-01-31 16:21:12 +020079 "devnum=2\0" \
Ian Ray70846762018-01-10 20:31:37 +010080 "rootdev=mmcblk0p\0" \
81 "quiet=quiet loglevel=0\0" \
Ian Ray70846762018-01-10 20:31:37 +010082 "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \
83 "ro rootwait cma=128M " \
84 "bootcause=${bootcause} " \
Robert Beckett8022cbd2020-01-31 15:08:01 +020085 "${quiet} " \
Ian Rayd8c60992018-04-25 16:57:03 +020086 "${videoargs}" "\0" \
Ian Ray70846762018-01-10 20:31:37 +010087 "doquiet=" \
88 "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
89 "then setenv quiet; fi\0" \
90 "hasfirstboot=" \
Robert Beckettf3270fb2020-01-31 15:08:03 +020091 "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \
Ian Ray70846762018-01-10 20:31:37 +010092 "swappartitions=" \
93 "setexpr partnum 3 - ${partnum}\0" \
94 "failbootcmd=" \
Ian Rayb7f96252019-11-12 19:15:15 +000095 "echo reached failbootcmd; " \
Robert Beckettb2185d22020-01-31 15:07:59 +020096 "cls; " \
Ian Rayb7f96252019-11-12 19:15:15 +000097 "setcurs 5 4; " \
98 "lcdputs \"Monitor failed to start. " \
99 "Try again, or contact GE Service for support.\"; " \
Robert Beckettf8945bc2020-01-31 15:07:55 +0200100 "bootcount reset; \0" \
Ian Ray70846762018-01-10 20:31:37 +0100101 "altbootcmd=" \
102 "run doquiet; " \
103 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
104 "run hasfirstboot || setenv partnum 0; " \
105 "if test ${partnum} != 0; then " \
Ian Ray70846762018-01-10 20:31:37 +0100106 "run swappartitions loadimage doboot; " \
107 "fi; " \
108 "run failbootcmd\0" \
Akshay Bhat197f9872016-01-29 15:16:40 -0500109 "loadimage=" \
110 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
Ian Ray70846762018-01-10 20:31:37 +0100111 "doboot=" \
112 "echo Booting from ${dev}:${devnum}:${partnum} ...; " \
Akshay Bhat197f9872016-01-29 15:16:40 -0500113 "run setargs; " \
Sebastian Reichel99453902020-12-15 00:41:56 +0100114 "bootm ${loadaddr}\0" \
Ian Ray70846762018-01-10 20:31:37 +0100115 "tryboot=" \
116 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
117 "run loadimage || run swappartitions && run loadimage || " \
118 "setenv partnum 0 && echo MISSING IMAGE;" \
119 "run doboot; " \
120 "run failbootcmd\0" \
Akshay Bhat197f9872016-01-29 15:16:40 -0500121
Andrew Shaduraaf628af2016-05-24 15:56:19 +0200122#define CONFIG_MMCBOOTCOMMAND \
Akshay Bhat197f9872016-01-29 15:16:40 -0500123 "if mmc dev ${devnum}; then " \
Ian Ray70846762018-01-10 20:31:37 +0100124 "run doquiet; " \
Akshay Bhat197f9872016-01-29 15:16:40 -0500125 "run tryboot; " \
126 "fi; " \
Andrew Shaduraaf628af2016-05-24 15:56:19 +0200127
128#define CONFIG_USBBOOTCOMMAND \
Ian Rayb52e2522018-01-10 20:31:33 +0100129 "echo Unsupported; " \
Akshay Bhat197f9872016-01-29 15:16:40 -0500130
Ian Ray656d8d52020-11-04 17:18:39 +0100131#ifdef CONFIG_CMD_NFS
Joonas Aijala667f25f2019-01-31 16:21:20 +0200132#define CONFIG_BOOTCOMMAND CONFIG_NETWORKBOOTCOMMAND
133#elif CONFIG_CMD_USB
Andrew Shaduraaf628af2016-05-24 15:56:19 +0200134#define CONFIG_BOOTCOMMAND CONFIG_USBBOOTCOMMAND
135#else
136#define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND
137#endif
138
Akshay Bhat197f9872016-01-29 15:16:40 -0500139
140/* Miscellaneous configurable options */
Akshay Bhat197f9872016-01-29 15:16:40 -0500141
Akshay Bhat197f9872016-01-29 15:16:40 -0500142#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
143
Akshay Bhat197f9872016-01-29 15:16:40 -0500144/* Physical Memory Map */
Akshay Bhat197f9872016-01-29 15:16:40 -0500145#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
146
Ian Raye5818ae2020-01-31 15:08:04 +0200147#define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */
148
Akshay Bhat197f9872016-01-29 15:16:40 -0500149#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
150#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
151#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
152
153#define CONFIG_SYS_INIT_SP_OFFSET \
154 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
155#define CONFIG_SYS_INIT_SP_ADDR \
156 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
157
Masahiro Yamada8cea9b52017-02-11 22:43:54 +0900158/* environment organization */
Akshay Bhat197f9872016-01-29 15:16:40 -0500159
Akshay Bhat197f9872016-01-29 15:16:40 -0500160#define CONFIG_SYS_FSL_USDHC_NUM 3
161
162/* Framebuffer */
Ian Ray70846762018-01-10 20:31:37 +0100163#define CONFIG_HIDE_LOGO_VERSION
Akshay Bhat197f9872016-01-29 15:16:40 -0500164#define CONFIG_IMX_HDMI
165#define CONFIG_IMX_VIDEO_SKIP
166
Akshay Bhat5d643622016-04-12 18:13:59 -0400167#define CONFIG_IMX6_PWM_PER_CLK 66000000
168
Akshay Bhat197f9872016-01-29 15:16:40 -0500169#define CONFIG_PCI_SCAN_SHOW
170#define CONFIG_PCIE_IMX
171#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(7, 12)
172#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5)
Akshay Bhat197f9872016-01-29 15:16:40 -0500173
Akshay Bhat197f9872016-01-29 15:16:40 -0500174#endif /* __GE_BX50V3_CONFIG_H */