blob: 402c5bfacbe37ea10c7bbc4249b045199db910d9 [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/* SATA Configs */
Andrew Shadura6da4f982016-05-24 15:56:21 +020023#ifdef CONFIG_CMD_SATA
Akshay Bhat197f9872016-01-29 15:16:40 -050024#define CONFIG_DWC_AHSATA_PORT_ID 0
25#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
26#define CONFIG_LBA48
Andrew Shadura6da4f982016-05-24 15:56:21 +020027#endif
Akshay Bhat197f9872016-01-29 15:16:40 -050028
Ian Ray656d8d52020-11-04 17:18:39 +010029#ifdef CONFIG_CMD_NFS
Joonas Aijala667f25f2019-01-31 16:21:20 +020030#define NETWORKBOOT \
31 "setnetworkboot=" \
32 "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \
33 "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \
34 "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \
35 "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \
36 "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \
Ian Raya8203cc2020-11-04 17:18:43 +010037 "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \
Joonas Aijala667f25f2019-01-31 16:21:20 +020038 "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \
39 "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \
40 "networkboot=" \
41 "run setnetworkboot; " \
42 "nfs ${loadaddr} /srv/nfs/fitImage; " \
Sebastian Reichel99453902020-12-15 00:41:56 +010043 "bootm ${loadaddr}\0" \
Joonas Aijala667f25f2019-01-31 16:21:20 +020044
Tom Rini9aed2af2021-08-19 14:29:00 -040045#define NETWORKBOOTCOMMAND \
Joonas Aijala667f25f2019-01-31 16:21:20 +020046 "run networkboot; " \
47
48#else
49#define NETWORKBOOT \
50
51#endif
52
Akshay Bhat197f9872016-01-29 15:16:40 -050053#define CONFIG_EXTRA_ENV_SETTINGS \
Joonas Aijala667f25f2019-01-31 16:21:20 +020054 NETWORKBOOT \
Ian Rayb52e2522018-01-10 20:31:33 +010055 "image=/boot/fitImage\0" \
Ian Ray70846762018-01-10 20:31:37 +010056 "dev=mmc\0" \
Ian Ray3a97ec02019-01-31 16:21:12 +020057 "devnum=2\0" \
Ian Ray70846762018-01-10 20:31:37 +010058 "rootdev=mmcblk0p\0" \
59 "quiet=quiet loglevel=0\0" \
Ian Ray70846762018-01-10 20:31:37 +010060 "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \
61 "ro rootwait cma=128M " \
62 "bootcause=${bootcause} " \
Robert Beckett8022cbd2020-01-31 15:08:01 +020063 "${quiet} " \
Ian Rayd8c60992018-04-25 16:57:03 +020064 "${videoargs}" "\0" \
Ian Ray70846762018-01-10 20:31:37 +010065 "doquiet=" \
66 "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
67 "then setenv quiet; fi\0" \
68 "hasfirstboot=" \
Robert Beckettf3270fb2020-01-31 15:08:03 +020069 "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \
Ian Ray70846762018-01-10 20:31:37 +010070 "swappartitions=" \
71 "setexpr partnum 3 - ${partnum}\0" \
72 "failbootcmd=" \
Robert Beckettb2185d22020-01-31 15:07:59 +020073 "cls; " \
Ian Rayb7f96252019-11-12 19:15:15 +000074 "setcurs 5 4; " \
75 "lcdputs \"Monitor failed to start. " \
76 "Try again, or contact GE Service for support.\"; " \
Ian Ray75c38f72021-04-23 16:15:13 +020077 "bootcount reset; " \
78 "while true; do sleep 1; done; \0" \
Ian Ray70846762018-01-10 20:31:37 +010079 "altbootcmd=" \
80 "run doquiet; " \
81 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
82 "run hasfirstboot || setenv partnum 0; " \
83 "if test ${partnum} != 0; then " \
Ian Ray70846762018-01-10 20:31:37 +010084 "run swappartitions loadimage doboot; " \
85 "fi; " \
86 "run failbootcmd\0" \
Akshay Bhat197f9872016-01-29 15:16:40 -050087 "loadimage=" \
88 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
Ian Ray70846762018-01-10 20:31:37 +010089 "doboot=" \
90 "echo Booting from ${dev}:${devnum}:${partnum} ...; " \
Akshay Bhat197f9872016-01-29 15:16:40 -050091 "run setargs; " \
Sebastian Reichel99453902020-12-15 00:41:56 +010092 "bootm ${loadaddr}\0" \
Ian Ray70846762018-01-10 20:31:37 +010093 "tryboot=" \
94 "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
95 "run loadimage || run swappartitions && run loadimage || " \
Ian Ray8355e8c2021-04-23 16:15:12 +020096 "setenv partnum 0 && echo MISSING IMAGE;" \
Ian Ray70846762018-01-10 20:31:37 +010097 "run doboot; " \
98 "run failbootcmd\0" \
Akshay Bhat197f9872016-01-29 15:16:40 -050099
Andrew Shaduraaf628af2016-05-24 15:56:19 +0200100
Akshay Bhat197f9872016-01-29 15:16:40 -0500101/* Physical Memory Map */
Akshay Bhat197f9872016-01-29 15:16:40 -0500102#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
103
Ian Raye5818ae2020-01-31 15:08:04 +0200104#define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */
105
Akshay Bhat197f9872016-01-29 15:16:40 -0500106#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
107#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
108#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
109
110#define CONFIG_SYS_INIT_SP_OFFSET \
111 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
112#define CONFIG_SYS_INIT_SP_ADDR \
113 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
114
Masahiro Yamada8cea9b52017-02-11 22:43:54 +0900115/* environment organization */
Akshay Bhat197f9872016-01-29 15:16:40 -0500116
Akshay Bhat197f9872016-01-29 15:16:40 -0500117#define CONFIG_SYS_FSL_USDHC_NUM 3
118
119/* Framebuffer */
Ian Ray70846762018-01-10 20:31:37 +0100120#define CONFIG_HIDE_LOGO_VERSION
Akshay Bhat197f9872016-01-29 15:16:40 -0500121#define CONFIG_IMX_HDMI
122#define CONFIG_IMX_VIDEO_SKIP
123
Akshay Bhat5d643622016-04-12 18:13:59 -0400124#define CONFIG_IMX6_PWM_PER_CLK 66000000
125
Akshay Bhat197f9872016-01-29 15:16:40 -0500126#define CONFIG_PCI_SCAN_SHOW
127#define CONFIG_PCIE_IMX
Akshay Bhat197f9872016-01-29 15:16:40 -0500128#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5)
Akshay Bhat197f9872016-01-29 15:16:40 -0500129
Akshay Bhat197f9872016-01-29 15:16:40 -0500130#endif /* __GE_BX50V3_CONFIG_H */