freebsd-skq/sys/mips/conf/BERI_DE4.hints

112 lines
2.7 KiB
Plaintext
Raw Normal View History

# $FreeBSD$
#
# Altera JTAG UARTs configured for console, debugging, and data putput on the
# Terasic DE-4.
#
hint.altera_jtag_uart.0.at="nexus0"
hint.altera_jtag_uart.0.maddr=0x7f000000
hint.altera_jtag_uart.0.msize=0x40
hint.altera_jtag_uart.0.irq=0
hint.altera_jtag_uart.1.at="nexus0"
hint.altera_jtag_uart.1.maddr=0x7f001000
hint.altera_jtag_uart.1.msize=0x40
hint.altera_jtag_uart.2.at="nexus0"
hint.altera_jtag_uart.2.maddr=0x7f002000
hint.altera_jtag_uart.2.msize=0x40
#
# On-board DE4 and tPad SD Card IP core
#
hint.altera_sdcardc.0.at="nexus0"
hint.altera_sdcardc.0.maddr=0x7f008000
hint.altera_sdcardc.0.msize=0x400
#
# On-board DE4 8-element LED
#
hint.terasic_de4led.0.at="nexus0"
hint.terasic_de4led.0.maddr=0x7f006000
hint.terasic_de4led.0.msize=1
hint.terasic_de4led.0.de4led_0_cmd="f9"
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
2012-08-25 22:35:29 +00:00
#
# 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"
hint.altera_avgen.0.maddr=0x7F00A000
hint.altera_avgen.0.msize=20
hint.altera_avgen.0.width=4
hint.altera_avgen.0.fileio="rw"
hint.altera_avgen.0.devname="berirom"
#
# Expose the DE4 flash via an Avalon "generic" device.
# This is incompatible with the isf(4) driver.
#
#hint.altera_avgen.0.at="nexus0"
#hint.altera_avgen.0.maddr=0x74000000
#hint.altera_avgen.0.msize=0x4000000
#hint.altera_avgen.0.width=2
#hint.altera_avgen.0.fileio="rw"
#hint.altera_avgen.0.mmapio="rwx"
#hint.altera_avgen.0.devname="de4flash"
#
# Expose the DE4 buttons and switches via an Avalon "generic" device.
#
hint.altera_avgen.0.at="nexus0"
hint.altera_avgen.0.maddr=0x7f009000
hint.altera_avgen.0.msize=2
hint.altera_avgen.0.width=1
hint.altera_avgen.0.fileio="r"
hint.altera_avgen.0.devname="de4bsw"
#
# General Intel StrataFlash driver
#
hint.isf.0.at="nexus0"
hint.isf.0.maddr=0x74000000
hint.isf.0.msize=0x2000000
hint.isf.1.at="nexus0"
hint.isf.1.maddr=0x76000000
hint.isf.1.msize=0x2000000
# Reserved configuration blocks. Don't touch.
hint.map.0.at="isf0"
hint.map.0.start=0x00000000
hint.map.0.end=0x00020000
hint.map.0.name="config"
hint.map.0.readonly=1
# Hardwired location of bitfile
hint.map.1.at="isf0"
hint.map.1.start=0x00020000
hint.map.1.end=0x01820000
hint.map.1.name="fpga"
# Kernel on first chip
hint.map.2.at="isf0"
hint.map.2.start=0x01820000
hint.map.2.end=0x02000000
hint.map.2.name="reserved"
# The second chip
hint.map.3.at="isf1"
hint.map.3.start=0x00000000
hint.map.3.end=0x02000000
hint.map.3.name="kernel"