Commit 63e22517a39046d62b86ebf0f7fe6e0db575f339
Committed by
Marek Vasut
1 parent
031fa18f70
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
ARM: renesas: Add R8A77990 E3 Ebisu board
Add support for the R8A77990 Ebisu board. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Showing 9 changed files with 240 additions and 0 deletions Side-by-side Diff
arch/arm/dts/r8a77990-ebisu-u-boot.dts
arch/arm/dts/r8a77990-u-boot.dtsi
arch/arm/mach-rmobile/Kconfig.64
... | ... | @@ -34,6 +34,11 @@ |
34 | 34 | help |
35 | 35 | Support for Renesas R-Car Gen3 Eagle platform |
36 | 36 | |
37 | +config TARGET_EBISU | |
38 | + bool "Ebisu board" | |
39 | + help | |
40 | + Support for Renesas R-Car Gen3 Ebisu platform | |
41 | + | |
37 | 42 | config TARGET_SALVATOR_X |
38 | 43 | bool "Salvator-X board" |
39 | 44 | help |
... | ... | @@ -51,6 +56,7 @@ |
51 | 56 | |
52 | 57 | source "board/renesas/draak/Kconfig" |
53 | 58 | source "board/renesas/eagle/Kconfig" |
59 | +source "board/renesas/ebisu/Kconfig" | |
54 | 60 | source "board/renesas/salvator-x/Kconfig" |
55 | 61 | source "board/renesas/ulcb/Kconfig" |
56 | 62 |
board/renesas/ebisu/Kconfig
board/renesas/ebisu/MAINTAINERS
board/renesas/ebisu/Makefile
board/renesas/ebisu/ebisu.c
1 | +/* | |
2 | + * board/renesas/ebisu/ebisu.c | |
3 | + * This file is Ebisu board support. | |
4 | + * | |
5 | + * Copyright (C) 2018 Marek Vasut <marek.vasut+renesas@gmail.com> | |
6 | + * | |
7 | + * SPDX-License-Identifier: GPL-2.0+ | |
8 | + */ | |
9 | + | |
10 | +#include <common.h> | |
11 | +#include <malloc.h> | |
12 | +#include <netdev.h> | |
13 | +#include <dm.h> | |
14 | +#include <dm/platform_data/serial_sh.h> | |
15 | +#include <asm/processor.h> | |
16 | +#include <asm/mach-types.h> | |
17 | +#include <asm/io.h> | |
18 | +#include <linux/errno.h> | |
19 | +#include <asm/arch/sys_proto.h> | |
20 | +#include <asm/gpio.h> | |
21 | +#include <asm/arch/gpio.h> | |
22 | +#include <asm/arch/rmobile.h> | |
23 | +#include <asm/arch/rcar-mstp.h> | |
24 | +#include <asm/arch/sh_sdhi.h> | |
25 | +#include <i2c.h> | |
26 | +#include <mmc.h> | |
27 | + | |
28 | +DECLARE_GLOBAL_DATA_PTR; | |
29 | + | |
30 | +void s_init(void) | |
31 | +{ | |
32 | +} | |
33 | + | |
34 | +#define TMU0_MSTP125 BIT(25) /* secure */ | |
35 | + | |
36 | +int board_early_init_f(void) | |
37 | +{ | |
38 | + /* TMU0 */ | |
39 | + mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125); | |
40 | + | |
41 | + return 0; | |
42 | +} | |
43 | + | |
44 | +int board_init(void) | |
45 | +{ | |
46 | + /* adress of boot parameters */ | |
47 | + gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; | |
48 | + | |
49 | + return 0; | |
50 | +} | |
51 | + | |
52 | +int dram_init(void) | |
53 | +{ | |
54 | + if (fdtdec_setup_memory_size() != 0) | |
55 | + return -EINVAL; | |
56 | + | |
57 | + return 0; | |
58 | +} | |
59 | + | |
60 | +int dram_init_banksize(void) | |
61 | +{ | |
62 | + fdtdec_setup_memory_banksize(); | |
63 | + | |
64 | + return 0; | |
65 | +} | |
66 | + | |
67 | +#define RST_BASE 0xE6160000 | |
68 | +#define RST_CA57RESCNT (RST_BASE + 0x40) | |
69 | +#define RST_CA53RESCNT (RST_BASE + 0x44) | |
70 | +#define RST_RSTOUTCR (RST_BASE + 0x58) | |
71 | +#define RST_CA57_CODE 0xA5A5000F | |
72 | +#define RST_CA53_CODE 0x5A5A000F | |
73 | + | |
74 | +void reset_cpu(ulong addr) | |
75 | +{ | |
76 | + unsigned long midr, cputype; | |
77 | + | |
78 | + asm volatile("mrs %0, midr_el1" : "=r" (midr)); | |
79 | + cputype = (midr >> 4) & 0xfff; | |
80 | + | |
81 | + if (cputype == 0xd03) | |
82 | + writel(RST_CA53_CODE, RST_CA53RESCNT); | |
83 | + else if (cputype == 0xd07) | |
84 | + writel(RST_CA57_CODE, RST_CA57RESCNT); | |
85 | + else | |
86 | + hang(); | |
87 | +} |
configs/r8a77990_ebisu_defconfig
1 | +CONFIG_ARM=y | |
2 | +CONFIG_ARCH_RMOBILE=y | |
3 | +CONFIG_SYS_TEXT_BASE=0x50000000 | |
4 | +CONFIG_SYS_MALLOC_F_LEN=0x2000 | |
5 | +CONFIG_RCAR_GEN3=y | |
6 | +CONFIG_R8A77990=y | |
7 | +CONFIG_TARGET_EBISU=y | |
8 | +CONFIG_DEFAULT_DEVICE_TREE="r8a77990-ebisu-u-boot" | |
9 | +CONFIG_SMBIOS_PRODUCT_NAME="" | |
10 | +CONFIG_FIT=y | |
11 | +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set | |
12 | +CONFIG_USE_BOOTARGS=y | |
13 | +CONFIG_BOOTARGS="console=ttySC0,115200" | |
14 | +CONFIG_SUPPORT_RAW_INITRD=y | |
15 | +CONFIG_DEFAULT_FDT_FILE="r8a77990-ebisu.dtb" | |
16 | +CONFIG_VERSION_VARIABLE=y | |
17 | +CONFIG_HUSH_PARSER=y | |
18 | +CONFIG_CMD_BOOTZ=y | |
19 | +CONFIG_CMD_GPIO=y | |
20 | +CONFIG_CMD_I2C=y | |
21 | +CONFIG_CMD_MMC=y | |
22 | +CONFIG_CMD_USB=y | |
23 | +CONFIG_CMD_DHCP=y | |
24 | +CONFIG_CMD_MII=y | |
25 | +CONFIG_CMD_PING=y | |
26 | +CONFIG_CMD_EXT2=y | |
27 | +CONFIG_CMD_EXT4=y | |
28 | +CONFIG_CMD_EXT4_WRITE=y | |
29 | +CONFIG_CMD_FAT=y | |
30 | +CONFIG_CMD_FS_GENERIC=y | |
31 | +CONFIG_OF_CONTROL=y | |
32 | +CONFIG_ENV_IS_IN_MMC=y | |
33 | +CONFIG_REGMAP=y | |
34 | +CONFIG_SYSCON=y | |
35 | +CONFIG_CLK=y | |
36 | +CONFIG_CLK_RENESAS=y | |
37 | +CONFIG_DM_GPIO=y | |
38 | +CONFIG_RCAR_GPIO=y | |
39 | +CONFIG_DM_I2C=y | |
40 | +CONFIG_SYS_I2C_RCAR_IIC=y | |
41 | +CONFIG_DM_MMC=y | |
42 | +CONFIG_MMC_IO_VOLTAGE=y | |
43 | +CONFIG_MMC_UHS_SUPPORT=y | |
44 | +CONFIG_MMC_HS200_SUPPORT=y | |
45 | +CONFIG_RENESAS_SDHI=y | |
46 | +CONFIG_PHY_MICREL=y | |
47 | +CONFIG_PHY_MICREL_KSZ90X1=y | |
48 | +CONFIG_DM_ETH=y | |
49 | +CONFIG_RENESAS_RAVB=y | |
50 | +CONFIG_PINCTRL=y | |
51 | +CONFIG_PINCONF=y | |
52 | +CONFIG_PINCTRL_PFC=y | |
53 | +CONFIG_DM_REGULATOR=y | |
54 | +CONFIG_DM_REGULATOR_FIXED=y | |
55 | +CONFIG_DM_REGULATOR_GPIO=y | |
56 | +CONFIG_SCIF_CONSOLE=y | |
57 | +CONFIG_USB=y | |
58 | +CONFIG_DM_USB=y | |
59 | +CONFIG_USB_XHCI_HCD=y | |
60 | +CONFIG_USB_EHCI_HCD=y | |
61 | +CONFIG_USB_EHCI_GENERIC=y | |
62 | +CONFIG_USB_STORAGE=y | |
63 | +CONFIG_OF_LIBFDT_OVERLAY=y | |
64 | +CONFIG_SMBIOS_MANUFACTURER="" |
include/configs/ebisu.h
1 | +/* | |
2 | + * include/configs/ebisu.h | |
3 | + * This file is Ebisu board configuration. | |
4 | + * | |
5 | + * Copyright (C) 2018 Renesas Electronics Corporation | |
6 | + * | |
7 | + * SPDX-License-Identifier: GPL-2.0+ | |
8 | + */ | |
9 | + | |
10 | +#ifndef __EBISU_H | |
11 | +#define __EBISU_H | |
12 | + | |
13 | +#undef DEBUG | |
14 | + | |
15 | +#include "rcar-gen3-common.h" | |
16 | + | |
17 | +/* Ethernet RAVB */ | |
18 | +#define CONFIG_NET_MULTI | |
19 | +#define CONFIG_BITBANGMII | |
20 | +#define CONFIG_BITBANGMII_MULTI | |
21 | + | |
22 | +/* Board Clock */ | |
23 | +/* XTAL_CLK : 33.33MHz */ | |
24 | +#define CONFIG_SYS_CLK_FREQ 48000000u | |
25 | + | |
26 | +/* Generic Timer Definitions (use in assembler source) */ | |
27 | +#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ | |
28 | + | |
29 | +/* Environment in eMMC, at the end of 2nd "boot sector" */ | |
30 | +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) | |
31 | +#define CONFIG_SYS_MMC_ENV_DEV 2 | |
32 | +#define CONFIG_SYS_MMC_ENV_PART 2 | |
33 | + | |
34 | +#endif /* __EBISU_H */ |