Arrow SoCKit: Adding Altera UART to GSRD v 13.1

I’m a newbie in SoCKit programming, and I have the following problem: I
created GSRD v 13.1 SD card (using Arrow SoCKit Getting Started on the,
and it worked, but then I added UART RS-232 interface in FPGA to use it
in HPS, and now it hangs during boot. The last message of the boot log

Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled 
ffc02000.serial0: ttyS0 at MMIO 0xffc02000 (irq = 690) is a 8250 console
 [ttyS0] enabled

The board is Arrow sockit Rev C

What did I do to add UART:

  1. Added UART (RS-232 Serial Port) component in Qsys

  2. Connected clk, reset, s1, irq, create external connection

  3. Set start address as 0x0001_00e0.

  4. Clicked generate

  5. Compiled .sof

  6. Generated .rbf based on this .sof

  7. Generated Device Tree, based on new .sopcinfo.
    The new information in it is:

    my_uart: serial@0x1000100E0 {
    compatible = “ALTR,uart-13.1”, “ALTR,uart-1.0”, “altr,uart-1.0”;
    reg = < 0x00000001 0x000100E0 0x00000020 >;
    interrupt-parent = < &hps_0_arm_gic_0 >;
    interrupts = < 0 43 4 >;
    current-speed = < 115200 >; /* embeddedsw.dts.params.current-speed type NUMBER /
    clock-frequency = < 50000000 >; /
    embeddedsw.dts.params.clock-frequency type NUMBER */
    }; //end serial@0x1000100E0 (my_uart)

  8. Copied .rbf and .dbt to SD card

  9. Started linux boot, and it hanged as I said in the beginning.

Can anybody help me to understand what is the problem?

I suspect that the problem is the Altera UART driver, but I am not sure, and still do not know how to fix it.

Hi!!! It looks everything OK!
I have some questions!!
In step 5, do you mean you compile the whole project in quartus? After generate QSYS and finish you have to compile the whole project!
What do you have under chosen @ dts file??
Does the UART0 on the HPS still there?? (in qsys>hps_0>peripheral pins) or you removed it??

Hello! Thank you for your reply.
I do all steps from , so ,yes, I compiled the whole project.

I’m not sure that I added the UART component correct.
Steps 1, 2, 3 in a little bit detailed view (everything done in Qsys):

  1. Find UART component in Component Library. Add it to project using default settings.

  2. Renamed it as ‘my_uart’

  3. Double click within the export column associated with the external connection of this component to set external connection

  4. Connect:

    my_uart.clk -> clk_0.clk
    my_uart.reset -> clk_0.clk_reset
    my_uart.s1 -> hps_0.h2f_lw_axi_master , fpga_only_master.master
    my_uart.irq -> hps_0.f2h_irq0, intr_capturer_0.interrupt_receiver

  5. Select the Address Map tab and set new address ( 0x0001_00e0) in two columns: hps_0.h2f_lw_axi_master and fpga_only_master.master

  6. Save

  7. Generate Qsys

I deleted nothing, only added one component, so the UART0 on the HPS is still there.

I generated the device tree using

What I did for compiling Linux with Altera UART driver:

$ source ~/yocto/altera-init ~/yocto/build
$ bitbake -c menuconfig virtual/kernel
$ bitbake virtual/kernel
$ bitbake altera-gsrd-image
$ sudo dd if=~/yocto/build/tmp/deploy/images/altera-gsrd-image-socfpga_cyclone5.ext3 of=/dev/sdb2
$ cd ~
$ mkdir sdcard
$ sudo mount /dev/sdb1 ./sdcard
$ rm ./sdcard/zImage
$ cp ~/yocto/build/tmp/deploy/images/zImage ./sdcard
$ sudo umount ./sdcard
$ rmdir ./sdcard

In menuconfig I set [*] Altera Uart driver , 10 as maximum ports and 115200 as default baud rate.

A little bit later I’ll send you the link to my modified project, maybe you can find an error.

I created my first SD card for Arrow Sockit using this instruction and pre-built binaries
After that I replaced root file system, zImage, .rbf and .dtb files on my SD card. this is my Quartus project based on GSHR design, .ext3 and zImage files.

I guess this information may be helpful.

Sorry but I just dont have the time to look at your whole project and I can’t test it because I dont have a Arrow Board!
You have to try to isolate your problem!
for example:

Try first to create from the original project an SD image without changing nothing. That means, do everithing without changing the original project (generate qsys, finish, compile quartus, generate rbf, generate dts and dtb, bitbakes …etc ) Just to test everything your doing works!

Then if it works … Try for example to create a SD image without adding the UART in Qsys! Do Steps 5 - 9 with and without the changes in menuconfig. Then you will know if your error depends on the menuconfig configuration or in Steps 5-9.
Try also to change the max number of Uarts to 1! maybe!!

and so one!!
If you find something … write again!! I also want to know whats the problem!!

I am having a similar issue - rather than system hanging on boot, it is not performing the proper device binding. If you were able to get your problem resolved, can you please post here and elaborate on what you had to do to fix it? thanks!