Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2021 Ronetix GmbH |
| 4 | * |
| 5 | * Configuration settings for the Ronetix's iMX7-CM System-on-Module. |
| 6 | */ |
| 7 | |
| 8 | #ifndef __IMX7_CM_CONFIG_H |
| 9 | #define __IMX7_CM_CONFIG_H |
| 10 | |
| 11 | #include "mx7_common.h" |
| 12 | |
| 13 | #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR |
| 14 | |
Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 15 | #undef CONFIG_SYS_AUTOLOAD |
| 16 | #undef CONFIG_EXTRA_ENV_SETTINGS |
Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 17 | |
| 18 | /* |
| 19 | * Use: |
Wolfgang Denk | 0cf207e | 2021-09-27 17:42:39 +0200 | [diff] [blame] | 20 | * boot-mode=mix |
| 21 | * boot-mode=sd |
| 22 | * boot-mode=net |
Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 23 | */ |
| 24 | #define MY_CONFIG_BOOT_MODE "boot-mode=sd\0" |
| 25 | |
| 26 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 27 | MY_CONFIG_BOOT_MODE \ |
| 28 | "image=zImage\0" \ |
| 29 | "console=ttymxc0\0" \ |
| 30 | "fdt_file=imx7-cm.dtb\0" \ |
| 31 | "fdt_addr=0x83000000\0" \ |
| 32 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | de35b8f | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 33 | "mmcpart=1\0" \ |
Peng Fan | adfaa42 | 2022-04-15 12:23:41 +0800 | [diff] [blame] | 34 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 35 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 36 | "root=${mmcroot}\0" \ |
| 37 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 38 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 39 | \ |
| 40 | "bootsd=" \ |
| 41 | "echo Booting from SD card ...; " \ |
| 42 | "run mmcargs; " \ |
| 43 | "mmc dev ${mmcdev};" \ |
| 44 | "run loadimage; " \ |
| 45 | "run loadfdt; " \ |
| 46 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 47 | "\0" \ |
| 48 | \ |
| 49 | "bootmix=" \ |
| 50 | "echo Boot Kernel and FDT from TFTP, RootFs from SD card ...; " \ |
| 51 | "run mmcargs; " \ |
| 52 | "mmc dev ${mmcdev};" \ |
| 53 | "tftp ${fdt_addr} ${fdt_file}; " \ |
| 54 | "tftp ${image}; " \ |
| 55 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 56 | "\0" \ |
| 57 | \ |
| 58 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 59 | "root=/dev/nfs " \ |
| 60 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \ |
| 61 | "\0" \ |
| 62 | "bootnet=" \ |
| 63 | "echo Booting from net ...; " \ |
| 64 | "run netargs; " \ |
| 65 | "tftp ${image}; " \ |
| 66 | "tftp ${fdt_addr} ${fdt_file}; " \ |
| 67 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 68 | "\0" |
| 69 | |
Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 70 | /* Physical Memory Map */ |
| 71 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 72 | |
| 73 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 74 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 75 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 76 | |
Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 77 | /* MMC Config*/ |
| 78 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR |
| 79 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 80 | |
Ilko Iliev | fdd2f35 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 81 | |
| 82 | /* USB Configs */ |
| 83 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 84 | |
| 85 | #define CONFIG_USBD_HS |
| 86 | |
| 87 | /* SPL */ |
| 88 | #include "imx7_spl.h" |
| 89 | |
| 90 | #endif /* __CONFIG_H */ |