Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Freescale i.MX6UL 14x14 EVK board. |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __MX6UL_14X14_EVK_CONFIG_H |
| 8 | #define __MX6UL_14X14_EVK_CONFIG_H |
| 9 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 10 | #include <asm/arch/imx-regs.h> |
| 11 | #include <linux/sizes.h> |
Simon Glass | 1af3c7f | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 12 | #include <linux/stringify.h> |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 13 | #include "mx6_common.h" |
Stefano Babic | 552a848 | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 14 | #include <asm/mach-imx/gpio.h> |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 15 | |
Peng Fan | d9cbb26 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 16 | #define is_mx6ul_9x9_evk() CONFIG_IS_ENABLED(TARGET_MX6UL_9X9_EVK) |
| 17 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 18 | /* SPL options */ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 19 | #include "imx6_spl.h" |
| 20 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 21 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 22 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 23 | /* MMC Configs */ |
| 24 | #ifdef CONFIG_FSL_USDHC |
| 25 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR |
| 26 | |
| 27 | /* NAND pin conflicts with usdhc2 */ |
| 28 | #ifdef CONFIG_NAND_MXS |
| 29 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
| 30 | #else |
| 31 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 32 | #endif |
| 33 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 34 | #endif |
| 35 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 36 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 37 | "script=boot.scr\0" \ |
| 38 | "image=zImage\0" \ |
| 39 | "console=ttymxc0\0" \ |
| 40 | "fdt_high=0xffffffff\0" \ |
| 41 | "initrd_high=0xffffffff\0" \ |
Peng Fan | d9cbb26 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 42 | "fdt_file=undefined\0" \ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 43 | "fdt_addr=0x83000000\0" \ |
| 44 | "boot_fdt=try\0" \ |
| 45 | "ip_dyn=yes\0" \ |
Tom Rini | 72d8136 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 46 | "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Peng Fan | df67490 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 47 | "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 48 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | de35b8f | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 49 | "mmcpart=1\0" \ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 50 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ |
| 51 | "mmcautodetect=yes\0" \ |
| 52 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 53 | "root=${mmcroot}\0" \ |
| 54 | "loadbootscript=" \ |
| 55 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 56 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 57 | "source\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 test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 63 | "if run loadfdt; then " \ |
| 64 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 65 | "else " \ |
| 66 | "if test ${boot_fdt} = try; then " \ |
| 67 | "bootz; " \ |
| 68 | "else " \ |
| 69 | "echo WARN: Cannot load the DT; " \ |
| 70 | "fi; " \ |
| 71 | "fi; " \ |
| 72 | "else " \ |
| 73 | "bootz; " \ |
| 74 | "fi;\0" \ |
| 75 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 76 | "root=/dev/nfs " \ |
| 77 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 78 | "netboot=echo Booting from net ...; " \ |
| 79 | "run netargs; " \ |
| 80 | "if test ${ip_dyn} = yes; then " \ |
| 81 | "setenv get_cmd dhcp; " \ |
| 82 | "else " \ |
| 83 | "setenv get_cmd tftp; " \ |
| 84 | "fi; " \ |
| 85 | "${get_cmd} ${image}; " \ |
| 86 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 87 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 88 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 89 | "else " \ |
| 90 | "if test ${boot_fdt} = try; then " \ |
| 91 | "bootz; " \ |
| 92 | "else " \ |
| 93 | "echo WARN: Cannot load the DT; " \ |
| 94 | "fi; " \ |
| 95 | "fi; " \ |
| 96 | "else " \ |
| 97 | "bootz; " \ |
Peng Fan | d9cbb26 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 98 | "fi;\0" \ |
| 99 | "findfdt="\ |
| 100 | "if test $fdt_file = undefined; then " \ |
| 101 | "if test $board_name = EVK && test $board_rev = 9X9; then " \ |
| 102 | "setenv fdt_file imx6ul-9x9-evk.dtb; fi; " \ |
| 103 | "if test $board_name = EVK && test $board_rev = 14X14; then " \ |
| 104 | "setenv fdt_file imx6ul-14x14-evk.dtb; fi; " \ |
| 105 | "if test $fdt_file = undefined; then " \ |
| 106 | "echo WARNING: Could not determine dtb to use; fi; " \ |
| 107 | "fi;\0" \ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 108 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 109 | /* Miscellaneous configurable options */ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 110 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 111 | /* Physical Memory Map */ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 112 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 113 | |
| 114 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 115 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 116 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 117 | |
| 118 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 119 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 120 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 121 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 122 | |
Masahiro Yamada | e856bdc | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 123 | /* environment organization */ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 124 | #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ |
| 125 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 126 | /* USB Configs */ |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 127 | #ifdef CONFIG_CMD_USB |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 128 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 129 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 130 | #define CONFIG_MXC_USB_FLAGS 0 |
| 131 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 132 | #endif |
| 133 | |
Peng Fan | 0d4cdb5 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 134 | #ifdef CONFIG_CMD_NET |
Peng Fan | 0d4cdb5 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 135 | #define CONFIG_FEC_ENET_DEV 1 |
| 136 | |
| 137 | #if (CONFIG_FEC_ENET_DEV == 0) |
| 138 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 139 | #define CONFIG_FEC_MXC_PHYADDR 0x2 |
| 140 | #define CONFIG_FEC_XCV_TYPE RMII |
| 141 | #elif (CONFIG_FEC_ENET_DEV == 1) |
| 142 | #define IMX_FEC_BASE ENET2_BASE_ADDR |
| 143 | #define CONFIG_FEC_MXC_PHYADDR 0x1 |
| 144 | #define CONFIG_FEC_XCV_TYPE RMII |
| 145 | #endif |
Peng Fan | 0d4cdb5 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 146 | #endif |
| 147 | |
Peng Fan | ce2190f | 2016-01-04 12:19:14 +0800 | [diff] [blame] | 148 | #ifndef CONFIG_SPL_BUILD |
Peng Fan | ae07605 | 2019-08-01 06:02:49 +0000 | [diff] [blame] | 149 | #if defined(CONFIG_DM_VIDEO) |
Peng Fan | df67490 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 150 | #define CONFIG_VIDEO_BMP_LOGO |
| 151 | #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR |
| 152 | #endif |
Peng Fan | ce2190f | 2016-01-04 12:19:14 +0800 | [diff] [blame] | 153 | #endif |
Peng Fan | df67490 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 154 | |
Peng Fan | f0ff57b | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 155 | #endif |