Add support for RK3308 SOC
Subsystems (5)
v3 cover Add support for RK3308 SOC
RK3308 is a quad Cortex A35 based SOC with rich audio interfaces(I2S/PCM/TDM/PDM/SPDIF/VAD/HDMI ARC), which designed for intelligent voice interaction and audio input/output processing.
This path set add basic support for it, test on a emmc based evb and roc-rk3308-cc.
Changes in v3:
- Add commit message.
- rename config to roc-cc-rk3308_defconfig
- Doc update with more detail message.
Andy Yan (8):
arm: rockchip: Add RK3308 SOC support
arm: dts: rockchip: Add dts for rk3308 evb
board: rockchip: Add rk3308 evb support
rockchip: rk3308: Add sdram driver
rockchip: mkimage: add support for RK3308
rockchip: rk3308: Add dts for ROC-RK3308-CC
rockchip: rk3308: Add support for ROC-RK3308-CC board
doc: rockchip: Add documentation for rk3308 based boards
Finley Xiao (1):
rockchip: clk: Add clk driver for rk3308
arch/arm/dts/Makefile | 4 + arch/arm/dts/rk3308-evb-u-boot.dtsi | 17 + arch/arm/dts/rk3308-evb.dts | 230 +++ arch/arm/dts/rk3308-roc-cc-u-boot.dtsi | 17 + arch/arm/dts/rk3308-roc-cc.dts | 190 ++ arch/arm/dts/rk3308-u-boot.dtsi | 25 + arch/arm/dts/rk3308.dtsi | 1829 +++++++++++++++++ arch/arm/include/asm/arch-rk3308/boot0.h | 11 + arch/arm/include/asm/arch-rk3308/cru_rk3308.h | 290 +++ arch/arm/include/asm/arch-rk3308/gpio.h | 11 + arch/arm/include/asm/arch-rk3308/grf_rk3308.h | 197 ++ arch/arm/mach-rockchip/Kconfig | 24 + arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rk3308/Kconfig | 27 + arch/arm/mach-rockchip/rk3308/Makefile | 9 + arch/arm/mach-rockchip/rk3308/clk_rk3308.c | 31 + arch/arm/mach-rockchip/rk3308/rk3308.c | 175 ++ arch/arm/mach-rockchip/rk3308/syscon_rk3308.c | 20 + board/firefly/firefly-rk3308/Kconfig | 15 + board/firefly/firefly-rk3308/MAINTAINERS | 5 + board/firefly/firefly-rk3308/Makefile | 7 + board/firefly/firefly-rk3308/roc_cc_rk3308.c | 82 + board/rockchip/evb_rk3308/Kconfig | 15 + board/rockchip/evb_rk3308/MAINTAINERS | 6 + board/rockchip/evb_rk3308/Makefile | 7 + board/rockchip/evb_rk3308/evb_rk3308.c | 44 + configs/evb-rk3308_defconfig | 77 + configs/roc-cc-rk3308_defconfig | 77 + doc/README.rockchip | 92 +- drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk_rk3308.c | 1078 ++++++++++ drivers/ram/rockchip/Makefile | 1 + drivers/ram/rockchip/sdram_rk3308.c | 55 + include/configs/evb_rk3308.h | 20 + include/configs/firefly_rk3308.h | 20 + include/configs/rk3308_common.h | 58 + include/dt-bindings/clock/rk3308-cru.h | 387 ++++ tools/rkcommon.c | 1 + 38 files changed, 5155 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/rk3308-evb-u-boot.dtsi create mode 100644 arch/arm/dts/rk3308-evb.dts create mode 100644 arch/arm/dts/rk3308-roc-cc-u-boot.dtsi create mode 100644 arch/arm/dts/rk3308-roc-cc.dts create mode 100644 arch/arm/dts/rk3308-u-boot.dtsi create mode 100644 arch/arm/dts/rk3308.dtsi create mode 100644 arch/arm/include/asm/arch-rk3308/boot0.h create mode 100644 arch/arm/include/asm/arch-rk3308/cru_rk3308.h create mode 100644 arch/arm/include/asm/arch-rk3308/gpio.h create mode 100644 arch/arm/include/asm/arch-rk3308/grf_rk3308.h create mode 100644 arch/arm/mach-rockchip/rk3308/Kconfig create mode 100644 arch/arm/mach-rockchip/rk3308/Makefile create mode 100644 arch/arm/mach-rockchip/rk3308/clk_rk3308.c create mode 100644 arch/arm/mach-rockchip/rk3308/rk3308.c create mode 100644 arch/arm/mach-rockchip/rk3308/syscon_rk3308.c create mode 100644 board/firefly/firefly-rk3308/Kconfig create mode 100644 board/firefly/firefly-rk3308/MAINTAINERS create mode 100644 board/firefly/firefly-rk3308/Makefile create mode 100644 board/firefly/firefly-rk3308/roc_cc_rk3308.c create mode 100644 board/rockchip/evb_rk3308/Kconfig create mode 100644 board/rockchip/evb_rk3308/MAINTAINERS create mode 100644 board/rockchip/evb_rk3308/Makefile create mode 100644 board/rockchip/evb_rk3308/evb_rk3308.c create mode 100644 configs/evb-rk3308_defconfig create mode 100644 configs/roc-cc-rk3308_defconfig create mode 100644 drivers/clk/rockchip/clk_rk3308.c create mode 100644 drivers/ram/rockchip/sdram_rk3308.c create mode 100644 include/configs/evb_rk3308.h create mode 100644 include/configs/firefly_rk3308.h create mode 100644 include/configs/rk3308_common.h create mode 100644 include/dt-bindings/clock/rk3308-cru.h
Signature · 1 line
2.17.1
PATCH v3 1/9 arm: rockchip: Add RK3308 SOC support
RK3308 is a quad Cortex A35 based SOC with rich audio interfaces(I2S/PCM/TDM/PDM/SPDIF/VAD/HDMI ARC), which designed for intelligent voice interaction and audio input/output processing.
---
Changes in v3: None
arch/arm/include/asm/arch-rk3308/boot0.h | 11 + arch/arm/include/asm/arch-rk3308/cru_rk3308.h | 290 ++++++++++++++++++ arch/arm/include/asm/arch-rk3308/gpio.h | 11 + arch/arm/include/asm/arch-rk3308/grf_rk3308.h | 197 ++++++++++++ arch/arm/mach-rockchip/Kconfig | 24 ++ arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rk3308/Kconfig | 14 + arch/arm/mach-rockchip/rk3308/Makefile | 9 + arch/arm/mach-rockchip/rk3308/clk_rk3308.c | 31 ++ arch/arm/mach-rockchip/rk3308/rk3308.c | 175 +++++++++++ arch/arm/mach-rockchip/rk3308/syscon_rk3308.c | 20 ++ include/configs/rk3308_common.h | 58 ++++ 12 files changed, 841 insertions(+) create mode 100644 arch/arm/include/asm/arch-rk3308/boot0.h create mode 100644 arch/arm/include/asm/arch-rk3308/cru_rk3308.h create mode 100644 arch/arm/include/asm/arch-rk3308/gpio.h create mode 100644 arch/arm/include/asm/arch-rk3308/grf_rk3308.h create mode 100644 arch/arm/mach-rockchip/rk3308/Kconfig create mode 100644 arch/arm/mach-rockchip/rk3308/Makefile create mode 100644 arch/arm/mach-rockchip/rk3308/clk_rk3308.c create mode 100644 arch/arm/mach-rockchip/rk3308/rk3308.c create mode 100644 arch/arm/mach-rockchip/rk3308/syscon_rk3308.c create mode 100644 include/configs/rk3308_common.h
arch/arm/include/asm/arch-rk3308/boot0.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2019 Rockchip Electronics Co., Ltd +*/ + +#ifndef __ASM_ARCH_BOOT0_H__ +#define __ASM_ARCH_BOOT0_H__ + +#include <asm/arch-rockchip/boot0.h> + +#endif
arch/arm/include/asm/arch-rk3308/cru_rk3308.h new file +290 -0
290 lines not on this page · raw message
arch/arm/include/asm/arch-rk3308/gpio.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2019 Rockchip Electronics Co., Ltd +*/ + +#ifndef __ASM_ARCH_GPIO_H__ +#define __ASM_ARCH_GPIO_H__ + +#include <asm/arch-rockchip/gpio.h> + +#endif
arch/arm/include/asm/arch-rk3308/grf_rk3308.h new file +197 -0
197 lines not on this page · raw message
arch/arm/mach-rockchip/Kconfig +24 -0
@@ -105,6 +105,29 @@ config ROCKCHIP_RK3288 and video codec support. Peripherals include Gigabit Ethernet, USB2 host and OTG, SDIO, I2S, UARTs, SPI, I2C and PWMs. +config ROCKCHIP_RK3308 + bool "Support Rockchip RK3308" + select ARM64 + select DEBUG_UART_BOARD_INIT + select SUPPORT_SPL + select SUPPORT_TPL + select SPL + select SPL_ATF + select SPL_ATF_NO_PLATFORM_PARAM + select SPL_LOAD_FIT + imply ROCKCHIP_COMMON_BOARD + imply SPL_ROCKCHIP_COMMON_BOARD + imply SPL_CLK + imply SPL_REGMAP + imply SPL_SYSCON + imply SPL_RAM + imply SPL_SERIAL_SUPPORT + imply TPL_SERIAL_SUPPORT + imply SPL_SEPARATE_BSS + help + The Rockchip RK3308 is a ARM-based Soc which embedded with quad + Cortex-A35 and highly integrated audio interfaces. + config ROCKCHIP_RK3328 bool "Support Rockchip RK3328" select ARM64
@@ -320,6 +343,7 @@ source "arch/arm/mach-rockchip/rk3128/Kconfig" source "arch/arm/mach-rockchip/rk3188/Kconfig" source "arch/arm/mach-rockchip/rk322x/Kconfig" source "arch/arm/mach-rockchip/rk3288/Kconfig" +source "arch/arm/mach-rockchip/rk3308/Kconfig" source "arch/arm/mach-rockchip/rk3328/Kconfig" source "arch/arm/mach-rockchip/rk3368/Kconfig" source "arch/arm/mach-rockchip/rk3399/Kconfig"
arch/arm/mach-rockchip/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128/ obj-$(CONFIG_ROCKCHIP_RK3188) += rk3188/ obj-$(CONFIG_ROCKCHIP_RK322X) += rk322x/ obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288/ +obj-$(CONFIG_ROCKCHIP_RK3308) += rk3308/ obj-$(CONFIG_ROCKCHIP_RK3328) += rk3328/ obj-$(CONFIG_ROCKCHIP_RK3368) += rk3368/ obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399/
arch/arm/mach-rockchip/rk3308/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +if ROCKCHIP_RK3308 + +config SYS_SOC + default "rk3308" + +config SYS_MALLOC_F_LEN + default 0x400 + +config SPL_SERIAL_SUPPORT + default y + +config ROCKCHIP_BOOT_MODE_REG + default 0xff000500 +endif
arch/arm/mach-rockchip/rk3308/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# (C) Copyright 2018 Rockchip Electronics Co., Ltd. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += syscon_rk3308.o +obj-y += rk3308.o +obj-y += clk_rk3308.o
arch/arm/mach-rockchip/rk3308/clk_rk3308.c new file +31 -0
@@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd +*/ + +#include <common.h> +#include <dm.h> +#include <syscon.h> +#include <asm/arch-rockchip/clock.h> +#include <asm/arch/cru_rk3308.h> + +int rockchip_get_clk (struct udevice **devp) +{ +return uclass_get_device_by_driver (UCLASS_CLK , +DM_GET_DRIVER (rockchip_rk3308_cru), devp); +} + +void *rockchip_get_cru (void ) +{ +struct rk3308_clk_priv *priv; +struct udevice *dev; +int ret; + + ret =rockchip_get_clk (&dev); +if (ret) +return ERR_PTR (ret); + + priv =dev_get_priv (dev); + +return priv->cru; +}
arch/arm/mach-rockchip/rk3308/rk3308.c new file +175 -0
175 lines not on this page · raw message
arch/arm/mach-rockchip/rk3308/syscon_rk3308.c new file +20 -0
@@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2018 Rockchip Electronics Co., Ltd +*/ + +#include <common.h> +#include <dm.h> +#include <syscon.h> +#include <asm/arch-rockchip/clock.h> + +static const struct udevice_id rk3308_syscon_ids[] = { + { .compatible ="rockchip,rk3308-grf" , .data =ROCKCHIP_SYSCON_GRF }, + { } +}; + +U_BOOT_DRIVER (syscon_rk3308) = { + .name ="rk3308_syscon" , + .id =UCLASS_SYSCON , + .of_match = rk3308_syscon_ids, +};
include/configs/rk3308_common.h new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 2/9 rockchip: clk: Add clk driver for rk3308
In reply to Andy YanFrom: Finley Xiao <[email protected]>
Add clk controller driver for RK3308 SOC.
This patch depends on Elaine's pll patch[0].
[0]http://patchwork.ozlabs.org/patch/1183718/
---
Changes in v3: None
drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk_rk3308.c | 1078 ++++++++++++++++++++++++ include/dt-bindings/clock/rk3308-cru.h | 387 +++++++++ 3 files changed, 1466 insertions(+) create mode 100644 drivers/clk/rockchip/clk_rk3308.c create mode 100644 include/dt-bindings/clock/rk3308-cru.h
drivers/clk/rockchip/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_ROCKCHIP_RK3128) += clk_rk3128.o obj-$(CONFIG_ROCKCHIP_RK3188) += clk_rk3188.o obj-$(CONFIG_ROCKCHIP_RK322X) += clk_rk322x.o obj-$(CONFIG_ROCKCHIP_RK3288) += clk_rk3288.o +obj-$(CONFIG_ROCKCHIP_RK3308) += clk_rk3308.o obj-$(CONFIG_ROCKCHIP_RK3328) += clk_rk3328.o obj-$(CONFIG_ROCKCHIP_RK3368) += clk_rk3368.o obj-$(CONFIG_ROCKCHIP_RK3399) += clk_rk3399.o
drivers/clk/rockchip/clk_rk3308.c new file +1078 -0
1,078 lines not on this page · raw message
include/dt-bindings/clock/rk3308-cru.h new file +387 -0
387 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 3/9 arm: dts: rockchip: Add dts for rk3308 evb
In reply to Andy YanAdd dts for rk3308 evb, sync from the linux kernel upstream list [0].
[0]https://patchwork.kernel.org/patch/11201555/
---
Changes in v3: None
arch/arm/dts/Makefile | 3 + arch/arm/dts/rk3308-evb-u-boot.dtsi | 17 + arch/arm/dts/rk3308-evb.dts | 230 ++++ arch/arm/dts/rk3308-u-boot.dtsi | 25 + arch/arm/dts/rk3308.dtsi | 1829 +++++++++++++++++++++++++++ 5 files changed, 2104 insertions(+) create mode 100644 arch/arm/dts/rk3308-evb-u-boot.dtsi create mode 100644 arch/arm/dts/rk3308-evb.dts create mode 100644 arch/arm/dts/rk3308-u-boot.dtsi create mode 100644 arch/arm/dts/rk3308.dtsi
arch/arm/dts/Makefile +3 -0
@@ -93,6 +93,9 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \ rk3288-veyron-speedy.dtb \ rk3288-vyasa.dtb +dtb-$(CONFIG_ROCKCHIP_RK3308) += \ + rk3308-evb.dtb + dtb-$(CONFIG_ROCKCHIP_RK3328) += \ rk3328-evb.dtb \ rk3328-rock64.dtb
arch/arm/dts/rk3308-evb-u-boot.dtsi new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd + */ +#include "rk3308-u-boot.dtsi" + +/ { + chosen { + u-boot,spl-boot-order = "same-as-spl", &emmc; + }; +}; + +&uart4 { + u-boot,dm-pre-reloc; + clock-frequency = <24000000>; + status = "okay"; +};
arch/arm/dts/rk3308-evb.dts new file +230 -0
230 lines not on this page · raw message
arch/arm/dts/rk3308-u-boot.dtsi new file +25 -0
@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + *(C) Copyright 2019 Rockchip Electronics Co., Ltd + */ + +&cru { + u-boot,dm-pre-reloc; +}; + +&dmc { + u-boot,dm-pre-reloc; +}; + +&emmc { + u-boot,dm-pre-reloc; +}; + +&grf { + u-boot,dm-pre-reloc; +}; + +&saradc { + u-boot,dm-pre-reloc; + status = "okay"; +};
arch/arm/dts/rk3308.dtsi new file +1829 -0
1,829 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 4/9 board: rockchip: Add rk3308 evb support
In reply to Andy YanAdd support for rk3308 evaluation board.
---
Changes in v3: None
arch/arm/mach-rockchip/rk3308/Kconfig | 8 +++ board/rockchip/evb_rk3308/Kconfig | 15 +++++ board/rockchip/evb_rk3308/MAINTAINERS | 6 ++ board/rockchip/evb_rk3308/Makefile | 7 +++ board/rockchip/evb_rk3308/evb_rk3308.c | 44 +++++++++++++++ configs/evb-rk3308_defconfig | 77 ++++++++++++++++++++++++++ include/configs/evb_rk3308.h | 20 +++++++ 7 files changed, 177 insertions(+) create mode 100644 board/rockchip/evb_rk3308/Kconfig create mode 100644 board/rockchip/evb_rk3308/MAINTAINERS create mode 100644 board/rockchip/evb_rk3308/Makefile create mode 100644 board/rockchip/evb_rk3308/evb_rk3308.c create mode 100644 configs/evb-rk3308_defconfig create mode 100644 include/configs/evb_rk3308.h
arch/arm/mach-rockchip/rk3308/Kconfig +8 -0
@@ -1,5 +1,9 @@ if ROCKCHIP_RK3308 +config TARGET_EVB_RK3308 + bool "EVB_RK3308" + select BOARD_LATE_INIT + config SYS_SOC default "rk3308"
@@ -11,4 +15,8 @@ config SPL_SERIAL_SUPPORT config ROCKCHIP_BOOT_MODE_REG default 0xff000500 + + +source "board/rockchip/evb_rk3308/Kconfig" + endif
board/rockchip/evb_rk3308/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_EVB_RK3308 + +config SYS_BOARD + default "evb_rk3308" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3308" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif
board/rockchip/evb_rk3308/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +EVB-RK3308 +M: Andy Yan <[email protected]> +S: Maintained +F: board/rockchip/evb_rk3308 +F: include/configs/evb_rk3308.h +F: configs/evb-rk3308_defconfig
board/rockchip/evb_rk3308/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# (C) Copyright 2018 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb_rk3308.o
board/rockchip/evb_rk3308/evb_rk3308.c new file +44 -0
44 lines not on this page · raw message
configs/evb-rk3308_defconfig new file +77 -0
77 lines not on this page · raw message
include/configs/evb_rk3308.h new file +20 -0
@@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2018 Rockchip Electronics Co., Ltd +*/ + +#ifndef __EVB_RK3308_H +#define __EVB_RK3308_H + +#include <configs/rk3308_common.h> + +#define CONFIG_SUPPORT_EMMC_RPMB +#define CONFIG_SYS_MMC_ENV_DEV 0 + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" +#undef CONFIG_CONSOLE_SCROLL_LINES +#define CONFIG_CONSOLE_SCROLL_LINES 10 + +#endif
Signature · 1 line
2.17.1
PATCH v3 5/9 rockchip: rk3308: Add sdram driver
In reply to Andy YanA dm based dram driver for rk3308 u-boot
to get capacity.
---
Changes in v3: None
drivers/ram/rockchip/Makefile | 1 + drivers/ram/rockchip/sdram_rk3308.c | 55 +++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 drivers/ram/rockchip/sdram_rk3308.c
drivers/ram/rockchip/Makefile +1 -0
@@ -9,5 +9,6 @@ obj-$(CONFIG_ROCKCHIP_RK3128) = sdram_rk3128.o obj-$(CONFIG_ROCKCHIP_RK3188) = sdram_rk3188.o obj-$(CONFIG_ROCKCHIP_RK322X) = sdram_rk322x.o obj-$(CONFIG_ROCKCHIP_RK3288) = sdram_rk3288.o +obj-$(CONFIG_ROCKCHIP_RK3308) = sdram_rk3308.o obj-$(CONFIG_ROCKCHIP_RK3328) = sdram_rk3328.o obj-$(CONFIG_RAM_RK3399) += sdram_rk3399.o
drivers/ram/rockchip/sdram_rk3308.c new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 6/9 rockchip: mkimage: add support for RK3308
In reply to Andy YanUsage:
(1) tools/mkimage -n rk3308 -T rksd -d tpl/u-boot-tpl.bin idbloader.img
(2) cat spl/u-boot-spl.bin >> idbloader.img
(3) upgrade_tool wl 0x40 idbloader.img
Note:
When use a ddr binary from rkbin as tpl, use it replace u-boot-tpl.bin in (1)
---
Changes in v3: None
tools/rkcommon.c | 1 + 1 file changed, 1 insertion(+)
tools/rkcommon.c +1 -0
@@ -72,6 +72,7 @@ static struct spl_info spl_infos[] = { { "rk3188", "RK31", 0x8000 - 0x800, true }, { "rk322x", "RK32", 0x8000 - 0x1000, false }, { "rk3288", "RK32", 0x8000, false }, + { "rk3308", "RK33", 0x40000 - 0x1000, false}, { "rk3328", "RK32", 0x8000 - 0x1000, false }, { "rk3368", "RK33", 0x8000 - 0x1000, false }, { "rk3399", "RK33", 0x30000 - 0x2000, false },
Signature · 1 line
2.17.1
PATCH v3 7/9 rockchip: rk3308: Add dts for ROC-RK3308-CC
In reply to Andy YanAdd dts file for ROC-RK3308-CC from firefly.
Sync form linux rockchip for v5.5-armsoc/dts64:
"arm64: dts: rockchip: Add devicetree for board roc-rk3308-cc" (sha1: 4403e1237be3af0977aa23ef399e3496316317a0)
---
Changes in v3:
- Add commit message.
arch/arm/dts/Makefile | 3 +- arch/arm/dts/rk3308-roc-cc-u-boot.dtsi | 17 +++ arch/arm/dts/rk3308-roc-cc.dts | 190 +++++++++++++++++++++++++ 3 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/rk3308-roc-cc-u-boot.dtsi create mode 100644 arch/arm/dts/rk3308-roc-cc.dts
arch/arm/dts/Makefile +2 -1
@@ -94,7 +94,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \ rk3288-vyasa.dtb dtb-$(CONFIG_ROCKCHIP_RK3308) += \ - rk3308-evb.dtb + rk3308-evb.dtb \ + rk3308-roc-cc.dtb dtb-$(CONFIG_ROCKCHIP_RK3328) += \ rk3328-evb.dtb \
arch/arm/dts/rk3308-roc-cc-u-boot.dtsi new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd + */ +#include "rk3308-u-boot.dtsi" + +/ { + chosen { + u-boot,spl-boot-order = "same-as-spl", &emmc; + }; +}; + +&uart2 { + u-boot,dm-pre-reloc; + clock-frequency = <24000000>; + status = "okay"; +};
arch/arm/dts/rk3308-roc-cc.dts new file +190 -0
190 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 7/9 rockchip: rk3308: Add dts for ROC-RK3308-CC
Quoted 7 lines · Andy Yan
Add dts file for ROC-RK3308-CC from firefly.
Sync form linux rockchip for v5.5-armsoc/dts64:
"arm64: dts: rockchip: Add devicetree for board roc-rk3308-cc" (sha1:4403e1237be3af0977aa23ef399e3496316317a0)Signed-off-by Andy Yan <[email protected]>
Thanks,
- Kever
Quoted 246 lines
---
Changes in v3:
- Add commit message.arch/arm/dts/Makefile | 3 +- arch/arm/dts/rk3308-roc-cc-u-boot.dtsi | 17 +++ arch/arm/dts/rk3308-roc-cc.dts | 190 +++++++++++++++++++++++++ 3 files changed, 209 insertions(+), 1 deletion(-)create mode 100644
arch/arm/dts/rk3308-roc-cc-u-boot.dtsicreate mode 100644arch/arm/dts/rk3308-roc-cc.dtsarch/arm/dts/Makefile +2
-1@@ -94,7 +94,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \ rk3288-vyasa.dtb dtb-$(CONFIG_ROCKCHIP_RK3308) += \ - rk3308-evb.dtb + rk3308-evb.dtb \ + rk3308-roc-cc.dtb dtb-$(CONFIG_ROCKCHIP_RK3328) += \ rk3328-evb.dtb \arch/arm/dts/rk3308-roc-cc-u-boot.dtsi new file +17
-0@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd + */ +#include "rk3308-u-boot.dtsi" + +/ { + chosen { + u-boot,spl-boot-order = "same-as-spl", &emmc; + }; +}; + +&uart2 { + u-boot,dm-pre-reloc; + clock-frequency = <24000000>; + status = "okay"; +};arch/arm/dts/rk3308-roc-cc.dts new file +190
-0@@ -0,0 +1,190 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd + */ + +/dts-v1/; +#include "rk3308.dtsi" + +/ { + model = "Firefly ROC-RK3308-CC board"; + compatible = "firefly,roc-rk3308-cc", "rockchip,rk3308"; + chosen { + stdout-path = "serial2:1500000n8"; + }; + + ir_rx { + compatible = "gpio-ir-receiver"; + gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&ir_recv_pin>; + }; + + ir_tx { + compatible = "pwm-ir-tx"; + pwms = <&pwm5 0 25000 0>; + }; + + leds { + compatible = "gpio-leds"; + power { + label = "firefly:red:power"; + linux,default-trigger = "ir-power-click"; + default-state = "on"; + gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; + }; + + user { + label = "firefly:blue:user"; + linux,default-trigger = "ir-user-click"; + default-state = "off"; + gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>; + }; + }; + + typec_vcc5v: typec-vcc5v { + compatible = "regulator-fixed"; + regulator-name = "typec_vcc5v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc5v0_sys: vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&typec_vcc5v>; + }; + + vdd_core: vdd-core { + compatible = "pwm-regulator"; + pwms = <&pwm0 0 5000 1>; + regulator-name = "vdd_core"; + regulator-min-microvolt = <827000>; + regulator-max-microvolt = <1340000>; + regulator-init-microvolt = <1015000>; + regulator-always-on; + regulator-boot-on; + regulator-settling-time-up-us = <250>; + pwm-supply = <&vcc5v0_sys>; + }; + + vdd_log: vdd-log { + compatible = "regulator-fixed"; + regulator-name = "vdd_log"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + vin-supply = <&vcc5v0_sys>; + }; + + vcc_io: vcc-io { + compatible = "regulator-fixed"; + regulator-name = "vcc_io"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; + }; + + vcc_sdmmc: vcc-sdmmc { + compatible = "regulator-gpio"; + regulator-name = "vcc_sdmmc"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>; + states = <1800000 0x0 + 3300000 0x1>; + vin-supply = <&vcc5v0_sys>; + }; + + vcc_sd: vcc-sd { + compatible = "regulator-fixed"; + gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>; + regulator-name = "vcc_sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + vim-supply = <&vcc_io>; + }; + +}; + +&cpu0 { + cpu-supply = <&vdd_core>; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed; + supports-emmc; + disable-wp; + non-removable; + num-slots = <1>; + status = "okay"; +}; + +&i2c1 { + clock-frequency = <400000>; + status = "okay"; + + rtc: rtc at 51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + #clock-cells = <0>; + }; +}; + +&pwm5 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm5_pin_pull_down>; +}; + +&pinctrl { + pinctrl-names = "default"; + pinctrl-0 = <&rtc_32k>; + + ir-receiver { + ir_recv_pin: ir-recv-pin { + rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + buttons { + pwr_key: pwr-key { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_pin_pull_down>; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + supports-sd; + card-detect-delay = <300>; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; + vmmc-supply = <&vcc_sd>; + vqmmc-supply = <&vcc_sdmmc>; + status = "okay"; +}; + +&uart2 { + status = "okay"; +};
PATCH v3 8/9 rockchip: rk3308: Add support for ROC-RK3308-CC board
In reply to Andy YanROC-RK3308-CC is a rk3308 based board designed by Firelfy, with eMMC and 256MB DDR3 and RTL8188 Wifi on board.
---
Changes in v3:
- rename config to roc-cc-rk3308_defconfig
arch/arm/mach-rockchip/rk3308/Kconfig | 5 ++ board/firefly/firefly-rk3308/Kconfig | 15 ++++ board/firefly/firefly-rk3308/MAINTAINERS | 5 ++ board/firefly/firefly-rk3308/Makefile | 7 ++ board/firefly/firefly-rk3308/roc_cc_rk3308.c | 82 ++++++++++++++++++++ configs/roc-cc-rk3308_defconfig | 77 ++++++++++++++++++ include/configs/firefly_rk3308.h | 20 +++++ 7 files changed, 211 insertions(+) create mode 100644 board/firefly/firefly-rk3308/Kconfig create mode 100644 board/firefly/firefly-rk3308/MAINTAINERS create mode 100644 board/firefly/firefly-rk3308/Makefile create mode 100644 board/firefly/firefly-rk3308/roc_cc_rk3308.c create mode 100644 configs/roc-cc-rk3308_defconfig create mode 100644 include/configs/firefly_rk3308.h
arch/arm/mach-rockchip/rk3308/Kconfig +5 -0
@@ -4,6 +4,10 @@ config TARGET_EVB_RK3308 bool "EVB_RK3308" select BOARD_LATE_INIT +config TARGET_ROC_RK3308_CC + bool "Firefly roc-rk3308-cc" + select BOARD_LATE_INIT + config SYS_SOC default "rk3308"
@@ -18,5 +22,6 @@ config ROCKCHIP_BOOT_MODE_REG source "board/rockchip/evb_rk3308/Kconfig" +source "board/firefly/firefly-rk3308/Kconfig" endif
board/firefly/firefly-rk3308/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_ROC_RK3308_CC + +config SYS_BOARD + default "firefly-rk3308" + +config SYS_VENDOR + default "firefly" + +config SYS_CONFIG_NAME + default "firefly_rk3308" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif
board/firefly/firefly-rk3308/MAINTAINERS new file +5 -0
@@ -0,0 +1,5 @@ +ROC-RK3308-CC +M: Andy Yan <[email protected]> +S: Maintained +F: board/firefly/firefly-rk3308/roc_rk3308_cc.c +F: configs/roc-rk3308-cc_defconfig
board/firefly/firefly-rk3308/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# (C) Copyright 2018 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += roc_cc_rk3308.o
board/firefly/firefly-rk3308/roc_cc_rk3308.c new file +82 -0
82 lines not on this page · raw message
configs/roc-cc-rk3308_defconfig new file +77 -0
77 lines not on this page · raw message
include/configs/firefly_rk3308.h new file +20 -0
@@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2019 Rockchip Electronics Co., Ltd +*/ + +#ifndef __FIREFLY_RK3308_H +#define __FIREFLY_RK3308_H + +#include <configs/rk3308_common.h> + +#define CONFIG_SUPPORT_EMMC_RPMB +#define CONFIG_SYS_MMC_ENV_DEV 0 + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" +#undef CONFIG_CONSOLE_SCROLL_LINES +#define CONFIG_CONSOLE_SCROLL_LINES 10 + +#endif
Signature · 1 line
2.17.1
PATCH v3 8/9 rockchip: rk3308: Add support for ROC-RK3308-CC board
Quoted 5 lines · Andy Yan
ROC-RK3308-CC is a rk3308 based board designed by Firelfy, with eMMC and 256MB DDR3 and RTL8188 Wifi on board.
Signed-off-by Andy Yan <[email protected]>
Thanks,
- Kever
Quoted 285 lines
---
Changes in v3:
- rename config to roc-cc-rk3308_defconfigarch/arm/mach-rockchip/rk3308/Kconfig | 5 ++ board/firefly/firefly-rk3308/Kconfig | 15 ++++ board/firefly/firefly-rk3308/MAINTAINERS | 5 ++ board/firefly/firefly-rk3308/Makefile | 7 ++ board/firefly/firefly-rk3308/roc_cc_rk3308.c | 82 ++++++++++++++++++++ configs/roc-cc-rk3308_defconfig | 77 ++++++++++++++++++ include/configs/firefly_rk3308.h | 20 +++++ 7 files changed, 211 insertions(+)create mode 100644 board/firefly/firefly-rk3308/Kconfig create mode 100644 board/firefly/firefly-rk3308/MAINTAINERS create mode 100644 board/firefly/firefly-rk3308/Makefile create mode 100644
board/firefly/firefly-rk3308/roc_cc_rk3308.ccreate mode 100644 configs/roc-cc-rk3308_defconfig create mode 100644include/configs/firefly_rk3308.harch/arm/mach-rockchip/rk3308/Kconfig +5
-0@@ -4,6 +4,10 @@ config TARGET_EVB_RK3308 bool "EVB_RK3308" select BOARD_LATE_INIT +config TARGET_ROC_RK3308_CC + bool "Firefly roc-rk3308-cc" + select BOARD_LATE_INIT + config SYS_SOC default "rk3308"@@ -18,5 +22,6 @@ config ROCKCHIP_BOOT_MODE_REG source "board/rockchip/evb_rk3308/Kconfig" +source "board/firefly/firefly-rk3308/Kconfig" endifboard/firefly/firefly-rk3308/Kconfig new file +15
-0@@ -0,0 +1,15 @@ +if TARGET_ROC_RK3308_CC + +config SYS_BOARD + default "firefly-rk3308" + +config SYS_VENDOR + default "firefly" + +config SYS_CONFIG_NAME + default "firefly_rk3308" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endifboard/firefly/firefly-rk3308/MAINTAINERS new file +5
-0@@ -0,0 +1,5 @@ +ROC-RK3308-CC +M: Andy Yan <[email protected]> +S: Maintained +F: board/firefly/firefly-rk3308/roc_rk3308_cc.c +F: configs/roc-rk3308-cc_defconfigboard/firefly/firefly-rk3308/Makefile new file +7
-0@@ -0,0 +1,7 @@ +# +# (C) Copyright 2018 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += roc_cc_rk3308.oboard/firefly/firefly-rk3308/roc_cc_rk3308.c new file +82
-0@@ -0,0 +1,82 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2019 Rockchip Electronics Co., Ltd +*/ + +#include <common.h> +#include <adc.h> +#include <asm/io.h> +#include <asm/arch/grf_rk3308.h> +#include <asm/arch-rockchip/hardware.h> + +#if defined(CONFIG_DEBUG_UART ) +#define GRF_BASE 0xff000000 + +enum { +GPIO1C7_SHIFT =8 , +GPIO1C7_MASK =GENMASK (11 ,8 ), +GPIO1C7_GPIO =0 , +GPIO1C7_UART1_RTSN , +GPIO1C7_UART2_TX_M0 , +GPIO1C7_SPI2_MOSI , +GPIO1C7_JTAG_TMS , + +GPIO1C6_SHIFT =4 , +GPIO1C6_MASK =GENMASK (7 ,4 ), +GPIO1C6_GPIO =0 , +GPIO1C6_UART1_CTSN , +GPIO1C6_UART2_RX_M0 , +GPIO1C6_SPI2_MISO , +GPIO1C6_JTAG_TCLK , + +GPIO4D3_SHIFT =6 , +GPIO4D3_MASK =GENMASK (7 ,6 ), +GPIO4D3_GPIO =0 , +GPIO4D3_SDMMC_D3 , +GPIO4D3_UART2_TX_M1 , + +GPIO4D2_SHIFT =4 , +GPIO4D2_MASK =GENMASK (5 ,4 ), +GPIO4D2_GPIO =0 , +GPIO4D2_SDMMC_D2 , +GPIO4D2_UART2_RX_M1 , + +UART2_IO_SEL_SHIFT =2 , +UART2_IO_SEL_MASK =GENMASK (3 ,2 ), +UART2_IO_SEL_M0 =0 , +UART2_IO_SEL_M1 , +UART2_IO_SEL_USB , +}; + +void board_debug_uart_init (void ) +{ +static struct rk3308_grf *const grf = (void *)GRF_BASE ; + +/* Enable early UART2 channel m0 on the rk3308 */ +rk_clrsetreg (&grf->soc_con5,UART2_IO_SEL_MASK , +UART2_IO_SEL_M0 <<UART2_IO_SEL_SHIFT ); +rk_clrsetreg (&grf->gpio1ch_iomux, +GPIO1C6_MASK |GPIO1C7_MASK , +GPIO1C6_UART2_RX_M0 <<GPIO1C6_SHIFT | +GPIO1C7_UART2_TX_M0 <<GPIO1C7_SHIFT ); +} +#endif + +#define KEY_DOWN_MIN_VAL 0 +#define KEY_DOWN_MAX_VAL 30 + +int rockchip_dnl_key_pressed (void ) +{ +unsigned int val; + + +if (adc_channel_single_shot ("saradc" ,1 , &val)) { +printf ("%s read adc key val failed\n" , __func__); +return false; + } + +if (val >=KEY_DOWN_MIN_VAL && val <=KEY_DOWN_MAX_VAL ) +return true; +else +return false; +}configs/roc-cc-rk3308_defconfig new file +77
-0@@ -0,0 +1,77 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SYS_TEXT_BASE=0x00600000 +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_ROCKCHIP_RK3308=y +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x0 +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_TARGET_ROC_RK3308_CC=y +CONFIG_SPL_STACK_R_ADDR=0xc00000 +CONFIG_DEBUG_UART_BASE=0xFF0C0000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART=y +CONFIG_ANDROID_BOOT_IMAGE=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_BOOTDELAY=0 +CONFIG_SYS_CONSOLE_INFO_QUIET=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_SPL_STACK_R=y +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_CONSOLE is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_XIMG is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPT=y +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +# CONFIG_CMD_ITEST is not set +# CONFIG_CMD_SETEXPR is not set +# CONFIG_CMD_MISC is not set +# CONFIG_DOS_PARTITION is not set +# CONFIG_ISO_PARTITION is not set +CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64 +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_DEFAULT_DEVICE_TREE="rk3308-roc-cc" +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_REGMAP=y +CONFIG_SYSCON=y +CONFIG_CLK=y +# CONFIG_USB_FUNCTION_FASTBOOT is not set +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PHY=y +CONFIG_PINCTRL=y +CONFIG_REGULATOR_PWM=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM=y +CONFIG_DM_RESET=y +CONFIG_BAUDRATE=1500000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_DEBUG_UART_SKIP_INIT=y +CONFIG_SYSRESET=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_DWC2=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_SPL_TINY_MEMSET=y +CONFIG_LZ4=y +CONFIG_LZO=y +CONFIG_ERRNO_STR=y +# CONFIG_EFI_LOADER is not setinclude/configs/firefly_rk3308.h new file +20
-0@@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2019 Rockchip Electronics Co., Ltd +*/ + +#ifndef __FIREFLY_RK3308_H +#define __FIREFLY_RK3308_H + +#include <configs/rk3308_common.h> + +#define CONFIG_SUPPORT_EMMC_RPMB +#define CONFIG_SYS_MMC_ENV_DEV 0 + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" +#undef CONFIG_CONSOLE_SCROLL_LINES +#define CONFIG_CONSOLE_SCROLL_LINES 10 + +#endif
PATCH v3 9/9 doc: rockchip: Add documentation for rk3308 based boards
In reply to Andy YanAdd build documentation for rk3308 based boards.
---
Changes in v3:
- Doc update with more detail message.
doc/README.rockchip | 92 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-)
doc/README.rockchip +91 -1
@@ -47,6 +47,11 @@ Two RK3036 boards are supported: - EVB RK3036 - use evb-rk3036 configuration - Kylin - use kylin_rk3036 configuration +Two RK3308 boards are supported: + + - EVB RK3308 - use evb-rk3308 configuration + - ROC-CC-RK3308 - use roc-rk3308-cc configuration + Two RK3328 board are supported: - EVB RK3328 - use evb-rk3328_defconfig
@@ -94,7 +99,20 @@ For example: (or you can use another cross compiler if you prefer) -2. To build RK3399 board: +2. To build RK3308 board: + - Get the rkbin + => git clone https://github.com/rockchip-linux/rkbin.git + + - Compile U-Boot + => cd /path/to/u-boot + => export BL31=/path/to/rkbin/bin/rk33/rk3308_bl31_v2.22.elf + => make roc-rk3308-cc_defconfig + => make CROSS_COMPILE=aarch64-linux-gnu- all + => make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb + => ./tools/mkimage -n rk3308 -T rksd -d /path/to/rkbin/bin/rk33/rk3308_ddr_589MHz_uart2_m0_v1.26.bin idbloader.img + => cat spl/u-boot-spl.bin >> idbloader.img + +3. To build RK3399 board: Option 1: Package the image with Rockchip miniloader:
@@ -203,6 +221,78 @@ as several other platforms do. However it does not seem to be possible to use the existing boot ROM code from SPL. +Writing to the eMMC with USB on ROC-RK3308-CC +============================================= +For USB to work you must get your board into Bootrom mode, +either by erasing the eMMC or short circuit the GND and D0 +on core board. + +Connect the board to your computer via tyepc. +=> rkdeveloptool db rk3308_loader_v1.26.117.bin +=> rkdeveloptool wl 0x40 idbloader.img +=> rkdeveloptool wl 0x4000 u-boot.itb +=> rkdeveloptool rd + +Then you will see the boot log from Debug UART at baud rate 1500000: +DDR Version V1.26 +REGFB: 0x00000032, 0x00000032 +In +589MHz +DDR3 + Col=10 Bank=8 Row=14 Size=256MB +msch:1 +Returning to boot ROM... + +U-Boot SPL 2020.01-rc1-00225-g34b681327f (Nov 14 2019 - 10:58:04 +0800) +Trying to boot from MMC1 +INFO: Preloader serial: 2 +NOTICE: BL31: v1.3(release):30f1405 +NOTICE: BL31: Built : 17:08:28, Sep 23 2019 +INFO: Lastlog: last=0x100000, realtime=0x102000, size=0x2000 +INFO: ARM GICv2 driver initialized +INFO: Using opteed sec cpu_context! +INFO: boot cpu mask: 1 +INFO: plat_rockchip_pmu_init: pd status 0xe b +INFO: BL31: Initializing runtime services +WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will rK +ERROR: Error initializing runtime service opteed_fast +INFO: BL31: Preparing for EL3 exit to normal world +INFO: Entry point address = 0x600000 +INFO: SPSR = 0x3c9 + + +U-Boot 2020.01-rc1-00225-g34b681327f (Nov 14 2019 - 10:58:47 +0800) + +Model: Firefly ROC-RK3308-CC board +DRAM: 254 MiB +MMC: dwmmc at ff480000: 0, dwmmc at ff490000: 1 +rockchip_dnl_key_pressed read adc key val failed +Net: No ethernet found. +Hit any key to stop autoboot: 0 +Card did not respond to voltage select! +switch to partitions #0, OK +mmc1(part 0) is current device +Scanning mmc 1:4... +Found /extlinux/extlinux.conf +Retrieving file: /extlinux/extlinux.conf +151 bytes read in 3 ms (48.8 KiB/s) +1: kernel-mainline +Retrieving file: /Image +14737920 bytes read in 377 ms (37.3 MiB/s) +append: earlycon=uart8250,mmio32,0xff0c0000 console=ttyS2,1500000n8 +Retrieving file: /rk3308-roc-cc.dtb +28954 bytes read in 4 ms (6.9 MiB/s) +Flattened Device Tree blob at 01f00000 +Booting using the fdt blob at 0x1f00000 +## Loading Device Tree to 000000000df3a000, end 000000000df44119 ... OK + +Starting kernel ... +[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd042] +[ 0.000000] Linux version 5.4.0-rc1-00040-g4dc2d508fa47-dirty (andy at B150) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-209 +[ 0.000000] Machine model: Firefly ROC-RK3308-CC board +[ 0.000000] earlycon: uart8250 at MMIO32 0x00000000ff0c0000 (options '') +[ 0.000000] printk: bootconsole [uart8250] enabled + Booting from an SD card =======================
Signature · 1 line
2.17.1
PATCH v3 9/9 doc: rockchip: Add documentation for rk3308 based boards
Quoted 3 lines · Andy Yan
Add build documentation for rk3308 based boards.
Signed-off-by Andy Yan <[email protected]>
Thanks,
- Kever
Quoted 126 lines
---
Changes in v3:
- Doc update with more detail message.doc/README.rockchip | 92 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-)doc/README.rockchip +91
-1@@ -47,6 +47,11 @@ Two RK3036 boards are supported: - EVB RK3036 - use evb-rk3036 configuration - Kylin - use kylin_rk3036 configuration +Two RK3308 boards are supported: + + - EVB RK3308 - use evb-rk3308 configuration + - ROC-CC-RK3308 - use roc-rk3308-cc configuration + Two RK3328 board are supported: - EVB RK3328 - use evb-rk3328_defconfig@@ -94,7 +99,20 @@ For example: (or you can use another cross compiler if you prefer) -2. To build RK3399 board: +2. To build RK3308 board: + - Get the rkbin + => git clone https://github.com/rockchip-linux/rkbin.git + + - Compile U-Boot + => cd /path/to/u-boot + => export BL31=/path/to/rkbin/bin/rk33/rk3308_bl31_v2.22.elf + => make roc-rk3308-cc_defconfig + => make CROSS_COMPILE=aarch64-linux-gnu- all + => make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb + => ./tools/mkimage -n rk3308 -T rksd -d /path/to/rkbin/bin/rk33/rk3308_ddr_589MHz_uart2_m0_v1.26.bin idbloader.img + => cat spl/u-boot-spl.bin >> idbloader.img + +3. To build RK3399 board: Option 1: Package the image with Rockchip miniloader:@@ -203,6 +221,78 @@ as several other platforms do. However it does not seem to be possible to use the existing boot ROM code from SPL. +Writing to the eMMC with USB on ROC-RK3308-CC +============================================= +For USB to work you must get your board into Bootrom mode, +either by erasing the eMMC or short circuit the GND and D0 +on core board. + +Connect the board to your computer via tyepc. +=> rkdeveloptool db rk3308_loader_v1.26.117.bin +=> rkdeveloptool wl 0x40 idbloader.img +=> rkdeveloptool wl 0x4000 u-boot.itb +=> rkdeveloptool rd + +Then you will see the boot log from Debug UART at baud rate 1500000: +DDR Version V1.26 +REGFB: 0x00000032, 0x00000032 +In +589MHz +DDR3 + Col=10 Bank=8 Row=14 Size=256MB +msch:1 +Returning to boot ROM... + +U-Boot SPL 2020.01-rc1-00225-g34b681327f (Nov 14 2019 - 10:58:04 +0800) +Trying to boot from MMC1 +INFO: Preloader serial: 2 +NOTICE: BL31: v1.3(release):30f1405 +NOTICE: BL31: Built : 17:08:28, Sep 23 2019 +INFO: Lastlog: last=0x100000, realtime=0x102000, size=0x2000 +INFO: ARM GICv2 driver initialized +INFO: Using opteed sec cpu_context! +INFO: boot cpu mask: 1 +INFO: plat_rockchip_pmu_init: pd status 0xe b +INFO: BL31: Initializing runtime services +WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will rK +ERROR: Error initializing runtime service opteed_fast +INFO: BL31: Preparing for EL3 exit to normal world +INFO: Entry point address = 0x600000 +INFO: SPSR = 0x3c9 + + +U-Boot 2020.01-rc1-00225-g34b681327f (Nov 14 2019 - 10:58:47 +0800) + +Model: Firefly ROC-RK3308-CC board +DRAM: 254 MiB +MMC: dwmmc at ff480000: 0, dwmmc at ff490000: 1 +rockchip_dnl_key_pressed read adc key val failed +Net: No ethernet found. +Hit any key to stop autoboot: 0 +Card did not respond to voltage select! +switch to partitions #0, OK +mmc1(part 0) is current device +Scanning mmc 1:4... +Found /extlinux/extlinux.conf +Retrieving file: /extlinux/extlinux.conf +151 bytes read in 3 ms (48.8 KiB/s) +1: kernel-mainline +Retrieving file: /Image +14737920 bytes read in 377 ms (37.3 MiB/s) +append: earlycon=uart8250,mmio32,0xff0c0000 console=ttyS2,1500000n8 +Retrieving file: /rk3308-roc-cc.dtb +28954 bytes read in 4 ms (6.9 MiB/s) +Flattened Device Tree blob at 01f00000 +Booting using the fdt blob at 0x1f00000 +## Loading Device Tree to 000000000df3a000, end 000000000df44119 ... OK + +Starting kernel ... +[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd042] +[ 0.000000] Linux version 5.4.0-rc1-00040-g4dc2d508fa47-dirty (andy at B150) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-209 +[ 0.000000] Machine model: Firefly ROC-RK3308-CC board +[ 0.000000] earlycon: uart8250 at MMIO32 0x00000000ff0c0000 (options '') +[ 0.000000] printk: bootconsole [uart8250] enabled + Booting from an SD card =======================