1 # SPDX-FileCopyrightText: 2023 Xenokrates
 
   3 # SPDX-License-Identifier: MIT
 
   4 """Pin definitions for the LeMaker Banana Pro."""
 
   6 # The LeMaker Banana Pro uses the AllWinner A20 SoC
 
   7 from adafruit_blinka.microcontroller.allwinner.a20 import pin
 
  11 # https://linux-sunxi.org/LeMaker_Banana_Pro#Expansion_Port
 
  13 # +---------------------+Banana Pro+-----------------+
 
  14 # |        Name         | Physical |       Name      |
 
  15 # +---------------------+----++----+-----------------+
 
  16 # |                3.3v |  1 || 2  | 5v              |
 
  17 # |   PB21/TWI2_SDA/SDA |  3 || 4  | 5V              |
 
  18 # |   PB20/TWI2_SCL/SCL |  5 || 6  | 0v              |
 
  19 # |                 PH2 |  7 || 8  | PH4/UART4_TX/TX |
 
  20 # |                  0v |  9 || 10 | PH5/UART4/RX    |
 
  21 # |       PI19/UART2_RX | 11 || 12 | PI3/PWM1        |
 
  22 # |       PI18/UART2_TX | 13 || 14 | 0v              |
 
  23 # |                PI17 | 15 || 16 | PH20            |
 
  24 # |                3.3v | 17 || 18 | PH21            |
 
  25 # | PI12/SPI0_MOSI/MOSI | 19 || 20 | 0v              |
 
  26 # | PI13/SPI0_MISO/SCLK | 21 || 22 | PI16            |
 
  27 # |       PI11/SPI0_CLK | 23 || 24 | PI10/SPI0_CS0   |
 
  28 # |                  0v | 25 || 26 | PI14/SPI0_CS1   |
 
  29 # |         PI1/TW3_SDA | 27 || 28 | PI0/TWI3_SCL    |
 
  30 # |                 PB3 | 29 || 30 | 0v              |
 
  31 # |       PI21/UART7_RX | 31 || 32 | PI20/UART7_TX   |
 
  32 # |                PB13 | 33 || 34 | 0v              |
 
  33 # |                 PB7 | 35 || 36 | PB06            |
 
  34 # |                 PB5 | 37 || 38 | PB12            |
 
  35 # |                  0v | 39 || 40 | PB08            |
 
  36 # +---------------------+----++----+-----------------+
 
  37 # |        Name         | Physical |      Name       |
 
  38 # +---------------------+Banana Pro+-----------------+
 
  40 # 40 pin header (CON6) - Using physical pin numbering and CPU PIOs
 
 121 ## Additional Hardware
 
 128 ## For compatibility of 40-pin header to RasPi & others
 
 129 ## With these definitions most examples run out of the box.