README.md: updated Edison SDK version to the latest one.
[contrib/mraa.git] / docs / banana_pi.md
1 Banana Pi/Pro    {#bananapi}
2 ============
3
4 The Banana Pi/Pro is a clone of the well known Raspberry Pi. It has advantages
5 compared to the 'old' Raspberry Pi A/B/A+/B+ devices as it is based on the
6 Allwinner A20 Dual Core Cortex-A7. It also has 1G Ethernet compared to 100M
7 Ethernet on the Raspberry.
8
9 There is a lot of effort on Mainline Kernel to fully support the Allwinner
10 Chips, for example Fedora 22 Arm will come with support for BananaPi/Pro which
11 means that you will be able to have HDMI Output and a number of periperal
12 modules work out of the box.
13
14 Pin-wise the Banana Pi matches the Raspberry Pi, the Banana Pro has a connector
15 similar to the Raspberry Pi A+/B+
16
17 Revision Support
18 ----------------
19 Banana Pi
20 Banana Pro
21
22 Interface notes
23 ---------------
24
25 **PWM** Whilst the Banana Pi is meant to have 1 PWM channel this is currently
26 not supported.
27
28 **SPI** works fine when used with old 3.4 Kernels provided by Lemaker, on
29 Mainline Kernel SPI does currently not work
30
31 **COM** I have created devicetree patches so that Mainline Kernel supports all
32 COM-Interfaces, this is not yet visible in Kernel
33
34 Mainline Kernel requires the use of Device-Trees, mraa tries it's best to guess
35 which gpio/serial/i2c/spi is connected where but there is currently no support
36 to manipulate the Device-Tree settings from within mraa. If a device does not
37 work as expected then please check syslog, mraa usually complains with a
38 meaningful message when it is unable to initialize the device.
39
40 Pin Mapping
41 -----------
42
43 This pin mapping refers to the Banana Pi but gives an idea
44 as to what the values are from mraa. Note that there is an emum to use wiringPi
45 style numbers.
46
47 | MRAA Number | Physical Pin | Function  |
48 |-------------|--------------|-----------|
49 | 1           | P1-01        | 3V3 VCC   |
50 | 2           | P1-02        | 5V VCC    |
51 | 3           | P1-03        | I2C SDA   |
52 | 4           | P1-04        | 5V VCC    |
53 | 5           | P1-05        | I2C SCL   |
54 | 6           | P1-06        | GND       |
55 | 7           | P1-07        | GPIO(PI03)|
56 | 8           | P1-08        | UART4 TX  |
57 | 9           | P1-09        | GND       |
58 | 10          | P1-10        | UART4 RX  |
59 | 11          | P1-11        | GPIO(PI19)|
60 | 12          | P1-12        | GPIO(PH02)|
61 | 13          | P1-13        | GPIO(PI18)|
62 | 14          | P1-14        | GND       |
63 | 15          | P1-15        | GPIO(PI17)|
64 | 16          | P1-16        | GPIO(PH20)|
65 | 17          | P1-17        | 3V3 VCC   |
66 | 18          | P1-18        | GPIO(PH21)|
67 | 19          | P1-19        | SPI MOSI  |
68 | 20          | P1-20        | GND       |
69 | 21          | P1-21        | SPI MISO  |
70 | 22          | P1-22        | GPIO(PI16)|
71 | 23          | P1-23        | SPI SCL   |
72 | 24          | P1-24        | SPI CS0   |
73 | 25          | P1-25        | GND       |
74 | 26          | P1-26        | SPI CS1   |
75
76 There is also a second 8-pin connector on the Banana Pi, the pins are as follows:
77
78 | 27          | P1-19        | 5V VCC    |
79 | 28          | P1-20        | 3V3 VCC   |
80 | 29          | P1-21        | GPIO(PH5) |
81 | 30          | P1-22        | GPIO(PI22)|
82 | 31          | P1-23        | GPIO(PH03)|
83 | 32          | P1-24        | GPIO(PI20)|
84 | 33          | P1-25        | GND       |
85 | 34          | P1-26        | GND       |