Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 CompuLab, Ltd. |
| 4 | * |
| 5 | * Configuration settings for the CompuLab CL-SOM-iMX7 System-on-Module. |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __CL_SOM_IMX7_CONFIG_H |
| 9 | #define __CL_SOM_IMX7_CONFIG_H |
| 10 | |
| 11 | #include "mx7_common.h" |
| 12 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 13 | #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR |
| 14 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 15 | /* Network */ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 16 | #define CONFIG_FEC_MXC_PHYADDR 0 |
| 17 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 18 | /* ENET1 */ |
| 19 | #define IMX_FEC_BASE ENET_IPS_BASE_ADDR |
| 20 | |
| 21 | /* PMIC */ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 22 | #define CONFIG_POWER_PFUZE3000 |
| 23 | #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 |
| 24 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 25 | #define CONFIG_PCA953X |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 26 | #define CONFIG_SYS_I2C_PCA953X_ADDR 0x20 |
| 27 | #define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} } |
| 28 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 29 | #undef CONFIG_EXTRA_ENV_SETTINGS |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 30 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 31 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 32 | "script=boot.scr\0" \ |
| 33 | "loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};\0" \ |
| 34 | "loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};\0" \ |
| 35 | "loadfdt=load ${storagetype} ${storagedev} ${fdtaddr} ${fdtfile};\0" \ |
| 36 | "bootscript=echo Running bootscript from ${storagetype} ...; source ${loadaddr};\0" \ |
| 37 | "storagebootcmd=echo Booting from ${storagetype} ...; run ${storagetype}args; run doboot;\0" \ |
| 38 | "kernel=zImage\0" \ |
| 39 | "console=ttymxc0\0" \ |
| 40 | "fdt_high=0xffffffff\0" \ |
| 41 | "initrd_high=0xffffffff\0" \ |
| 42 | "fdtfile=imx7d-sbc-imx7.dtb\0" \ |
| 43 | "fdtaddr=0x83000000\0" \ |
| 44 | "mmcdev_def="__stringify(CONFIG_SYS_MMC_DEV)"\0" \ |
| 45 | "usbdev_def="__stringify(CONFIG_SYS_USB_DEV)"\0" \ |
Tom Rini | b113bca | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 46 | "mmcpart=1\0" \ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 47 | "usbpart=" __stringify(CONFIG_SYS_USB_IMG_LOAD_PART) "\0" \ |
| 48 | "doboot=bootz ${loadaddr} - ${fdtaddr}\0" \ |
| 49 | "mmc_config=mmc dev ${mmcdev}; mmc rescan\0" \ |
| 50 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 51 | "root=/dev/mmcblk${mmcblk}p2 rootwait rw\0" \ |
| 52 | "mmcbootscript=" \ |
| 53 | "if run mmc_config; then " \ |
| 54 | "setenv storagetype mmc;" \ |
| 55 | "setenv storagedev ${mmcdev}:${mmcpart};" \ |
| 56 | "if run loadscript; then " \ |
| 57 | "run bootscript; " \ |
| 58 | "fi; " \ |
| 59 | "fi;\0" \ |
| 60 | "mmcboot=" \ |
| 61 | "if run mmc_config; then " \ |
| 62 | "setenv storagetype mmc;" \ |
| 63 | "setenv storagedev ${mmcdev}:${mmcpart};" \ |
| 64 | "if run loadkernel; then " \ |
| 65 | "if run loadfdt; then " \ |
| 66 | "run storagebootcmd;" \ |
| 67 | "fi; " \ |
| 68 | "fi; " \ |
| 69 | "fi;\0" \ |
| 70 | "sdbootscript=setenv mmcdev ${mmcdev_def}; setenv mmcblk 0; " \ |
| 71 | "run mmcbootscript\0" \ |
| 72 | "usbbootscript=setenv usbdev ${usbdev_def}; " \ |
| 73 | "setenv storagetype usb;" \ |
| 74 | "setenv storagedev ${usbdev}:${usbpart};" \ |
| 75 | "if run loadscript; then " \ |
| 76 | "run bootscript; " \ |
| 77 | "fi; " \ |
| 78 | "sdboot=setenv mmcdev ${mmcdev_def}; setenv mmcblk 0; run mmcboot\0" \ |
| 79 | "emmcbootscript=setenv mmcdev 1; setenv mmcblk 2; run mmcbootscript\0" \ |
| 80 | "emmcboot=setenv mmcdev 1; setenv mmcblk 2; run mmcboot\0" \ |
| 81 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 82 | /* Physical Memory Map */ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 83 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 84 | |
| 85 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 86 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 87 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 88 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 89 | /* SPI Flash support */ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 90 | |
| 91 | /* FLASH and environment organization */ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 92 | |
| 93 | /* MMC Config*/ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 94 | #ifdef CONFIG_FSL_USDHC |
| 95 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR |
| 96 | |
| 97 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 98 | #endif |
| 99 | |
| 100 | /* USB Configs */ |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 101 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 102 | #define CONFIG_MXC_USB_FLAGS 0 |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 103 | |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 104 | /* SPL */ |
| 105 | #include "imx7_spl.h" |
Ilya Ledvich | 38a53c6 | 2017-09-24 09:00:25 +0300 | [diff] [blame] | 106 | |
| 107 | #endif /* __CONFIG_H */ |