v8rush wrote:On a more general note, how does the AR9331 handle PIO muxing - is the GPIO_FUNCTION register a centralised pin-function register, or are they spread over the subsystems (eg ethernet, RF...). If the former, then I guess there's the possibility of freeing up even more GPIOs quite easily.
Check out
http://gpl.back2roots.org/source/fritzb … 240/gpio.c
http://gpl.back2roots.org/source/fritzb … 0/ar7240.h
http://gpl.back2roots.org/source/fritzb … 0/ar933x.h
... some of these german gateway devices (Fritzbox) seems to have utilized more of the ar71xx functionality, and their GPL release has some stuff I haven't seen in other places.You can grab the whole kernel too: http://gpl.back2roots.org/source/fritzb … nel.tar.gz
There seems to be one register at GPIO_BASE (0x18040000) that selects a pin as input or output, then several function select/mux registers that are rather complicated at GPIO_BASE + 0x28 - 0x40. Some examples of how certain functions get set up are in the above gpio.c file within ar7240_gpio_setup_pin_mode. This could be useful for enabling more GPIOs, but also for using some of the other functions (JTAG, I2S, SPI)
Thanks for the links!
(Last edited by Squonk on 16 Aug 2012, 06:07)