Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Freescale i.MX6SX Sabreauto board. |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 6 | */ |
| 7 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 8 | #ifndef __CONFIG_H |
| 9 | #define __CONFIG_H |
| 10 | |
| 11 | #include "mx6_common.h" |
| 12 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 13 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 14 | |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame^] | 15 | #define CFG_EXTRA_ENV_SETTINGS \ |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 16 | "script=boot.scr\0" \ |
| 17 | "image=zImage\0" \ |
| 18 | "console=ttymxc0\0" \ |
| 19 | "fdt_high=0xffffffff\0" \ |
| 20 | "initrd_high=0xffffffff\0" \ |
| 21 | "fdt_file=imx6sx-sabreauto.dtb\0" \ |
| 22 | "fdt_addr=0x88000000\0" \ |
| 23 | "boot_fdt=try\0" \ |
| 24 | "ip_dyn=yes\0" \ |
| 25 | "mmcdev=0\0" \ |
| 26 | "mmcpart=1\0" \ |
| 27 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
| 28 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 29 | "root=${mmcroot}\0" \ |
| 30 | "loadbootscript=" \ |
| 31 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 32 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 33 | "source\0" \ |
| 34 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 35 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 36 | "mmcboot=echo Booting from mmc ...; " \ |
| 37 | "run mmcargs; " \ |
| 38 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 39 | "if run loadfdt; then " \ |
| 40 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 41 | "else " \ |
| 42 | "if test ${boot_fdt} = try; then " \ |
| 43 | "bootz; " \ |
| 44 | "else " \ |
| 45 | "echo WARN: Cannot load the DT; " \ |
| 46 | "fi; " \ |
| 47 | "fi; " \ |
| 48 | "else " \ |
| 49 | "bootz; " \ |
| 50 | "fi;\0" \ |
| 51 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 52 | "root=/dev/nfs " \ |
| 53 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 54 | "netboot=echo Booting from net ...; " \ |
| 55 | "run netargs; " \ |
| 56 | "if test ${ip_dyn} = yes; then " \ |
| 57 | "setenv get_cmd dhcp; " \ |
| 58 | "else " \ |
| 59 | "setenv get_cmd tftp; " \ |
| 60 | "fi; " \ |
| 61 | "${get_cmd} ${image}; " \ |
| 62 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 63 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; 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 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 76 | /* Miscellaneous configurable options */ |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 77 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 78 | /* Physical Memory Map */ |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 79 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 80 | |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 81 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 82 | #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 83 | #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 84 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 85 | /* MMC Configuration */ |
Tom Rini | 6cc0454 | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 86 | #define CFG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 87 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 88 | /* NAND stuff */ |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 89 | #define CFG_SYS_NAND_BASE 0x40000000 |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 90 | |
| 91 | /* DMA stuff, needed for GPMI/MXS NAND support */ |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 92 | |
| 93 | /* Network */ |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 94 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 95 | #define IMX_FEC_BASE ENET2_BASE_ADDR |
| 96 | #define CONFIG_FEC_MXC_PHYADDR 0x0 |
| 97 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 98 | #ifdef CONFIG_CMD_USB |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 99 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 100 | #define CONFIG_MXC_USB_FLAGS 0 |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 101 | #endif |
| 102 | |
Tom Rini | 6cc0454 | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 103 | #define CFG_SYS_FSL_USDHC_NUM 2 |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 104 | |
Ye Li | cf94a34 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 105 | #endif /* __CONFIG_H */ |