Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peng Fan | dbf316a | 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 | dbf316a | 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 | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 10 | #include <asm/arch/imx-regs.h> |
| 11 | #include <linux/sizes.h> |
Simon Glass | fb64e36 | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 12 | #include <linux/stringify.h> |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 13 | #include "mx6_common.h" |
Stefano Babic | 33731bc | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 14 | #include <asm/mach-imx/gpio.h> |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 15 | |
Peng Fan | 5630c98 | 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 | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 18 | /* SPL options */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 19 | #include "imx6_spl.h" |
| 20 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 21 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 22 | |
Peng Fan | dbf316a | 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 | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 34 | #endif |
| 35 | |
Peng Fan | dbf316a | 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 | 5630c98 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 42 | "fdt_file=undefined\0" \ |
Peng Fan | dbf316a | 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 | 9004ee0 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 46 | "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Peng Fan | 60c72b6 | 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 | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 48 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | b113bca | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 49 | "mmcpart=1\0" \ |
Peng Fan | bb4bb58 | 2022-04-15 12:23:41 +0800 | [diff] [blame] | 50 | "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 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 | 5630c98 | 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 | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 108 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 109 | /* Miscellaneous configurable options */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 110 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 111 | /* Physical Memory Map */ |
Peng Fan | dbf316a | 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 | |
Masahiro Yamada | 8cea9b5 | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 118 | /* environment organization */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 119 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 120 | /* USB Configs */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 121 | #ifdef CONFIG_CMD_USB |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 122 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 123 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 124 | #define CONFIG_MXC_USB_FLAGS 0 |
| 125 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 126 | #endif |
| 127 | |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 128 | #ifdef CONFIG_CMD_NET |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 129 | #define CONFIG_FEC_ENET_DEV 1 |
| 130 | |
| 131 | #if (CONFIG_FEC_ENET_DEV == 0) |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 132 | #define CONFIG_FEC_MXC_PHYADDR 0x2 |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 133 | #elif (CONFIG_FEC_ENET_DEV == 1) |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 134 | #define CONFIG_FEC_MXC_PHYADDR 0x1 |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 135 | #endif |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 136 | #endif |
| 137 | |
Peng Fan | c0eaca2 | 2016-01-04 12:19:14 +0800 | [diff] [blame] | 138 | #ifndef CONFIG_SPL_BUILD |
Peng Fan | f2e78c8 | 2019-08-01 06:02:49 +0000 | [diff] [blame] | 139 | #if defined(CONFIG_DM_VIDEO) |
Peng Fan | 60c72b6 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 140 | #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR |
| 141 | #endif |
Peng Fan | c0eaca2 | 2016-01-04 12:19:14 +0800 | [diff] [blame] | 142 | #endif |
Peng Fan | 60c72b6 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 143 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 144 | #endif |