Allwinner Nezha

The Allwinner Nezha is one of the first D1 based boards made available to the general public. It was sold through an Indiegogo campaign by the distributor company Sipeed.

The indiegogo campaign page states that "Nezha is Open Source". But the hardware itself is not OSHW, and the open source SDK that that page refers to requires registering for an "Allwinner account". Seems like the Nezha is just as open source as all the other devices who are based on u-boot and the linux kernel, and who follow the basic premise of the GPL.

In fact, the disclaimer that Allwinner requires you to click through reads the following: "This deliverable may not be altered, copied, reversed, sold, distributed, or otherwise engaged in commercial activities without prior written permission of the company." And they seem to be using this disclaimer since at least 2018-11-21 according to the date on that disclaimer. This disclaimer is 100% at odds with the GPL license that Allwinners whole business depends on.

= Identification =

There are at least two known revisions of the board. The older version is silkscreened D1_DEV_DDR3_16X2_V1_0 on the top and does not have the AWDL logo. The newer version has the AWDL anagram silkscreened on the front and the identifier D1_DEV_DDR3_16X2_V1_2 on the back.

The front side of both PCB versions has a variant of the Nezha logo.

The back also has a sticker containing a QR code, with the board serial number below it. Scanning the QR code reveals the following URL:
 * https://d1.docs.allwinnertech.com?device=d1nezha#serial (with #serial replaced by the serial number)

= Sunxi support =

Current status
The BSP U-Boot/kernel use a NAND layout which merges a pair of pages from consecutive blocks into a super-page. Mainline uses the physical layout as-is. So while SPI NAND contents are accessible from both mainline and BSP kernels, they are only usable by one driver or the other. There is a config option in the BSP kernel, CONFIG_AW_SPINAND_SIMULATE_MULTIPLANE, which should make it compatible with mainline, but this has not been tested.

Manual build
You can build things for yourself by following our Manual build howto and by choosing from the configurations available below.

BSP U-Boot
U-Boot can be built from the SDK. By default, it will pass its internal (nonconformant) DTB to Linux, regardless of the argument passed to booti. That must be hacked out to run mainline Linux. The BSP U-boot will also enable T-HEAD ISA and MMU extensions, and leave them enabled when entering Linux.

Mainline U-Boot
No mainline U-Boot support exists yet for sunxi on the RISC-V architecture. Some code re-organization is needed before D1 SoC support can be added.

Use the  build target.

Mainline kernel
A WIP branch is available at https://github.com/smaeul/linux/commits/riscv/d1-wip which supports enough hardware for headless use (Audio, Ethernet, MMC, NAND, USB). It relies on some MMU patches that may not get merged upstream.

Use the sun20i-d1-nezha.dtb device-tree binary.

= Tips, Tricks, Caveats =

FEL mode
The FEL button triggers FEL mode.

The xfel tool has support for the D1 chip. Currently sunxi-fel (from Sunxi-tools) lists the SoC as unknown</tt>.

Enabling U-Boot command line
The preinstalled version of U-Boot requires holding down "S" during boot to enter the command line. From a booted Linux system (like the Tina Linux preinstalled in the on-board NAND) run the following command to set a three second delay during which it's possible to enter the command line on the built-in serial port:

fw_setenv bootdelay 3

= Adding a serial port =



The DEBUG</tt> header at the top-right corner of the board can be used as a serial port. See the UART howto for instructions about how to attach to it. The default baud rate is 115200.

= Pictures =

= Schematic =


 * V1.0 board schematic
 * V1.0 board layout and silkscreen

= Also known as =

= See also =


 * IndieGogo campaign
 * Data gathering thread on whycan.com (chinese)

Manufacturer images

 * D1_Nezha_HDMI_test_firmware Image from whycan.com (requires regristration)