uartf - fixed

lounge.sw
 
Posts: 1
Joined: Tue Jun 28, 2016 5:35 pm

uartf - fixed

Tue Jun 28, 2016 6:38 pm

EDIT 30 June--Fixed, the uartf works fine with the VOCORE.dts file in the post below. The problem was caused by something else entirely, and I had the uartf working shortly after I made this post, so please consider this question answered and use the post for information only. Thanks! -- l.sw

Hello, has anyone been able to get uartf to work? I have been trying with OpenWRT 15.05 using the following guides--VoCore: Two UARTs, and Uartf without losing gpio11, 12, 13, 14, and while taking note of Schematic mistake - UARTL_RXD2 and UARTF_RXD interchange and taking the header pin from the PCB layout PDF.

After following these references and some others that I found scattered around, I have only been able to get the TX line of uartf working. The RX line is not working, and with my latest VOCORE.dts attempt my multimeter says that the line is being held low which I believe is not the correct idle state for a UART line.

If anyone has been able to get this working I would apprieciate any help, I am not an OpenWRT or embedded Linux expert but I'm getting better at it ; ) Below is some OpenWRT message output and then my VOCORE.dts. I am also using the pinctrl code modifications from noblepepper's post linked above (allow_functions_use_multiple_groups.patch).

Code: Select all
dmesg|grep uart
[    0.130000] rt2880-pinmux pinctrl: found group selector 4 for uartf_high
[    0.480000] rt2880-pinmux pinctrl: found group selector 5 for uartlite
[    0.480000] rt2880-pinmux pinctrl: request pin 15 (io15) for 10000c00.uartlite
[    0.480000] rt2880-pinmux pinctrl: request pin 16 (io16) for 10000c00.uartlite
[    0.490000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    0.540000] rt2880-pinmux pinctrl: found group selector 3 for uartf_low
[    0.540000] rt2880-pinmux pinctrl: request pin 7 (io7) for 10000500.uart
[    0.540000] rt2880-pinmux pinctrl: request pin 8 (io8) for 10000500.uart
[    0.540000] rt2880-pinmux pinctrl: request pin 9 (io9) for 10000500.uart
[    0.540000] rt2880-pinmux pinctrl: request pin 10 (io10) for 10000500.uart
[    0.540000] 10000500.uart: ttyS1 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a 16550A


