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 | /* SATA Configs */ |
Andrew Shadura | aacc10c | 2016-05-24 15:56:21 +0200 | [diff] [blame] | 23 | #ifdef CONFIG_CMD_SATA |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 24 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
| 25 | #define CONFIG_DWC_AHSATA_PORT_ID 0 |
| 26 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR |
| 27 | #define CONFIG_LBA48 |
Andrew Shadura | aacc10c | 2016-05-24 15:56:21 +0200 | [diff] [blame] | 28 | #endif |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 29 | |
Ian Ray | f2ac6f7 | 2020-11-04 17:18:39 +0100 | [diff] [blame] | 30 | #ifdef CONFIG_CMD_NFS |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 31 | #define NETWORKBOOT \ |
| 32 | "setnetworkboot=" \ |
| 33 | "setenv ipaddr 172.16.2.10; setenv serverip 172.16.2.20; " \ |
| 34 | "setenv gatewayip 172.16.2.20; setenv nfsserver 172.16.2.20; " \ |
| 35 | "setenv netmask 255.255.255.0; setenv ethaddr ca:fe:de:ca:f0:11; " \ |
| 36 | "setenv bootargs root=/dev/nfs nfsroot=${nfsserver}:/srv/nfs/,v3,tcp rw rootwait" \ |
| 37 | "setenv bootargs $bootargs ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}::eth0:off " \ |
Ian Ray | 4f1970f | 2020-11-04 17:18:43 +0100 | [diff] [blame] | 38 | "setenv bootargs $bootargs cma=128M bootcause=${bootcause} ${videoargs} " \ |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 39 | "setenv bootargs $bootargs systemd.mask=helix-network-defaults.service " \ |
| 40 | "setenv bootargs $bootargs watchdog.handle_boot_enabled=1\0" \ |
| 41 | "networkboot=" \ |
| 42 | "run setnetworkboot; " \ |
| 43 | "nfs ${loadaddr} /srv/nfs/fitImage; " \ |
Sebastian Reichel | c44d374 | 2020-12-15 00:41:56 +0100 | [diff] [blame] | 44 | "bootm ${loadaddr}\0" \ |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 45 | |
Tom Rini | 7ae1b08 | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 46 | #define NETWORKBOOTCOMMAND \ |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 47 | "run networkboot; " \ |
| 48 | |
| 49 | #else |
| 50 | #define NETWORKBOOT \ |
| 51 | |
| 52 | #endif |
| 53 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 54 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Joonas Aijala | b026c82 | 2019-01-31 16:21:20 +0200 | [diff] [blame] | 55 | NETWORKBOOT \ |
Ian Ray | f07b314 | 2018-01-10 20:31:33 +0100 | [diff] [blame] | 56 | "image=/boot/fitImage\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 57 | "dev=mmc\0" \ |
Ian Ray | efc260a | 2019-01-31 16:21:12 +0200 | [diff] [blame] | 58 | "devnum=2\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 59 | "rootdev=mmcblk0p\0" \ |
| 60 | "quiet=quiet loglevel=0\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 61 | "setargs=setenv bootargs root=/dev/${rootdev}${partnum} " \ |
| 62 | "ro rootwait cma=128M " \ |
| 63 | "bootcause=${bootcause} " \ |
Robert Beckett | a707281 | 2020-01-31 15:08:01 +0200 | [diff] [blame] | 64 | "${quiet} " \ |
Ian Ray | 06a3e43 | 2018-04-25 16:57:03 +0200 | [diff] [blame] | 65 | "${videoargs}" "\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 66 | "doquiet=" \ |
| 67 | "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \ |
| 68 | "then setenv quiet; fi\0" \ |
| 69 | "hasfirstboot=" \ |
Robert Beckett | 5e13def | 2020-01-31 15:08:03 +0200 | [diff] [blame] | 70 | "test -e ${dev} ${devnum}:${partnum} /boot/bootcause/firstboot\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 71 | "swappartitions=" \ |
| 72 | "setexpr partnum 3 - ${partnum}\0" \ |
| 73 | "failbootcmd=" \ |
Robert Beckett | 92faf43 | 2020-01-31 15:07:59 +0200 | [diff] [blame] | 74 | "cls; " \ |
Ian Ray | c6b31ca | 2019-11-12 19:15:15 +0000 | [diff] [blame] | 75 | "setcurs 5 4; " \ |
| 76 | "lcdputs \"Monitor failed to start. " \ |
| 77 | "Try again, or contact GE Service for support.\"; " \ |
Ian Ray | 3a54355 | 2021-04-23 16:15:13 +0200 | [diff] [blame] | 78 | "bootcount reset; " \ |
| 79 | "while true; do sleep 1; done; \0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 80 | "altbootcmd=" \ |
| 81 | "run doquiet; " \ |
| 82 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ |
| 83 | "run hasfirstboot || setenv partnum 0; " \ |
| 84 | "if test ${partnum} != 0; then " \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 85 | "run swappartitions loadimage doboot; " \ |
| 86 | "fi; " \ |
| 87 | "run failbootcmd\0" \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 88 | "loadimage=" \ |
| 89 | "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 90 | "doboot=" \ |
| 91 | "echo Booting from ${dev}:${devnum}:${partnum} ...; " \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 92 | "run setargs; " \ |
Sebastian Reichel | c44d374 | 2020-12-15 00:41:56 +0100 | [diff] [blame] | 93 | "bootm ${loadaddr}\0" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 94 | "tryboot=" \ |
| 95 | "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \ |
| 96 | "run loadimage || run swappartitions && run loadimage || " \ |
Ian Ray | ee77bb5 | 2021-04-23 16:15:12 +0200 | [diff] [blame] | 97 | "setenv partnum 0 && echo MISSING IMAGE;" \ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 98 | "run doboot; " \ |
| 99 | "run failbootcmd\0" \ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 100 | |
Tom Rini | 7ae1b08 | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 101 | #define MMCBOOTCOMMAND \ |
Ian Ray | ee77bb5 | 2021-04-23 16:15:12 +0200 | [diff] [blame] | 102 | "run doquiet; " \ |
| 103 | "run tryboot; " \ |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 104 | |
Ian Ray | f2ac6f7 | 2020-11-04 17:18:39 +0100 | [diff] [blame] | 105 | #ifdef CONFIG_CMD_NFS |
Tom Rini | 7ae1b08 | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 106 | #define CONFIG_BOOTCOMMAND NETWORKBOOTCOMMAND |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 107 | #else |
Tom Rini | 7ae1b08 | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 108 | #define CONFIG_BOOTCOMMAND MMCBOOTCOMMAND |
Andrew Shadura | fc44902 | 2016-05-24 15:56:19 +0200 | [diff] [blame] | 109 | #endif |
| 110 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 111 | /* Physical Memory Map */ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 112 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 113 | |
Ian Ray | a19d737 | 2020-01-31 15:08:04 +0200 | [diff] [blame] | 114 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */ |
| 115 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 116 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 117 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 118 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 119 | |
| 120 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 121 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 122 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 123 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 124 | |
Masahiro Yamada | e856bdc | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 125 | /* environment organization */ |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 126 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 127 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
| 128 | |
| 129 | /* Framebuffer */ |
Ian Ray | 9e41b54 | 2018-01-10 20:31:37 +0100 | [diff] [blame] | 130 | #define CONFIG_HIDE_LOGO_VERSION |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 131 | #define CONFIG_IMX_HDMI |
| 132 | #define CONFIG_IMX_VIDEO_SKIP |
| 133 | |
Akshay Bhat | 54971ac | 2016-04-12 18:13:59 -0400 | [diff] [blame] | 134 | #define CONFIG_IMX6_PWM_PER_CLK 66000000 |
| 135 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 136 | #define CONFIG_PCI_SCAN_SHOW |
| 137 | #define CONFIG_PCIE_IMX |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 138 | #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5) |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 139 | |
Akshay Bhat | f9162b1 | 2016-01-29 15:16:40 -0500 | [diff] [blame] | 140 | #endif /* __GE_BX50V3_CONFIG_H */ |