Skip to content

Instantly share code, notes, and snippets.

@jgibbard
Last active January 21, 2025 21:44
Show Gist options
  • Save jgibbard/bec93623d0aa28d27cd1a2bf1803032a to your computer and use it in GitHub Desktop.
Save jgibbard/bec93623d0aa28d27cd1a2bf1803032a to your computer and use it in GitHub Desktop.
DE10 Nano - HPS2FPGA Bridge

DE10 Nano with Soft UART and GPIO

Using the Quartus Project here: https://github.com/jgibbard/de10_nano_clean/tree/with_fpga_leds_and_uart

Follow the instructions here: https://gibbard.me/linux_debian_de10_2025/ but do the following things differently:

Device Tree Modifications

Before building the kernel make the following modification to the device tree:

gedit linux/arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts 

Following under the leds device but still within the main {} brackets:

	uart_altr: uart@ff200000 {
	    compatible = "altr,uart-1.0";
	    reg = <0xff200000 0x20>;
	    clock-frequency = <50000000>;
	    interrupt-parent = <&intc>;
        interrupts = <0 40 4>;
	};

	gpio_altr: gpio@ff200020 {
	    compatible = "altr,pio-1.0";
	    reg = <0xff200020 0x20>;
	    altr,ngpio = <8>;
	    #gpio-cells = <2>;
	    gpio-controller;
    };

Then add the folling in the bottom section of the file (outside of the main {} brackets:

&fpga_bridge0 {
    status = "okay";
    bridge-enable = <1>;
};

Kernel Modifications

Enable the following option:

Device Drivers -> Character Devices -> Serial Devices -> Altera UART Support

Other useful info

Setup USB Blaster on development host

This is needed when programming the FPGA using quartus on Linux

sudo nano /etc/udev/rules.d/92-usbblaster.rules

Add the following:

# USB-Blaster
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0666"

SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0666"

# USB-Blaster II
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0666"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment