]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: imx: add i.MX8ULP cpu type and helper
authorPeng Fan <peng.fan@nxp.com>
Sat, 7 Aug 2021 08:00:31 +0000 (16:00 +0800)
committerStefano Babic <sbabic@denx.de>
Mon, 9 Aug 2021 12:46:50 +0000 (14:46 +0200)
Add i.MX8ULP cpu type and helpers.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/include/asm/arch-imx/cpu.h
arch/arm/include/asm/arch-imx8ulp/sys_proto.h [new file with mode: 0644]
arch/arm/include/asm/mach-imx/sys_proto.h
arch/arm/mach-imx/imx8ulp/soc.c [new file with mode: 0644]

index 267a094e5a743b44f31815324f37d10913042c06..fe963789710d14bd38cb671a603cba07f644cf4a 100644 (file)
 #define MXC_CPU_IMX8QXP_A0     0x90 /* dummy ID */
 #define MXC_CPU_IMX8QM         0x91 /* dummy ID */
 #define MXC_CPU_IMX8QXP                0x92 /* dummy ID */
+
+#define MXC_CPU_IMX8ULP                0xA1 /* dummy ID */
+
 #define MXC_CPU_IMXRT1020      0xB4 /* dummy ID */
 #define MXC_CPU_IMXRT1050      0xB6 /* dummy ID */
+
 #define MXC_CPU_MX7ULP         0xE1 /* Temporally hard code */
 #define MXC_CPU_VF610          0xF6 /* dummy ID */
 
diff --git a/arch/arm/include/asm/arch-imx8ulp/sys_proto.h b/arch/arm/include/asm/arch-imx8ulp/sys_proto.h
new file mode 100644 (file)
index 0000000..cab12c2
--- /dev/null
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+#ifndef __ARCH_IMX8ULP_SYS_PROTO_H
+#define __ARCH_NMX8ULP_SYS_PROTO_H
+
+#include <asm/mach-imx/sys_proto.h>
+
+#endif
index b6121898498eb5654df9c22fa25b5560aa95558f..ad446940ff3a5f8ac444d4fee14b5e2f2923b808 100644 (file)
@@ -51,6 +51,7 @@ struct bd_info;
 #define is_imx8md() (is_cpu_type(MXC_CPU_IMX8MD))
 #define is_imx8mql() (is_cpu_type(MXC_CPU_IMX8MQL))
 #define is_imx8qm() (is_cpu_type(MXC_CPU_IMX8QM))
+#define is_imx8ulp() (is_cpu_type(MXC_CPU_IMX8ULP))
 #define is_imx8mm() (is_cpu_type(MXC_CPU_IMX8MM) || is_cpu_type(MXC_CPU_IMX8MML) ||\
        is_cpu_type(MXC_CPU_IMX8MMD) || is_cpu_type(MXC_CPU_IMX8MMDL) || \
        is_cpu_type(MXC_CPU_IMX8MMS) || is_cpu_type(MXC_CPU_IMX8MMSL))
diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c
new file mode 100644 (file)
index 0000000..b3679ae
--- /dev/null
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 NXP
+ */
+
+#include <asm/arch/sys_proto.h>
+
+u32 get_cpu_rev(void)
+{
+       return (MXC_CPU_IMX8ULP << 12) | CHIP_REV_1_0;
+}