Ok so I was able to mux the pins correctly in the Linux kernel for UART2 (/dev/ttyO1) and get all 4 I/O lines working (TX,RX,CTS,RTS). Now I need to do the same thing for UART1 (/dev/ttyO0), but that port isn’t working as easily as UART2 did, and I suspect it has something to do with the digital video lines (DSS_DATA*).
My Linux distribution is Ubuntu, and my baseline kernel is the RCN-EE kernel.
Basically my pin muxing is as follows for UART1 (/dev/ttyO0):
OMAP3_MUX(DSS_DATA7,OMAP_MUX_MODE2 | OMAP_PIN_INPUT), /* uart1_rx /
OMAP3_MUX(DSS_DATA6,OMAP_MUX_MODE2 | OMAP_PIN_OUTPUT), / uart1_tx /
OMAP3_MUX(DSS_DATA0,OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), / uart1_cts /
OMAP3_MUX(DSS_DATA1,OMAP_MUX_MODE2 | OMAP_PIN_OUTPUT), / uart1_rts */
The above is the code I inserted into the omap_board_mux[] array in board-omap3beagle.c. As you can see, the UART1 pins a muxed with the DSS_DATA* pins for the digital video controller. I know the pins are getting muxed because I can do this:
cd /sys/kernel/debug/omap_mux
cat dss_data7 dss_data6 dss_data0 dss_data1
name: dss_data7.uart1_rx (0x480020ea/0x0ba = 0x0102), b f28, t NA
mode: OMAP_PIN_INPUT | OMAP_MUX_MODE2
signals: dss_data7 | NA | uart1_rx | NA | gpio_77 | NA | NA | safe_mode
name: dss_data6.uart1_tx (0x480020e8/0x0b8 = 0x0002), b e26, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE2
signals: dss_data6 | NA | uart1_tx | NA | gpio_76 | NA | NA | safe_mode
name: dss_data0.uart1_cts (0x480020dc/0x0ac = 0x011a), b ag22, t NA
mode: OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE2
signals: dss_data0 | NA | uart1_cts | NA | gpio_70 | NA | NA | safe_mode
name: dss_data1.uart1_rts (0x480020de/0x0ae = 0x0002), b ah22, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE2
signals: dss_data1 | NA | uart1_rts | NA | gpio_71 | NA | NA | safe_mode
The above output from the /sys area shows the 4 pins for UART1 being in the correct mux mode, which is mux mode 2.
So UART1 (/dev/ttyO0) should work from Linux right? It doesn’t (UART2 continues to work correctly though). The only pin that works on UART1 is the TX transmitter pin. I can write data to the /dev/ttyO0 port and see it on the DSO for the TX pin. However, when I set RTS on /dev/ttyO0 from Linux, nothing happens on the DSO for the RTS pin. When I short CTS to ground, I don’t see a change when reading the status of CTS for /dev/ttyO0 in Linux. When I short TX to RX to form a loopback, and then transmit data, I see video signals (DSS_DATA) on the DSO. This suggests that the HDMI video is overriding my mux settings somewhere, because sometimes I see video signaling on my pins.
All of this works fine with my muxing for UART2 (/dev/ttyO1).
Is there a way to disable the HDMI video in the Linux kernel, so it doesn’t try to use my UART1 pins? Should I need to disable the video?
What’s really stange is that when I boot my kernel with the above pin muxing, the HDMI video output connect on the BB-xM still works with my computer monitor (I would expect it not to work at all). Stranger, the video always has a background color of “blue”. Without the pin muxing, the background color of the video is “black”, as expected.
So something strange is going on… Can anyone offer help on disabling the video in the Linux kernel?
Thanks in advance,
-Eric