blob: c80a07655ecd8b7a2d110bc99f35d57eba99393e [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
Akshay Bhatf9162b12016-01-29 15:16:40 -050017#include "mx6_common.h"
18#include <linux/sizes.h>
19
Akshay Bhatf9162b12016-01-29 15:16:40 -050020/* SATA Configs */
Andrew Shaduraaacc10c2016-05-24 15:56:21 +020021#ifdef CONFIG_CMD_SATA
Akshay Bhatf9162b12016-01-29 15:16:40 -050022#define CONFIG_DWC_AHSATA_PORT_ID 0
23#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
24#define CONFIG_LBA48
Andrew Shaduraaacc10c2016-05-24 15:56:21 +020025#endif
Akshay Bhatf9162b12016-01-29 15:16:40 -050026
Ian Rayf2ac6f72020-11-04 17:18:39 +010027#ifdef CONFIG_CMD_NFS
Joonas Aijalab026c822019-01-31 16:21:20 +020028#define NETWORKBOOT \
29 "setnetworkboot=" \
30 "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \
31 "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \
32 "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \
33 "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \
34 "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \
Ian Ray4f1970f2020-11-04 17:18:43 +010035 "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \
Joonas Aijalab026c822019-01-31 16:21:20 +020036 "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \
37 "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \
38 "networkboot=" \
39 "run setnetworkboot; " \
40 "nfs ${loadaddr} /srv/nfs/fitImage; " \
Sebastian Reichelc44d3742020-12-15 00:41:56 +010041 "bootm ${loadaddr}\0" \
Joonas Aijalab026c822019-01-31 16:21:20 +020042
Tom Rini7ae1b082021-08-19 14:29:00 -040043#define NETWORKBOOTCOMMAND \
Joonas Aijalab026c822019-01-31 16:21:20 +020044 "run networkboot; " \
45
46#else
47#define NETWORKBOOT \
48
49#endif
50
Akshay Bhatf9162b12016-01-29 15:16:40 -050051#define CONFIG_EXTRA_ENV_SETTINGS \
Joonas Aijalab026c822019-01-31 16:21:20 +020052 NETWORKBOOT \
Ian Rayf07b3142018-01-10 20:31:33 +010053 "image=/boot/fitImage\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010054 "dev=mmc\0" \
Ian Rayefc260a2019-01-31 16:21:12 +020055 "devnum=2\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010056 "rootdev=mmcblk0p\0" \
57 "quiet=quiet loglevel=0\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010058 "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \
59 "ro rootwait cma=128M " \
60 "bootcause=${bootcause} " \
Robert Becketta7072812020-01-31 15:08:01 +020061 "${quiet} " \
Ian Ray06a3e432018-04-25 16:57:03 +020062 "${videoargs}" "\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010063 "doquiet=" \
64 "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
65 "then setenv quiet; fi\0" \
66 "hasfirstboot=" \
Robert Beckett5e13def2020-01-31 15:08:03 +020067 "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010068 "swappartitions=" \
69 "setexpr partnum 3 - ${partnum}\0" \
70 "failbootcmd=" \
Robert Beckett92faf432020-01-31 15:07:59 +020071 "cls; " \
Ian Rayc6b31ca2019-11-12 19:15:15 +000072 "setcurs 5 4; " \
73 "lcdputs \"Monitor failed to start. " \
74 "Try again, or contact GE Service for support.\"; " \
Ian Ray3a543552021-04-23 16:15:13 +020075 "bootcount reset; " \
76 "while true; do sleep 1; done; \0" \
Ian Ray9e41b542018-01-10 20:31:37 +010077 "altbootcmd=" \
78 "run doquiet; " \
79 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
80 "run hasfirstboot || setenv partnum 0; " \
81 "if test ${partnum} != 0; then " \
Ian Ray9e41b542018-01-10 20:31:37 +010082 "run swappartitions loadimage doboot; " \
83 "fi; " \
84 "run failbootcmd\0" \
Akshay Bhatf9162b12016-01-29 15:16:40 -050085 "loadimage=" \
86 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010087 "doboot=" \
88 "echo Booting from ${dev}:${devnum}:${partnum} ...; " \
Akshay Bhatf9162b12016-01-29 15:16:40 -050089 "run setargs; " \
Sebastian Reichelc44d3742020-12-15 00:41:56 +010090 "bootm ${loadaddr}\0" \
Ian Ray9e41b542018-01-10 20:31:37 +010091 "tryboot=" \
92 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
93 "run loadimage || run swappartitions && run loadimage || " \
Ian Rayee77bb52021-04-23 16:15:12 +020094 "setenv partnum 0 && echo MISSING IMAGE;" \
Ian Ray9e41b542018-01-10 20:31:37 +010095 "run doboot; " \
96 "run failbootcmd\0" \
Akshay Bhatf9162b12016-01-29 15:16:40 -050097
Andrew Shadurafc449022016-05-24 15:56:19 +020098
Akshay Bhatf9162b12016-01-29 15:16:40 -050099/* Physical Memory Map */
Akshay Bhatf9162b12016-01-29 15:16:40 -0500100#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
101
Ian Raya19d7372020-01-31 15:08:04 +0200102#define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */
103
Akshay Bhatf9162b12016-01-29 15:16:40 -0500104#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
105#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
106#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
107
108#define CONFIG_SYS_INIT_SP_OFFSET \
109 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
110#define CONFIG_SYS_INIT_SP_ADDR \
111 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
112
Masahiro Yamadae856bdc2017-02-11 22:43:54 +0900113/* environment organization */
Akshay Bhatf9162b12016-01-29 15:16:40 -0500114
Akshay Bhatf9162b12016-01-29 15:16:40 -0500115#define CONFIG_SYS_FSL_USDHC_NUM 3
116
117/* Framebuffer */
Ian Ray9e41b542018-01-10 20:31:37 +0100118#define CONFIG_HIDE_LOGO_VERSION
Akshay Bhatf9162b12016-01-29 15:16:40 -0500119#define CONFIG_IMX_HDMI
120#define CONFIG_IMX_VIDEO_SKIP
121
Akshay Bhat54971ac2016-04-12 18:13:59 -0400122#define CONFIG_IMX6_PWM_PER_CLK 66000000
123
Akshay Bhatf9162b12016-01-29 15:16:40 -0500124#define CONFIG_PCI_SCAN_SHOW
125#define CONFIG_PCIE_IMX
Akshay Bhatf9162b12016-01-29 15:16:40 -0500126
Akshay Bhatf9162b12016-01-29 15:16:40 -0500127#endif /* __GE_BX50V3_CONFIG_H */