Adding SCFW API to u-boot

To enable the virtual WDT in the SCFW, modify board.c in board_system_config(). The SCFW Porting Guide recommends using the internal SCFW APIs to enable the software WDT as below for the boot partition or M4. Alternatively, use the SCFW WDT APIs and WDT driver in uboot if available to enable the WDT on IMX8X Apalis.

— a/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.c
+++ b/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.c
@@ -987,6 +987,18 @@ void board_system_config(sc_bool_t early, sc_rm_pt_t pt_boot)
BRD_ERR(rm_assign_resource(pt_m4_0, pt_sh, SC_R_M4_0_PID3));
BRD_ERR(rm_assign_resource(pt_m4_0, pt_sh, SC_R_M4_0_PID4));

+/* Adding virtual WDT to boot partition */
+timer_set_wdog_timeout(pt_boot, 120000);
+timer_set_wdog_action(SC_PT, pt_boot, SC_TIMER_WDOG_ACTION_BOARD);
+timer_start_wdog(pt_boot, 0);
+
+// Alternatively set WDT for the m4
++// timer_set_wdog_timeout(pt_m4_0, 120000);
+// timer_set_wdog_action(pt_boot, pt_m4_0, SC_TIMER_WDOG_ACTION_BOARD);
+// timer_start_wdog(pt_m4_0, SC_TRUE);
+

Also follow the release notes:

Note by default the SC hardware WDT is enabled by default to protect the SCU, SCFW, and SECO according to the SCFW Porting Guide. The SCFW virtual WDTs are not enabled by default. Also the SCFW enables and services the PMIC WDOG by default in board.c and does a hard reset. See the PF8100 PMIC datasheet and SCFW board.c pf8100_pmic_wdog_enable() for details.

This can be closed.