Code: Select all
dmesg|grep pinmux
[    0.130000] rt2880-pinmux pinctrl: try to register 28 pins ...
[    0.130000] pinctrl core: registered pin 0 (io0) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 1 (io1) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 2 (io2) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 3 (io3) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 4 (io4) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 5 (io5) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 6 (io6) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 7 (io7) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 8 (io8) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 9 (io9) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 10 (io10) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 11 (io11) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 12 (io12) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 13 (io13) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 14 (io14) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 15 (io15) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 16 (io16) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 17 (io17) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 18 (io18) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 19 (io19) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 20 (io20) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 21 (io21) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 22 (io22) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 23 (io23) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 24 (io24) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 25 (io25) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 26 (io26) on rt2880-pinmux
[    0.130000] pinctrl core: registered pin 27 (io27) on rt2880-pinmux
[    0.130000] pinctrl core: add 3 pinmux maps
[    0.130000] rt2880-pinmux pinctrl: found group selector 6 for jtag
[    0.130000] rt2880-pinmux pinctrl: found group selector 7 for led
[    0.130000] rt2880-pinmux pinctrl: found group selector 4 for uartf_high
[    0.130000] rt2880-pinmux pinctrl: request pin 17 (io17) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 18 (io18) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 19 (io19) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 20 (io20) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 21 (io21) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 22 (io22) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 23 (io23) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 24 (io24) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 25 (io25) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 26 (io26) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 11 (io11) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 12 (io12) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 13 (io13) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: request pin 14 (io14) for pinctrl
[    0.130000] rt2880-pinmux pinctrl: failed to lookup the sleep state
[    0.450000] rt2880-pinmux pinctrl: request pin 0 (io0) for pio:0
[    0.450000] rt2880-pinmux pinctrl: request pin 11 (io11) for pio:11
[    0.450000] rt2880-pinmux pinctrl: request pin 12 (io12) for pio:12
[    0.450000] rt2880-pinmux pinctrl: request pin 13 (io13) for pio:13
[    0.450000] rt2880-pinmux pinctrl: request pin 14 (io14) for pio:14
[    0.450000] rt2880-pinmux pinctrl: request pin 17 (io17) for pio:17
[    0.450000] rt2880-pinmux pinctrl: request pin 18 (io18) for pio:18
[    0.450000] rt2880-pinmux pinctrl: request pin 19 (io19) for pio:19
[    0.450000] rt2880-pinmux pinctrl: request pin 20 (io20) for pio:20
[    0.450000] rt2880-pinmux pinctrl: request pin 21 (io21) for pio:21
[    0.460000] rt2880-pinmux pinctrl: request pin 22 (io22) for pio:22
[    0.460000] rt2880-pinmux pinctrl: request pin 23 (io23) for pio:23
[    0.460000] rt2880-pinmux pinctrl: request pin 24 (io24) for pio:24
[    0.460000] rt2880-pinmux pinctrl: request pin 25 (io25) for pio:25
[    0.460000] rt2880-pinmux pinctrl: request pin 26 (io26) for pio:26
[    0.480000] pinctrl core: add 1 pinmux maps
[    0.480000] rt2880-pinmux pinctrl: found group selector 5 for uartlite
[    0.480000] rt2880-pinmux pinctrl: request pin 15 (io15) for 10000c00.uartlite
[    0.480000] rt2880-pinmux pinctrl: request pin 16 (io16) for 10000c00.uartlite
[    0.540000] pinctrl core: add 1 pinmux maps
[    0.540000] rt2880-pinmux pinctrl: found group selector 3 for uartf_low
[    0.540000] rt2880-pinmux pinctrl: request pin 7 (io7) for 10000500.uart
[    0.540000] rt2880-pinmux pinctrl: request pin 8 (io8) for 10000500.uart
[    0.540000] rt2880-pinmux pinctrl: request pin 9 (io9) for 10000500.uart
[    0.540000] rt2880-pinmux pinctrl: request pin 10 (io10) for 10000500.uart
[    0.560000] pinctrl core: add 1 pinmux maps
[    0.560000] pinctrl core: add 1 pinmux maps
[    0.560000] rt2880-pinmux pinctrl: found group selector 1 for spi
[    0.560000] rt2880-pinmux pinctrl: found group selector 8 for spi_cs1
[    0.560000] rt2880-pinmux pinctrl: request pin 3 (io3) for 10000b00.spi
[    0.560000] rt2880-pinmux pinctrl: request pin 4 (io4) for 10000b00.spi
[    0.560000] rt2880-pinmux pinctrl: request pin 5 (io5) for 10000b00.spi
[    0.560000] rt2880-pinmux pinctrl: request pin 6 (io6) for 10000b00.spi
[    0.560000] rt2880-pinmux pinctrl: request pin 27 (io27) for 10000b00.spi
[   82.140000] pinctrl core: add 1 pinmux maps
[   82.140000] rt2880-pinmux pinctrl: found group selector 0 for i2c
[   82.140000] rt2880-pinmux pinctrl: request pin 1 (io1) for 10000900.i2c
[   82.140000] rt2880-pinmux pinctrl: request pin 2 (io2) for 10000900.i2c


VOCORE.dts

Code: Select all
/dts-v1/;
/ {
        palmbus@10000000 {
                uartlite@c00 {
                        status = "okay";
                };
        };
};
/include/ "rt5350.dtsi"

