500 | | |
| 500 | ==== Venice GW7400 GPIO Discussion |
| 501 | To understand the pins on the GW7400 imx8mp you have to look in the following files in the Gateworks source code : |
| 502 | - [https://github.com/Gateworks/linux-venice/blob/v6.12-venice/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts imx8mp-venice-gw74xx.dts] shows what pins are used on the board and what they are muxed to |
| 503 | - [https://github.com/Gateworks/linux-venice/blob/v6.12-venice/arch/arm64/boot/dts/freescale/imx8mp-pinfunc.h imx8mp-pinfunc.h] shows what pins on the processor can be muxed to what |
| 504 | |
| 505 | If you are not using the off-board SPI connector (J6) then there are 4 unshared IMX8MP pins that can be re-purposed as GPIOs: |
| 506 | * J6.1 ECSPI2_MOSI can be GPIO5_IO11 |
| 507 | * J6.2 ECSPI2_MISO can be GPIO5_IO12 |
| 508 | * J6.3 ECSPI2_SCLK can be GPIO5_IO10 |
| 509 | * J6.4 ECSPI2_SS0 can be GPIO5_IO09 |
| 510 | |
| 511 | ^^^ NOTE: there are series 121ohm resistors already on the above allowing a direct LED connection for 27mA |
| 512 | |
| 513 | Looking at the DIO connector (J14) is more complicated as some of the pins are shared with other devices and there are some resistor loading options that can be used if you are ordering enough boards to create a Gateworks Special (100 piece minimum order): |
| 514 | * J14.1 DIO0 can be GPIO1_9 or PWM2_OUT |
| 515 | * J14.2 DIO1 can be GPIO1_IO11 or PWM2_OUT |
| 516 | * J14.3 UART1_RX can be GPIO5_IO22 (only if GPS is not loaded on your board; if you have a Gateworks Special a resistor loading option can route this to GPIO1_IO14 which can a GPIO or PWM3_OUT) |
| 517 | * J14.4 UART1_TX can be GPIO5_IO23 (only if GPS is unloaded or you are not using it; if you have a Gateworks Special a resistor loading option can route this to GPIO1_IO15 which can be a GPIO or PWM4_OUT) |
| 518 | * J14.5 I2C4_SCL can be GPIO5_IO20 (if not using the MIPI connector) |
| 519 | * J14.6 I2C4_SDA can be GPIO5_IO21 or PWM1_OUT (if not using the MIPI connector) |
| 520 | * J14.7 GSC_ADC1 can not be used as a GPIO; but if you have a Gateworks Special a resistor loading option can route this to UART3_RXD which can be GPIO5_IO26 but only if you do not have the onboard WiFi/BLE BLE function loaded |
| 521 | * J14.8 GSC_ADC2 can not be used as a GPIO; but if you have a Gateworks Special a resistor loading option can route this to UART3_TXD which can be GPIO5_IO27 but only if you do not have the onboard WiFi/BLE BLE function loaded |
| 522 | ^^^ NOTE: pin 1,2,5,6 have 332 ohm series current limit resistors, the other pins have 0ohm resistors all of which can change with a Gateworks Special |
| 523 | |
| 524 | There is also a possibility of picking up 2 GPIO's from UART4 if you are not using the RS232/RS485 connector (J18). |
| 525 | |
| 526 | All of the above are 3.3V I/O's. GPIO's can drive an LED on/off and PWM's can drive an LED with configurable brightness level. The other option is to hang a PWM or GPIO controller off of I2C4 on J14 but that requires a small/simple PCB to be made. |
| 527 | |
| 528 | To achieve most of the above, modifying the device tree is required, similar to the GW7100 example above. |