Changes between Version 7 and Version 8 of gpio
- Timestamp:
- 09/27/2018 11:21:29 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
gpio
v7 v8 96 96 The various product hardware manuals will call out GPIO devices on the board and provide a table mapping the GPIO to a GPIO host controller, a function, and a connector pinout (if going off-board). 97 97 98 This hardware mapping is defined in the Linux kernel device-tree for Ventana (ie [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi arch/arm/boot/dts/imx6qdl-gw54xx.dtsi]) or in the kernel board-support file for other product families (file, ie [https://dev.openwrt.org/browser/trunk/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c arch/arm/mach-cns3xxx/laguna.c]). 99 100 If debugfs is enabled in the kernel (as it is on Gateworks BSP's) you can see a nice table of GPIO mapping via {{{/sys/kernel/debug/gpio}}}. Some examples: 101 * GW5400: 98 This hardware mapping is defined in the following files depending on board/family: 99 * Ventana: Linux kernel device-tree (ie [http://github.com/Gateworks/dts-newport]) 100 * Ventana: Linux kernel device-tree (ie [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi arch/arm/boot/dts/imx6qdl-gw54xx.dtsi]) 101 * Laguna: Linux kernel board-support files (ie [https://github.com/Gateworks/openwrt/blob/16.02/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c arch/arm/mach-cns3xxx/laguna.c]). 102 103 If debugfs is enabled in the kernel and mounted (as it is on Gateworks BSP's) you can see a nice table of GPIO mapping via {{{/sys/kernel/debug/gpio}}}. Some examples: 104 * Newport GW6400: 105 {{{#!bash 106 # cat /sys/kernel/debug/gpio 107 gpiochip1: GPIOs 448-463, parent: i2c/0-0023, pca9555, can sleep: 108 109 gpiochip0: GPIOs 464-511, parent: pci/0000:00:06.0, gpio_thunderx: 110 gpio-472 ( |mmc_supply_3v3 ) out hi 111 gpio-478 ( |user2 ) out lo 112 gpio-495 ( |user1 ) out lo 113 }}} 114 * Ventana GW5400: 102 115 {{{#!bash 103 116 # cat /sys/kernel/debug/gpio … … 128 141 }}} 129 142 * Note that this does not show GPIO's that are not used by Linux drivers such as USB HUB reset, Ethernet PHY reset, etc. 130 * GW2388:143 * Laguna GW2388: 131 144 {{{#!bash 132 145 # cat /sys/kernel/debug/gpio … … 146 159 gpio-115 (user1 ) out hi 147 160 }}} 148 * GW2387:161 * Laguna GW2387: 149 162 {{{#!bash 150 163 # cat /sys/kernel/debug/gpio … … 167 180 168 181 Product Family specific notes: 182 * Newport: 183 - CN80XX GPIOs: The CN80XX has one 48bit GPIO controller 184 - GPIO![0-48]: gpio-464 to gpio-511 169 185 * Ventana: 170 186 - IMX6 GPIOs: The IMX6 has 7 32bit GPIO controllers for a possible 224 fast ARM based GPIO's … … 189 205 - additional i2c based GPIO port-expanders present on some boards would begin at gpio116 190 206 207 Note that the Linux gpio mapping is not guaranteed to remain constant across kernel versions. Care should be taken to consult {{{/sys/kernel/debug/gpio}}} and {{{/sys/class/gpio}}} when changing kernel versions. 191 208 192 209 When referring to [http://www.gateworks.com/usermanuals Gateworks board user hardware manuals] you will need to translate the hardware pin name to a gpio using the information above. Some examples: 210 * Newport GPIO8 would be the 8th IO on the CN80XX GPIO controller thus map to gpio-472. 193 211 * Laguna GPIOA8 would be the 9th IO on the GPIOA controller (the first is GPIOA0) thus map to gpio 0+8 = gpio-8 194 212 * Laguna GPIOB1 would be the 2nd IO on the GPIOB controller thus map to gpio 32+2 = gpio-34 … … 448 466 * [wiki:OpenWrt/gpio GPIO in OpenWrt] 449 467 * [wiki:ventana/DigitalIO Ventana product family Digital I/O] 468 * [wiki:newport/DigitalIO Newport product family Digital I/O]