1 # SPDX-FileCopyrightText: 2023 Xenokrates
3 # SPDX-License-Identifier: MIT
4 """Allwinner A20 pin names"""
5 from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin
7 # Pin descriptions at https://linux-sunxi.org/A20/PIO
128 # A10/A20 has a touch panel controller which can be configured to operate
129 # as four seperate adc chanels, providing 12-bit resolution.
135 # SysFS pwm outputs, pwm channel and pin in first tuple
141 # ordered as i2cId, sclId, sdaId
143 (0, TWI0_SCK, TWI0_SDA),
144 (1, TWI1_SCK, TWI1_SDA),
145 (2, TWI2_SCK, TWI2_SDA),
148 # ordered as spiId, sckId, mosiId, misoId
149 spiPorts = ((0, SPI0_SCLK, SPI0_MOSI, SPI0_MISO),
150 (2, SPI2_SCLK, SPI2_MOSI, SPI2_MISO),
153 # ordered as uartId, txId, rxId
155 (0, UART0_TX, UART0_RX),
156 (2, UART2_TX, UART2_RX),
157 (4, UART4_TX, UART4_RX),
158 (5, UART5_TX, UART5_RX),
159 (6, UART6_TX, UART6_RX),
160 (7, UART7_TX, UART7_RX),
163 # sysFs analog inputs, Ordered as analogInId, device, and channel