diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/verdin-am62.h | 74 | ||||
-rw-r--r-- | include/dfu.h | 1 | ||||
-rw-r--r-- | include/dm/pinctrl.h | 2 | ||||
-rw-r--r-- | include/hwspinlock.h | 2 | ||||
-rw-r--r-- | include/i2c_eeprom.h | 2 | ||||
-rw-r--r-- | include/nvmem.h | 2 | ||||
-rw-r--r-- | include/power-domain.h | 2 | ||||
-rw-r--r-- | include/power/regulator.h | 2 | ||||
-rw-r--r-- | include/remoteproc.h | 1 | ||||
-rw-r--r-- | include/soc.h | 2 | ||||
-rw-r--r-- | include/spi-mem.h | 2 | ||||
-rw-r--r-- | include/sysinfo.h | 2 | ||||
-rw-r--r-- | include/tlv_eeprom.h | 2 |
13 files changed, 96 insertions, 0 deletions
diff --git a/include/configs/verdin-am62.h b/include/configs/verdin-am62.h new file mode 100644 index 0000000000..a2cbcce33d --- /dev/null +++ b/include/configs/verdin-am62.h @@ -0,0 +1,74 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Configuration header file for Verdin AM62 SoM + * + * Copyright 2023 Toradex - https://www.toradex.com/ + */ + +#ifndef __VERDIN_AM62_H +#define __VERDIN_AM62_H + +#define RAMDISK_ADDR_R 0x90300000 +#define SCRIPTADDR 0x90280000 + +/* DDR Configuration */ +#define CFG_SYS_SDRAM_BASE 0x80000000 +#define CFG_SYS_SDRAM_BASE1 0x880000000 +#define CFG_SYS_SDRAM_SIZE SZ_2G /* Maximum supported size */ + +#define MEM_LAYOUT_ENV_SETTINGS \ + "fdt_addr_r=0x90200000\0" \ + "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "kernel_comp_addr_r=0x80200000\0" \ + "kernel_comp_size=0x08000000\0" \ + "ramdisk_addr_r=" __stringify(RAMDISK_ADDR_R) "\0" \ + "scriptaddr=" __stringify(SCRIPTADDR) "\0" + +#if CONFIG_TARGET_VERDIN_AM62_A53 +/* Enable Distro Boot */ +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ + func(DHCP, dhcp, na) +#include <config_distro_bootcmd.h> +#else /* CONFIG_TARGET_VERDIN_AM62_A53 */ +#define BOOTENV \ + "" +#endif /* CONFIG_TARGET_VERDIN_AM62_A53 */ + +#define EXTRA_ENV_DFUARGS \ + "dfu_alt_info_ram=" \ + "tispl.bin ram 0x80080000 0x200000;" \ + "u-boot.img ram 0x81000000 0x400000;" \ + "loadaddr ram " __stringify(CONFIG_SYS_LOAD_ADDR) " 0x80000;" \ + "scriptaddr ram " __stringify(SCRIPTADDR) " 0x80000;" \ + "ramdisk_addr_r ram " __stringify(RAMDISK_ADDR_R) " 0x8000000\0" + +/* Incorporate settings into the U-Boot environment */ +#define CFG_EXTRA_ENV_SETTINGS \ + BOOTENV \ + EXTRA_ENV_DFUARGS \ + MEM_LAYOUT_ENV_SETTINGS \ + "boot_scripts=boot.scr\0" \ + "boot_script_dhcp=boot.scr\0" \ + "console=ttyS2\0" \ + "fdt_board=dev\0" \ + "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ + "consoleblank=0 earlycon=ns16550a,mmio32,0x02800000\0" \ + "update_tiboot3=askenv confirm Did you load tiboot3.bin (y/N)?; " \ + "if test \"$confirm\" = \"y\"; then " \ + "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ + "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \ + "${blkcnt}; fi\0" \ + "update_tispl=askenv confirm Did you load tispl.bin (y/N)?; " \ + "if test \"$confirm\" = \"y\"; then " \ + "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ + "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x400 " \ + "${blkcnt}; fi\0" \ + "update_uboot=askenv confirm Did you load u-boot.img (y/N)?; " \ + "if test \"$confirm\" = \"y\"; then " \ + "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ + "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x1400 " \ + "${blkcnt}; fi\0" + +#endif /* __VERDIN_AM62_H */ diff --git a/include/dfu.h b/include/dfu.h index 07922224ef..548c3700e6 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -11,6 +11,7 @@ #define __DFU_ENTITY_H_ #include <common.h> +#include <linux/errno.h> #include <linux/list.h> #include <mmc.h> #include <spi_flash.h> diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index e3e50afeaf..5dce3ec69f 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -6,6 +6,8 @@ #ifndef __PINCTRL_H #define __PINCTRL_H +#include <linux/errno.h> + #define PINNAME_SIZE 10 #define PINMUX_SIZE 80 diff --git a/include/hwspinlock.h b/include/hwspinlock.h index d8556c0b4b..dd5135442e 100644 --- a/include/hwspinlock.h +++ b/include/hwspinlock.h @@ -6,6 +6,8 @@ #ifndef _HWSPINLOCK_H_ #define _HWSPINLOCK_H_ +#include <linux/errno.h> + /** * Implement a hwspinlock uclass. * Hardware spinlocks are used to perform hardware protection of diff --git a/include/i2c_eeprom.h b/include/i2c_eeprom.h index 32dcb03497..cba991e357 100644 --- a/include/i2c_eeprom.h +++ b/include/i2c_eeprom.h @@ -6,6 +6,8 @@ #ifndef __I2C_EEPROM #define __I2C_EEPROM +#include <linux/errno.h> + struct udevice; struct i2c_eeprom_ops { diff --git a/include/nvmem.h b/include/nvmem.h index 822e698bdd..e6a8a98828 100644 --- a/include/nvmem.h +++ b/include/nvmem.h @@ -6,6 +6,8 @@ #ifndef NVMEM_H #define NVMEM_H +#include <linux/errno.h> + /** * DOC: Design * diff --git a/include/power-domain.h b/include/power-domain.h index 2ff6c77cd7..18525073e5 100644 --- a/include/power-domain.h +++ b/include/power-domain.h @@ -6,6 +6,8 @@ #ifndef _POWER_DOMAIN_H #define _POWER_DOMAIN_H +#include <linux/errno.h> + /** * A power domain is a portion of an SoC or chip that is powered by a * switchable source of power. In many cases, software has control over the diff --git a/include/power/regulator.h b/include/power/regulator.h index ff1bfc2435..d66d0e94f7 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -7,6 +7,8 @@ #ifndef _INCLUDE_REGULATOR_H_ #define _INCLUDE_REGULATOR_H_ +#include <linux/errno.h> + struct udevice; /** diff --git a/include/remoteproc.h b/include/remoteproc.h index 61aa50ac79..48c71597fb 100644 --- a/include/remoteproc.h +++ b/include/remoteproc.h @@ -14,6 +14,7 @@ * platforms have moved to dm/fdt. */ #include <dm/platdata.h> /* For platform data support - non dt world */ +#include <linux/errno.h> /** * struct fw_rsc_hdr - firmware resource entry header diff --git a/include/soc.h b/include/soc.h index a52a300a84..197d58443a 100644 --- a/include/soc.h +++ b/include/soc.h @@ -7,6 +7,8 @@ #ifndef __SOC_H #define __SOC_H +#include <linux/errno.h> + #define SOC_MAX_STR_SIZE 128 struct udevice; diff --git a/include/spi-mem.h b/include/spi-mem.h index 6b969919b6..fae7dfcaa4 100644 --- a/include/spi-mem.h +++ b/include/spi-mem.h @@ -11,6 +11,8 @@ #ifndef __UBOOT_SPI_MEM_H #define __UBOOT_SPI_MEM_H +#include <linux/errno.h> + struct udevice; #define SPI_MEM_OP_DTR .dtr = 1 diff --git a/include/sysinfo.h b/include/sysinfo.h index b140d742e9..c6e05dd5e9 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -7,6 +7,8 @@ #ifndef __SYSINFO_H__ #define __SYSINFO_H__ +#include <linux/errno.h> + struct udevice; /* diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h index a2c333e744..af28a0cdf7 100644 --- a/include/tlv_eeprom.h +++ b/include/tlv_eeprom.h @@ -7,6 +7,8 @@ #ifndef __TLV_EEPROM_H_ #define __TLV_EEPROM_H_ +#include <linux/errno.h> + /* * The Definition of the TlvInfo EEPROM format can be found at onie.org or * github.com/onie |