summaryrefslogtreecommitdiffstats
path: root/sys/mips/conf
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2012-08-25 22:35:29 +0000
committerrwatson <rwatson@FreeBSD.org>2012-08-25 22:35:29 +0000
commite08ff303c902f834a35dabf8400b41d80d628051 (patch)
tree3e28595bf2655db19f449d3fff418afa3c3779b7 /sys/mips/conf
parentfde748f681bb53f2db1ffd4a506727b86881bed6 (diff)
downloadFreeBSD-src-e08ff303c902f834a35dabf8400b41d80d628051.zip
FreeBSD-src-e08ff303c902f834a35dabf8400b41d80d628051.tar.gz
Add terasic_mtl(4), a device driver for the Terasic Multi-Touch LCD,
used with Terasic's DE-4 and other similar FPGA boards. This display is 800x480 and includes a capacitive touch screen, multi-touch gesture recognition, etc. This device driver depends on a Cambridge- provided IP core that allows the MTL device to be hooked up to the Altera Avalon SoC bus, and also provides a VGA-like text frame buffer. Although it is compiled as a single device driver, it actually implements a number of different device nodes exporting various aspects of this multi-function device to userspace: - Simple memory-mapped driver for the MTL 24-bit pixel frame buffer. - Simple memory-mapped driver for the MTL control register set. - Simple memory-mapped driver for the MTL text frame buffer. - syscons attachment for the MTL text frame buffer. This driver attaches directly to Nexus as is common for SoC device drivers, and for the time being is considered BERI-specific, although in principle it might be used with other hard and soft cores on Altera FPGAs. Control registers, including touchscreen input, are simply memory mapped; in the future it would be desirable to hook up a more conventional device node that can stream events, support kqueue(2)/ poll(2)/select(2), etc. This is the first use of syscons on MIPS, as far as I can tell, and there are some loose ends, such as an inability to use the hardware cursor. More fundamentally, it appears that syscons(4) assumes that either a host is PC-like (i386, amd64) *or* it must be using a graphical frame buffer. While the MTL supports a graphical frame buffer, using the text frame buffer is preferable for console use. Fixing this issue in syscons(4) requires non-trivial changes, as the text frame buffer support assumes that direct memory access can be done to the text frame buffer without using bus accessor methods, which is not the case on MIPS. As a workaround for this, we instead double-buffer and pretend to be a graphical frame buffer exposing text accessor methods, leading to some quirks in syscons behaviour. Sponsored by: DARPA, AFRL
Diffstat (limited to 'sys/mips/conf')
-rw-r--r--sys/mips/conf/BERI_DE4.hints11
-rw-r--r--sys/mips/conf/BERI_DE4_MDROOT3
-rw-r--r--sys/mips/conf/BERI_DE4_SDROOT3
3 files changed, 15 insertions, 2 deletions
diff --git a/sys/mips/conf/BERI_DE4.hints b/sys/mips/conf/BERI_DE4.hints
index 4ffe6c2..b2a0e0a 100644
--- a/sys/mips/conf/BERI_DE4.hints
+++ b/sys/mips/conf/BERI_DE4.hints
@@ -25,6 +25,17 @@ hint.altera_sdcardc.0.maddr=0x7f008000
hint.altera_sdcardc.0.msize=0x400
#
+# Terasic Multi-touch LCD (MTL), an optional feature in DE-4 configurations.
+#
+hint.terasic_mtl.0.at="nexus0"
+hint.terasic_mtl.0.reg_maddr=0x70400000
+hint.terasic_mtl.0.reg_msize=0x1000
+hint.terasic_mtl.0.pixel_maddr=0x70000000
+hint.terasic_mtl.0.pixel_msize=0x177000
+hint.terasic_mtl.0.text_maddr=0x70177000
+hint.terasic_mtl.0.text_msize=0x2000
+
+#
# BERI Hardware Version ROM
#
hint.altera_avgen.0.at="nexus0"
diff --git a/sys/mips/conf/BERI_DE4_MDROOT b/sys/mips/conf/BERI_DE4_MDROOT
index 658c925..75d9b4e 100644
--- a/sys/mips/conf/BERI_DE4_MDROOT
+++ b/sys/mips/conf/BERI_DE4_MDROOT
@@ -24,6 +24,7 @@ options ROOTDEVNAME=\"ufs:md0\"
device altera_avgen
device altera_jtag_uart
device altera_sdcard
+device terasic_mtl
device isf
-#device sc
+device sc
diff --git a/sys/mips/conf/BERI_DE4_SDROOT b/sys/mips/conf/BERI_DE4_SDROOT
index b41e6ff..a638e46 100644
--- a/sys/mips/conf/BERI_DE4_SDROOT
+++ b/sys/mips/conf/BERI_DE4_SDROOT
@@ -17,6 +17,7 @@ options ROOTDEVNAME=\"ufs:altera_sdcard0\"
device altera_avgen
device altera_jtag_uart
device altera_sdcard
+device terasic_mtl
device isf
-#device sc
+device sc
OpenPOWER on IntegriCloud