blob: 4fdc2b6596265166b605fd6682624590e414a930 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Akshay Bhatf9162b12016-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 Bhatf9162b12016-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 Babic552a8482017-06-29 10:16:06 +020015#include <asm/mach-imx/gpio.h>
Akshay Bhatf9162b12016-01-29 15:16:40 -050016
Ian Ray51a42be2018-04-25 16:57:04 +020017#define CONFIG_BOARD_NAME "General Electric Bx50v3"
Akshay Bhatf9162b12016-01-29 15:16:40 -050018
Akshay Bhatf9162b12016-01-29 15:16:40 -050019#include "mx6_common.h"
20#include <linux/sizes.h>
21
Akshay Bhatf9162b12016-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 Bhatf9162b12016-01-29 15:16:40 -050028/* SATA Configs */
Andrew Shaduraaacc10c2016-05-24 15:56:21 +020029#ifdef CONFIG_CMD_SATA
Akshay Bhatf9162b12016-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 Shaduraaacc10c2016-05-24 15:56:21 +020034#endif
Akshay Bhatf9162b12016-01-29 15:16:40 -050035
Akshay Bhatf9162b12016-01-29 15:16:40 -050036/* USB Configs */
Andrew Shadurafc449022016-05-24 15:56:19 +020037#ifdef CONFIG_USB
Akshay Bhatf9162b12016-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 Bhatf9162b12016-01-29 15:16:40 -050042
Akshay Bhatf9162b12016-01-29 15:16:40 -050043#define CONFIG_USBD_HS
Akshay Bhatf9162b12016-01-29 15:16:40 -050044#define CONFIG_USB_GADGET_MASS_STORAGE
Andrew Shadurafc449022016-05-24 15:56:19 +020045#endif
Akshay Bhatf9162b12016-01-29 15:16:40 -050046
Akshay Bhatf9162b12016-01-29 15:16:40 -050047/* Serial Flash */
Akshay Bhatf9162b12016-01-29 15:16:40 -050048
Akshay Bhatf9162b12016-01-29 15:16:40 -050049#define CONFIG_LOADADDR 0x12000000
Akshay Bhatf9162b12016-01-29 15:16:40 -050050
Joonas Aijalab026c822019-01-31 16:21:20 +020051#ifdef CONFIG_NFS_CMD
52#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 " \
Robert Becketta7072812020-01-31 15:08:01 +020059 "setenv bootargs $bootargs cma=128M bootcause=POR ${videoargs} " \
Joonas Aijalab026c822019-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; " \
65 "bootm ${loadaddr}#conf@${confidx}\0" \
66
67#define CONFIG_NETWORKBOOTCOMMAND \
68 "run networkboot; " \
69
70#else
71#define NETWORKBOOT \
72
73#endif
74
Akshay Bhatf9162b12016-01-29 15:16:40 -050075#define CONFIG_EXTRA_ENV_SETTINGS \
Joonas Aijalab026c822019-01-31 16:21:20 +020076 NETWORKBOOT \
Ian Ray9e41b542018-01-10 20:31:37 +010077 "bootcause=POR\0" \
Ian Rayf07b3142018-01-10 20:31:33 +010078 "image=/boot/fitImage\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010079 "dev=mmc\0" \
Ian Rayefc260a2019-01-31 16:21:12 +020080 "devnum=2\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010081 "rootdev=mmcblk0p\0" \
82 "quiet=quiet loglevel=0\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010083 "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \
84 "ro rootwait cma=128M " \
85 "bootcause=${bootcause} " \
Robert Becketta7072812020-01-31 15:08:01 +020086 "${quiet} " \
Ian Ray06a3e432018-04-25 16:57:03 +020087 "${videoargs}" "\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010088 "doquiet=" \
89 "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
90 "then setenv quiet; fi\0" \
91 "hasfirstboot=" \
Robert Beckett5e13def2020-01-31 15:08:03 +020092 "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010093 "swappartitions=" \
94 "setexpr partnum 3 - ${partnum}\0" \
95 "failbootcmd=" \
Ian Rayc6b31ca2019-11-12 19:15:15 +000096 "echo reached failbootcmd; " \
Robert Beckett92faf432020-01-31 15:07:59 +020097 "cls; " \
Ian Rayc6b31ca2019-11-12 19:15:15 +000098 "setcurs 5 4; " \
99 "lcdputs \"Monitor failed to start. " \
100 "Try again, or contact GE Service for support.\"; " \
Robert Beckett41613a72020-01-31 15:07:55 +0200101 "bootcount reset; \0" \
Ian Ray9e41b542018-01-10 20:31:37 +0100102 "altbootcmd=" \
103 "run doquiet; " \
104 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
105 "run hasfirstboot || setenv partnum 0; " \
106 "if test ${partnum} != 0; then " \
107 "setenv bootcause REVERT; " \
108 "run swappartitions loadimage doboot; " \
109 "fi; " \
110 "run failbootcmd\0" \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500111 "loadimage=" \
112 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
Ian Ray9e41b542018-01-10 20:31:37 +0100113 "doboot=" \
114 "echo Booting from ${dev}:${devnum}:${partnum} ...; " \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500115 "run setargs; " \
Ian Ray9e41b542018-01-10 20:31:37 +0100116 "bootm ${loadaddr}#conf@${confidx}\0" \
117 "tryboot=" \
118 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
119 "run loadimage || run swappartitions && run loadimage || " \
120 "setenv partnum 0 && echo MISSING IMAGE;" \
121 "run doboot; " \
122 "run failbootcmd\0" \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500123
Andrew Shadurafc449022016-05-24 15:56:19 +0200124#define CONFIG_MMCBOOTCOMMAND \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500125 "if mmc dev ${devnum}; then " \
Ian Ray9e41b542018-01-10 20:31:37 +0100126 "run doquiet; " \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500127 "run tryboot; " \
128 "fi; " \
Andrew Shadurafc449022016-05-24 15:56:19 +0200129
130#define CONFIG_USBBOOTCOMMAND \
Ian Rayf07b3142018-01-10 20:31:33 +0100131 "echo Unsupported; " \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500132
Joonas Aijalab026c822019-01-31 16:21:20 +0200133#ifdef CONFIG_NFS_CMD
134#define CONFIG_BOOTCOMMAND CONFIG_NETWORKBOOTCOMMAND
135#elif CONFIG_CMD_USB
Andrew Shadurafc449022016-05-24 15:56:19 +0200136#define CONFIG_BOOTCOMMAND CONFIG_USBBOOTCOMMAND
137#else
138#define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND
139#endif
140
Akshay Bhatf9162b12016-01-29 15:16:40 -0500141
142/* Miscellaneous configurable options */
Akshay Bhatf9162b12016-01-29 15:16:40 -0500143
Akshay Bhatf9162b12016-01-29 15:16:40 -0500144#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
145
Akshay Bhatf9162b12016-01-29 15:16:40 -0500146/* Physical Memory Map */
Akshay Bhatf9162b12016-01-29 15:16:40 -0500147#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
148
Ian Raya19d7372020-01-31 15:08:04 +0200149#define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */
150
Akshay Bhatf9162b12016-01-29 15:16:40 -0500151#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
152#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
153#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
154
155#define CONFIG_SYS_INIT_SP_OFFSET \
156 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
157#define CONFIG_SYS_INIT_SP_ADDR \
158 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
159
Masahiro Yamadae856bdc2017-02-11 22:43:54 +0900160/* environment organization */
Akshay Bhatf9162b12016-01-29 15:16:40 -0500161
Akshay Bhatf9162b12016-01-29 15:16:40 -0500162#define CONFIG_SYS_FSL_USDHC_NUM 3
163
164/* Framebuffer */
Ian Ray9e41b542018-01-10 20:31:37 +0100165#define CONFIG_HIDE_LOGO_VERSION
Akshay Bhatf9162b12016-01-29 15:16:40 -0500166#define CONFIG_IMX_HDMI
167#define CONFIG_IMX_VIDEO_SKIP
168
Akshay Bhat54971ac2016-04-12 18:13:59 -0400169#define CONFIG_IMX6_PWM_PER_CLK 66000000
170
Akshay Bhatf9162b12016-01-29 15:16:40 -0500171#define CONFIG_PCI_SCAN_SHOW
172#define CONFIG_PCIE_IMX
173#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(7, 12)
174#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5)
Akshay Bhatf9162b12016-01-29 15:16:40 -0500175
Akshay Bhatf9162b12016-01-29 15:16:40 -0500176#endif /* __GE_BX50V3_CONFIG_H */