diff --git a/src/adafruit_blinka/board/x86j4105.py b/src/adafruit_blinka/board/x86j4105.py new file mode 100644 index 00000000..a107135a --- /dev/null +++ b/src/adafruit_blinka/board/x86j4105.py @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: MIT +"""Pin definitions for the Odyssey X86j4105.""" + +from adafruit_blinka.microcontroller.pentium.j4105 import pin + +D0 = pin.GPIO388 +D1 = pin.GPIO389 +D2 = pin.GPIO386 +D3 = pin.GPIO387 +D4 = pin.GPIO337 +D5 = pin.GPIO415 +D6 = pin.GPIO416 +D7 = pin.GPIO357 +D8 = pin.GPIO356 +D9 = pin.GPIO358 +D10 = pin.GPIO359 +D11 = pin.GPIO355 +D12 = pin.GPIO391 +D13 = pin.GPIO417 +D14 = pin.GPIO493 +D15 = pin.GPIO492 +D16 = pin.GPIO410 +D17 = pin.GPIO364 +D18 = pin.GPIO338 +D19 = pin.GPIO339 +D20 = pin.GPIO340 +D21 = pin.GPIO341 +D22 = pin.GPIO413 +D23 = pin.GPIO421 +D24 = pin.GPIO422 +D25 = pin.GPIO390 +D26 = pin.GPIO419 +D27 = pin.GPIO412 + +SDA = D2 +SCL = D3 + +SCL2 = D1 +SDA2 = D0 + +SCLK = D11 +MOSI = D10 +MISO = D9 +CS = D8 +SCK = SCLK + +UART_TX = D14 +UART_RX = D15 diff --git a/src/adafruit_blinka/microcontroller/pentium/j4105/__init__.py b/src/adafruit_blinka/microcontroller/pentium/j4105/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/adafruit_blinka/microcontroller/pentium/j4105/pin.py b/src/adafruit_blinka/microcontroller/pentium/j4105/pin.py new file mode 100644 index 00000000..0266b518 --- /dev/null +++ b/src/adafruit_blinka/microcontroller/pentium/j4105/pin.py @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: MIT +"""Intel Celeron j4105 pin names""" + +from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin + +GPIO388 = Pin((1, 36)) +GPIO389 = Pin((1, 37)) +GPIO386 = Pin((1, 34)) +GPIO387 = Pin((1, 35)) +GPIO337 = Pin((2, 5)) +GPIO415 = Pin((1, 63)) +GPIO416 = Pin((1, 64)) +GPIO357 = Pin((1, 5)) +GPIO356 = Pin((1, 4)) +GPIO358 = Pin((1, 6)) +GPIO359 = Pin((1, 7)) +GPIO355 = Pin((1, 3)) +GPIO391 = Pin((1, 39)) +GPIO417 = Pin((1, 65)) +GPIO493 = Pin((0, 61)) +GPIO492 = Pin((0, 60)) +GPIO410 = Pin((1, 58)) +GPIO364 = Pin((1, 12)) +GPIO338 = Pin((2, 6)) +GPIO339 = Pin((2, 7)) +GPIO340 = Pin((2, 8)) +GPIO341 = Pin((2, 9)) +GPIO413 = Pin((1, 61)) +GPIO421 = Pin((1, 69)) +GPIO422 = Pin((1, 70)) +GPIO390 = Pin((1, 38)) +GPIO419 = Pin((1, 67)) +GPIO412 = Pin((1, 60)) + +SPI1_SCLK = GPIO355 +SPI1_MOSI = GPIO359 +SPI1_MISO = GPIO358 +SPI1_FSO = GPIO356 +SPI1_FS1 = GPIO357 + +UART4_TX = GPIO493 +UART4_RX = GPIO492 + +I2C2_SDA = GPIO386 +I2C2_SCL = GPIO387 + +I2C3_SDA = GPIO388 +I2C3_SCL = GPIO389 + +i2cPorts = ( + (2, I2C2_SCL, I2C2_SDA), + (3, I2C3_SCL, I2C3_SDA), +) +# ordered as spiId, sckId, mosiId, misoId +spiPorts = ((1, SPI1_SCLK, SPI1_MOSI, SPI1_MISO),) +# ordered as uartId, txId, rxId +uartPorts = ((4, UART4_TX, UART4_RX),) diff --git a/src/board.py b/src/board.py index bde2686e..fce4a513 100644 --- a/src/board.py +++ b/src/board.py @@ -238,6 +238,9 @@ elif board_id == ap_board.UDOO_X86: from adafruit_blinka.board.udoo_x86ultra import * +elif board_id == ap_board.ODYSSEY_X86J4105: + from adafruit_blinka.board.x86j4105 import * + elif board_id == ap_board.STM32MP157C_DK2: from adafruit_blinka.board.stm32.stm32mp157c_dk2 import * diff --git a/src/digitalio.py b/src/digitalio.py index 69e1af6d..cbd0ae23 100644 --- a/src/digitalio.py +++ b/src/digitalio.py @@ -73,6 +73,8 @@ from adafruit_blinka.microcontroller.rockchip.rk3328.pin import Pin elif detector.chip.PENTIUM_N3710: from adafruit_blinka.microcontroller.pentium.n3710.pin import Pin +elif detector.chip.ATOM_J4105: + from adafruit_blinka.microcontroller.pentium.j4105.pin import Pin elif detector.chip.STM32MP157: from adafruit_blinka.microcontroller.stm32.stm32mp157.pin import Pin elif detector.chip.MT8167: diff --git a/src/microcontroller/__init__.py b/src/microcontroller/__init__.py index 58584810..6015cd9d 100644 --- a/src/microcontroller/__init__.py +++ b/src/microcontroller/__init__.py @@ -118,6 +118,8 @@ def delay_us(delay): from adafruit_blinka.microcontroller.ftdi_mpsse.ft2232h import * elif chip_id == ap_chip.PENTIUM_N3710: from adafruit_blinka.microcontroller.pentium.n3710 import * +elif chip_id == ap_chip.ATOM_J4105: + from adafruit_blinka.microcontroller.pentium.j4105 import * elif chip_id == ap_chip.STM32MP157: from adafruit_blinka.microcontroller.stm32.stm32mp157 import * elif chip_id == ap_chip.MT8167: diff --git a/src/microcontroller/pin.py b/src/microcontroller/pin.py index d13437a4..e7f7765d 100644 --- a/src/microcontroller/pin.py +++ b/src/microcontroller/pin.py @@ -103,6 +103,8 @@ from adafruit_blinka.microcontroller.mips24kec.pin import * elif chip_id == ap_chip.PENTIUM_N3710: from adafruit_blinka.microcontroller.pentium.n3710.pin import * +elif chip_id == ap_chip.ATOM_J4105: + from adafruit_blinka.microcontroller.pentium.j4105.pin import * elif chip_id == ap_chip.STM32MP157: from adafruit_blinka.microcontroller.stm32.stm32mp157.pin import * elif chip_id == ap_chip.MT8167: