board/orangepi: add basic support for orangepi-zero board
PATCH v2 1/1 board/orangepi: add basic support for orangepi-zero board
This patch adds basic support for orangepi-zero board. Board support package includes the following components:
- mainline kernel v4.11
- mainline u-boot v2017.03
- extra kernel config options: spidev, spi nor flash, wifi
- dts patches to enable SPI NOR and spidev
More details about this board are available here:
- http://linux-sunxi.org/Orange_Pi_Zero
Note that at the moment networking is not supported right out of the box. Ethernet submission to mainline kernel is a work in progress, see the latest dwmac-sun8i branches at https://github.com/montjoie/linux
On-board SDIO WiFi chip XR819 is supported by off-the-tree wireless driver available at https://github.com/fifteenhex/xradio
Changes from v1:
* Send patch using proper subject
* Update xr819 kernel dts patch: add compatible property
--- board/orangepi/orangepi-zero/boot.cmd | 8 +++++ board/orangepi/orangepi-zero/genimage.cfg | 36 +++++++++++++++++++ board/orangepi/orangepi-zero/linux-extras.config | 17 +++++++++ ...orange-pi-zero-interrupt-triggering-xr819.patch | 35 ++++++++++++++++++ ...002-ARM-dts-orange-pi-zero-enable-spi-nor.patch | 42 ++++++++++++++++++++++ ...0003-ARM-dts-orange-pi-zero-enable-spidev.patch | 42 ++++++++++++++++++++++ board/orangepi/orangepi-zero/post-build.sh | 1 + board/orangepi/orangepi-zero/post-image.sh | 1 + board/orangepi/orangepi-zero/readme.txt | 29 +++++++++++++++ configs/orangepi_zero_defconfig | 42 ++++++++++++++++++++++ 10 files changed, 253 insertions(+) create mode 100644 board/orangepi/orangepi-zero/boot.cmd create mode 100644 board/orangepi/orangepi-zero/genimage.cfg create mode 100644 board/orangepi/orangepi-zero/linux-extras.config create mode 100644 board/orangepi/orangepi-zero/patches/linux/0001-ARM-dts-orange-pi-zero-interrupt-triggering-xr819.patch create mode 100644 board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch create mode 100644 board/orangepi/orangepi-zero/patches/linux/0003-ARM-dts-orange-pi-zero-enable-spidev.patch create mode 120000 board/orangepi/orangepi-zero/post-build.sh create mode 120000 board/orangepi/orangepi-zero/post-image.sh create mode 100644 board/orangepi/orangepi-zero/readme.txt create mode 100644 configs/orangepi_zero_defconfig
board/orangepi/orangepi-zero/boot.cmd new file +8 -0
@@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h2-plus-orangepi-zero.dtb + +bootz $kernel_addr_r - $fdt_addr_r
board/orangepi/orangepi-zero/genimage.cfg new file +36 -0
@@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi PC +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h2-plus-orangepi-zero.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +}
board/orangepi/orangepi-zero/linux-extras.config new file +17 -0
@@ -0,0 +1,17 @@ +# spidev +CONFIG_SPI_SPIDEV=y + +# spi nor +CONFIG_MTD=y +CONFIG_MTD_OF_PARTS=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_M25P80=y + +# wireless core +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_CFG80211_WEXT=y + +# wireless drivers +CONFIG_WLAN=y
board/orangepi/orangepi-zero/patches/linux/0001-ARM-dts-orange-pi-zero-interrupt-triggering-xr819.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 321faaf4b78d46a0c77782c1798856746f0619e9 Mon Sep 17 00:00:00 2001 +From: Sergey Matyukevich <[email protected]> +Date: Fri, 19 May 2017 23:39:48 +0300 +Subject: [PATCH 1/3] ARM: dts: orange-pi-zero: specify XR819 WiFi chip + interrupts + +The orange-pi-zero board has Allwinner XR819 SDIO wifi chip. The board +dts file provides a node enabling mmc1 controller. Together with an +out-of-tree driver https://github.com/fifteenhex/xradio this node +enables using the wifi chip. + +This commit specifies XR819 interrupt configuration for the driver. + +Signed-off-by: Sergey Matyukevich <[email protected]> +--- + arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +index b7ca916d871d..4e1a9050c6b4 100644 +--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts ++++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +@@ -125,6 +125,9 @@ + */ + xr819: sdio_wifi at 1 { + reg = <1>; ++ compatible = "xradio,xr819"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_EDGE_RISING>; + }; + }; + +-- +2.11.0 +
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch new file +42 -0
42 lines not on this page · raw message
board/orangepi/orangepi-zero/patches/linux/0003-ARM-dts-orange-pi-zero-enable-spidev.patch new file +42 -0
42 lines not on this page · raw message
board/orangepi/orangepi-zero/post-build.sh new file +1 -0
@@ -0,0 +1 @@ +../post-build.sh
board/orangepi/orangepi-zero/post-image.sh new file +1 -0
@@ -0,0 +1 @@ +../post-image.sh
board/orangepi/orangepi-zero/readme.txt new file +29 -0
@@ -0,0 +1,29 @@ +OrangePi Zero + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi Zero. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_zero_defconfig + +Compile everything and build the SD card image: + + $ make + +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
configs/orangepi_zero_defconfig new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH v2 1/1 board/orangepi: add basic support for orangepi-zero board
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sergey" == Sergey Matyukevich <[email protected]> writes:
This patch adds basic support for orangepi-zero board. Board support package includes the following components:
- mainline kernel v4.11
- mainline u-boot v2017.03
- extra kernel config options: spidev, spi nor flash, wifi
- dts patches to enable SPI NOR and spidevMore details about this board are available here:
- http://linux-sunxi.org/Orange_Pi_Zero
Quoted 6 lines
Note that at the moment networking is not supported right out of the box. Ethernet submission to mainline kernel is a work in progress, see the latest dwmac-sun8i branches at https://github.com/montjoie/linux
On-board SDIO WiFi chip XR819 is supported by off-the-tree wireless driver available at https://github.com/fifteenhex/xradio
Any plans for submitting a package for that?
board/orangepi/orangepi-zero/genimage.cfg line 1
Quoted 3 lines
+++ b/board/orangepi/orangepi-zero/genimage.cfg
board/orangepi/orangepi-zero/genimage.cfg new file +1
-0@@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi PC
Typo: s/PC/Zero/
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch line 4
Quoted 6 lines
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch new file +5
-0+++ b/board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch@@ -0,0 +1,42 @@ +From 068c3baff3048a3db4ef2518ff917ce749cd8169 Mon Sep 17 00:00:00 2001 +From: Sergey Matyukevich <[email protected]> +Date: Sat, 20 May 2017 11:24:26 +0300 +Subject: [PATCH 2/3] ARM: dts: orange-pi-zero: enable SPI NOR
Please drop the 2/3, they tend to get out of date.
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch line 11
Quoted 7 lines
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch new file +7
-0+ +Enable SPI NOR on orange-pi-zero board. + +For more information see: +- http://linux-sunxi.org/Orange_Pi_Zero#SPI_NOR_flash + +Signed-off-by: Sergey Matyukevich <[email protected]>
It would be nicer to add the v2 version that got merged, but oh well.
Committed with the typo fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 board/orangepi: add basic support for orangepi-zero board
Quoted 4 lines
Quoted 2 lines
On-board SDIO WiFi chip XR819 is supported by off-the-tree wireless driver available at https://github.com/fifteenhex/xradio
Any plans for submitting a package for that?
It doesn't look like xradio driver or its flavors are anywhere on its way to mainline kernel. So yes, I plan to add this package to simplify the use of zero board right out of the box.
Meanwhile I have some doubts about supplementary firmware package. IIUC normally xr819 firmware is extracted from vendor's SDK. Extracted firmware can be obtained e.g. from Armbian project. Would it be alright to point at Armbian github in firmware package ?
Quoted 8 lines
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch line 4
Quoted 6 lines
+++
b/board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patchboard/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch new file +4
-0@@ -0,0 +1,42 @@ +From 068c3baff3048a3db4ef2518ff917ce749cd8169 Mon Sep 17 00:00:00 2001 +From: Sergey Matyukevich <[email protected]> +Date: Sat, 20 May 2017 11:24:26 +0300 +Subject: [PATCH 2/3] ARM: dts: orange-pi-zero: enable SPI NORPlease drop the 2/3, they tend to get out of date.
Do you mean all the patch indices in Subjects ?
Quoted 11 lines
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch line 11
Quoted 7 lines
board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch new file +7
-0+ +Enable SPI NOR on orange-pi-zero board. + +For more information see: +- http://linux-sunxi.org/Orange_Pi_Zero#SPI_NOR_flash + +Signed-off-by: Sergey Matyukevich <[email protected]>It would be nicer to add the v2 version that got merged, but oh well.
Committed with the typo fixed, thanks.
Thanks !
Regards,
Sergey