Fabien Parent | bb4c5d6 | 2019-07-18 19:08:09 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Configuration for Pumpkin board |
| 4 | * |
| 5 | * Copyright (C) 2019 BayLibre, SAS |
| 6 | * Author: Fabien Parent <fparent@baylibre.com |
| 7 | */ |
| 8 | |
| 9 | #ifndef __PUMPKIN_H |
| 10 | #define __PUMPKIN_H |
| 11 | |
| 12 | #include <linux/sizes.h> |
| 13 | |
| 14 | #define CONFIG_ENV_SIZE SZ_4K |
| 15 | #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_TEXT_BASE |
| 16 | #define CONFIG_SYS_MALLOC_LEN SZ_4M |
| 17 | |
| 18 | #define CONFIG_CPU_ARMV8 |
| 19 | #define COUNTER_FREQUENCY 13000000 |
| 20 | |
| 21 | #define CONFIG_SYS_NS16550_SERIAL |
| 22 | #define CONFIG_SYS_NS16550_REG_SIZE -4 |
| 23 | #define CONFIG_SYS_NS16550_MEM32 |
| 24 | #define CONFIG_SYS_NS16550_COM1 0x11005000 |
| 25 | #define CONFIG_SYS_NS16550_CLK 26000000 |
| 26 | |
| 27 | #define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE |
| 28 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + SZ_2M - \ |
| 29 | GENERATED_GBL_DATA_SIZE) |
| 30 | |
| 31 | #define CONFIG_SYS_BOOTM_LEN SZ_64M |
| 32 | |
| 33 | /* Environment settings */ |
| 34 | #include <config_distro_bootcmd.h> |
| 35 | |
| 36 | #define MMCBOOT \ |
| 37 | "mmcdev=0\0" \ |
| 38 | "kernel_partition=2\0" \ |
| 39 | "rootfs_partition=3\0" \ |
| 40 | "mmc_discover_partition=" \ |
| 41 | "part start mmc ${mmcdev} ${kernel_partition} kernel_part_addr;" \ |
| 42 | "part size mmc ${mmcdev} ${kernel_partition} kernel_part_size;\0" \ |
| 43 | "mmcboot=" \ |
| 44 | "mmc dev ${mmcdev};" \ |
| 45 | "run mmc_discover_partition;" \ |
| 46 | "mmc read ${kerneladdr} ${kernel_part_addr} ${kernel_part_size};" \ |
| 47 | "setenv bootargs ${bootargs} root=/dev/mmcblk${mmcdev}p${rootfs_partition} rootwait; " \ |
| 48 | "bootm ${kerneladdr}; \0" |
| 49 | |
| 50 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 51 | "kerneladdr=0x4A000000\0" \ |
| 52 | MMCBOOT \ |
| 53 | "bootcmd=run mmcboot;\0" |
| 54 | |
| 55 | #endif |