aboutsummaryrefslogtreecommitdiff
path: root/board/orangepi
diff options
context:
space:
mode:
authorGravatar Jagan Teki <jagannadh.teki@gmail.com>2017-12-20 10:53:38 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2017-12-20 18:56:19 +0100
commitdc21f8957d91e6e4204c636b9cd1b6ba6d1dcb99 (patch)
treeaf83b30e65e34c96be019cb5242eae8a54e2d9c8 /board/orangepi
parentf093b478e1d0ddaeb4811d5e8bd6fe599798baee (diff)
downloadbuildroot-dc21f8957d91e6e4204c636b9cd1b6ba6d1dcb99.tar.gz
buildroot-dc21f8957d91e6e4204c636b9cd1b6ba6d1dcb99.tar.bz2
board: Add Orangepi Zero Plus2 support
Add initial support for Orangepi Zero Plus2 board with below features: - U-Boot 2017.11 - Linux 4.14 - Default packages from buildroot Cc: zhaoyifan <zhao_steven@263.net> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board/orangepi')
-rw-r--r--board/orangepi/orangepi-zero-plus2/boot.cmd6
-rw-r--r--board/orangepi/orangepi-zero-plus2/genimage.cfg39
-rw-r--r--board/orangepi/orangepi-zero-plus2/patches/linux/linux-0001-arm64-dts-orange-pi-zero-plus2-fix-sdcard-detect.patch30
-rw-r--r--board/orangepi/orangepi-zero-plus2/readme.txt37
4 files changed, 112 insertions, 0 deletions
diff --git a/board/orangepi/orangepi-zero-plus2/boot.cmd b/board/orangepi/orangepi-zero-plus2/boot.cmd
new file mode 100644
index 0000000000..4772a9be31
--- /dev/null
+++ b/board/orangepi/orangepi-zero-plus2/boot.cmd
@@ -0,0 +1,6 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+
+fatload mmc 0 $kernel_addr_r Image
+fatload mmc 0 $fdt_addr_r sun50i-h5-orangepi-zero-plus2.dtb
+
+booti $kernel_addr_r - $fdt_addr_r
diff --git a/board/orangepi/orangepi-zero-plus2/genimage.cfg b/board/orangepi/orangepi-zero-plus2/genimage.cfg
new file mode 100644
index 0000000000..8091edad6f
--- /dev/null
+++ b/board/orangepi/orangepi-zero-plus2/genimage.cfg
@@ -0,0 +1,39 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "Image",
+ "sun50i-h5-orangepi-zero-plus2.dtb",
+ "boot.scr"
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition spl {
+ in-partition-table = "no"
+ image = "sunxi-spl.bin"
+ offset = 8192
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.itb"
+ offset = 40K
+ size = 1M # 1MB - 40K
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
diff --git a/board/orangepi/orangepi-zero-plus2/patches/linux/linux-0001-arm64-dts-orange-pi-zero-plus2-fix-sdcard-detect.patch b/board/orangepi/orangepi-zero-plus2/patches/linux/linux-0001-arm64-dts-orange-pi-zero-plus2-fix-sdcard-detect.patch
new file mode 100644
index 0000000000..203402932b
--- /dev/null
+++ b/board/orangepi/orangepi-zero-plus2/patches/linux/linux-0001-arm64-dts-orange-pi-zero-plus2-fix-sdcard-detect.patch
@@ -0,0 +1,30 @@
+From f88e9301948173dd35afad4a6939092c7f269aed Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Fri, 3 Nov 2017 22:58:54 +0300
+Subject: [PATCH] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
+
+The sdcard detect pin on orange-pi-zero-plus2 is pulled up.
+Fix cd-gpio description to enable sdcard detect.
+
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+---
+ arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+index b6b7a56..a42fd79 100644
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+@@ -71,7 +71,7 @@
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <4>;
+- cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+ status = "okay";
+ };
+
+--
+1.9.1
+
diff --git a/board/orangepi/orangepi-zero-plus2/readme.txt b/board/orangepi/orangepi-zero-plus2/readme.txt
new file mode 100644
index 0000000000..322ba0e12a
--- /dev/null
+++ b/board/orangepi/orangepi-zero-plus2/readme.txt
@@ -0,0 +1,37 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the Orangepi Zero Plus2. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Orangepi Zero Plus2 link:
+http://www.orangepi.org/OrangePiZeroPlus2/
+
+Wiki link:
+https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Zero+Plus2
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+ $ make orangepi_zero_plus2_defconfig
+ $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+ $ sudo sync
+
+Insert the micro SDcard in your Orangepi Zero Plus2 and power it up. The console
+is on the serial line, 115200 8N1.