User Tools

Site Tools


doc:hardware:port.gpio
>>>>> Wiki-merge in process >>>>> wiki.openwrt.org + openwrt.org are going to be merged soon, this wiki therefore being read only. Once pages are transfered to openwrt.org, you can edit them again.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
doc:hardware:port.gpio [2017/09/17 15:54]
Lin-Buo-Ren [Hardware] Fix typoes
doc:hardware:port.gpio [2017/09/18 18:43]
tmomas
Line 43: Line 43:
 Many times some GPIOs cannot be controlled by the kernel because they are multiplexed,​ and they are not acting as GPIOs. It might be possible to undo the multiplexing by writing some particular software programmable register settings, and then recover the GPIO functionality. But probably on most cases those GPIOs were multiplexed for some good reason, like using a [[doc/​hardware/​soc|SoC]] pin  for a signal on an ethernet phy, SPI, PCI, UART or another purpose. Many times some GPIOs cannot be controlled by the kernel because they are multiplexed,​ and they are not acting as GPIOs. It might be possible to undo the multiplexing by writing some particular software programmable register settings, and then recover the GPIO functionality. But probably on most cases those GPIOs were multiplexed for some good reason, like using a [[doc/​hardware/​soc|SoC]] pin  for a signal on an ethernet phy, SPI, PCI, UART or another purpose.
  
-  * Example 1: on the Broadcom BCM6328 SoC, GPIO pins 25, 26, 27 and 28 are used to indicate the LAN activity with hardware controlled LEDs. The memory register for setting this multiplexing is at 0x1000009C address, 64bits wide. Let's read it in Openwrt\\ ''<​color grey>​root@OpenWrt:/#​ devmem 0x1000009C 64+  * Example 1: on the Broadcom BCM6328 SoC, GPIO pins 25, 26, 27 and 28 are used to indicate the LAN activity with hardware controlled LEDs. The memory register for setting this multiplexing is at 0x1000009C address, 64bits wide. Let's read it in OpenWrt\\ ''<​color grey>​root@OpenWrt:/#​ devmem 0x1000009C 64
 0x0154000000000000</​color>''​\\ {{:​media:​doc:​hardware:​bcm6328-lan-led_pinmux-bits.png?​nolink|}}\\ These enabled bits are enabling every LAN LED to be controlled by hardware, therefore they cannot be controlled as regular GPIO'​s\\ ​ Let's disable this multiplexing for all LEDs\\ ''<​color grey>​root@OpenWrt:/#​ devmem 0x1000009C 64 0x0</​color>''​\\ Now we can export these GPIOs and control them via software. 0x0154000000000000</​color>''​\\ {{:​media:​doc:​hardware:​bcm6328-lan-led_pinmux-bits.png?​nolink|}}\\ These enabled bits are enabling every LAN LED to be controlled by hardware, therefore they cannot be controlled as regular GPIO'​s\\ ​ Let's disable this multiplexing for all LEDs\\ ''<​color grey>​root@OpenWrt:/#​ devmem 0x1000009C 64 0x0</​color>''​\\ Now we can export these GPIOs and control them via software.
  
doc/hardware/port.gpio.txt · Last modified: 2017/09/18 18:43 by tmomas