aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/board/theobroma-systems/lion_rk3368
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/board/theobroma-systems/lion_rk3368')
-rw-r--r--roms/u-boot/board/theobroma-systems/lion_rk3368/Kconfig21
-rw-r--r--roms/u-boot/board/theobroma-systems/lion_rk3368/MAINTAINERS10
-rw-r--r--roms/u-boot/board/theobroma-systems/lion_rk3368/Makefile5
-rw-r--r--roms/u-boot/board/theobroma-systems/lion_rk3368/README78
-rw-r--r--roms/u-boot/board/theobroma-systems/lion_rk3368/lion_rk3368.c4
5 files changed, 118 insertions, 0 deletions
diff --git a/roms/u-boot/board/theobroma-systems/lion_rk3368/Kconfig b/roms/u-boot/board/theobroma-systems/lion_rk3368/Kconfig
new file mode 100644
index 000000000..fddbf826d
--- /dev/null
+++ b/roms/u-boot/board/theobroma-systems/lion_rk3368/Kconfig
@@ -0,0 +1,21 @@
+if TARGET_LION_RK3368
+
+config SYS_BOARD
+ default "lion_rk3368"
+
+config SYS_VENDOR
+ default "theobroma-systems"
+
+config SYS_CONFIG_NAME
+ default "lion_rk3368"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+
+config ENV_SIZE
+ default 0x2000
+
+config ENV_OFFSET
+ default 0x3c000 if ENV_IS_IN_SPI_FLASH
+
+endif
diff --git a/roms/u-boot/board/theobroma-systems/lion_rk3368/MAINTAINERS b/roms/u-boot/board/theobroma-systems/lion_rk3368/MAINTAINERS
new file mode 100644
index 000000000..857f784d2
--- /dev/null
+++ b/roms/u-boot/board/theobroma-systems/lion_rk3368/MAINTAINERS
@@ -0,0 +1,10 @@
+LION-RK3368 (RK3368-uQ7 system-on-module)
+M: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
+M: Klaus Goger <klaus.goger@theobroma-systems.com>
+S: Maintained
+F: board/theobroma-systems/lion_rk3368
+F: include/configs/lion_rk3368.h
+F: arch/arm/dts/rk3368-lion.dts
+F: configs/lion-rk3368_defconfig
+W: https://www.theobroma-systems.com/rk3368-uq7/tech-specs
+T: git git://git.theobroma-systems.com/lion-u-boot.git
diff --git a/roms/u-boot/board/theobroma-systems/lion_rk3368/Makefile b/roms/u-boot/board/theobroma-systems/lion_rk3368/Makefile
new file mode 100644
index 000000000..fc8df2714
--- /dev/null
+++ b/roms/u-boot/board/theobroma-systems/lion_rk3368/Makefile
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
+
+obj-y += lion_rk3368.o
diff --git a/roms/u-boot/board/theobroma-systems/lion_rk3368/README b/roms/u-boot/board/theobroma-systems/lion_rk3368/README
new file mode 100644
index 000000000..7488b1832
--- /dev/null
+++ b/roms/u-boot/board/theobroma-systems/lion_rk3368/README
@@ -0,0 +1,78 @@
+Here is the step-by-step to boot to U-Boot on RK3368-uQ7
+
+Get the Source and build ATF
+============================
+
+ > git clone git://git.theobroma-systems.com/arm-trusted-firmware.git
+ > cd arm-trusted-firmware
+ > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3368 bl31
+ > cp build/rk3368/release/bl31.bin ../u-boot/bl31-rk3368.bin
+
+Configure U-Boot
+================
+
+ > cd ../u-boot
+ > make lion-rk3368_defconfig
+
+Build the TPL/SPL stage
+=======================
+
+ > make CROSS_COMPILE=aarch64-unknown-elf-
+
+Build the full U-Boot and a FIT image including the ATF
+=======================================================
+
+ > make CROSS_COMPILE=aarch64-unknown-elf- u-boot.itb
+
+Flash the image
+===============
+
+Copy the SPL to offset 32k and the FIT image containing the payloads
+(U-Boot proper, ATF, devicetree) to offset 256k card.
+
+SD-Card
+-------
+
+ > dd if=idbloader.img of=/dev/sdb seek=64
+ > dd if=u-boot.itb of=/dev/sdb seek=512
+
+eMMC
+----
+
+rkdeveloptool allows to flash the on-board eMMC via the USB OTG interface with
+help of the Rockchip loader binary.
+
+ > git clone https://github.com/rockchip-linux/rkdeveloptool
+ > cd rkdeveloptool
+ > autoreconf -i && && ./configure && make
+ > git clone https://github.com/rockchip-linux/rkbin.git
+ > ./rkdeveloptool db rkbin/rk33/rk3368_loader_v2.00.256.bin
+ > ./rkdeveloptool wl 64 ../spl.img
+ > ./rkdeveloptool wl 512 ../u-boot.itb
+
+
+If everything went according to plan, you should see the following
+output on UART0:
+
+<debug_uart> U-Boot TPL board init
+Trying to boot from BOOTROM
+Returning to boot ROM...
+Trying to boot from MMC1
+NOTICE: BL31: v1.3(release):v1.2-1320-gbf43a443
+NOTICE: BL31: Built : 18:04:47, Jul 5 2017
+
+
+U-Boot 2017.07-00158-g2395e99858 (Jul 18 2017 - 21:03:31 +0200)
+
+Model: Theobroma Systems RK3368-uQ7 SoM
+DRAM: 2 GiB
+MMC: dwmmc@ff0c0000: 1, dwmmc@ff0f0000: 0
+Using default environment
+
+In: serial@ff180000
+Out: serial@ff180000
+Err: serial@ff180000
+Net:
+Warning: ethernet@ff290000 (eth0) using random MAC address - d2:69:35:7e:d0:1e
+eth0: ethernet@ff290000
+Hit any key to stop autoboot: 2
diff --git a/roms/u-boot/board/theobroma-systems/lion_rk3368/lion_rk3368.c b/roms/u-boot/board/theobroma-systems/lion_rk3368/lion_rk3368.c
new file mode 100644
index 000000000..1b0d50463
--- /dev/null
+++ b/roms/u-boot/board/theobroma-systems/lion_rk3368/lion_rk3368.c
@@ -0,0 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
+ */