Ilko Iliev | e2480f1 | 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 | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 15 | #undef CONFIG_EXTRA_ENV_SETTINGS |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 16 | |
| 17 | /* |
| 18 | * Use: |
Wolfgang Denk | 62fb2b4 | 2021-09-27 17:42:39 +0200 | [diff] [blame] | 19 | * boot-mode=mix |
| 20 | * boot-mode=sd |
| 21 | * boot-mode=net |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 22 | */ |
| 23 | #define MY_CONFIG_BOOT_MODE "boot-mode=sd\0" |
| 24 | |
| 25 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 26 | MY_CONFIG_BOOT_MODE \ |
| 27 | "image=zImage\0" \ |
| 28 | "console=ttymxc0\0" \ |
| 29 | "fdt_file=imx7-cm.dtb\0" \ |
| 30 | "fdt_addr=0x83000000\0" \ |
| 31 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | b113bca | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 32 | "mmcpart=1\0" \ |
Peng Fan | bb4bb58 | 2022-04-15 12:23:41 +0800 | [diff] [blame] | 33 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 34 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 35 | "root=${mmcroot}\0" \ |
| 36 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 37 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 38 | \ |
| 39 | "bootsd=" \ |
| 40 | "echo Booting from SD card ...; " \ |
| 41 | "run mmcargs; " \ |
| 42 | "mmc dev ${mmcdev};" \ |
| 43 | "run loadimage; " \ |
| 44 | "run loadfdt; " \ |
| 45 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 46 | "\0" \ |
| 47 | \ |
| 48 | "bootmix=" \ |
| 49 | "echo Boot Kernel and FDT from TFTP, RootFs from SD card ...; " \ |
| 50 | "run mmcargs; " \ |
| 51 | "mmc dev ${mmcdev};" \ |
| 52 | "tftp ${fdt_addr} ${fdt_file}; " \ |
| 53 | "tftp ${image}; " \ |
| 54 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 55 | "\0" \ |
| 56 | \ |
| 57 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 58 | "root=/dev/nfs " \ |
| 59 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \ |
| 60 | "\0" \ |
| 61 | "bootnet=" \ |
| 62 | "echo Booting from net ...; " \ |
| 63 | "run netargs; " \ |
| 64 | "tftp ${image}; " \ |
| 65 | "tftp ${fdt_addr} ${fdt_file}; " \ |
| 66 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 67 | "\0" |
| 68 | |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 69 | /* Physical Memory Map */ |
| 70 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 71 | |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 72 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 73 | #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 74 | #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 75 | |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 76 | /* MMC Config*/ |
Tom Rini | 376b88a | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 77 | #define CFG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR |
| 78 | #define CFG_SYS_FSL_USDHC_NUM 2 |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 79 | |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 80 | |
| 81 | /* USB Configs */ |
| 82 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 83 | |
Ilko Iliev | e2480f1 | 2021-04-16 15:48:13 +0200 | [diff] [blame] | 84 | #endif /* __CONFIG_H */ |