diff options
Diffstat (limited to 'roms/u-boot/board/rockchip')
58 files changed, 1128 insertions, 0 deletions
diff --git a/roms/u-boot/board/rockchip/evb_px30/Kconfig b/roms/u-boot/board/rockchip/evb_px30/Kconfig new file mode 100644 index 000000000..0042c8e4d --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px30/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_PX30 + +config SYS_BOARD + default "evb_px30" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_px30" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_px30/MAINTAINERS b/roms/u-boot/board/rockchip/evb_px30/MAINTAINERS new file mode 100644 index 000000000..4dc060c50 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px30/MAINTAINERS @@ -0,0 +1,7 @@ +EVB-PX30 +M: Kever Yang <kever.yang@rock-chips.com> +S: Maintained +F: board/rockchip/evb_px30 +F: include/configs/evb_px30.h +F: configs/evb-px30_defconfig +F: configs/firefly-px30_defconfig diff --git a/roms/u-boot/board/rockchip/evb_px30/Makefile b/roms/u-boot/board/rockchip/evb_px30/Makefile new file mode 100644 index 000000000..74b0b9f44 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px30/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2017 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb_px30.o diff --git a/roms/u-boot/board/rockchip/evb_px30/evb_px30.c b/roms/u-boot/board/rockchip/evb_px30/evb_px30.c new file mode 100644 index 000000000..29464ae63 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px30/evb_px30.c @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2019 Rockchip Electronics Co., Ltd + */ diff --git a/roms/u-boot/board/rockchip/evb_px5/Kconfig b/roms/u-boot/board/rockchip/evb_px5/Kconfig new file mode 100644 index 000000000..9a04ee7e6 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px5/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_PX5 + +config SYS_BOARD + default "evb_px5" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_px5" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_px5/MAINTAINERS b/roms/u-boot/board/rockchip/evb_px5/MAINTAINERS new file mode 100644 index 000000000..5d09fbf0a --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px5/MAINTAINERS @@ -0,0 +1,6 @@ +PX5 EVB +M: Andy Yan <andy.yan@rock-chips.com> +S: Maintained +F: board/rockchip/evb_px5 +F: include/configs/evb_px5.h +F: configs/evb-px5_defconfig diff --git a/roms/u-boot/board/rockchip/evb_px5/Makefile b/roms/u-boot/board/rockchip/evb_px5/Makefile new file mode 100644 index 000000000..40f6ff8e7 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px5/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2017 Rockchip Electronics Co., Ltd + +obj-y += evb-px5.o diff --git a/roms/u-boot/board/rockchip/evb_px5/README b/roms/u-boot/board/rockchip/evb_px5/README new file mode 100644 index 000000000..de980f2f2 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px5/README @@ -0,0 +1 @@ +see board/rockchip/sheep_rk3368/README diff --git a/roms/u-boot/board/rockchip/evb_px5/evb-px5.c b/roms/u-boot/board/rockchip/evb_px5/evb-px5.c new file mode 100644 index 000000000..b81f97088 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_px5/evb-px5.c @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2017 Andy Yan + */ diff --git a/roms/u-boot/board/rockchip/evb_rk3036/Kconfig b/roms/u-boot/board/rockchip/evb_rk3036/Kconfig new file mode 100644 index 000000000..ef45f6292 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3036/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_RK3036 + +config SYS_BOARD + default "evb_rk3036" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3036" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_rk3036/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rk3036/MAINTAINERS new file mode 100644 index 000000000..91f8a839c --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3036/MAINTAINERS @@ -0,0 +1,6 @@ +EVB-RK3036 +M: huang lin <hl@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3036 +F: include/configs/evb_rk3036.h +F: configs/evb-rk3036_defconfig diff --git a/roms/u-boot/board/rockchip/evb_rk3036/Makefile b/roms/u-boot/board/rockchip/evb_rk3036/Makefile new file mode 100644 index 000000000..0403836e1 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3036/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2015 Google, Inc +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb_rk3036.o diff --git a/roms/u-boot/board/rockchip/evb_rk3036/evb_rk3036.c b/roms/u-boot/board/rockchip/evb_rk3036/evb_rk3036.c new file mode 100644 index 000000000..8c606463e --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3036/evb_rk3036.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2015 Rockchip Electronics Co., Ltd + */ + +#include <common.h> +#include <dm.h> +#include <asm/io.h> +#include <asm/arch-rockchip/uart.h> +#include <asm/arch-rockchip/sdram_rk3036.h> + +void get_ddr_config(struct rk3036_ddr_config *config) +{ + /* K4B4G1646Q config */ + config->ddr_type = 3; + config->rank = 2; + config->cs0_row = 15; + config->cs1_row = 15; + + /* 8bank */ + config->bank = 3; + config->col = 10; + + /* 16bit bw */ + config->bw = 1; +} diff --git a/roms/u-boot/board/rockchip/evb_rk3128/Kconfig b/roms/u-boot/board/rockchip/evb_rk3128/Kconfig new file mode 100644 index 000000000..5b3095ade --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3128/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_RK3128 + +config SYS_BOARD + default "evb_rk3128" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3128" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_rk3128/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rk3128/MAINTAINERS new file mode 100644 index 000000000..f5145d1f0 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3128/MAINTAINERS @@ -0,0 +1,6 @@ +EVB-RK3128 +M: Kever Yang <kever.yang@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3128 +F: include/configs/evb_rk3128.h +F: configs/evb-rk3128_defconfig diff --git a/roms/u-boot/board/rockchip/evb_rk3128/Makefile b/roms/u-boot/board/rockchip/evb_rk3128/Makefile new file mode 100644 index 000000000..078bb898c --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3128/Makefile @@ -0,0 +1,5 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evk-rk3128.o diff --git a/roms/u-boot/board/rockchip/evb_rk3128/evk-rk3128.c b/roms/u-boot/board/rockchip/evb_rk3128/evk-rk3128.c new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3128/evk-rk3128.c diff --git a/roms/u-boot/board/rockchip/evb_rk3229/Kconfig b/roms/u-boot/board/rockchip/evb_rk3229/Kconfig new file mode 100644 index 000000000..361dcb186 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3229/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_RK3229 + +config SYS_BOARD + default "evb_rk3229" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3229" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_rk3229/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rk3229/MAINTAINERS new file mode 100644 index 000000000..dfa1090c3 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3229/MAINTAINERS @@ -0,0 +1,6 @@ +EVB-RK3229 +M: Kever Yang <kever.yang@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3229 +F: include/configs/evb_rk3229.h +F: configs/evb-rk3229_defconfig diff --git a/roms/u-boot/board/rockchip/evb_rk3229/Makefile b/roms/u-boot/board/rockchip/evb_rk3229/Makefile new file mode 100644 index 000000000..65dcd8be3 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3229/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2015 Google, Inc +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb_rk3229.o diff --git a/roms/u-boot/board/rockchip/evb_rk3229/README b/roms/u-boot/board/rockchip/evb_rk3229/README new file mode 100644 index 000000000..9068225e2 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3229/README @@ -0,0 +1,71 @@ +Get the Source and prebuild binary +================================== + + > mkdir ~/evb_rk3229 + > cd ~/evb_rk3229 + > git clone git://git.denx.de/u-boot.git + > git clone https://github.com/OP-TEE/optee_os.git + > git clone https://github.com/rockchip-linux/rkbin.git + > git clone https://github.com/rockchip-linux/rkdeveloptool.git + +Compile the OP-TEE +=============== + + > cd optee_os + > make clean + > make CROSS_COMPILE_ta_arm32=arm-none-eabi- PLATFORM=rockchip-rk322x + Get tee.bin in this step, copy it to U-Boot root dir: + > cp out/arm-plat-rockchip/core/tee-pager.bin ../u-boot/tee.bin + +Compile the U-Boot +================== + + > cd ../u-boot + > export CROSS_COMPILE=arm-linux-gnueabihf- + > make evb-rk3229_defconfig + > make + > make u-boot.itb + + Get tpl/u-boot-tpl.bin, spl/u-boot-spl.bin and u-boot.itb in this step. + +Compile the rkdeveloptool +======================= + Follow instructions in latest README + > cd ../rkflashtool + > autoreconf -i + > ./configure + > make + > sudo make install + + Get rkdeveloptool in you Host in this step. + +Both origin binaries and Tool are ready now, choose either option 1 or +option 2 to deploy U-Boot. + +Package the image +================= + + > cd ../u-boot + > tools/mkimage -n rk322x -T rksd -d tpl/u-boot-spl.bin idbloader.img + > cat spl/u-boot-spl.bin >> idbloader.img + + Get idbloader.img in this step. + +Flash the image to eMMC +======================= +Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then: + > cd .. + > rkdeveloptool db rkbin/rk32/rk322x_loader_v1.04.232.bin + > rkdeveloptool wl 64 u-boot/idbloader.img + > rkdeveloptool wl 0x4000 u-boot/u-boot.itb + > rkdeveloptool rd + +Flash the image to SD card +========================== + > dd if=u-boot/idbloader.img of=/dev/sdb seek=64 + > dd if=u-boot/u-boot.itb of=/dev/sdb seek=16384 + +You should be able to get U-Boot log message with OP-TEE boot info. + +For more detail, please reference to: +http://opensource.rock-chips.com/wiki_Boot_option diff --git a/roms/u-boot/board/rockchip/evb_rk3229/evb_rk3229.c b/roms/u-boot/board/rockchip/evb_rk3229/evb_rk3229.c new file mode 100644 index 000000000..c64c62f7b --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3229/evb_rk3229.c @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2017 Rockchip Electronics Co., Ltd + */ + +#include <common.h> +#include <dm.h> +#include <asm/io.h> +#include <asm/arch-rockchip/uart.h> + diff --git a/roms/u-boot/board/rockchip/evb_rk3288/Kconfig b/roms/u-boot/board/rockchip/evb_rk3288/Kconfig new file mode 100644 index 000000000..8ab07f41f --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3288/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_RK3288 + +config SYS_BOARD + default "evb_rk3288" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3288" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_rk3288/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rk3288/MAINTAINERS new file mode 100644 index 000000000..9bd6b1e8a --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3288/MAINTAINERS @@ -0,0 +1,12 @@ +EVB-RK3288 +M: Lin Huang <hl@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3288 +F: include/configs/evb_rk3288.h +F: configs/evb-rk3288_defconfig + +ROCK-PI-N8 +M: Jagan Teki <jagan@amarulasolutions.com> +S: Maintained +F: configs/rock-pi-n8-rk3288_defconfig +F: arch/arm/dts/rk3288-rock-pi-n8-u-boot.dtsi diff --git a/roms/u-boot/board/rockchip/evb_rk3288/Makefile b/roms/u-boot/board/rockchip/evb_rk3288/Makefile new file mode 100644 index 000000000..c11b65760 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3288/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb-rk3288.o diff --git a/roms/u-boot/board/rockchip/evb_rk3288/evb-rk3288.c b/roms/u-boot/board/rockchip/evb_rk3288/evb-rk3288.c new file mode 100644 index 000000000..779bc646b --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3288/evb-rk3288.c @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + */ + diff --git a/roms/u-boot/board/rockchip/evb_rk3308/Kconfig b/roms/u-boot/board/rockchip/evb_rk3308/Kconfig new file mode 100644 index 000000000..0074429cb --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3308/Kconfig @@ -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 diff --git a/roms/u-boot/board/rockchip/evb_rk3308/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rk3308/MAINTAINERS new file mode 100644 index 000000000..0af119ae0 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3308/MAINTAINERS @@ -0,0 +1,6 @@ +EVB-RK3308 +M: Andy Yan <andy.yan@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3308 +F: include/configs/evb_rk3308.h +F: configs/evb-rk3308_defconfig diff --git a/roms/u-boot/board/rockchip/evb_rk3308/Makefile b/roms/u-boot/board/rockchip/evb_rk3308/Makefile new file mode 100644 index 000000000..05de5560f --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3308/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2018 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb_rk3308.o diff --git a/roms/u-boot/board/rockchip/evb_rk3308/evb_rk3308.c b/roms/u-boot/board/rockchip/evb_rk3308/evb_rk3308.c new file mode 100644 index 000000000..e0c96fd70 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3308/evb_rk3308.c @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2018 Rockchip Electronics Co., Ltd + */ + +#include <common.h> +#include <adc.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR; + +#define KEY_DOWN_MIN_VAL 0 +#define KEY_DOWN_MAX_VAL 30 + +/* + * Two board variants whith adc channel 3 is for board id + * v10: 1024, v11: 512 + * v10: adc channel 0 for dnl key + * v11: adc channel 1 for dnl key + */ +int rockchip_dnl_key_pressed(void) +{ + unsigned int key_val, id_val; + int key_ch; + + if (adc_channel_single_shot("saradc", 3, &id_val)) { + printf("%s read board id failed\n", __func__); + return false; + } + + if (abs(id_val - 1024) <= 30) + key_ch = 0; + else + key_ch = 1; + + if (adc_channel_single_shot("saradc", key_ch, &key_val)) { + printf("%s read adc key val failed\n", __func__); + return false; + } + + if (key_val >= KEY_DOWN_MIN_VAL && key_val <= KEY_DOWN_MAX_VAL) + return true; + else + return false; +} diff --git a/roms/u-boot/board/rockchip/evb_rk3328/Kconfig b/roms/u-boot/board/rockchip/evb_rk3328/Kconfig new file mode 100644 index 000000000..ef446b49d --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3328/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_RK3328 + +config SYS_BOARD + default "evb_rk3328" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3328" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_rk3328/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rk3328/MAINTAINERS new file mode 100644 index 000000000..14fda46e8 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3328/MAINTAINERS @@ -0,0 +1,33 @@ +EVB-RK3328 +M: Kever Yang <kever.yang@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3328 +F: include/configs/evb_rk3328.h +F: configs/evb-rk3328_defconfig + +NANOPI-R2S-RK3328 +M: David Bauer <mail@david-bauer.net> +S: Maintained +F: configs/nanopi-r2s-rk3328_defconfig +F: arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi +F: arch/arm/dts/rk3328-nanopi-r2s.dts + +ROC-RK3328-CC +M: Loic Devulder <ldevulder@suse.com> +M: Chen-Yu Tsai <wens@csie.org> +S: Maintained +F: configs/roc-cc-rk3328_defconfig +F: arch/arm/dts/rk3328-roc-cc-u-boot.dtsi + +ROCK64-RK3328 +M: Matwey V. Kornilov <matwey.kornilov@gmail.com> +S: Maintained +F: configs/rock64-rk3328_defconfig +F: arch/arm/dts/rk3328-rock64-u-boot.dtsi + +ROCKPIE-RK3328 +M: Banglang Huang <banglang.huang@foxmail.com> +S: Maintained +F: configs/rock-pi-e-rk3328_defconfig +F: arch/arm/dts/rk3328-rock-pi-e.dts +F: arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi diff --git a/roms/u-boot/board/rockchip/evb_rk3328/Makefile b/roms/u-boot/board/rockchip/evb_rk3328/Makefile new file mode 100644 index 000000000..81c5de86d --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3328/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb-rk3328.o diff --git a/roms/u-boot/board/rockchip/evb_rk3328/README b/roms/u-boot/board/rockchip/evb_rk3328/README new file mode 100644 index 000000000..6cbb66a4c --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3328/README @@ -0,0 +1,70 @@ +Introduction +============ + +RK3328 key features we might use in U-Boot: +* CPU: ARMv8 64bit quad-core Cortex-A53 +* IRAM: 36KB +* DRAM: 4GB-16MB dual-channel +* eMMC: support eMMC 5.0/5.1, suport HS400, HS200, DDR50 +* SD/MMC: support SD 3.0, MMC 4.51 +* USB: USB2.0 EHCI host port *2 +* Display: RGB/HDMI/DP/MIPI/EDP + +evb key features: +* regulator: pwm regulator for CPU B/L +* PMIC: rk808 +* debug console: UART2 + +In order to support Arm Trust Firmware(ATF), we need to use the +miniloader from rockchip which: +* do DRAM init +* load and verify ATF image +* load and verify U-Boot image + +Here is the step-by-step to boot to U-Boot on rk3328. + +Get the Source and prebuild binary +================================== + + > mkdir ~/evb_rk3328 + > cd ~/evb_rk3328 + > git clone https://github.com/ARM-software/arm-trusted-firmware.git + > git clone https://github.com/rockchip-linux/rkbin + > git clone https://github.com/rockchip-linux/rkflashtool + +Compile ATF +=============== + + > cd arm-trusted-firmware + > make realclean + > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328 bl31 + +Compile U-Boot +================== + + > cd ../u-boot + > make CROSS_COMPILE=aarch64-linux-gnu- evb-rk3328_defconfig all + +Compile rkflashtool +======================= + + > cd ../rkflashtool + > make + +Package image for miniloader +================================ + > cd .. + > cp arm-trusted-firmware/build/rk3328/release/bl31.bin rkbin/rk33 + > ./rkbin/tools/trust_merger rkbin/tools/RK3328TRUST.ini + > ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img + > mkdir image + > mv trust.img ./image/ + > mv uboot.img ./image/rk3328evb-uboot.bin + +Flash image +=============== +Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then: + + > ./rkflashtool/rkflashloader rk3328evb + +You should be able to get U-Boot log message in console/UART2 now. diff --git a/roms/u-boot/board/rockchip/evb_rk3328/evb-rk3328.c b/roms/u-boot/board/rockchip/evb_rk3328/evb-rk3328.c new file mode 100644 index 000000000..779bc646b --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3328/evb-rk3328.c @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + */ + diff --git a/roms/u-boot/board/rockchip/evb_rk3399/Kconfig b/roms/u-boot/board/rockchip/evb_rk3399/Kconfig new file mode 100644 index 000000000..412b81cbe --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3399/Kconfig @@ -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 diff --git a/roms/u-boot/board/rockchip/evb_rk3399/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rk3399/MAINTAINERS new file mode 100644 index 000000000..25e308d18 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3399/MAINTAINERS @@ -0,0 +1,90 @@ +EVB-RK3399 +M: Kever Yang <kever.yang@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3399 +F: include/configs/evb_rk3399.h +F: configs/evb-rk3399_defconfig +F: configs/firefly-rk3399_defconfig + +KHADAS-EDGE +M: Nick Xie <nick@khadas.com> +S: Maintained +F: configs/khadas-edge-rk3399_defconfig +F: arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi + +KHADAS-EDGE-CAPTAIN +M: Nick Xie <nick@khadas.com> +S: Maintained +F: configs/khadas-edge-captain-rk3399_defconfig +F: arch/arm/dts/rk3399-khadas-edge-captain-u-boot.dtsi + +KHADAS-EDGE-V +M: Nick Xie <nick@khadas.com> +S: Maintained +F: configs/khadas-edge-v-rk3399_defconfig +F: arch/arm/dts/rk3399-khadas-edge-v-u-boot.dtsi + +LEEZ-P710 +M: Andy Yan <andy.yan@rock-chips.com> +S: Maintained +F: arch/arm/dts/rk3399-leez-p710-u-boot.dtsi +F: configs/leez-rk3399_defconfig + +NANOPC-T4 +M: Jagan Teki <jagan@amarulasolutions.com> +S: Maintained +F: configs/nanopc-t4-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi + +NANOPI-M4 +M: Jagan Teki <jagan@amarulasolutions.com> +S: Maintained +F: configs/nanopi-m4-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi + +NANOPI-M4-2GB +M: Jagan Teki <jagan@amarulasolutions.com> +M: Deepak Das <deepakdas.linux@gmail.com> +S: Maintained +F: configs/nanopi-m4-2gb-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi + +NANOPI-M4B +M: Alexandre Vicenzi <linux@alxd.me> +S: Maintained +F: configs/nanopi-m4b-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopi-m4b-u-boot.dtsi + +NANOPI-NEO4 +M: Jagan Teki <jagan@amarulasolutions.com> +S: Maintained +F: configs/nanopi-neo4-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi + +NANOPI-R4S +M: Xiaobo Tian <peterwillcn@gmail.com> +S: Maintained +F: configs/nanopi-r4s-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi + +ORANGEPI-RK3399 +M: Jagan Teki <jagan@amarulasolutions.com> +S: Maintained +F: configs/orangepi-rk3399_defconfig +F: arch/arm/dts/rk3399-u-boot.dtsi +F: arch/arm/dts/rk3399-orangepi-u-boot.dtsi + +ROCK-PI-4 +M: Akash Gajjar <akash@openedev.com> +M: Jagan Teki <jagan@amarulasolutions.com> +S: Maintained +F: configs/rock-pi-4-rk3399_defconfig +F: arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +F: configs/rock-pi-4c-rk3399_defconfig +F: arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi + +ROCK-PI-N10 +M: Jagan Teki <jagan@amarulasolutions.com> +S: Maintained +F: configs/rock-pi-n10-rk3399pro_defconfig +F: arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi diff --git a/roms/u-boot/board/rockchip/evb_rk3399/Makefile b/roms/u-boot/board/rockchip/evb_rk3399/Makefile new file mode 100644 index 000000000..aaa51c212 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3399/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb-rk3399.o diff --git a/roms/u-boot/board/rockchip/evb_rk3399/README b/roms/u-boot/board/rockchip/evb_rk3399/README new file mode 100644 index 000000000..c6f58203e --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3399/README @@ -0,0 +1,122 @@ +Introduction +============ + +RK3399 key features we might use in U-Boot: +* CPU: ARMv8 64bit Big-Little architecture, +* Big: dual-core Cortex-A72 +* Little: quad-core Cortex-A53 +* IRAM: 200KB +* DRAM: 4GB-128MB dual-channel +* eMMC: support eMMC 5.0/5.1, suport HS400, HS200, DDR50 +* SD/MMC: support SD 3.0, MMC 4.51 +* USB: USB3.0 type-C port *2 with dwc3 controller +* USB2.0 EHCI host port *2 +* Display: RGB/HDMI/DP/MIPI/EDP + +evb key features: +* regulator: pwm regulator for CPU B/L +* PMIC: rk808 +* debug console: UART2 + +In order to support Arm Trust Firmware(ATF), we can use either SPL or +miniloader from rockchip to do: +* do DRAM init +* load and verify ATF image +* load and verify U-Boot image + +Here is the step-by-step to boot to U-Boot on rk3399. + +Get the Source and prebuild binary +================================== + + > mkdir ~/evb_rk3399 + > cd ~/evb_rk3399 + > git clone https://github.com/ARM-software/arm-trusted-firmware.git + > git clone https://github.com/rockchip-linux/rkbin.git + > git clone https://github.com/rockchip-linux/rkdeveloptool.git + + +Compile ATF +=========== + + > cd arm-trusted-firmware + > make realclean + > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31 + + Get bl31.elf in this step, copy it to U-Boot root dir: + > cp build/rk3399/release/bl31/bl31.elf ../u-boot/ + + Or you can get the bl31.elf directly from Rockchip: + > cp rkbin/rk33/rk3399_bl31_v1.00.elf ../u-boot/bl31.elf + + +Compile U-Boot +============== + + > cd ../u-boot + > export CROSS_COMPILE=aarch64-linux-gnu- + > make evb-rk3399_defconfig + for firefly-rk3399, use below instead: + > make firefly-rk3399_defconfig + > make + > make u-boot.itb + + Get spl/u-boot-spl.bin and u-boot.itb in this step. + +Compile rkdeveloptool +===================== + +Get rkdeveloptool installed on your Host in this step. + +Follow instructions in latest README, example: + > cd ../rkdeveloptool + > autoreconf -i + > ./configure + > make + > sudo make install + +Both origin binaries and Tool are ready now, choose either option 1 or +option 2 to deploy U-Boot. + +Package the image +================= + +Package the image for U-Boot SPL(option 1) +-------------------------------- + > cd .. + > tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img + + Get idbspl.img in this step. + +Package the image for Rockchip miniloader(option 2) +------------------------------------------ + > cd .. + > cp arm-trusted-firmware/build/rk3399/release/bl31.elf rkbin/rk33 + > ./rkbin/tools/trust_merger rkbin/tools/RK3399TRUST.ini + > ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img + + Get trust.img and uboot.img in this step. + +Flash the image to eMMC +======================= + +Flash the image with U-Boot SPL(option 1) +------------------------------- +Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then: + > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin + > rkdeveloptool wl 64 u-boot/idbspl.img + > rkdeveloptool wl 0x4000 u-boot/u-boot.itb + > rkdeveloptool rd + +Flash the image with Rockchip miniloader(option 2) +---------------------------------------- +Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then: + > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin + > rkdeveloptool ul rkbin/rk33/rk3399_loader_v1.08.106.bin + > rkdeveloptool wl 0x4000 u-boot/uboot.img + > rkdeveloptool wl 0x6000 u-boot/trust.img + > rkdeveloptool rd + +You should be able to get U-Boot log in console/UART2(baurdrate 1500000) +For more detail, please reference to: +http://opensource.rock-chips.com/wiki_Boot_option diff --git a/roms/u-boot/board/rockchip/evb_rk3399/evb-rk3399.c b/roms/u-boot/board/rockchip/evb_rk3399/evb-rk3399.c new file mode 100644 index 000000000..abb76585c --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rk3399/evb-rk3399.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + */ + +#include <common.h> +#include <dm.h> +#include <init.h> +#include <log.h> +#include <asm/arch-rockchip/periph.h> +#include <power/regulator.h> + +#ifndef CONFIG_SPL_BUILD +int board_early_init_f(void) +{ + struct udevice *regulator; + int ret; + + ret = regulator_get_by_platname("vcc5v0_host", ®ulator); + if (ret) { + debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret); + goto out; + } + + ret = regulator_set_enable(regulator, true); + if (ret) + debug("%s vcc5v0-host-en set fail! ret %d\n", __func__, ret); + +out: + return 0; +} +#endif diff --git a/roms/u-boot/board/rockchip/evb_rv1108/Kconfig b/roms/u-boot/board/rockchip/evb_rv1108/Kconfig new file mode 100644 index 000000000..4a76e0b9f --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rv1108/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_RV1108 + +config SYS_BOARD + default "evb_rv1108" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rv1108" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/evb_rv1108/MAINTAINERS b/roms/u-boot/board/rockchip/evb_rv1108/MAINTAINERS new file mode 100644 index 000000000..94def320c --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rv1108/MAINTAINERS @@ -0,0 +1,6 @@ +EVB-RV1108 +M: Andy Yan <andy.yan@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rv1108 +F: include/configs/evb_rv1108.h +F: configs/evb-rv1108_defconfig diff --git a/roms/u-boot/board/rockchip/evb_rv1108/Makefile b/roms/u-boot/board/rockchip/evb_rv1108/Makefile new file mode 100644 index 000000000..dd99054d5 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rv1108/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb_rv1108.o diff --git a/roms/u-boot/board/rockchip/evb_rv1108/README b/roms/u-boot/board/rockchip/evb_rv1108/README new file mode 100644 index 000000000..79a97c313 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rv1108/README @@ -0,0 +1,46 @@ +Here is the step-by-step to boot U-Boot on rv1108 evb. + +Get ddr init binary +============================================================================== + > git clone https://github.com/rockchip-linux/rkbin.git + +Compile U-Boot +=========================== + > make CROSS_COMPILE=arm-linux-gnueabi- evb-rv1108_defconfig all + > ./tools/mkimage -n rv1108 -T rksd -d ../rkbin/rv1x/rv1108ddr_v1.00.bin spl.bin + > cat spl.bin 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 ./rkbin/rv1x/rv1108usbboot_v1.00.bin + > rkdeveloptool wl 0x40 u-boot.img + > rkdeveloptool RD + +You should be able to get U-Boot log message from boot console: + +DDR Version V1.02 20170220 +In +400MHz +DDR3 +Bus Width=16 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=512MB +mach:2 +OUT + + +U-Boot 2017.05-00693-g3a5b171 (Jun 01 2017 - 17:37:53 +0800) + +Model: Rockchip RV1108 Evaluation board +DRAM: 128 MiB +APLL: 600000000 DPLL:792000000 GPLL:384000000 +MMC: +Using default environment + +In: serial@10210000 +Out: serial@10210000 +Err: serial@10210000 +Net: No ethernet found. +Hit any key to stop autoboot: 0 +=> diff --git a/roms/u-boot/board/rockchip/evb_rv1108/evb_rv1108.c b/roms/u-boot/board/rockchip/evb_rv1108/evb_rv1108.c new file mode 100644 index 000000000..e6ac59864 --- /dev/null +++ b/roms/u-boot/board/rockchip/evb_rv1108/evb_rv1108.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C)Copyright 2016 Rockchip Electronics Co., Ltd + * Authors: Andy Yan <andy.yan@rock-chips.com> + */ + +#include <common.h> +#include <init.h> +#include <syscon.h> +#include <asm/global_data.h> +#include <asm/io.h> +#include <asm/arch-rockchip/clock.h> +#include <asm/arch-rockchip/grf_rv1108.h> +#include <asm/arch-rockchip/hardware.h> + +DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + struct rv1108_grf *grf; + enum { + GPIO3C3_SHIFT = 6, + GPIO3C3_MASK = 3 << GPIO3C3_SHIFT, + + GPIO3C2_SHIFT = 4, + GPIO3C2_MASK = 3 << GPIO3C2_SHIFT, + + GPIO2D2_SHIFT = 4, + GPIO2D2_MASK = 3 << GPIO2D2_SHIFT, + GPIO2D2_GPIO = 0, + GPIO2D2_UART2_SOUT_M0, + + GPIO2D1_SHIFT = 2, + GPIO2D1_MASK = 3 << GPIO2D1_SHIFT, + GPIO2D1_GPIO = 0, + GPIO2D1_UART2_SIN_M0, + }; + + grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); + + /*evb board use UART2 m0 for debug*/ + rk_clrsetreg(&grf->gpio2d_iomux, + GPIO2D2_MASK | GPIO2D1_MASK, + GPIO2D2_UART2_SOUT_M0 << GPIO2D2_SHIFT | + GPIO2D1_UART2_SIN_M0 << GPIO2D1_SHIFT); + rk_clrreg(&grf->gpio3c_iomux, GPIO3C3_MASK | GPIO3C2_MASK); + + return 0; +} + +int dram_init(void) +{ + gd->ram_size = 0x8000000; + + return 0; +} diff --git a/roms/u-boot/board/rockchip/kylin_rk3036/Kconfig b/roms/u-boot/board/rockchip/kylin_rk3036/Kconfig new file mode 100644 index 000000000..8d35b4e62 --- /dev/null +++ b/roms/u-boot/board/rockchip/kylin_rk3036/Kconfig @@ -0,0 +1,15 @@ +if TARGET_KYLIN_RK3036 + +config SYS_BOARD + default "kylin_rk3036" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "kylin_rk3036" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/kylin_rk3036/MAINTAINERS b/roms/u-boot/board/rockchip/kylin_rk3036/MAINTAINERS new file mode 100644 index 000000000..5453e7d98 --- /dev/null +++ b/roms/u-boot/board/rockchip/kylin_rk3036/MAINTAINERS @@ -0,0 +1,6 @@ +KYLIN-RK3036 +M: huang lin <hl@rock-chips.com> +S: Maintained +F: board/rockchip/kylin_rk3036 +F: include/configs/kylin_rk3036.h +F: configs/kylin-rk3036_defconfig diff --git a/roms/u-boot/board/rockchip/kylin_rk3036/Makefile b/roms/u-boot/board/rockchip/kylin_rk3036/Makefile new file mode 100644 index 000000000..066327050 --- /dev/null +++ b/roms/u-boot/board/rockchip/kylin_rk3036/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2015 Google, Inc +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += kylin_rk3036.o diff --git a/roms/u-boot/board/rockchip/kylin_rk3036/kylin_rk3036.c b/roms/u-boot/board/rockchip/kylin_rk3036/kylin_rk3036.c new file mode 100644 index 000000000..0ca91cdeb --- /dev/null +++ b/roms/u-boot/board/rockchip/kylin_rk3036/kylin_rk3036.c @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2015 Rockchip Electronics Co., Ltd + */ + +#include <common.h> +#include <dm.h> +#include <env.h> +#include <init.h> +#include <asm/io.h> +#include <asm/arch-rockchip/uart.h> +#include <asm/arch-rockchip/sdram_rk3036.h> +#include <asm/gpio.h> + +void get_ddr_config(struct rk3036_ddr_config *config) +{ + /* K4B4G1646Q config */ + config->ddr_type = 3; + config->rank = 1; + config->cs0_row = 15; + config->cs1_row = 15; + + /* 8bank */ + config->bank = 3; + config->col = 10; + + /* 16bit bw */ + config->bw = 1; +} + +#define FASTBOOT_KEY_GPIO 93 + +int fastboot_key_pressed(void) +{ + gpio_request(FASTBOOT_KEY_GPIO, "fastboot_key"); + gpio_direction_input(FASTBOOT_KEY_GPIO); + return !gpio_get_value(FASTBOOT_KEY_GPIO); +} + +#define ROCKCHIP_BOOT_MODE_FASTBOOT 0x5242C309 + +int rk_board_late_init(void) +{ + if (fastboot_key_pressed()) { + printf("enter fastboot!\n"); + env_set("preboot", "setenv preboot; fastboot usb0"); + } + + return 0; +} diff --git a/roms/u-boot/board/rockchip/sheep_rk3368/Kconfig b/roms/u-boot/board/rockchip/sheep_rk3368/Kconfig new file mode 100644 index 000000000..d39b5e8b1 --- /dev/null +++ b/roms/u-boot/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/roms/u-boot/board/rockchip/sheep_rk3368/MAINTAINERS b/roms/u-boot/board/rockchip/sheep_rk3368/MAINTAINERS new file mode 100644 index 000000000..cd5de9923 --- /dev/null +++ b/roms/u-boot/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/roms/u-boot/board/rockchip/sheep_rk3368/Makefile b/roms/u-boot/board/rockchip/sheep_rk3368/Makefile new file mode 100644 index 000000000..966152811 --- /dev/null +++ b/roms/u-boot/board/rockchip/sheep_rk3368/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2017 Rockchip Electronics Co., Ltd + +obj-y += sheep_rk3368.o diff --git a/roms/u-boot/board/rockchip/sheep_rk3368/README b/roms/u-boot/board/rockchip/sheep_rk3368/README new file mode 100644 index 000000000..2d078cbe5 --- /dev/null +++ b/roms/u-boot/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/roms/u-boot/board/rockchip/sheep_rk3368/sheep_rk3368.c b/roms/u-boot/board/rockchip/sheep_rk3368/sheep_rk3368.c new file mode 100644 index 000000000..b81f97088 --- /dev/null +++ b/roms/u-boot/board/rockchip/sheep_rk3368/sheep_rk3368.c @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2017 Andy Yan + */ diff --git a/roms/u-boot/board/rockchip/tinker_rk3288/Kconfig b/roms/u-boot/board/rockchip/tinker_rk3288/Kconfig new file mode 100644 index 000000000..bca6c37bc --- /dev/null +++ b/roms/u-boot/board/rockchip/tinker_rk3288/Kconfig @@ -0,0 +1,15 @@ +if TARGET_TINKER_RK3288 + +config SYS_BOARD + default "tinker_rk3288" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "tinker_rk3288" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/roms/u-boot/board/rockchip/tinker_rk3288/MAINTAINERS b/roms/u-boot/board/rockchip/tinker_rk3288/MAINTAINERS new file mode 100644 index 000000000..ed5de682c --- /dev/null +++ b/roms/u-boot/board/rockchip/tinker_rk3288/MAINTAINERS @@ -0,0 +1,13 @@ +TINKER-RK3288 +M: Lin Huang <hl@rock-chips.com> +S: Maintained +F: board/rockchip/tinker_rk3288 +F: include/configs/tinker_rk3288.h +F: configs/tinker-rk3288_defconfig + +TINKER-S-RK3288 +M: Michael Trimarchi <michael@amarulasolutions.com> +S: Maintained +F: board/rockchip/tinker_rk3288 +F: include/configs/tinker_rk3288.h +F: configs/tinker-s-rk3288_defconfig diff --git a/roms/u-boot/board/rockchip/tinker_rk3288/Makefile b/roms/u-boot/board/rockchip/tinker_rk3288/Makefile new file mode 100644 index 000000000..432367f4e --- /dev/null +++ b/roms/u-boot/board/rockchip/tinker_rk3288/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += tinker-rk3288.o diff --git a/roms/u-boot/board/rockchip/tinker_rk3288/tinker-rk3288.c b/roms/u-boot/board/rockchip/tinker_rk3288/tinker-rk3288.c new file mode 100644 index 000000000..f85209c64 --- /dev/null +++ b/roms/u-boot/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + */ + +#include <common.h> +#include <dm.h> +#include <eeprom.h> +#include <env.h> +#include <i2c_eeprom.h> +#include <init.h> +#include <net.h> +#include <netdev.h> +#include <asm/arch-rockchip/bootrom.h> +#include <asm/io.h> + +static int get_ethaddr_from_eeprom(u8 *addr) +{ + int ret; + struct udevice *dev; + + ret = uclass_first_device_err(UCLASS_I2C_EEPROM, &dev); + if (ret) + return ret; + + return i2c_eeprom_read(dev, 0, addr, 6); +} + +int rk3288_board_late_init(void) +{ + u8 ethaddr[6]; + + if (get_ethaddr_from_eeprom(ethaddr)) + return 0; + + if (is_valid_ethaddr(ethaddr)) + eth_env_set_enetaddr("ethaddr", ethaddr); + + return 0; +} + +int mmc_get_env_dev(void) +{ + u32 bootdevice_brom_id = readl(BROM_BOOTSOURCE_ID_ADDR); + + if (bootdevice_brom_id == BROM_BOOTSOURCE_EMMC) + return 0; + + return 1; +} |