/ {
        compatible = "VoCore", "ralink,rt5350-soc";
        model = "VoCore";

        palmbus@10000000 {
                sysc@0 {
                        ralink,pinmux = "spi", "uartlite", "jtag", "mdio", "sdram", "rgmii";
                        ralink,gpiomux = "i2c";
                        ralink,uartmux = "gpio uartf";
                        ralink,wdtmux = <1>;
                };
                uart@500 {
                        compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a";
                        reg = <0x500 0x100>;
                        interrupt-parent = <&intc>;
                        interrupts = <5>;
                        reg-shift = <2>;
                        status = "okay";
                };
                gpio1: gpio@660 {
                        status = "okay";
                };

                i2c@900 {
                        status = "okay";
                };

                spi@b00 {
                        status = "okay";

                        m25p80@0 {
                                #address-cells = <1>;
                                #size-cells = <1>;
                                compatible = "s25fl064k";
                                reg = <0>;
                                linux,modalias = "m25p80", "s25fl064k";
                                spi-max-frequency = <10000000>;

                                partition@0 {
                                        label = "uboot";
                                        reg = <0x0 0x30000>;
                                        read-only;
                                };

                                partition@30000 {
                                        label = "uboot-env";
                                        reg = <0x30000 0x10000>;
                                        read-only;
                                };

                                factory: partition@40000 {
                                        label = "factory";
                                        reg = <0x40000 0x10000>;
                                        read-only;
                                };

                                partition@50000 {
                                        label = "firmware";
                                        reg = <0x50000 0xfb0000>;
                                };
                        };

                        spidev@1 {
                                compatible = "linux,spidev";
                                spi-max-frequency = <10000000>;
                                reg = <1>;
                        };
                };
        };

        pinctrl {
                uartf_pins: uartf {
                        uartf {
                                ralink,group = "uartf_low";
                                ralink,function = "gpio uartf";
                        };
                };
                state_default: pinctrl0 {
                        gpio {
                                ralink,group = "jtag", "led", "uartf_high";
                                ralink,function = "gpio";
                        };
                };
        };

        ethernet@10100000 {
                mtd-mac-address = <&factory 0x4>;
        };

        esw@10110000 {
                ralink,portmap = <0x17>;
        };

        wmac@10180000 {
                ralink,mtd-eeprom = <&factory 0>;
        };

        ehci@101c0000 {
                status = "okay";
        };

        ohci@101c1000 {
                status = "okay";
        };

        gpio-export {
                compatible = "gpio-export";
                #size-cells = <0>;

                gpio0 {
                        gpio-export,name = "gpio0";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 0 0>;
                };

                /* UARTF */
                gpio11 {
                        /* UARTF_DTR_N */
                        gpio-export,name = "gpio11";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 11 0>;
                };
                gpio12 {
                        /* UARTF_DCD_N */
                        gpio-export,name = "gpio12";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 12 0>;
                };
                gpio13 {
                        /* UARTF_DSR_N */
                        gpio-export,name = "gpio13";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 13 0>;
                };
                gpio14 {
                        /* UARTF_RIN */
                        gpio-export,name = "gpio14";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 14 0>;
                };

                /* JTAG */
                gpio17 {
                        /* JTAG_TDO */
                        gpio-export,name = "gpio17";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 17 0>;
                };
                gpio18 {
                        /* JTAG_TDI */
                        gpio-export,name = "gpio18";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 18 0>;
                };
                gpio19 {
                        /* JTAG_TMS */
                        gpio-export,name = "gpio19";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 19 0>;
                };
                gpio20 {
                        /* JTAG_TCLK */
                        gpio-export,name = "gpio20";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 20 0>;
                };
                gpio21 {
                        /* JTAG_TRST_N */
                        gpio-export,name = "gpio21";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio0 21 0>;
                };

                /* ETH LEDs */
                gpio22 {
                        /* ETH0_LED */
                        gpio-export,name = "gpio22";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio1 0 0>;
                };
                gpio23 {
                        /* ETH1_LED */
                        gpio-export,name = "gpio23";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio1 1 0>;
                };
                gpio24 {
                        /* ETH2_LED */
                        gpio-export,name = "gpio24";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio1 2 0>;
                };
                gpio25 {
                        /* ETH3_LED */
                        gpio-export,name = "gpio25";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio1 3 0>;
                };
                gpio26 {
                        /* ETH4_LED */
                        gpio-export,name = "gpio26";
                        gpio-export,direction_may_change = <1>;
                        gpios = <&gpio1 4 0>;
                };
        };

        gpio-leds {
                compatible = "gpio-leds";
                status {
                        /* UARTF_RXD */
                        label = "vocore:green:status";
                        gpios = <&gpio0 0 0>;
                };
                eth {
                        /* UARTF_DTR_N */
                        label = "vocore:orange:eth";
                        gpios = <&gpio0 4 0>;
                };
        };
};

Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: Bing [Bot] and 3 guests