Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Embedded Artists i.MX7ULP COM board. |
| 6 | */ |
| 7 | |
| 8 | #ifndef __MX7ULP_COM_CONFIG_H |
| 9 | #define __MX7ULP_COM_CONFIG_H |
| 10 | |
| 11 | #include <linux/sizes.h> |
| 12 | #include <asm/arch/imx-regs.h> |
| 13 | |
Ricardo Salveti | 0219250 | 2021-09-12 17:32:57 +0300 | [diff] [blame] | 14 | #ifdef CONFIG_SPL |
| 15 | #include "imx7ulp_spl.h" |
| 16 | #endif |
| 17 | |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 18 | #define CONFIG_BOARD_POSTCLK_INIT |
| 19 | #define CONFIG_SYS_BOOTM_LEN 0x1000000 |
| 20 | |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 21 | /* |
| 22 | * Detect overlap between U-Boot image and environment area in build-time |
| 23 | * |
| 24 | * CONFIG_BOARD_SIZE_LIMIT = CONFIG_ENV_OFFSET - u-boot-dtb.imx offset |
| 25 | * CONFIG_BOARD_SIZE_LIMIT = 768k - 1k = 767k = 785408 |
| 26 | * |
| 27 | * Currently CONFIG_BOARD_SIZE_LIMIT does not handle expressions, so |
| 28 | * write the direct value here |
| 29 | */ |
| 30 | #define CONFIG_BOARD_SIZE_LIMIT 785408 |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 31 | #define CONFIG_MMCROOT "/dev/mmcblk0p2" |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 32 | |
| 33 | /* Using ULP WDOG for reset */ |
| 34 | #define WDOG_BASE_ADDR WDG1_RBASE |
| 35 | |
| 36 | #define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1MHz from TSTMR */ |
| 37 | |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 38 | /* UART */ |
| 39 | #define LPUART_BASE LPUART4_RBASE |
| 40 | |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 41 | /* Physical Memory Map */ |
| 42 | |
| 43 | #define PHYS_SDRAM 0x60000000 |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 44 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 45 | |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 46 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 47 | "image=zImage\0" \ |
| 48 | "console=ttyLP0\0" \ |
| 49 | "fdt_high=0xffffffff\0" \ |
| 50 | "initrd_high=0xffffffff\0" \ |
| 51 | "fdt_file=imx7ulp-com.dtb\0" \ |
| 52 | "fdt_addr=0x63000000\0" \ |
| 53 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | b113bca | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 54 | "mmcpart=1\0" \ |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 55 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ |
| 56 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 57 | "root=${mmcroot}\0" \ |
| 58 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 59 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 60 | "mmcboot=echo Booting from mmc ...; " \ |
| 61 | "run mmcargs; " \ |
| 62 | "if run loadfdt; then " \ |
| 63 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 64 | "fi;\0" \ |
| 65 | |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 66 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 67 | #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K |
| 68 | |
| 69 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 70 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 71 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 72 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 73 | |
Ricardo Salveti | 0219250 | 2021-09-12 17:32:57 +0300 | [diff] [blame] | 74 | #define CONFIG_ARMV7_SECURE_BASE 0x2F000000 |
| 75 | |
Fabio Estevam | ebc8fcc | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 76 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 77 | #endif /* __CONFIG_H */ |