blob: 94243117f1cc5e80ec3221feba579cb98492b3d8 [file] [log] [blame]
Marcel Ziswiler99d768b2019-05-31 18:56:39 +03001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2019 Toradex
4 */
5
6#ifndef __COLIBRI_IMX8X_H
7#define __COLIBRI_IMX8X_H
8
9#include <asm/arch/imx-regs.h>
10#include <linux/sizes.h>
11
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030012#define MEM_LAYOUT_ENV_SETTINGS \
13 "fdt_addr_r=0x83000000\0" \
14 "kernel_addr_r=0x81000000\0" \
15 "ramdisk_addr_r=0x83800000\0" \
16 "scriptaddr=0x80800000\0"
17
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030018/* Boot M4 */
19#define M4_BOOT_ENV \
20 "m4_0_image=m4_0.bin\0" \
21 "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
22 "${m4_0_image}\0" \
23 "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
24
Marcel Ziswileracf2a262023-03-03 14:26:29 +010025/* Enable Distro Boot */
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030026#define BOOT_TARGET_DEVICES(func) \
27 func(MMC, mmc, 1) \
28 func(MMC, mmc, 0) \
29 func(DHCP, dhcp, na)
30#include <config_distro_bootcmd.h>
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030031
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030032/* Initial environment variables */
Tom Rinic9edebe2022-12-04 10:03:50 -050033#define CFG_EXTRA_ENV_SETTINGS \
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030034 BOOTENV \
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030035 M4_BOOT_ENV \
36 MEM_LAYOUT_ENV_SETTINGS \
Igor Opaniuk84c1a2d2022-04-13 11:33:27 +020037 "boot_script_dhcp=boot.scr\0" \
Philippe Schenker31a2be52023-03-03 14:26:27 +010038 "console=ttyLP3\0" \
Andrejs Cainikovsa4d81542023-03-03 14:26:33 +010039 "fdt_board=eval-v3\0" \
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030040 "initrd_addr=0x83800000\0" \
41 "initrd_high=0xffffffffffffffff\0" \
Philippe Schenker31a2be52023-03-03 14:26:27 +010042 "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \
43 "consoleblank=0 earlycon\0" \
Marcel Ziswiler22a75ed2023-03-03 14:26:31 +010044 "update_uboot=askenv confirm Did you load flash.bin resp. u-boot-dtb.imx (y/N)?; " \
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030045 "if test \"$confirm\" = \"y\"; then " \
46 "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
47 "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \
Andrejs Cainikovs943d4f62023-03-03 14:26:34 +010048 "${blkcnt}; fi\0"
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030049
Tom Rinibb4dd962022-11-16 13:10:37 -050050#define CFG_SYS_SDRAM_BASE 0x80000000
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030051#define PHYS_SDRAM_1 0x80000000
52#define PHYS_SDRAM_2 0x880000000
53#define PHYS_SDRAM_1_SIZE SZ_2G /* 2 GB */
54#define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */
55
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030056/* Generic Timer Definitions */
Marcel Ziswiler99d768b2019-05-31 18:56:39 +030057
58#define BOOTAUX_RESERVED_MEM_BASE 0x88000000
59#define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */
60
61#endif /* __COLIBRI_IMX8X_H */