Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Adrian Alonso | 1a8150d | 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 | 1a8150d | 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 | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 13 | #define PHYS_SDRAM_SIZE SZ_1G |
| 14 | |
Peng Fan | 79e355f | 2016-01-28 16:55:08 +0800 | [diff] [blame] | 15 | #ifdef CONFIG_IMX_BOOTAUX |
Peng Fan | 79e355f | 2016-01-28 16:55:08 +0800 | [diff] [blame] | 16 | |
| 17 | #define UPDATE_M4_ENV \ |
| 18 | "m4image=m4_qspi.bin\0" \ |
| 19 | "loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \ |
| 20 | "update_m4_from_sd=" \ |
| 21 | "if sf probe 0:0; then " \ |
| 22 | "if run loadm4image; then " \ |
| 23 | "setexpr fw_sz ${filesize} + 0xffff; " \ |
| 24 | "setexpr fw_sz ${fw_sz} / 0x10000; " \ |
| 25 | "setexpr fw_sz ${fw_sz} * 0x10000; " \ |
| 26 | "sf erase 0x0 ${fw_sz}; " \ |
| 27 | "sf write ${loadaddr} 0x0 ${filesize}; " \ |
| 28 | "fi; " \ |
| 29 | "fi\0" \ |
Tom Rini | 56fc54a | 2022-06-25 11:02:47 -0400 | [diff] [blame] | 30 | "m4boot=sf probe 0:0; bootaux 0x60000000\0" |
Peng Fan | 79e355f | 2016-01-28 16:55:08 +0800 | [diff] [blame] | 31 | #else |
| 32 | #define UPDATE_M4_ENV "" |
| 33 | #endif |
| 34 | |
Tom Rini | 8f52920 | 2022-12-04 10:04:52 -0500 | [diff] [blame] | 35 | #define CFG_MFG_ENV_SETTINGS \ |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 36 | "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ |
| 37 | "rdinit=/linuxrc " \ |
| 38 | "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ |
| 39 | "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ |
| 40 | "g_mass_storage.iSerialNumber=\"\" "\ |
| 41 | "clk_ignore_unused "\ |
| 42 | "\0" \ |
| 43 | "initrd_addr=0x83800000\0" \ |
| 44 | "initrd_high=0xffffffff\0" \ |
| 45 | "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \ |
| 46 | |
Tom Rini | b8089c6 | 2022-12-04 10:03:38 -0500 | [diff] [blame] | 47 | #define CFG_DFU_ENV_SETTINGS \ |
Tzu-Jung Lee | 73f1b80 | 2015-10-27 23:00:50 +0000 | [diff] [blame] | 48 | "dfu_alt_info=image raw 0 0x800000;"\ |
| 49 | "u-boot raw 0 0x4000;"\ |
| 50 | "bootimg part 0 1;"\ |
| 51 | "rootfs part 0 2\0" \ |
| 52 | |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 53 | #define CFG_EXTRA_ENV_SETTINGS \ |
Peng Fan | 79e355f | 2016-01-28 16:55:08 +0800 | [diff] [blame] | 54 | UPDATE_M4_ENV \ |
Tom Rini | 8f52920 | 2022-12-04 10:04:52 -0500 | [diff] [blame] | 55 | CFG_MFG_ENV_SETTINGS \ |
Tom Rini | b8089c6 | 2022-12-04 10:03:38 -0500 | [diff] [blame] | 56 | CFG_DFU_ENV_SETTINGS \ |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 57 | "script=boot.scr\0" \ |
| 58 | "image=zImage\0" \ |
| 59 | "console=ttymxc0\0" \ |
| 60 | "fdt_high=0xffffffff\0" \ |
Joris Offouga | 80e62e3 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 61 | "finduuid=part uuid mmc 0:1 uuid\0" \ |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 62 | "initrd_high=0xffffffff\0" \ |
Joris Offouga | 80e62e3 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 63 | "fdtfile=imx7d-sdb.dtb\0" \ |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 64 | "fdt_addr=0x83000000\0" \ |
Joris Offouga | 80e62e3 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 65 | "fdt_addr_r=0x83000000\0" \ |
Tom Rini | 72d8136 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 66 | "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 67 | "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Jan Kiszka | c94f405 | 2020-03-16 12:50:09 +0100 | [diff] [blame] | 68 | "ramdisk_addr_r=0x83100000\0" \ |
| 69 | "ramdiskaddr=0x83100000\0" \ |
Tom Rini | 72d8136 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 70 | "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Peng Fan | ebe517b | 2015-10-29 15:54:53 +0800 | [diff] [blame] | 71 | "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 | 80e62e3 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 72 | BOOTENV |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 73 | |
Joris Offouga | 80e62e3 | 2019-12-08 18:02:31 +0100 | [diff] [blame] | 74 | #define BOOT_TARGET_DEVICES(func) \ |
| 75 | func(MMC, mmc, 0) \ |
| 76 | func(DHCP, dhcp, na) \ |
| 77 | func(PXE, pxe, na) |
| 78 | |
| 79 | #include <config_distro_bootcmd.h> |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 80 | |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 81 | /* Physical Memory Map */ |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 82 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 83 | |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 84 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 85 | #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 86 | #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 87 | |
Masahiro Yamada | e856bdc | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 88 | /* environment organization */ |
Peng Fan | 6e1a41c | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 89 | |
| 90 | /* |
| 91 | * If want to use nand, define CONFIG_NAND_MXS and rework board |
| 92 | * to support nand, since emmc has pin conflicts with nand |
| 93 | */ |
| 94 | #ifdef CONFIG_NAND_MXS |
Peng Fan | 6e1a41c | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 95 | /* NAND stuff */ |
Tom Rini | 4e59094 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 96 | #define CFG_SYS_NAND_BASE 0x40000000 |
Peng Fan | 6e1a41c | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 97 | |
| 98 | /* DMA stuff, needed for GPMI/MXS NAND support */ |
Peng Fan | 6e1a41c | 2015-12-22 17:04:24 +0800 | [diff] [blame] | 99 | #endif |
| 100 | |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 101 | /* USB Configs */ |
Tom Rini | dd11fdc | 2022-12-04 10:04:56 -0500 | [diff] [blame] | 102 | #define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 103 | |
Adrian Alonso | 1a8150d | 2015-09-03 11:49:28 -0500 | [diff] [blame] | 104 | #endif /* __CONFIG_H */ |