Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2017-2018 NXP |
| 4 | * Copyright 2019 Siemens AG |
| 5 | */ |
| 6 | |
| 7 | #ifndef __IMX8X_CAPRICORN_H |
| 8 | #define __IMX8X_CAPRICORN_H |
| 9 | |
| 10 | #include <linux/sizes.h> |
| 11 | #include <asm/arch/imx-regs.h> |
| 12 | |
| 13 | #include "siemens-env-common.h" |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 14 | |
| 15 | /* SPL config */ |
| 16 | #ifdef CONFIG_SPL_BUILD |
Tom Rini | dd5b58c | 2022-12-04 10:04:49 -0500 | [diff] [blame] | 17 | #define CFG_MALLOC_F_ADDR 0x00120000 |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 18 | |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 19 | #endif /* CONFIG_SPL_BUILD */ |
| 20 | |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 21 | /* ENET1 connects to base board and MUX with ESAI */ |
Tom Rini | 4daffb5 | 2022-12-04 10:03:52 -0500 | [diff] [blame] | 22 | #define CFG_FEC_ENET_DEV 1 |
Tom Rini | fa760c3 | 2022-12-04 10:03:53 -0500 | [diff] [blame] | 23 | #define CFG_FEC_MXC_PHYADDR 0x0 |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 24 | |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 25 | /* EEPROM */ |
| 26 | #define EEPROM_I2C_BUS 0 /* I2C0 */ |
| 27 | #define EEPROM_I2C_ADDR 0x50 |
| 28 | /* PCA9552 */ |
| 29 | #define PCA9552_1_I2C_BUS 1 /* I2C1 */ |
| 30 | #define PCA9552_1_I2C_ADDR 0x60 |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 31 | |
| 32 | /* AHAB */ |
| 33 | #ifdef CONFIG_AHAB_BOOT |
| 34 | #define AHAB_ENV "sec_boot=yes\0" |
| 35 | #else |
| 36 | #define AHAB_ENV "sec_boot=no\0" |
| 37 | #endif |
| 38 | |
| 39 | #define MFG_ENV_SETTINGS_DEFAULT \ |
| 40 | "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ |
| 41 | "rdinit=/linuxrc " \ |
| 42 | "clk_ignore_unused "\ |
| 43 | "\0" \ |
| 44 | "kboot=booti\0"\ |
| 45 | "bootcmd_mfg=run mfgtool_args;" \ |
| 46 | "if iminfo ${initrd_addr}; then " \ |
| 47 | "if test ${tee} = yes; then " \ |
| 48 | "bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; " \ |
| 49 | "else " \ |
| 50 | "booti ${loadaddr} ${initrd_addr} ${fdt_addr}; " \ |
| 51 | "fi; " \ |
| 52 | "else " \ |
| 53 | "echo \"Run fastboot ...\"; fastboot 0; " \ |
| 54 | "fi;\0" |
| 55 | |
| 56 | /* Boot M4 */ |
| 57 | #define M4_BOOT_ENV \ |
| 58 | "m4_0_image=m4_0.bin\0" \ |
| 59 | "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} " \ |
| 60 | "${loadaddr} ${m4_0_image}\0" \ |
| 61 | "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \ |
| 62 | |
Tom Rini | 8f52920 | 2022-12-04 10:04:52 -0500 | [diff] [blame] | 63 | #define CFG_MFG_ENV_SETTINGS \ |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 64 | MFG_ENV_SETTINGS_DEFAULT \ |
| 65 | "initrd_addr=0x83100000\0" \ |
| 66 | "initrd_high=0xffffffffffffffff\0" \ |
| 67 | "emmc_dev=0\0" |
| 68 | |
| 69 | /* Initial environment variables */ |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 70 | #define CFG_EXTRA_ENV_SETTINGS \ |
Tom Rini | 8f52920 | 2022-12-04 10:04:52 -0500 | [diff] [blame] | 71 | CFG_MFG_ENV_SETTINGS \ |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 72 | M4_BOOT_ENV \ |
| 73 | AHAB_ENV \ |
| 74 | ENV_COMMON \ |
| 75 | "script=boot.scr\0" \ |
| 76 | "image=Image\0" \ |
| 77 | "panel=NULL\0" \ |
| 78 | "console=ttyLP2\0" \ |
| 79 | "fdt_addr=0x83000000\0" \ |
| 80 | "fdt_high=0xffffffffffffffff\0" \ |
| 81 | "cntr_addr=0x88000000\0" \ |
| 82 | "cntr_file=os_cntr_signed.bin\0" \ |
| 83 | "initrd_addr=0x83800000\0" \ |
| 84 | "initrd_high=0xffffffffffffffff\0" \ |
| 85 | "netdev=eth0\0" \ |
| 86 | "nfsopts=vers=3,udp,rsize=4096,wsize=4096,nolock rw\0" \ |
| 87 | "hostname=capricorn\0" \ |
| 88 | ENV_EMMC \ |
| 89 | ENV_NET |
| 90 | |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 91 | /* Default location for tftp and bootm */ |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 92 | |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 93 | /* On CCP board, USDHC1 is for eMMC */ |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 94 | |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 95 | #define CFG_SYS_SDRAM_BASE 0x80000000 |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 96 | #define PHYS_SDRAM_1 0x80000000 |
| 97 | #define PHYS_SDRAM_2 0x880000000 |
| 98 | /* DDR3 board total DDR is 1 GB */ |
| 99 | #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1 GB */ |
| 100 | #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */ |
| 101 | |
Anatolij Gustschin | 7b5b934 | 2020-01-07 16:37:42 +0100 | [diff] [blame] | 102 | #define BOOTAUX_RESERVED_MEM_BASE 0x88000000 |
| 103 | #define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */ |
| 104 | |
| 105 | #endif /* __IMX8X_CAPRICORN_H */ |