add support for rk3399 soc and evb
Subsystems (6)
v2 cover add support for rk3399 soc and evb
This patchset add support for rk3399 with ATF based on Rockchip miniloader as secondary bootloader instead of u-boot SPL.
Rockchip miniloader init the DRAM and load the ATF and u-boot to runing address, and then jump to ATF, ATM do some init and switch to EL2/EL1 mode before jump to next loader which is u-boot here.
Pls reference board/rockchip/evb_rk3399/README to setup the board.
Will migrate to SPL once its ready for ATF.
This patch set is based on below patch:
"board: move all the rockchip board in one folder"
This patch set has been test on rk3399 evb board.
Changes in v2:
fix description error on board Kconfig
fix a binary path error
Kever Yang (5):
dts: add support for rkchichip rk3399 soc
ARM64: rockchip: add support for rk3399 SoC based evb-board
config: add config file for evb-rk3399
mmc: rockchip: add SDHCI driver support for rockchip soc
ARM64: evb-rk3399: add a README for this board setup
arch/arm/Kconfig | 3 - arch/arm/dts/Makefile | 3 +- arch/arm/dts/rk3399-evb.dts | 104 ++++ arch/arm/dts/rk3399.dtsi | 1028 ++++++++++++++++++++++++++++++++ arch/arm/mach-rockchip/Kconfig | 25 +- arch/arm/mach-rockchip/Makefile | 2 +- arch/arm/mach-rockchip/rk3399/Kconfig | 14 + arch/arm/mach-rockchip/rk3399/Makefile | 5 + board/rockchip/evb_rk3399/Kconfig | 15 + board/rockchip/evb_rk3399/MAINTAINERS | 0 board/rockchip/evb_rk3399/Makefile | 7 + board/rockchip/evb_rk3399/README | 73 +++ board/rockchip/evb_rk3399/evb-rk3399.c | 41 ++ configs/evb-rk3399_defconfig | 32 + drivers/mmc/Kconfig | 6 + drivers/mmc/Makefile | 1 + drivers/mmc/rockchip_sdhci.c | 58 ++ include/configs/evb_rk3399.h | 24 + include/configs/rk3399_common.h | 84 +++ include/dt-bindings/clock/rk3399-cru.h | 746 +++++++++++++++++++++++ 20 files changed, 2265 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/rk3399-evb.dts create mode 100644 arch/arm/dts/rk3399.dtsi create mode 100644 arch/arm/mach-rockchip/rk3399/Kconfig create mode 100644 arch/arm/mach-rockchip/rk3399/Makefile create mode 100644 board/rockchip/evb_rk3399/Kconfig create mode 100644 board/rockchip/evb_rk3399/MAINTAINERS create mode 100644 board/rockchip/evb_rk3399/Makefile create mode 100644 board/rockchip/evb_rk3399/README create mode 100644 board/rockchip/evb_rk3399/evb-rk3399.c create mode 100644 configs/evb-rk3399_defconfig create mode 100644 drivers/mmc/rockchip_sdhci.c create mode 100644 include/configs/evb_rk3399.h create mode 100644 include/configs/rk3399_common.h create mode 100644 include/dt-bindings/clock/rk3399-cru.h
Signature · 1 line
1.9.1
PATCH v2 1/5 dts: add support for rkchichip rk3399 soc
These files are from kernel upstream with some modification need by uboot:
- chosen with stdout-path to uart2.
---
Changes in v2: None
arch/arm/dts/Makefile | 3 +- arch/arm/dts/rk3399-evb.dts | 104 ++++ arch/arm/dts/rk3399.dtsi | 1028 ++++++++++++++++++++++++++++++++ include/dt-bindings/clock/rk3399-cru.h | 746 +++++++++++++++++++++++ 4 files changed, 1880 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/rk3399-evb.dts create mode 100644 arch/arm/dts/rk3399.dtsi create mode 100644 include/dt-bindings/clock/rk3399-cru.h
arch/arm/dts/Makefile +2 -1
@@ -27,7 +27,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3288-firefly.dtb \ rk3288-jerry.dtb \ rk3288-rock2-square.dtb \ - rk3036-sdk.dtb + rk3036-sdk.dtb \ + rk3399-evb.dtb dtb-$(CONFIG_ARCH_MESON) += \ meson-gxbb-odroidc2.dtb dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
arch/arm/dts/rk3399-evb.dts new file +104 -0
104 lines not on this page · raw message
arch/arm/dts/rk3399.dtsi new file +1028 -0
1,028 lines not on this page · raw message
include/dt-bindings/clock/rk3399-cru.h new file +746 -0
746 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 2/5 ARM64: rockchip: add support for rk3399 SoC based evb-board
In reply to Kever YangRK3399 is a SoC from Rockchip with dual-core Cortex-A72 and qual-core Cortex-A53 CPU. It supports two USB3.0 type-C ports and two USB2.0 EHCI ports. Other interfaces are very like RK3288, the DRAM are 32bit width address and support address from 0 to 4GB-128MB range.
---
Changes in v2:
fix description error on board Kconfig
arch/arm/Kconfig | 3 -- arch/arm/mach-rockchip/Kconfig | 25 +++++++++- arch/arm/mach-rockchip/Makefile | 2 +- arch/arm/mach-rockchip/rk3399/Kconfig | 14 ++++++ arch/arm/mach-rockchip/rk3399/Makefile | 5 ++ board/rockchip/evb_rk3399/Kconfig | 15 ++++++ board/rockchip/evb_rk3399/MAINTAINERS | 0 board/rockchip/evb_rk3399/Makefile | 7 +++ board/rockchip/evb_rk3399/evb-rk3399.c | 41 +++++++++++++++++ include/configs/evb_rk3399.h | 24 ++++++++++ include/configs/rk3399_common.h | 84 ++++++++++++++++++++++++++++++++++ 11 files changed, 215 insertions(+), 5 deletions(-) create mode 100644 arch/arm/mach-rockchip/rk3399/Kconfig create mode 100644 arch/arm/mach-rockchip/rk3399/Makefile create mode 100644 board/rockchip/evb_rk3399/Kconfig create mode 100644 board/rockchip/evb_rk3399/MAINTAINERS create mode 100644 board/rockchip/evb_rk3399/Makefile create mode 100644 board/rockchip/evb_rk3399/evb-rk3399.c create mode 100644 include/configs/evb_rk3399.h create mode 100644 include/configs/rk3399_common.h
arch/arm/Kconfig +0 -3
@@ -846,10 +846,7 @@ config STM32 config ARCH_ROCKCHIP bool "Support Rockchip SoCs" - select SUPPORT_SPL - select SPL select OF_CONTROL - select CPU_V7 select DM config TARGET_THUNDERX_88XX
arch/arm/mach-rockchip/Kconfig +24 -1
@@ -1,5 +1,8 @@ if ARCH_ROCKCHIP +config RK_TIMER + bool + config ROCKCHIP_RK3288 bool "Support Rockchip RK3288" help
@@ -8,6 +11,10 @@ config ROCKCHIP_RK3288 video interfaces supporting HDMI and eDP, several DDR3 options and video codec support. Peripherals include Gigabit Ethernet, USB2 host and OTG, SDIO, I2S, UART,s, SPI, I2C and PWMs. + select CPU_V7 + select RK_TIMER + select SUPPORT_SPL + select SPL config ROCKCHIP_RK3036 bool "Support Rockchip RK3036"
@@ -16,6 +23,21 @@ config ROCKCHIP_RK3036 including NEON and GPU, Mali-400 graphics, several DDR3 options and video codec support. Peripherals include Gigabit Ethernet, USB2 host and OTG, SDIO, I2S, UART, SPI, I2C and PWMs. + select CPU_V7 + select RK_TIMER + select SUPPORT_SPL + select SPL + +config ROCKCHIP_RK3399 + bool "Support Rockchip RK3399" + help + The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72 + and qual-core Cortex-A53. + including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two + video interfaces supporting HDMI and eDP, several DDR3 options + and video codec support. Peripherals include Gigabit Ethernet, + USB2 host and OTG, SDIO, I2S, UART,s, SPI, I2C and PWMs. + select ARM64 config SYS_MALLOC_F default y
@@ -42,8 +64,9 @@ config DM_GPIO default y config BLK - default y + default y if CPU_V7 source "arch/arm/mach-rockchip/rk3288/Kconfig" source "arch/arm/mach-rockchip/rk3036/Kconfig" +source "arch/arm/mach-rockchip/rk3399/Kconfig" endif
arch/arm/mach-rockchip/Makefile +1 -1
@@ -10,6 +10,6 @@ obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o else obj-$(CONFIG_ROCKCHIP_RK3288) += board.o endif -obj-y += rk_timer.o +obj-$(CONFIG_RK_TIMER) += rk_timer.o obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288/ obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/
arch/arm/mach-rockchip/rk3399/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +if ROCKCHIP_RK3399 + +config TARGET_EVB_RK3399 + bool "RK3399 evb board" + +config SYS_SOC + default "rockchip" + +config SYS_MALLOC_F_LEN + default 0x0800 + +source "board/rockchip/evb_rk3399/Kconfig" + +endif
arch/arm/mach-rockchip/rk3399/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# +# Copyright (C) 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +#
board/rockchip/evb_rk3399/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_EVB_RK3399 + +config SYS_BOARD + default "evb_rk3399" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3399" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif
board/rockchip/evb_rk3399/MAINTAINERS new file +0 -0
board/rockchip/evb_rk3399/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb-rk3399.o
board/rockchip/evb_rk3399/evb-rk3399.c new file +41 -0
41 lines not on this page · raw message
include/configs/evb_rk3399.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* (C) Copyright 2016 Rockchip Electronics Co., Ltd +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __EVB_RK3399_H +#define __EVB_RK3399_H + +#include <configs/rk3399_common.h> + + +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0 +/* SPL @ 32k for ~36k +* ENV @ 96k +* u-boot @ 128K +*/ +#define CONFIG_ENV_OFFSET (96 * 1024) + +#define CONFIG_SYS_WHITE_ON_BLACK +#define CONFIG_CONSOLE_SCROLL_LINES 10 + +#endif
include/configs/rk3399_common.h new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 3/5 config: add config file for evb-rk3399
In reply to Kever YangThis patch add basic config option for evb-rk3399 board.
---
Changes in v2: None
configs/evb-rk3399_defconfig | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 configs/evb-rk3399_defconfig
configs/evb-rk3399_defconfig new file +32 -0
@@ -0,0 +1,32 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_ROCKCHIP_RK3399=y +CONFIG_TARGET_EVB_RK3399=y +CONFIG_DEFAULT_DEVICE_TREE="rk3399-evb" +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_IMLS is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_CMD_GPT=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y +CONFIG_CLK=y +CONFIG_FIT=y +CONFIG_SYSRESET=y +CONFIG_DM_MMC=y +CONFIG_ROCKCHIP_SDHCI=y +CONFIG_PINCTRL=y +CONFIG_RAM=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_BASE=0xFF1A0000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_USE_TINY_PRINTF=y +CONFIG_ERRNO_STR=y
Signature · 1 line
1.9.1
PATCH v2 4/5 mmc: rockchip: add SDHCI driver support for rockchip soc
In reply to Kever YangRockchip rk3399 using arasan sdhci-5.1 controller.
This patch add the controller support to enable mmc device and tested on rk3399 evb board.
---
Changes in v2: None
drivers/mmc/Kconfig | 6 +++++ drivers/mmc/Makefile | 1 + drivers/mmc/rockchip_sdhci.c | 58 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 drivers/mmc/rockchip_sdhci.c
drivers/mmc/Kconfig +6 -0
@@ -52,6 +52,12 @@ config ZYNQ_SDHCI help Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform +config ROCKCHIP_SDHCI + bool "Arasan SDHCI controller for Rockchip support" + depends on DM_MMC && OF_CONTROL + help + Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform + config MMC_UNIPHIER bool "UniPhier SD/MMC Host Controller support" depends on ARCH_UNIPHIER
drivers/mmc/Makefile +1 -0
@@ -53,6 +53,7 @@ obj-$(CONFIG_SPEAR_SDHCI) += spear_sdhci.o obj-$(CONFIG_TEGRA_MMC) += tegra_mmc.o obj-$(CONFIG_MMC_UNIPHIER) += uniphier-sd.o obj-$(CONFIG_ZYNQ_SDHCI) += zynq_sdhci.o +obj-$(CONFIG_ROCKCHIP_SDHCI) += rockchip_sdhci.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o
drivers/mmc/rockchip_sdhci.c new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
1.9.1