Fabio Estevam | 0417ef1 | 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 | 8b71576 | 2021-09-12 17:32:57 +0300 | [diff] [blame] | 14 | #ifdef CONFIG_SPL |
| 15 | #include "imx7ulp_spl.h" |
| 16 | #endif |
| 17 | |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 18 | #define CONFIG_SYS_BOOTM_LEN 0x1000000 |
| 19 | |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 20 | /* Using ULP WDOG for reset */ |
| 21 | #define WDOG_BASE_ADDR WDG1_RBASE |
| 22 | |
| 23 | #define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1MHz from TSTMR */ |
| 24 | |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 25 | /* UART */ |
| 26 | #define LPUART_BASE LPUART4_RBASE |
| 27 | |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 28 | /* Physical Memory Map */ |
| 29 | |
| 30 | #define PHYS_SDRAM 0x60000000 |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 31 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 32 | |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 33 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 34 | "image=zImage\0" \ |
| 35 | "console=ttyLP0\0" \ |
| 36 | "fdt_high=0xffffffff\0" \ |
| 37 | "initrd_high=0xffffffff\0" \ |
| 38 | "fdt_file=imx7ulp-com.dtb\0" \ |
| 39 | "fdt_addr=0x63000000\0" \ |
| 40 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | de35b8f | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 41 | "mmcpart=1\0" \ |
Peng Fan | adfaa42 | 2022-04-15 12:23:41 +0800 | [diff] [blame^] | 42 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 43 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 44 | "root=${mmcroot}\0" \ |
| 45 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 46 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 47 | "mmcboot=echo Booting from mmc ...; " \ |
| 48 | "run mmcargs; " \ |
| 49 | "if run loadfdt; then " \ |
| 50 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 51 | "fi;\0" \ |
| 52 | |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 53 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 54 | #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K |
| 55 | |
| 56 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 57 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 58 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 59 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 60 | |
Fabio Estevam | 0417ef1 | 2019-12-09 10:43:03 -0300 | [diff] [blame] | 61 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 62 | #endif /* __CONFIG_H */ |