GPIO pinmux configuration
There is 'qca_mux_ctl' utility that can configure GPIO pinmux settings. It is included in default 8devices firmware image. Config is saved in /etc/qca_mux_conf.json
file and applied by running qca_mux_ctl
command.
Example configs
Second UART port
/etc/qca_mux_conf.json
{ "mux_list": [ {"gpio" : 21, "signal_direction": "IN", "gpio_direction" : "IN","signal": "UART1_RD"}, {"gpio" : 22, "signal_direction": "OUT", "gpio_direction" : "OUT","signal": "UART1_TD"} ], "functions": [ ] }
Serial port is available at /dev/ttyATH0
Quick test: echo AAAA > /dev/ttyATH0
Terminal:
opkg update opkg install picocom picocom -b 115200 /dev/ttyATH0
I2C
/etc/qca_mux_conf.json
{ "mux_list": [ {"gpio" : 21, "signal_direction": "IN", "gpio_direction" : "OUT","signal": "I2C_DATA"}, {"gpio" : 21, "signal_direction": "OUT", "gpio_direction" : "OUT","signal": "I2C_DATA"}, {"gpio" : 22, "signal_direction": "OUT", "gpio_direction" : "OUT","signal": "I2C_CLK"} ], "functions": [ ] }