hex "i.MX auxiliary core dram memory size"
default 0
+config PSCI_BOARD_REBOOT
+ bool "Enable psci board reboot command"
+ depends on ARM_PSCI_FW
+ help
+ This is a optional command used to trigger system board reboot on imx8.
+
choice
prompt "i.MX8 board select"
optional
#include <generated/version_autogenerated.h>
#include <linux/libfdt.h>
#include <asm/arch/lpcg.h>
+#include <linux/psci.h>
+#include <dm.h>
+#include <command.h>
DECLARE_GLOBAL_DATA_PTR;
}
printf("\n");
}
+
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_PSCI_BOARD_REBOOT)
+
+#define PSCI_SYSTEM_RESET2_AARCH64 0xc4000012
+#define PSCI_RESET2_SYSTEM_BOARD_RESET 0x80000002
+
+int do_board_reboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ struct udevice *dev;
+
+ uclass_get_device_by_name(UCLASS_FIRMWARE, "psci", &dev);
+ invoke_psci_fn(PSCI_SYSTEM_RESET2_AARCH64, PSCI_RESET2_SYSTEM_BOARD_RESET, 0, 0);
+
+ return 1;
+}
+
+U_BOOT_CMD(
+ reboot, 1, 1, do_board_reboot,
+ "reboot\n",
+ "system board reboot for i.MX 8 Quad devices \n"
+);
+#endif