Daily Archives: 2014-10-12

VoCore: Two UARTs

Enable two UARTs for VoCore, one UART lite, one UART full.
Just need to change DTS a little:(VOCORE.dts under openwrt source code)

First, enable uart@500

uart@500 {
    status = "okay";

Then, remove uartf from ralink,group:gpio.

pinctrl {
    state_default: pinctrl0 {
        gpio {
            ralink,group = "jtag", "led"; -> remove "uartf"
            ralink,function = "gpio";

Finally, delete the code that export uartf as gpio:
in gpio-export section, remove gpio7, gpio8, gpio9, gpio10, gpio11, gpio12, gpio13, gpio14. If we keep them will get some error in log, but no effect to system boot.
PS: find a possible bug here, gpio10 and gpio11 are missed 🙂

Now good news is the two UARTs work same time, bad news is we lose eight gpio. 😉
Hope one day a hero will make a new rt5350-uart driver, so that allows ralink-function=”uartf,gpio”, then we can save 4 gpios. It is a good chance to practise Linux driver code. 😀