{{{#!html
The intent of this page is to provide information about Ventana single board computers off-board digital IO signals including I2C
Ventana baseboards provide 4 digital IO signals to a connector. The IMX6 has 7 GPIO blocks having 32 GPIO's each which get mapped to gpio0 - through gpio 223. The various ventana product hardware manuals contain a table of what pins on the Digital IO connector routes to what IMX6 GPIO. In some cases these signals can be pinmux'd internally to one of four IMX6 PWM's.
Ventana GPIO Mapping:
Board | DIO(1) | Connector(2) | IMX6_PAD(3) | IMX6 GPIO(4) | linux gpio(5) | linux PWM(6) | I2C(7) | |
---|---|---|---|---|---|---|---|---|
GW51xx | DIO0 | J11.5 | PAD_SD1_DATA0 | GPIO1_IO16 | gpio-16 | - | - | |
GW51xx | DIO1 | J11.7 | PAD_SD1_DATA2 | GPIO1_IO19 | gpio-19 | PWM2 | - | |
GW51xx | DIO2 | J11.6 | PAD_SD1_DATA1 | GPIO1_IO17 | gpio-17 | PWM3 | - | |
GW51xx | DIO3 | J11.8 | PAD_SD1_CMD | GPIO1_IO18 | gpio-18 | PWM4 | - | |
GW52xx | DIO0 | J4.1 | PAD_SD1_DATA0 | GPIO1_IO16 | gpio-16 | - | i2c-2 SDA (9) | |
GW52xx | DIO1 | J4.2 | PAD_SD1_DATA2 | GPIO1_IO19 | gpio-19 | PWM2 | i2c-2 SCL (9) | |
GW52xx | DIO2 | J4.3 | PAD_SD1_DATA1 | GPIO1_IO17 | gpio-17 | PWM3 | - | |
GW52xx | DIO3 | J4.4 | PAD_SD1_CLK | GPIO1_IO20 | gpio-20 | - | - | |
GW53xx | DIO0 | J4.1 | PAD_SD1_DATA0 | GPIO1_IO16 | gpio-16 | - | i2c-2 SDA | |
GW53xx | DIO1 | J4.2 | PAD_SD1_DATA2 | GPIO1_IO19 | gpio-19 | PWM2 | i2c-2 SCL | |
GW53xx | DIO2 | J4.3 | PAD_SD1_DATA1 | GPIO1_IO17 | gpio-17 | PWM3 | - | |
GW53xx | DIO3 | J4.4 | PAD_SD1_CLK | GPIO1_IO20 | gpio-20 | - | - | |
GW54xx | DIO0 | J16.1 | PAD_GPIO_9 | GPIO1_IO09 | gpio-9 | PWM1 | i2c-2 SDA | |
GW54xx | DIO1 | J16.2 | PAD_SD1_DATA2 | GPIO1_IO19 | gpio-19 | PWM2 | i2c-2 SCL | |
GW54xx | DIO2 | J16.3 | PAD_SD4_DATA1 | GPIO2_IO09 | gpio-41 | PWM3 | - | |
GW54xx | DIO3(10) | J16.4 | PAD_SD4_DATA2 | GPIO2_IO10 | gpio-42 | PWM4 | - | |
GW551x | DIO1 | J3.19 | PAD_SD1_DATA2 | GPIO1_IO19 | gpio-19 | PWM2 | - | |
GW551x | DIO2 | J3.20 | PAD_SD1_DATA1 | GPIO2_IO17 | gpio-17 | PWM3 | - | |
GW551x | J3.7 | I2C SDA | ||||||
GW551x | J3.8 | I2C SCL | ||||||
GW552x | DIO0 | J8.9 | PAD_SD1_DATA0 | GPIO1_IO16 | gpio-16 | - | - | |
GW552x | DIO1 | J8.11 | PAD_SD1_DATA2 | GPIO1_IO19 | gpio-19 | PWM2 | - | |
GW552x | DIO2 | J8.10 | PAD_SD1_DATA1 | GPIO1_IO17 | gpio-17 | PWM3 | - | |
GW552x | DIO3 | J8.12 | PAD_SD1_CLK | GPIO1_IO20 | gpio-20 | - | - | |
GW552x | DIO4 | J8.15 | PAD_CSI0_PIXCLK | GPIO5_IO18 | gpio-146 | - | - | |
GW552x | DIO5 | J8.17 | PAD_CSI0_DATA_EN | GPIO5_IO20 | gpio-148 | - | - | |
GW552x | DIO6 | J8.16 | PAD_CSI0_VSYNC | GPIO5_IO21 | gpio-149 | - | - | |
GW552x | DIO7 | J8.18 | PAD_CSI0_DAT4 | GPIO5_IO22 | gpio-150 | - | - | |
GW552x | DIO8 | J8.1 | PAD_CSI0_DAT5 | GPIO5_IO23 | gpio-151 | - | - | |
GW552x | DIO9 | J8.2 | PAD_CSI0_DAT7 | GPIO5_IO25 | gpio-153 | - | - | |
GW553x | DIO0 | J10.5 | PAD_SD1_DATA0 | GPIO1_IO16 | gpio-16 | - | - | |
GW553x | DIO1 | J10.7 | PAD_SD1_DATA2 | GPIO1_IO19 | gpio-19 | PWM2 | - | |
GW553x | DIO2 | J10.6 | PAD_SD1_DATA1 | GPIO1_IO17 | gpio-17 | PWM3 | - | |
GW553x | DIO3 | J10.8 | PAD_SD1_CMD | GPIO1_IO18 | gpio-18 | PWM4 | ||
- | ||||||||
GW16111(8) | P0.0 | J12.1 (IO0) | - | - | gpio-224 | - | - | |
GW16111(8) | P0.1 | J12.2 (IO1) | - | - | gpio-225 | - | - | |
GW16111(8) | P0.2 | J12.3 (IO2) | - | - | gpio-226 | - | - | |
GW16111(8) | P0.3 | J12.4 (IO3) | - | - | gpio-227 | - | - | |
GW16111(8) | P0.4 | J13.1 (IO4) | - | - | gpio-228 | - | - | |
GW16111(8) | P0.5 | J13.2 (IO5) | - | - | gpio-229 | - | - | |
GW16111(8) | P0.6 | J13.3 (IO6) | - | - | gpio-230 | - | - | |
GW16111(8) | P0.7 | J13.4 (IO7) | - | - | gpio-231 | - | - | |
GW16111(8) | P1.0 | J14.1 (IO8) | - | - | gpio-232 | - | - | |
GW16111(8) | P1.1 | J14.2 (IO9) | - | - | gpio-233 | - | - | |
GW16111(8) | P1.2 | J14.3 (IO10) | - | - | gpio-234 | - | - | |
GW16111(8) | P1.3 | J14.4 (IO11) | - | - | gpio-235 | - | - | |
GW16111(8) | P1.4 | J15.1 (IO12) | - | - | gpio-236 | - | - | |
GW16111(8) | P1.5 | J15.2 (IO13) | - | - | gpio-237 | - | - | |
GW16111(8) | P1.6 | J15.3 (IO14) | - | - | gpio-238 | - | - | |
GW16111(8) | P1.7 | J15.4 (IO15) | - | - | gpio-239 | - | - | |
The pinmux and IO configuration is done by the bootloader depending on the hwconfig env variable. For information on how to configure that see hwconfig
Please visit this link to find out more information about using GPIO's in Linux
Typically not needed as defaults should work Please visit this link to find out how to configure the pin function and IO driver details (pull-up, drive str, etc) of the Digital IO pins:
See linux/pwm
Please consult the Hardware Manuals for pint output and support]
Model | external I2C Support | Notes |
---|---|---|
GW551x | Yes | Does not have I2C buffer |
GW51xx | No | Can add via GW16113 |
GW52xx | Yes (Requires resistor loading) | Does not have I2C buffer |
GW53xx-B+ | Yes | Has software controlled I2C buffer |
GW54xx-B+ | Yes | Has software controlled I2C buffer |
GW552x | No | Can add via GW16113 |
Ventana boards rely heavily on the I2C bus for on-board devices. The IMX6 supports 4 i2c controllers and Ventana uses the first three as:
I2C Bus | Linux Device | Description |
---|---|---|
1 | /dev/i2c-0 | GSC |
2 | /dev/i2c-1 | PMIC, System items |
3 | /dev/i2c-2 | Multimedia, HDMI, LVDS, Audio, User bus |
Note that depending on the board model, there may be some i2c device addresses already in use. Please refer to this table:
Device | 7bit Address | Present On | Notes |
---|---|---|---|
FXOS8700 | 0x1E | GW5400/GW5410/GW5300/GW5310 | Accelerometer / Magnetometer, Bus 3 |
SGTL5000 | 0x0A | GW5400/GW5300 | Analog Audio Codec |
ADV7180 | 0x20 | GW5400/GW5300 | Analog Video Decoder Bus 3 |
ADV7393 | 0x2A | GW5400 | Analog Video Encoder |
TDF19771 | 0x34 | GW5400 | HDMI Receiver |
TDF19771 | 0x48 | GW5400 | HDMI Receiver CEC |
HDMI EDID | 0x50 | GW5xxx | HDMI Monitor EDID device (If HDMI monitor plugged in) |
Many Ventana boards provide the I2C3 (/dev/i2c-2) bus via an off-board connection:
Several Ventana boards can optionally configure the CPU I2C3 bus (/dev/i2c-2) SDA/SCL to route out to the Digital IO connector pins 1 (DIO0) and 2 (DIO1) respectively (see above)
Note that on these boards that have i2c-2 off-board via DIO0/DIO1 capability, there are 4.7kohm pull-up's to 3.3V on DIO0/DIO1 (SCL/SDA).
For those boards that have a software controlled I2C buffer, the buffer is disabled by default and to enable it you must:
Ventana > print hwconfig hwconfig=rs232;dio0:mode=gpio;dio1:mode=gpio;dio2:mode=gpio;dio3:mode=gpio
Ventana > setenv bootcmd "gpio set 101; ${bootcmd}" Ventana > saveenv
You can test by using a oscilloscope and probing the lines and issuing a command like shown below. You will see activity.
Usage: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]
Example shown is on bus 3 (0 based, thus 2 is shown, address 0x20 and Data Address of 0)
Please adjust below example for actual bus and I2C address.
i2cget -f -y 2 0x20 0
A quick script to do the above commands for a GW5400:
#!/bin/sh # make DIO0 and DIO1 inputs to not conflict with I2C-2 SCL/SDA echo 9 > /sys/class/gpio/export echo 19 > /sys/class/gpio/export echo in > /sys/class/gpio/gpio9/direction echo in > /sys/class/gpio/gpio19/direction # enable I2C_EN echo 101 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio101/direction echo 1 > /sys/class/gpio/gpio101/value
Note that on these boards that have i2c-2 off-board via DIO0/DIO1 capability, there are 4.7kohm pull-up's to 3.3V on DIO0/DIO1.
All boards that have HDMI output, route I2C3 to the HDMI connector. For pinout details see the HDMI specification for the specific connector type. Note that Type-A (standard HDMI) and Type-D (micro HDMI) have different pinouts.
References:
The best reference is looking at the source code for the standard I2C tools available on the Linux command line.
See links below: