Verify BSP settings
I am developing a system using Cyclone V under Linux OS.
Up to now I was focused on rebuilding of the kernel and device tree. The device tree that is loaded contains the HPS peripherals I am looking for with status = "okay"; but the devices do not seem to work. Also cat /proc/interrupts doesn't seem to be showing interrupts associated with some of the peripherals. Would that likely be an issue with my device tree or could that be that the HW is not enabled in my BSP (that I didn't touch since I started with the GHRD). In case of the UART (serial1) I clearly have a Linux driver running on serial0 so I should be covered there.
I realize that the BSP code embedded into the u-boot is responsible for bring-up of the HPS resources that will be used by the kernel drivers.
- Is there a way to verify that the resource (such as "serial1") is actually enabled from within a running OS?
- Can one enable a HPS module during run-time or is the bootloader the only place?
Thanks - Martin
Got that one resolved!
I decided to re-build bootloader and tried to follow the GSRD v14.0 - Generating and Compiling the Preloader
When I copied the binary to my uSD card the system didn't boot - likely some of the important details like partition type etc. I went back to my previous scripts that use mainline u-boot (branch v2019.07).
After some searching how the BSP specific information gets included into the u-boot-with-spl_DE0.sfp u-boot binary I discovered in the u-boot build tree the fileboard/terasic/de0-nano-soc/qts/pinmux_config.hI edited desired "...USEFPGA" values to "1"
abbreviated ...
1, /* UART1USEFPGA */ 0, /* CAN1USEFPGA */ 0, /* USB1USEFPGA */ 0, /* I2C3USEFPGA */ 1, /* I2C2USEFPGA */
...rebuilt the u-boot, placed on my uSD card and the previously failing kernel with corresponding drivers and device tree started to work as expected.
Hoping this may help someone else.
Martin