diff options
author | Andy Yan <andy.yan@rock-chips.com> | 2017-05-15 17:53:50 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-06-07 07:29:20 -0600 |
commit | e2901ab8f68acaa776f9f3ea8deef316e90543a0 (patch) | |
tree | 5259572e4af4a36fdaec054523578efd76e8dcc3 /board | |
parent | fe9d4e77ea988201d567eb9f67792ed8c54db057 (diff) |
rockchip: rk3368: add Sheep board
Sheep board is designed by Rockchip as a EVB for rk3368.
Currently it is able to boot a linux kernel and system
to console with the miniloader run as fist level loader.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/rockchip/sheep_rk3368/Kconfig | 15 | ||||
-rw-r--r-- | board/rockchip/sheep_rk3368/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/rockchip/sheep_rk3368/Makefile | 7 | ||||
-rw-r--r-- | board/rockchip/sheep_rk3368/README | 44 | ||||
-rw-r--r-- | board/rockchip/sheep_rk3368/sheep_rk3368.c | 37 |
5 files changed, 109 insertions, 0 deletions
diff --git a/board/rockchip/sheep_rk3368/Kconfig b/board/rockchip/sheep_rk3368/Kconfig new file mode 100644 index 00000000000..d39b5e8b1aa --- /dev/null +++ b/board/rockchip/sheep_rk3368/Kconfig @@ -0,0 +1,15 @@ +if TARGET_SHEEP + +config SYS_BOARD + default "sheep_rk3368" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "sheep_rk3368" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/board/rockchip/sheep_rk3368/MAINTAINERS b/board/rockchip/sheep_rk3368/MAINTAINERS new file mode 100644 index 00000000000..cd5de9923e0 --- /dev/null +++ b/board/rockchip/sheep_rk3368/MAINTAINERS @@ -0,0 +1,6 @@ +RK3368 Sheep Board +M: Andy Yan <andy.yan@rock-chips.com> +S: Maintained +F: board/rockchip/sheep_rk3368 +F: include/configs/sheep_rk3368.h +F: configs/sheep-rk3368_defconfig diff --git a/board/rockchip/sheep_rk3368/Makefile b/board/rockchip/sheep_rk3368/Makefile new file mode 100644 index 00000000000..a38b9ced733 --- /dev/null +++ b/board/rockchip/sheep_rk3368/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (c) 2017 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += sheep_rk3368.o diff --git a/board/rockchip/sheep_rk3368/README b/board/rockchip/sheep_rk3368/README new file mode 100644 index 00000000000..2d078cbe5c0 --- /dev/null +++ b/board/rockchip/sheep_rk3368/README @@ -0,0 +1,44 @@ +Here is the step-by-step to boot to U-Boot on rk3368. + +Get miniloader and trust.img form rockchip vendor u-boot source code +============================================================================== + > git clone https://github.com/rockchip-linux/u-boot.git rockchip-uboot + > cd rockchip-uboot + > make rk3368_defconfig /*chose px5_defconfig if you run a px5 platform here*/ + > ./mkv8.sh + +Compile the upstream U-Boot +=========================== + > cd u-boot + > make CROSS_COMPILE=aarch64-linux-gnu- sheep-rk3368_defconfig all + +Package u-boot for miniloader +================================ + > ../rockchip-uboot/tools/loaderimage --pack --uboot u-boot.bin u-boot.img + +Flash the image by rkdeveloptool +================================ +rkdeveloptool can get from https://github.com/rockchip-linux/rkdeveloptool.git + +Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then: + > rkdeveloptool db ./rockchip-uboot/rk3368_loader_v2.00.256.bin + > rkdeveloptool wl 0x6000 ./rockchip-uboot/trust.img + > rkdeveloptool wl 0x4000 ./u-boot/u-boot.img + > rkdeveloptool RD + +You should be able to get U-Boot log message from boot console: + +U-Boot 2017.05-rc3-01094-g9ddd1e8-dirty (May 15 2017 - 15:57:23 +0800) + +Model: Rockchip sheep board +DRAM: 2 GiB +MMC: dwmmc@ff0f0000: 0 +Using default environment + +In: serial@ff690000 +Out: serial@ff690000 +Err: serial@ff690000 +Net: Net Initialization Skipped +No ethernet found. +Hit any key to stop autoboot: 0 +=> diff --git a/board/rockchip/sheep_rk3368/sheep_rk3368.c b/board/rockchip/sheep_rk3368/sheep_rk3368.c new file mode 100644 index 00000000000..df1fd9d2c33 --- /dev/null +++ b/board/rockchip/sheep_rk3368/sheep_rk3368.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2017 Andy Yan + * + * SPDX-License-Identifier: GPL-2.0+ + */ +#include <common.h> +#include <asm/io.h> +#include <asm/arch/clock.h> +#include <asm/arch/grf_rk3368.h> +#include <syscon.h> + +DECLARE_GLOBAL_DATA_PTR; + +int mach_cpu_init(void) +{ + return 0; +} + +int board_init(void) +{ + return 0; +} + +int dram_init(void) +{ + gd->ram_size = 0x80000000; + + return 0; +} + +int dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = 0x200000; + gd->bd->bi_dram[0].size = 0x7fe00000; + + return 0; +} |