.. raw:: html
.. role:: red
.. role:: green
.. role:: blue
.. role:: pink
.. role:: black
.. include:: /keyword.rst
==========
|i350-EVK|
==========
.. contents:: Sections
:local:
:depth: 1
.. _i2c-i350-evk:
I2C
---
There are 4 I2C adapters on |i350-EVK-REF-BOARD|:
- I2C-0 shared with Battery Charger
- I2C-1 shared with HDMI Bridge IC it66121, Capacitive Touch Controller
- I2C-2 shared with MIPI-CSI camera 0
- I2C-3 shared with MIPI-CSI camera 1
I2C-0 and I2C-2 are exported to `Raspberry Pi HAT`_. You can use them to connect to other I2C devices.
.. _spi-i350-evk:
SPI
---
There is 1 master SPI device on |i350-EVK-REF-BOARD|:
- SPI on `Raspberry Pi HAT`_ Pin #19(MOSI) #21(MISO) #23(SCLK) #24(CS)
.. _usb-i350-evk:
USB
---
There are 4 USB ports on |i350-EVK-REF-BOARD|:
- USB 2.0 Micro B OTG
- USB 2.0 Type-A Host
- USB to UART Bridge IC * 2 (Debug port)
USB 2.0 Micro B OTG is used to flash the image.
For flashing the image, please refer to :doc:`/sw/yocto/get-started/flash`.
USB 2.0 Type-A Host can be used for USB flash drives, UVC, UAC, and so on.
To mount a USB flash drive, you can use:
.. prompt:: bash # auto
# mkdir /media/usb
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 29.5G 0 disk
|-sda1 8:1 1 200M 0 part
`-sda2 8:2 1 29.3G 0 part
# mount /dev/sda2 /media/usb/
USB to UART Bridge IC is used for the debug console.
.. _pwm-i350-evk:
PWM
---
There are 4 PWM devices on |i350-EVK-REF-BOARD|:
- PWM_A on `Raspberry Pi HAT`_ Pin #32
- PWM_B on Jumper J2307
- PWM_C on `Raspberry Pi HAT`_ Pin #33
- DISP_PWM on `Raspberry Pi HAT`_ Pin #32
.. note::
By default, PWM_B and DISP_PWM are inactive.
You have to set pinmux to enable them.
You can use ``sysfs`` to operate PWM devices.
First, you need to export the PWM node.
.. prompt:: bash # auto
# echo 0 > /sys/class/pwm/pwmchip0/export
Second, you need to set the period and the duty cycle.
.. prompt:: bash # auto
# echo 2000000 > /sys/class/pwm/pwmchip0/pwm0/period
# echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
Finally, you can enable the PWM device.
.. prompt:: bash # auto
# echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
You can also use the kernel debugger to check the value of PMW devices.
.. prompt:: bash # auto
# cat /sys/kernel/debug/pwm
platform/1100e000.disp-pwm, 1 PWM device
pwm-0 (sysfs ): requested period: 0 ns duty: 0 ns polarity: normal
platform/11006000.pwm, 3 PWM devices
pwm-0 (sysfs ): requested enabled period: 2000000 ns duty: 1000000 ns polarity: normal
pwm-1 (sysfs ): requested period: 0 ns duty: 0 ns polarity: normal
pwm-2 (sysfs ): requested period: 0 ns duty: 0 ns polarity: normal
.. _uart-i350-evk:
UART
----
There are 3 UART devices on |i350-EVK-REF-BOARD|. The supported baud is from 4,800 bps to 921,600 bps:
- UART to USB * 2
- UART on `Raspberry Pi HAT`_ Pin #8(Tx) #10(Rx)
.. _gpio-i350-evk:
GPIO
----
The SOC has 145 GPIO pins in total.
Due to the limitation of the number of physical pins, only few GPIO pins are exported.
The actual positions of available GPIO pins are shown in `Raspberry Pi HAT`_.
.. _pin-header-i350-evk:
Raspberry Pi HAT
----------------
There is a 40-pin Raspberry Pi HAT on |i350-EVK-REF-BOARD|. It contains several peripheral interfaces.
By default, it follows the official Raspberry Pi setting.
For more details about RPi HAT, please refer to `GPIO and the 40-pin Header `_.
You can use the header to connect your external devices.
.. table:: pin definition of Raspberry Pi HAT
===== ================= ===================== ===== ================== ==============
Pin # Main Alternative Pin # Main Alternative
===== ================= ===================== ===== ================== ==============
1 :red:`VDD_3V3` 2 :red:`VDD_5V`
3 :green:`I2C2_SDA` :green:`Camera 0 I2C` 4 :red:`VDD_5V`
5 :green:`I2C2_SCL` :green:`Camera 0 I2C` 6 :black:`GND`
7 :blue:`GPIO124` 8 :green:`UART2_TXD` :blue:`GPIO40`
9 :black:`GND` 10 :green:`UART2_RXD` :blue:`GPIO39`
11 :pink:`GPIO127` 12 :blue:`GPIO22`
13 :pink:`GPIO33` 14 :black:`GND`
15 :blue:`GPIO109` 16 :pink:`GPIO136`
17 :red:`VDD_3V3` 18 :pink:`GPIO137`
19 :green:`SPI_MOSI` :blue:`GPIO29` 20 :black:`GND`
21 :green:`SPI_MISO` :blue:`GPIO28` 22 :pink:`GPIO140`
23 :green:`SPI_SCLK` :blue:`GPIO27` 24 :green:`SPI_CS` :blue:`GPIO26`
25 :black:`GND` 26 :pink:`GPIO141`
27 :green:`I2C0_SDA` :blue:`GPIO57` 28 :green:`I2C0_SCL` :blue:`GPIO58`
29 :blue:`GPIO25` 30 :black:`GND`
31 :pink:`GPIO142` 32 :green:`PWMA` :blue:`GPIO19`
33 :pink:`PWMC` :green:`IRRX` 34 :black:`GND`
35 :pink:`GPIO144` 36 :pink:`GPIO139`
37 :pink:`GPIO138` 38 :pink:`GPIO34`
39 :black:`GND` 40 :pink:`GPIO32`
===== ================= ===================== ===== ================== ==============
.. note::
1. VDD_5V power can provide 5V/2A maximum but share with USB Host VBUS 5V output.
2. VGPIOEXT_3V3 power can deliver 3.3V/300mA
3. :black:`Black` words are ground pins.
4. :red:`Red` words are power pins.
5. :green:`Green` words are special function pins.
6. :blue:`Blue` words are GPIOs.
7. :pink:`Pink` words are pins, which multiplex with other functions. Please refer to `Hardware Pin Mux`_.
.. warning::
The default input/output voltage of the GPIO pins on the header is **3.3V**.
Before using them, please make sure the voltage is suitable for your external device.
Otherwise, the unmatched voltage may destroy both Genio 350-EVK and external devices.
Some pins have alternative usage:
- I2C2_SDA / I2C2_SCL are also used for camera 0.
- UART2_TXD / UART2_RXD can be switched to GPIO by setting pinmux.
- SPI_MOSI / SPI_MISO / SPI_SCLK / SPI_CS can be switched to GPIO by setting pinmux.
- I2C0_SDA / I2C0_SCL can be switched to GPIO by setting pinmux.
- PWMA can be switched to GPIO19 and DISP_PWM by setting pinmux.
- PWMC can be switched to IRRX by setting jumper J1303.
Hardware Pin Mux
----------------
There are some GPIOs shared with on-board WiFi chip (MT6631), JTAG, IrDA Receiver, and Raspberry Pi-like I/O.
You should pay attention to them when you use these functions.
.. table:: Pin Mux Controlled by Jumper J2318
======= ============= ================
J2318 Short Open
GPIO MT6631 / JTAG Raspberry Pi I/O
======= ============= ================
GPIO32 JTDI RasPi_GPIO32
GPIO33 JTDO RasPi_GPIO33
GPIO34 JTRST RasPi_GPIO34
GPIO136 CONN_TOP_CLK RasPi_GPIO136
GPIO137 CONN_TOP_DATA RasPi_GPIO137
GPIO138 CONN_HRST_B RasPi_GPIO138
GPIO140 CONN_BT_CLK RasPi_GPIO140
GPIO141 CONN_BT_DATA RasPi_GPIO141
GPIO142 CONN_WF_CTRL0 RasPi_GPIO142
GPIO143 CONN_WF_CTRL1 RasPi_GPIO143
GPIO144 CONN_WF_CTRL2 RasPi_GPIO144
GPIO139 CONN_WB_PTA RasPi_GPIO139
======= ============= ================
.. table:: Pin Mux Controlled by Jumpers J1303
======== =================== =====================
Location Use Pin 2 and Pin 3 Short Pin 1 and Pin 2
======== =================== =====================
J1303 IRRX_3V3 RasPi_PWM_3V3
======== =================== =====================