blob: 92c84cd8ce05a0a948444e50397d785dd57c378b [file] [log] [blame]
Dzmitry Sankouski69bde042021-10-17 13:45:41 +03001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Configuration settings for the EXYNOS 78x0 based boards.
4 *
5 * Copyright (c) 2020 Dzmitry Sankouski (dsankouski@gmail.com)
6 * based on include/exynos7420-common.h
7 * Copyright (C) 2016 Samsung Electronics
8 * Thomas Abraham <thomas.ab@samsung.com>
9 */
10
11#ifndef __CONFIG_EXYNOS78x0_COMMON_H
12#define __CONFIG_EXYNOS78x0_COMMON_H
13
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030014#include <asm/arch/cpu.h> /* get chip and board defs */
15#include <linux/sizes.h>
16
17/* Miscellaneous configurable options */
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030018
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030019#define CPU_RELEASE_ADDR secondary_boot_addr
20
Tom Rini65cc0e22022-11-16 13:10:41 -050021#define CFG_SYS_BAUDRATE_TABLE \
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030022 {9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600}
23
Tom Riniaa6e94d2022-11-16 13:10:37 -050024#define CFG_SYS_SDRAM_BASE 0x40000000
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030025/* DRAM Memory Banks */
26#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
Tom Riniaa6e94d2022-11-16 13:10:37 -050027#define PHYS_SDRAM_1 CFG_SYS_SDRAM_BASE
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030028#define PHYS_SDRAM_1_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050029#define PHYS_SDRAM_2 (CFG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE)
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030030#define PHYS_SDRAM_2_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050031#define PHYS_SDRAM_3 (CFG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030032#define PHYS_SDRAM_3_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050033#define PHYS_SDRAM_4 (CFG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030034#define PHYS_SDRAM_4_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050035#define PHYS_SDRAM_5 (CFG_SYS_SDRAM_BASE + (4 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030036#define PHYS_SDRAM_5_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050037#define PHYS_SDRAM_6 (CFG_SYS_SDRAM_BASE + (5 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030038#define PHYS_SDRAM_6_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050039#define PHYS_SDRAM_7 (CFG_SYS_SDRAM_BASE + (6 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030040#define PHYS_SDRAM_7_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050041#define PHYS_SDRAM_8 (CFG_SYS_SDRAM_BASE + (7 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030042#define PHYS_SDRAM_8_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050043#define PHYS_SDRAM_9 (CFG_SYS_SDRAM_BASE + (8 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030044#define PHYS_SDRAM_9_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050045#define PHYS_SDRAM_10 (CFG_SYS_SDRAM_BASE + (9 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030046#define PHYS_SDRAM_10_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050047#define PHYS_SDRAM_11 (CFG_SYS_SDRAM_BASE + (10 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030048#define PHYS_SDRAM_11_SIZE SDRAM_BANK_SIZE
Tom Riniaa6e94d2022-11-16 13:10:37 -050049#define PHYS_SDRAM_12 (CFG_SYS_SDRAM_BASE + (11 * SDRAM_BANK_SIZE))
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030050#define PHYS_SDRAM_12_SIZE SDRAM_BANK_SIZE
51
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030052#ifndef MEM_LAYOUT_ENV_SETTINGS
53#define MEM_LAYOUT_ENV_SETTINGS \
54 "bootm_size=0x10000000\0" \
55 "bootm_low=0x40000000\0"
56#endif
57
58#ifndef EXYNOS_DEVICE_SETTINGS
59#define EXYNOS_DEVICE_SETTINGS \
60 "stdin=serial\0" \
61 "stdout=serial\0" \
62 "stderr=serial\0"
63#endif
64
65#ifndef EXYNOS_FDTFILE_SETTING
66#define EXYNOS_FDTFILE_SETTING
67#endif
68
Dzmitry Sankouskid5c4ec42022-02-22 21:49:54 +030069/* Cannot use bootdelay > 0, because timer is not working */
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030070#define EXTRA_ENV_SETTINGS \
Dzmitry Sankouskid5c4ec42022-02-22 21:49:54 +030071 "bootdelay=0\0" \
72 "bootcmd=source $prevbl_initrd_start_addr:bootscript\0" \
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030073 EXYNOS_DEVICE_SETTINGS \
74 EXYNOS_FDTFILE_SETTING \
75 MEM_LAYOUT_ENV_SETTINGS
76
Tom Rini0613c362022-12-04 10:03:50 -050077#define CFG_EXTRA_ENV_SETTINGS \
Dzmitry Sankouski69bde042021-10-17 13:45:41 +030078 EXTRA_ENV_SETTINGS
79
80#endif /* __CONFIG_EXYNOS78x0_COMMON_H */