183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 23b6e3898SPrabhakar Kushwaha /* 33b6e3898SPrabhakar Kushwaha * Copyright 2016 Freescale Semiconductor, Inc. 43b6e3898SPrabhakar Kushwaha */ 53b6e3898SPrabhakar Kushwaha 63b6e3898SPrabhakar Kushwaha #ifndef __LS1012ARDB_H__ 73b6e3898SPrabhakar Kushwaha #define __LS1012ARDB_H__ 83b6e3898SPrabhakar Kushwaha 93b6e3898SPrabhakar Kushwaha #include "ls1012a_common.h" 103b6e3898SPrabhakar Kushwaha 11b9e745bbSShengzhou Liu /* DDR */ 123b6e3898SPrabhakar Kushwaha #define CONFIG_DIMM_SLOTS_PER_CTLR 1 133b6e3898SPrabhakar Kushwaha #define CONFIG_CHIP_SELECTS_PER_CTRL 1 143b6e3898SPrabhakar Kushwaha #define CONFIG_SYS_SDRAM_SIZE 0x40000000 153b6e3898SPrabhakar Kushwaha #define CONFIG_CMD_MEMINFO 163b6e3898SPrabhakar Kushwaha #define CONFIG_SYS_MEMTEST_START 0x80000000 173b6e3898SPrabhakar Kushwaha #define CONFIG_SYS_MEMTEST_END 0x9fffffff 183b6e3898SPrabhakar Kushwaha 193b6e3898SPrabhakar Kushwaha 203b6e3898SPrabhakar Kushwaha /* 213b6e3898SPrabhakar Kushwaha * I2C IO expander 223b6e3898SPrabhakar Kushwaha */ 233b6e3898SPrabhakar Kushwaha 24481fb01fSYangbo Lu #define I2C_MUX_IO_ADDR 0x24 257ab16479SCalvin Johnson #define I2C_MUX_IO2_ADDR 0x25 26481fb01fSYangbo Lu #define I2C_MUX_IO_0 0 27481fb01fSYangbo Lu #define I2C_MUX_IO_1 1 28481fb01fSYangbo Lu #define SW_BOOT_MASK 0x03 29481fb01fSYangbo Lu #define SW_BOOT_EMU 0x02 30481fb01fSYangbo Lu #define SW_BOOT_BANK1 0x00 31481fb01fSYangbo Lu #define SW_BOOT_BANK2 0x01 32481fb01fSYangbo Lu #define SW_REV_MASK 0xF8 33481fb01fSYangbo Lu #define SW_REV_A 0xF8 34481fb01fSYangbo Lu #define SW_REV_B 0xF0 354a47bf8aSYangbo Lu #define SW_REV_C 0xE8 364a47bf8aSYangbo Lu #define SW_REV_C1 0xE0 374a47bf8aSYangbo Lu #define SW_REV_C2 0xD8 384a47bf8aSYangbo Lu #define SW_REV_D 0xD0 394a47bf8aSYangbo Lu #define SW_REV_E 0xC8 407ab16479SCalvin Johnson #define __PHY_MASK 0xF9 417ab16479SCalvin Johnson #define __PHY_ETH2_MASK 0xFB 427ab16479SCalvin Johnson #define __PHY_ETH1_MASK 0xFD 433b6e3898SPrabhakar Kushwaha 443b6e3898SPrabhakar Kushwaha /* MMC */ 453b6e3898SPrabhakar Kushwaha #ifdef CONFIG_MMC 463b6e3898SPrabhakar Kushwaha #define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33 473b6e3898SPrabhakar Kushwaha #endif 483b6e3898SPrabhakar Kushwaha 499e0bb4c1SPrabhakar Kushwaha 503b6e3898SPrabhakar Kushwaha #define CONFIG_PCIE1 /* PCIE controller 1 */ 513b6e3898SPrabhakar Kushwaha 523b6e3898SPrabhakar Kushwaha #define CONFIG_PCI_SCAN_SHOW 533b6e3898SPrabhakar Kushwaha 543b6e3898SPrabhakar Kushwaha #define CONFIG_CMD_MEMINFO 553b6e3898SPrabhakar Kushwaha #define CONFIG_SYS_MEMTEST_START 0x80000000 563b6e3898SPrabhakar Kushwaha #define CONFIG_SYS_MEMTEST_END 0x9fffffff 573b6e3898SPrabhakar Kushwaha 58a81357a2SRajesh Bhagat #undef CONFIG_EXTRA_ENV_SETTINGS 59a81357a2SRajesh Bhagat #define CONFIG_EXTRA_ENV_SETTINGS \ 60a81357a2SRajesh Bhagat "verify=no\0" \ 61a81357a2SRajesh Bhagat "fdt_high=0xffffffffffffffff\0" \ 62a81357a2SRajesh Bhagat "initrd_high=0xffffffffffffffff\0" \ 63a81357a2SRajesh Bhagat "fdt_addr=0x00f00000\0" \ 64a81357a2SRajesh Bhagat "kernel_addr=0x01000000\0" \ 65c883f351SVinitha Pillai-B57223 "kernelheader_addr=0x800000\0" \ 66a81357a2SRajesh Bhagat "scriptaddr=0x80000000\0" \ 67c883f351SVinitha Pillai-B57223 "scripthdraddr=0x80080000\0" \ 68a81357a2SRajesh Bhagat "fdtheader_addr_r=0x80100000\0" \ 69a81357a2SRajesh Bhagat "kernelheader_addr_r=0x80200000\0" \ 70a81357a2SRajesh Bhagat "kernel_addr_r=0x81000000\0" \ 71a81357a2SRajesh Bhagat "fdt_addr_r=0x90000000\0" \ 72a81357a2SRajesh Bhagat "load_addr=0xa0000000\0" \ 73a81357a2SRajesh Bhagat "kernel_size=0x2800000\0" \ 74c883f351SVinitha Pillai-B57223 "kernelheader_size=0x40000\0" \ 75a81357a2SRajesh Bhagat "console=ttyS0,115200\0" \ 76a81357a2SRajesh Bhagat BOOTENV \ 77a81357a2SRajesh Bhagat "boot_scripts=ls1012ardb_boot.scr\0" \ 78c883f351SVinitha Pillai-B57223 "boot_script_hdr=hdr_ls1012ardb_bs.out\0" \ 79a81357a2SRajesh Bhagat "scan_dev_for_boot_part=" \ 80a81357a2SRajesh Bhagat "part list ${devtype} ${devnum} devplist; " \ 81a81357a2SRajesh Bhagat "env exists devplist || setenv devplist 1; " \ 82a81357a2SRajesh Bhagat "for distro_bootpart in ${devplist}; do " \ 83a81357a2SRajesh Bhagat "if fstype ${devtype} " \ 84a81357a2SRajesh Bhagat "${devnum}:${distro_bootpart} " \ 85a81357a2SRajesh Bhagat "bootfstype; then " \ 86a81357a2SRajesh Bhagat "run scan_dev_for_boot; " \ 87a81357a2SRajesh Bhagat "fi; " \ 88a81357a2SRajesh Bhagat "done\0" \ 89a81357a2SRajesh Bhagat "scan_dev_for_boot=" \ 90a81357a2SRajesh Bhagat "echo Scanning ${devtype} " \ 91a81357a2SRajesh Bhagat "${devnum}:${distro_bootpart}...; " \ 92a81357a2SRajesh Bhagat "for prefix in ${boot_prefixes}; do " \ 93a81357a2SRajesh Bhagat "run scan_dev_for_scripts; " \ 94a81357a2SRajesh Bhagat "done;" \ 95a81357a2SRajesh Bhagat "\0" \ 96c883f351SVinitha Pillai-B57223 "boot_a_script=" \ 97c883f351SVinitha Pillai-B57223 "load ${devtype} ${devnum}:${distro_bootpart} " \ 98c883f351SVinitha Pillai-B57223 "${scriptaddr} ${prefix}${script}; " \ 99c883f351SVinitha Pillai-B57223 "env exists secureboot && load ${devtype} " \ 100c883f351SVinitha Pillai-B57223 "${devnum}:${distro_bootpart} " \ 101c883f351SVinitha Pillai-B57223 "${scripthdraddr} ${prefix}${boot_script_hdr} " \ 102c883f351SVinitha Pillai-B57223 "&& esbc_validate ${scripthdraddr};" \ 103c883f351SVinitha Pillai-B57223 "source ${scriptaddr}\0" \ 104a81357a2SRajesh Bhagat "installer=load mmc 0:2 $load_addr " \ 105a81357a2SRajesh Bhagat "/flex_installer_arm64.itb; " \ 106a81357a2SRajesh Bhagat "bootm $load_addr#$board\0" \ 107a81357a2SRajesh Bhagat "qspi_bootcmd=echo Trying load from qspi..;" \ 108a81357a2SRajesh Bhagat "sf probe && sf read $load_addr " \ 109c883f351SVinitha Pillai-B57223 "$kernel_addr $kernel_size; env exists secureboot " \ 110c883f351SVinitha Pillai-B57223 "&& sf read $kernelheader_addr_r $kernelheader_addr " \ 111c883f351SVinitha Pillai-B57223 "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ 112c883f351SVinitha Pillai-B57223 "bootm $load_addr#$board\0" 113a81357a2SRajesh Bhagat 114a81357a2SRajesh Bhagat #undef CONFIG_BOOTCOMMAND 115*1f6180dfSRajesh Bhagat #ifdef CONFIG_TFABOOT 116*1f6180dfSRajesh Bhagat #undef QSPI_NOR_BOOTCOMMAND 117*1f6180dfSRajesh Bhagat #define QSPI_NOR_BOOTCOMMAND "pfe stop; run distro_bootcmd; run qspi_bootcmd; "\ 118*1f6180dfSRajesh Bhagat "env exists secureboot && esbc_halt;" 119*1f6180dfSRajesh Bhagat #else 120a802d1e2SCalvin Johnson #define CONFIG_BOOTCOMMAND "pfe stop; run distro_bootcmd; run qspi_bootcmd; "\ 121c883f351SVinitha Pillai-B57223 "env exists secureboot && esbc_halt;" 122*1f6180dfSRajesh Bhagat #endif 12311d14bfbSVinitha Pillai-B57223 12411d14bfbSVinitha Pillai-B57223 #include <asm/fsl_secure_boot.h> 12511d14bfbSVinitha Pillai-B57223 1263b6e3898SPrabhakar Kushwaha #endif /* __LS1012ARDB_H__ */ 127