2 * Copyright (c) 2012 The Chromium OS Authors.
4 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef __ASM_ARCH_EXYNOS_SPL_H__
8 #define __ASM_ARCH_EXYNOS_SPL_H__
10 #include <asm/arch-exynos/dmc.h>
14 * Assign the OM pin values for respective boot modes.
15 * Exynos4 does not support spi boot and the mmc boot OM
16 * pin values are the same across Exynos4 and Exynos5.
19 BOOT_MODE_EMMC = 8, /* EMMC4.4 */
20 BOOT_MODE_SERIAL = 20,
21 /* Boot based on Operating Mode pin settings */
23 BOOT_MODE_USB, /* Boot using USB download */
27 /* Parameters of early board initialization in SPL */
28 struct spl_machine_param {
29 /* Add fields as and when required */
31 u32 version; /* Version number */
32 u32 size; /* Size of block */
34 * Parameters we expect, in order, terminated with \0. Each parameter
35 * is a single character representing one 32-bit word in this
38 * Valid characters in this string are:
45 * f frequency_mhz (memory frequency in MHz)
46 * a ARM clock frequency in MHz
47 * s serial base address
48 * i i2c base address for early access (meant for PMIC)
49 * r board rev GPIO numbers used to read board revision
50 * (lower halfword=bit 0, upper=bit 1)
51 * M Memory Manufacturer name
54 char params[12]; /* Length must be word-aligned */
55 u32 mem_iv_size; /* Memory channel interleaving size */
56 enum ddr_mode mem_type; /* Type of on-board memory */
58 * U-boot size - The iROM mmc copy function used by the SPL takes a
59 * block count paramter to describe the u-boot size unlike the spi
60 * boot copy function which just uses the u-boot size directly. Align
61 * the u-boot size to block size (512 bytes) when populating the SPL
62 * table only for mmc boot.
65 enum boot_mode boot_source; /* Boot device */
66 unsigned frequency_mhz; /* Frequency of memory in MHz */
67 unsigned arm_freq_mhz; /* ARM Frequency in MHz */
68 u32 serial_base; /* Serial base address */
69 u32 i2c_base; /* i2c base address */
70 u32 board_rev_gpios; /* Board revision GPIOs */
71 enum mem_manuf mem_manuf; /* Memory Manufacturer */
72 } __attribute__((__packed__));
76 * Validate signature and return a pointer to the parameter table. If the
77 * signature is invalid, call panic() and never return.
79 * @return pointer to the parameter table if signature matched or never return.
81 struct spl_machine_param *spl_get_machine_params(void);
83 #endif /* __ASM_ARCH_EXYNOS_SPL_H__ */