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 | /* Link Definitions */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 14 | #define CFG_SYS_INIT_RAM_ADDR 0x40000000 |
| 15 | #define CFG_SYS_INIT_RAM_SIZE 0x200000 |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 16 | |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 17 | #define CFG_SYS_SDRAM_BASE 0x40000000 |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 18 | #define PHYS_SDRAM 0x40000000 |
| 19 | #define PHYS_SDRAM_SIZE 0x20000000 /* Minimum 512 MiB DDR */ |
| 20 | |
Tom Rini | a17aa19 | 2022-12-04 10:04:55 -0500 | [diff] [blame] | 21 | #define CFG_MXC_UART_BASE UART1_BASE_ADDR |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 22 | |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 23 | /* PHY needs a longer autonegotiation timeout after reset */ |
| 24 | #define PHY_ANEG_TIMEOUT 20000 |
| 25 | #define FEC_QUIRK_ENET_MAC |
| 26 | |
| 27 | /* USDHC */ |
Tom Rini | 376b88a | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 28 | #define CFG_SYS_FSL_USDHC_NUM 2 |
| 29 | #define CFG_SYS_FSL_ESDHC_ADDR 0 |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 30 | |
Marek Vasut | 035f6bf | 2024-01-13 18:58:30 +0100 | [diff] [blame^] | 31 | #define CFG_EXTRA_ENV_SETTINGS \ |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 32 | "altbootcmd=run bootcmd ; reset\0" \ |
| 33 | "bootlimit=3\0" \ |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 34 | "dfu_alt_info=" \ |
| 35 | /* RAM block at DRAM offset 256..768 MiB */ \ |
| 36 | "ram ram0=ram ram 0x50000000 0x20000000&" \ |
| 37 | /* 16 MiB SPI NOR */ \ |
| 38 | "mtd nor0=sf raw 0x0 0x1000000\0" \ |
| 39 | "dh_update_env=" \ |
| 40 | "setenv dh_update_env true ; saveenv ; saveenv\0" \ |
| 41 | "dh_update_sf_gen_fcfb=" \ |
| 42 | "setexpr sfaddr ${loadaddr} - 0x1000 ; " \ |
| 43 | "base ${sfaddr} ; " \ |
| 44 | "mw 0 0 0x400 ; " \ |
| 45 | "mw 0x400 0x42464346 ; " \ |
| 46 | "mw 0x404 0x56010000 ; " \ |
| 47 | "mw 0x40c 00030300 ; " \ |
| 48 | "mw 0x444 0x00020101 ; " \ |
| 49 | "mw 0x450 0x10000000 ; " \ |
| 50 | "mw 0x480 0x0818040b ; " \ |
| 51 | "mw 0x484 0x24043008 ; " \ |
| 52 | "mw 0x5c0 0x100 ; " \ |
| 53 | "mw 0x5c4 0x10000 ; " \ |
| 54 | "base 0\0" \ |
| 55 | "dh_update_sf_write_data=" \ |
| 56 | "setexpr sfaddr ${loadaddr} - 0x1000 ; " \ |
| 57 | "setexpr filesize ${filesize} + 0x1000 ; " \ |
| 58 | "sf probe && sf update ${sfaddr} 0 ${filesize}\0" \ |
| 59 | "dh_update_sd_to_sf=" \ |
| 60 | "load mmc 0:1 ${loadaddr} boot/flash.bin && " \ |
| 61 | "run dh_update_sf_gen_fcfb dh_update_sf_write_data\0" \ |
| 62 | "dh_update_emmc_to_sf=" \ |
| 63 | "load mmc 1:1 ${loadaddr} boot/flash.bin && " \ |
| 64 | "run dh_update_sf_gen_fcfb dh_update_sf_write_data\0" \ |
Marek Vasut | 035f6bf | 2024-01-13 18:58:30 +0100 | [diff] [blame^] | 65 | "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 66 | "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 67 | "ramdisk_addr_r=0x58000000\0" \ |
| 68 | "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 69 | "stdin=serial\0" \ |
| 70 | "stdout=serial\0" \ |
| 71 | "stderr=serial\0" \ |
| 72 | /* Give slow devices beyond USB HUB chance to come up. */ \ |
| 73 | "usb_pgood_delay=2000\0" \ |
Marek Vasut | f670cd7 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 74 | BOOTENV |
| 75 | |
| 76 | #define BOOT_TARGET_DEVICES(func) \ |
| 77 | func(MMC, mmc, 0) \ |
| 78 | func(MMC, mmc, 1) \ |
| 79 | func(USB, usb, 0) \ |
| 80 | func(DHCP, dhcp, na) |
| 81 | |
| 82 | #include <config_distro_bootcmd.h> |
| 83 | |
| 84 | #endif |