blob: 2ccb20192d4fddbb3fd2cab309983e13173acddb [file] [log] [blame]
Yuantian Tang353f36d2019-04-10 16:43:34 +08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
Yangbo Lu34f39ce2021-06-03 10:51:19 +08003 * Copyright 2019-2021 NXP
Yuantian Tang353f36d2019-04-10 16:43:34 +08004 */
5
6#ifndef __L1028A_COMMON_H
7#define __L1028A_COMMON_H
8
Yuantian Tang353f36d2019-04-10 16:43:34 +08009#include <asm/arch/stream_id_lsch3.h>
10#include <asm/arch/config.h>
11#include <asm/arch/soc.h>
12
13/* Link Definitions */
Yuantian Tang353f36d2019-04-10 16:43:34 +080014
Tom Rini65cc0e22022-11-16 13:10:41 -050015#define CFG_SYS_DDR_SDRAM_BASE 0x80000000UL
Tom Rini6cc04542022-10-28 20:27:13 -040016#define CFG_SYS_FSL_DDR_SDRAM_BASE_PHY 0
Tom Rini65cc0e22022-11-16 13:10:41 -050017#define CFG_SYS_SDRAM_BASE CFG_SYS_DDR_SDRAM_BASE
18#define CFG_SYS_DDR_BLOCK2_BASE 0x2080000000ULL
Yuantian Tang353f36d2019-04-10 16:43:34 +080019
Yuantian Tang353f36d2019-04-10 16:43:34 +080020/*
21 * SMP Definitinos
22 */
Michael Walle3d3fe8b2020-06-01 21:53:26 +020023#define CPU_RELEASE_ADDR secondary_boot_addr
Yuantian Tang353f36d2019-04-10 16:43:34 +080024
Biwen Li90281f42021-02-05 19:01:57 +080025/* GPIO */
Biwen Li90281f42021-02-05 19:01:57 +080026
Yuantian Tang353f36d2019-04-10 16:43:34 +080027/* I2C */
Yuantian Tang353f36d2019-04-10 16:43:34 +080028
29/* Serial Port */
Tom Rini91092132022-11-16 13:10:28 -050030#define CFG_SYS_NS16550_CLK (get_bus_freq(0) / 2)
Yuantian Tang353f36d2019-04-10 16:43:34 +080031
Yuantian Tang353f36d2019-04-10 16:43:34 +080032/* Miscellaneous configurable options */
Yuantian Tang353f36d2019-04-10 16:43:34 +080033
34/* Physical Memory Map */
Yuantian Tang353f36d2019-04-10 16:43:34 +080035
Yuantian Tang353f36d2019-04-10 16:43:34 +080036#define HWCONFIG_BUFFER_SIZE 128
37
Yuantian Tang353f36d2019-04-10 16:43:34 +080038#define BOOT_TARGET_DEVICES(func) \
39 func(MMC, mmc, 0) \
Yuantian Tang0de19ab2019-11-04 15:10:45 +080040 func(MMC, mmc, 1) \
Yuantian Tang81d9e552020-03-10 11:31:05 +080041 func(USB, usb, 0) \
42 func(DHCP, dhcp, na)
Yuantian Tang353f36d2019-04-10 16:43:34 +080043#include <config_distro_bootcmd.h>
44
Yuantian Tang0de19ab2019-11-04 15:10:45 +080045#define XSPI_NOR_BOOTCOMMAND \
46 "run xspi_hdploadcmd; run distro_bootcmd; run xspi_bootcmd; " \
47 "env exists secureboot && esbc_halt;;"
Yuantian Tang353f36d2019-04-10 16:43:34 +080048#define SD_BOOTCOMMAND \
Yuantian Tang0de19ab2019-11-04 15:10:45 +080049 "run sd_hdploadcmd; run distro_bootcmd;run sd_bootcmd; " \
50 "env exists secureboot && esbc_halt;"
51#define SD2_BOOTCOMMAND \
52 "run emmc_hdploadcmd; run distro_bootcmd;run emmc_bootcmd; " \
Yuantian Tang353f36d2019-04-10 16:43:34 +080053 "env exists secureboot && esbc_halt;"
54
Yuantian Tang353f36d2019-04-10 16:43:34 +080055#define OCRAM_NONSECURE_SIZE 0x00010000
Tom Rini6cc04542022-10-28 20:27:13 -040056#define CFG_SYS_FSL_QSPI_BASE 0x20000000
Yuantian Tang353f36d2019-04-10 16:43:34 +080057
Yuantian Tang353f36d2019-04-10 16:43:34 +080058/* I2C bus multiplexer */
59#define I2C_MUX_PCA_ADDR_PRI 0x77 /* Primary Mux*/
60#define I2C_MUX_CH_DEFAULT 0x8
61
Wen Hef76d88b2019-11-18 13:26:09 +080062/* DisplayPort */
63#define DP_PWD_EN_DEFAULT_MASK 0x8
64
Udit Agarwal5536c3c2019-11-07 16:11:32 +000065#ifdef CONFIG_NXP_ESBC
Yuantian Tanga1e126b2019-05-24 14:36:27 +080066#include <asm/fsl_secure_boot.h>
67#endif
68
Yuantian Tang353f36d2019-04-10 16:43:34 +080069#endif /* __L1028A_COMMON_H */