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