1 # SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
 
   3 # SPDX-License-Identifier: MIT
 
   4 """Pentium N3710 (Braswell core SOC) pin names
 
   5    i2c and GPIO can be accessed through Blinka.
 
   6    For i2c use IC20_SCL, IC20-SDA and IC21-SCL, IC21-SDA in the i2c(<sdl, sda>) calls.
 
   7    For UART use pyserial"""
 
   8 from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin
 
  11 GPIO_243 = Pin((3, 15))
 
  12 GPIO_246 = Pin((3, 18))
 
  13 GPIO_247 = Pin((3, 19))
 
  14 GPIO_249 = Pin((3, 21))
 
  15 GPIO_250 = Pin((3, 22))
 
  16 GPIO_253 = Pin((3, 25))
 
  17 GPIO_273 = Pin((3, 45))
 
  18 GPIO_275 = Pin((3, 47))
 
  19 GPIO_276 = Pin((3, 48))
 
  20 GPIO_278 = Pin((3, 50))
 
  21 GPIO_279 = Pin((3, 51))
 
  22 GPIO_280 = Pin((3, 52))
 
  23 GPIO_307 = Pin((3, 79))
 
  25 SDIO_D3 = SDMMC2_D3 = GPIO_243
 
  26 SDIO_DI = SDMMC2_D1 = GPIO_246
 
  27 SDIO_CLK = SDMMC2_CLK = GPIO_247
 
  28 SDIO_D2 = SDMMC2_D2 = GPIO_249
 
  29 SDIO_CMD = SDMMC2_CMD = GPIO_250
 
  30 SDIO_D0 = SDMMC2_D0 = GPIO_253
 
  36 MF_LPC_CLKOUT0 = GPIO_279
 
  41 GPIO_358 = Pin((1, 17))
 
  42 GPIO_SUS3 = SDIO_WAKE = GPIO_358
 
  46 GPIO_490 = Pin((0, 76))
 
  47 GPIO_492 = Pin((0, 78))
 
  49 SATA_GP1 = TS_INT = GPIO_490
 
  50 SATA_GP2 = TS_RST = GPIO_492
 
  53 # not general gpio on chip 0
 
  54 # use pyserial not blinka.  These are only included for completeness
 
  56 UART1_RXD = Pin((0, 16))
 
  57 UART1_TXD = Pin((0, 20))
 
  58 UART1_RTS = Pin((0, 15))
 
  59 UART1_CTS = Pin((0, 18))
 
  61 UART2_RXD = Pin((0, 17))
 
  62 UART2_TXD = Pin((0, 21))
 
  63 UART2_RTS = Pin((0, 19))
 
  64 UART2_CTS = Pin((0, 22))
 
  74 # i2c use these addresses when accessing i2c from Blinka.  You can also access
 
  75 # the i2c useing smbus
 
  76 I2C0_SDA = Pin((0, 61))  # IC21 on diagram, port 0 in hardware manual
 
  77 I2C0_SCL = Pin((0, 65))
 
  79 I2C1_SDA = TS_I2C_SDA = Pin((0, 45))  # I2C2 on diagram, port 5 in hardware manual
 
  80 I2C1_SCL = TS_I2C_SCL = Pin((0, 48))
 
  83 GPIO_469 = I2C1_SDA  # I2C2 on diagram
 
  85 GPIO_475 = I2C0_SDA  # I2C1 on diagram
 
  88 # ordered as i2cId, sclId, sdaId
 
  89 i2cPorts = ((0, I2C0_SCL, I2C0_SDA), (1, I2C1_SCL, I2C1_SDA))