
Hi Andy,
On 20 April 2017 at 20:31, Andy Yan andy.yan@rock-chips.com wrote:
From: Andreas Färber afaerber@suse.de
The RK3368 is an octa-core Cortex-A53 SoC from Rockchip. This adds basic support to chain-load U-Boot from Rockchip's miniloader.
Signed-off-by: Andreas Färber afaerber@suse.de Signed-off-by: Andy Yan andy.yan@rock-chips.com
arch/arm/dts/rk3368.dtsi | 1090 +++++++++++++++++++++++++ arch/arm/mach-rockchip/Kconfig | 13 + arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rk3368/Kconfig | 8 + arch/arm/mach-rockchip/rk3368/Makefile | 8 + arch/arm/mach-rockchip/rk3368/clk_rk3368.c | 32 + arch/arm/mach-rockchip/rk3368/rk3368.c | 84 ++ arch/arm/mach-rockchip/rk3368/syscon_rk3368.c | 25 + include/configs/rk3368_common.h | 43 + include/dt-bindings/clock/rk3368-cru.h | 384 +++++++++ 10 files changed, 1688 insertions(+) create mode 100644 arch/arm/dts/rk3368.dtsi create mode 100644 arch/arm/mach-rockchip/rk3368/Kconfig create mode 100644 arch/arm/mach-rockchip/rk3368/Makefile create mode 100644 arch/arm/mach-rockchip/rk3368/clk_rk3368.c create mode 100644 arch/arm/mach-rockchip/rk3368/rk3368.c create mode 100644 arch/arm/mach-rockchip/rk3368/syscon_rk3368.c create mode 100644 include/configs/rk3368_common.h create mode 100644 include/dt-bindings/clock/rk3368-cru.h
Reviewed-by: Simon Glass sjg@chromium.org
[...]
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 2b752ad..2d7afab 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -49,6 +49,18 @@ config ROCKCHIP_RK3328 and video codec support. Peripherals include Gigabit Ethernet, USB2 host and OTG, SDIO, I2S, UARTs, SPI, I2C and PWMs.
+config ROCKCHIP_RK3368
bool "Support Rockchip RK3368"
select ARM64
select SYS_NS16550
help
The Rockchip RK3328 is a ARM-based SoC with a octa-core Cortex-A53.
including NEON and GPU, 512KB L2 cache for big cluster and 256 KB
L2 cache for little cluser, PowerVR G6110 based graphics, one video
output processor supporting LVDS、HDMI、eDP, several DDR3 options
and video codec support. Peripherals include Gigabit Ethernet,
USB2 host and OTG, SDIO, I2S, UARTs, SPI, I2C and PWMs.
Great!
config ROCKCHIP_RK3399 bool "Support Rockchip RK3399" select ARM64 @@ -84,5 +96,6 @@ source "arch/arm/mach-rockchip/rk3036/Kconfig" source "arch/arm/mach-rockchip/rk3188/Kconfig" source "arch/arm/mach-rockchip/rk3288/Kconfig" source "arch/arm/mach-rockchip/rk3328/Kconfig" +source "arch/arm/mach-rockchip/rk3368/Kconfig" source "arch/arm/mach-rockchip/rk3399/Kconfig" endif diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 6b251c7..bb13ffe 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -29,4 +29,5 @@ endif
obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288/ obj-$(CONFIG_ROCKCHIP_RK3328) += rk3328/ +obj-$(CONFIG_ROCKCHIP_RK3368) += rk3368/ obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399/ diff --git a/arch/arm/mach-rockchip/rk3368/Kconfig b/arch/arm/mach-rockchip/rk3368/Kconfig new file mode 100644 index 0000000..ee9c6fb --- /dev/null +++ b/arch/arm/mach-rockchip/rk3368/Kconfig @@ -0,0 +1,8 @@ +if ROCKCHIP_RK3368
+config SYS_SOC
default "rockchip"
+config SYS_MALLOC_F_LEN
default 0x0800
I think this is the usual default, so you should be able to remove this?
[...]
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c new file mode 100644 index 0000000..7b2bdd0 --- /dev/null +++ b/arch/arm/mach-rockchip/rk3368/rk3368.c @@ -0,0 +1,84 @@ +/*
- Copyright (c) 2016 Rockchip Electronics Co., Ltd
- Copyright (c) 2016 Andreas Färber
- SPDX-License-Identifier: GPL-2.0+
- */
+#include <common.h> +#include <asm/arch/cru_rk3368.h> +#include <asm/arch/grf_rk3368.h> +#include <asm/armv8/mmu.h> +#include <asm/io.h>
The above two should go below common.h
[...]
diff --git a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c new file mode 100644 index 0000000..cefee0a --- /dev/null +++ b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c @@ -0,0 +1,25 @@ +/*
- (C) Copyright 2017 Rockchip Electronics Co., Ltd
- Author: Andy Yan andy.yan@rock-chips.com
- SPDX-License-Identifier: GPL-2.0+
- */
+#include <common.h> +#include <asm/arch/clock.h>
Should go last
+#include <dm.h> +#include <syscon.h>
+static const struct udevice_id rk3368_syscon_ids[] = {
{ .compatible = "rockchip,rk3368-grf",
.data = ROCKCHIP_SYSCON_GRF },
{ .compatible = "rockchip,rk3368-pmugrf",
.data = ROCKCHIP_SYSCON_PMUGRF },
{ }
+};
+U_BOOT_DRIVER(syscon_rk3368) = {
.name = "rk3368_syscon",
.id = UCLASS_SYSCON,
.of_match = rk3368_syscon_ids,
+};
[..]
Regards, Simon