Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2022 Marek Vasut <marex@denx.de> |
| 4 | */ |
| 5 | |
| 6 | #ifndef __IMX8MP_DHCOM_PDK2_H |
| 7 | #define __IMX8MP_DHCOM_PDK2_H |
| 8 | |
| 9 | #include <linux/sizes.h> |
| 10 | #include <linux/stringify.h> |
| 11 | #include <asm/arch/imx-regs.h> |
| 12 | |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 13 | #define CONFIG_SYS_MONITOR_LEN SZ_1M |
| 14 | |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 15 | /* Link Definitions */ |
| 16 | #define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 |
| 17 | #define CONFIG_SYS_INIT_RAM_SIZE 0x200000 |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 18 | |
| 19 | #define CONFIG_SYS_SDRAM_BASE 0x40000000 |
| 20 | #define PHYS_SDRAM 0x40000000 |
| 21 | #define PHYS_SDRAM_SIZE 0x20000000 /* Minimum 512 MiB DDR */ |
| 22 | |
| 23 | #define CONFIG_MXC_UART_BASE UART1_BASE_ADDR |
| 24 | |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 25 | /* PHY needs a longer autonegotiation timeout after reset */ |
| 26 | #define PHY_ANEG_TIMEOUT 20000 |
| 27 | #define FEC_QUIRK_ENET_MAC |
| 28 | |
| 29 | /* USDHC */ |
| 30 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 31 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 32 | |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 33 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 34 | "altbootcmd=run bootcmd ; reset\0" \ |
| 35 | "bootlimit=3\0" \ |
| 36 | "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 37 | "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 38 | "ramdisk_addr_r=0x58000000\0" \ |
| 39 | "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 40 | /* Give slow devices beyond USB HUB chance to come up. */ \ |
| 41 | "usb_pgood_delay=2000\0" \ |
| 42 | "dfu_alt_info=" \ |
| 43 | /* RAM block at DRAM offset 256..768 MiB */ \ |
| 44 | "ram ram0=ram ram 0x50000000 0x20000000&" \ |
| 45 | /* 16 MiB SPI NOR */ \ |
| 46 | "mtd nor0=sf raw 0x0 0x1000000\0" \ |
| 47 | "dh_update_env=" \ |
| 48 | "setenv dh_update_env true ; saveenv ; saveenv\0" \ |
| 49 | "dh_update_sf_gen_fcfb=" \ |
| 50 | "setexpr sfaddr ${loadaddr} - 0x1000 ; " \ |
| 51 | "base ${sfaddr} ; " \ |
| 52 | "mw 0 0 0x400 ; " \ |
| 53 | "mw 0x400 0x42464346 ; " \ |
| 54 | "mw 0x404 0x56010000 ; " \ |
| 55 | "mw 0x40c 00030300 ; " \ |
| 56 | "mw 0x444 0x00020101 ; " \ |
| 57 | "mw 0x450 0x10000000 ; " \ |
| 58 | "mw 0x480 0x0818040b ; " \ |
| 59 | "mw 0x484 0x24043008 ; " \ |
| 60 | "mw 0x5c0 0x100 ; " \ |
| 61 | "mw 0x5c4 0x10000 ; " \ |
| 62 | "base 0\0" \ |
| 63 | "dh_update_sf_write_data=" \ |
| 64 | "setexpr sfaddr ${loadaddr} - 0x1000 ; " \ |
| 65 | "setexpr filesize ${filesize} + 0x1000 ; " \ |
| 66 | "sf probe && sf update ${sfaddr} 0 ${filesize}\0" \ |
| 67 | "dh_update_sd_to_sf=" \ |
| 68 | "load mmc 0:1 ${loadaddr} boot/flash.bin && " \ |
| 69 | "run dh_update_sf_gen_fcfb dh_update_sf_write_data\0" \ |
| 70 | "dh_update_emmc_to_sf=" \ |
| 71 | "load mmc 1:1 ${loadaddr} boot/flash.bin && " \ |
| 72 | "run dh_update_sf_gen_fcfb dh_update_sf_write_data\0" \ |
| 73 | BOOTENV |
| 74 | |
| 75 | #define BOOT_TARGET_DEVICES(func) \ |
| 76 | func(MMC, mmc, 0) \ |
| 77 | func(MMC, mmc, 1) \ |
| 78 | func(USB, usb, 0) \ |
| 79 | func(DHCP, dhcp, na) |
| 80 | |
| 81 | #include <config_distro_bootcmd.h> |
| 82 | |
| 83 | #endif |