August 13, 2021

Nanopi Neo - pins and signals

Running an OS with a serial console may be interesting for a short while, but to do anything really interesting with a board like this, you need to connect things to IO pins. This board packs in an amazing amount of IO for such a tiny board. Well, compared to the Orange Pi with its 40 pin connector, here we have 36 pins, so we really aren't all that handicapped.

On board LED's

Before we talk about the connections that go off board, let's talk about two on board LEDs. They are next to the SD card and labeled PWR and STAT. The PWR led is not an actualy power indicator -- it is driven by an IO pin. Mine is green, and blinks when I manipulate GPIO J10 (the Nanopi schematics call this L10). The status LED is on a different pin that the Orange PI. For the Neo it is on A10 (the Orange Pi puts it on A15).

To build Kyu to blink the status light, go to orange_pi/board.h and uncomment the line that defines BOARD_NANOPI_NEO, then go back to the main directory, type make, and reboot.

On my board the "power" LED is green and the status LED is blue.

36 pins on two IO connectors

If you hold the board in front of you with the ethernet connector down, we can talk about left and right. In that orientation, the right side has a double row of 24 pins. The left side has a single row of 12 pins.

First the single row of pins on the left.
The schematic calls this CON2

The question now (for me anyway) is which pins I can use for plain old GPIO. I am not sure at all about any of the pins on this connector, but L11 looks fine as long as I don't mind the pullup. A17 looks just fine too, despite the "SPDIF" label. The last four pins come from the audio codec and don't have alternate functions as GPIO pins.

As far as the USB pins, the chip supports 4 usb connections. USB0 is the micro-USB and USB3 is the big square USB. USB 1 and 2 are simply provided here in case the adventurous builder wants to add connectors and hardware for them (I guess) and they don't have alternate functions as GPIO, so they are of no use to me.

Now what about the 24 pins on CON1 (the connector on the right). Here we have odd and even pins. Pin 1 is at the top left, holding the card with ethernet down (once again). In other words pin 1 is towards the inside of the card and sort of near the micro-USB connector.

A quick reminder to myself. I skipped pins 1-6 and soldered an 18 pin connector to my board (because I soldered wires for power and ground to pins 2 and 6).

Just for the record, section 3.2 of the H3 chip datasheet describe pin muxing.

It is important to note that for whatever reason, Allwinner avoids calling i2c i2c in their docs. They like to call it TWI, which I guess is "two wire interface".

All told we get 16 GPIO pins on this 24 pin connector. We get another two, with some issues, on the other connector. We get a single i2c interface, and a single spi interface, as well as two uarts.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / [email protected]