Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Freescale i.MX7D SABRESD board. |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __MX7D_SABRESD_CONFIG_H |
| 9 | #define __MX7D_SABRESD_CONFIG_H |
| 10 | |
| 11 | #include "mx7_common.h" |
| 12 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 13 | #define PHYS_SDRAM_SIZE SZ_1G |
| 14 | |
Fabio Estevam | 82bf1a0 | 2016-02-22 18:41:48 -0300 | [diff] [blame] | 15 | #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR |
| 16 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 17 | /* MMC Config*/ |
| 18 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 19 | |
Peng Fan | 48509ae | 2016-01-28 16:55:08 +0800 | [diff] [blame] | 20 | #ifdef CONFIG_IMX_BOOTAUX |
| 21 | /* Set to QSPI1 A flash at default */ |
| 22 | #define CONFIG_SYS_AUXCORE_BOOTDATA 0x60000000 |
Peng Fan | 48509ae | 2016-01-28 16:55:08 +0800 | [diff] [blame] | 23 | |
| 24 | #define UPDATE_M4_ENV \ |
| 25 | "m4image=m4_qspi.bin\0" \ |
| 26 | "loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \ |
| 27 | "update_m4_from_sd=" \ |
| 28 | "if sf probe 0:0; then " \ |
| 29 | "if run loadm4image; then " \ |
| 30 | "setexpr fw_sz ${filesize} + 0xffff; " \ |
| 31 | "setexpr fw_sz ${fw_sz} / 0x10000; " \ |
| 32 | "setexpr fw_sz ${fw_sz} * 0x10000; " \ |
| 33 | "sf erase 0x0 ${fw_sz}; " \ |
| 34 | "sf write ${loadaddr} 0x0 ${filesize}; " \ |
| 35 | "fi; " \ |
| 36 | "fi\0" \ |
| 37 | "m4boot=sf probe 0:0; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0" |
| 38 | #else |
| 39 | #define UPDATE_M4_ENV "" |
| 40 | #endif |
| 41 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 42 | #define CONFIG_MFG_ENV_SETTINGS \ |
| 43 | "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ |
| 44 | "rdinit=/linuxrc " \ |
| 45 | "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ |
| 46 | "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ |
| 47 | "g_mass_storage.iSerialNumber=\"\" "\ |
| 48 | "clk_ignore_unused "\ |
| 49 | "\0" \ |
| 50 | "initrd_addr=0x83800000\0" \ |
| 51 | "initrd_high=0xffffffff\0" \ |
| 52 | "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \ |
| 53 | |
Tzu-Jung Lee | 7db2714 | 2015-10-27 23:00:50 +0000 | [diff] [blame] | 54 | #define CONFIG_DFU_ENV_SETTINGS \ |
| 55 | "dfu_alt_info=image raw 0 0x800000;"\ |
| 56 | "u-boot raw 0 0x4000;"\ |
| 57 | "bootimg part 0 1;"\ |
| 58 | "rootfs part 0 2\0" \ |
| 59 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 60 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Peng Fan | 48509ae | 2016-01-28 16:55:08 +0800 | [diff] [blame] | 61 | UPDATE_M4_ENV \ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 62 | CONFIG_MFG_ENV_SETTINGS \ |
Tzu-Jung Lee | 7db2714 | 2015-10-27 23:00:50 +0000 | [diff] [blame] | 63 | CONFIG_DFU_ENV_SETTINGS \ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 64 | "script=boot.scr\0" \ |
| 65 | "image=zImage\0" \ |
| 66 | "console=ttymxc0\0" \ |
| 67 | "fdt_high=0xffffffff\0" \ |
Joris Offouga | 9e75d14 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 68 | "finduuid=part uuid mmc 0:1 uuid\0" \ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 69 | "initrd_high=0xffffffff\0" \ |
Joris Offouga | 9e75d14 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 70 | "fdtfile=imx7d-sdb.dtb\0" \ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 71 | "fdt_addr=0x83000000\0" \ |
Joris Offouga | 9e75d14 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 72 | "fdt_addr_r=0x83000000\0" \ |
Tom Rini | 9004ee0 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 73 | "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 74 | "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Jan Kiszka | 2a6f0e6 | 2020-03-16 12:50:09 +0100 | [diff] [blame] | 75 | "ramdisk_addr_r=0x83100000\0" \ |
| 76 | "ramdiskaddr=0x83100000\0" \ |
Tom Rini | 9004ee0 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 77 | "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Peng Fan | 55be1ed | 2015-10-29 15:54:53 +0800 | [diff] [blame] | 78 | "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" \ |
Joris Offouga | 9e75d14 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 79 | BOOTENV |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 80 | |
Joris Offouga | 9e75d14 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 81 | #define BOOT_TARGET_DEVICES(func) \ |
| 82 | func(MMC, mmc, 0) \ |
| 83 | func(DHCP, dhcp, na) \ |
| 84 | func(PXE, pxe, na) |
| 85 | |
| 86 | #include <config_distro_bootcmd.h> |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 87 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 88 | /* Physical Memory Map */ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 89 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 90 | |
| 91 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 92 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 93 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 94 | |
| 95 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 96 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 97 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 98 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 99 | |
Masahiro Yamada | 8cea9b5 | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 100 | /* environment organization */ |
Peng Fan | 62f9260 | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 101 | |
| 102 | /* |
| 103 | * If want to use nand, define CONFIG_NAND_MXS and rework board |
| 104 | * to support nand, since emmc has pin conflicts with nand |
| 105 | */ |
| 106 | #ifdef CONFIG_NAND_MXS |
Peng Fan | 62f9260 | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 107 | /* NAND stuff */ |
| 108 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 109 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
Peng Fan | 62f9260 | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 110 | |
| 111 | /* DMA stuff, needed for GPMI/MXS NAND support */ |
Peng Fan | 62f9260 | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 112 | #endif |
| 113 | |
Peng Fan | 62f9260 | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 114 | #ifdef CONFIG_NAND_MXS |
| 115 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
| 116 | #else |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 117 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
Peng Fan | 62f9260 | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 118 | #endif |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 119 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 120 | /* USB Configs */ |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 121 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 122 | |
Tzu-Jung Lee | 7db2714 | 2015-10-27 23:00:50 +0000 | [diff] [blame] | 123 | #define CONFIG_USBD_HS |
Tzu-Jung Lee | 7db2714 | 2015-10-27 23:00:50 +0000 | [diff] [blame] | 124 | |
Anatolij Gustschin | e22e08e | 2021-10-04 17:33:12 +0200 | [diff] [blame] | 125 | #ifdef CONFIG_DM_VIDEO |
Peng Fan | 55be1ed | 2015-10-29 15:54:53 +0800 | [diff] [blame] | 126 | #define CONFIG_VIDEO_BMP_LOGO |
| 127 | #endif |
| 128 | |
Adrian Alonso | 9881077 | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 129 | #endif /* __CONFIG_H */ |