Knowledge Base Article

Why do the HPS Synopsys DesignWare APB timers fail to initialize in Linux* during the early boot stage in the FPGA HPS Embedded Software 25.1.1 and earlier?

Description

Due to an inadequate configuration in the Linux* device tree node for the HPS Synopsys DesignWare APB timers in Agilex® 3, Agilex® 5, and Agilex® 7 FPGA devices, the timers remain in reset and fail to initialize during the early driver probe stages in FPGA HPS Embedded Software 25.1.1 and earlier. This problem is observed even when the timers are enabled through CONFIG_DW_APB_TIMER=y and CONFIG_DW_APB_TIMER_OF=y and enabled in the device tree.

The root cause is that the timer driver is not a regular platform driver and does not support the probe/defer mechanism. The device tree timer nodes use a clock manager-dependent clock (clocks = <&clkmgr ...>; clock-names = "timer"), but the clock manager is not ready when the driver probes during early boot. As a result, timer initialization fails and the timers are unavailable during early boot.

Resolution

To work around this problem in FPGA HPS Embedded Software 25.1.1 and earlier, modify the clock configuration in each HPS timer node (timer0 through timer3) in the Linux device tree. Remove the clock manager reference (clocks and clock-names) and add clock-freq = <100000000> (100 MHz L4_SP clock).

The problem has been fixed starting with Quartus® Prime Pro Edition software version 25.3 (FPGA HPS Embedded Software). Reference device trees in linux-socfpga use clock-freq instead of clocks/clock-names from the clock manager.

Updated 4 months ago
Version 5.0
No CommentsBe the first to comment