aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/include
diff options
context:
space:
mode:
authorMihai Sain2022-12-02 09:47:19 +0200
committerEugen Hristev2022-12-20 11:59:07 +0200
commita60c5a986eedd5920cd2c2ba79ecece85dbb87b5 (patch)
tree16615e4613a272d0101215ed77a7a3f159df2bf6 /arch/arm/mach-at91/include
parent4df35b38d12c0c5630efe373870b5f557262af57 (diff)
ARM: mach-at91: add support for sama7g5 chip id and extended id definition
Add SAMA7G5 series chip id definitions to align with linux SoC driver. Add support for SAMA7G5 System-In-Package (SIP): SAMA7G54D1G, SAMA7G54D2G, SAMA7G54D4G. Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
Diffstat (limited to 'arch/arm/mach-at91/include')
-rw-r--r--arch/arm/mach-at91/include/mach/sama7g5.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/include/mach/sama7g5.h b/arch/arm/mach-at91/include/mach/sama7g5.h
index ae43e8700be..621a26f6eba 100644
--- a/arch/arm/mach-at91/include/mach/sama7g5.h
+++ b/arch/arm/mach-at91/include/mach/sama7g5.h
@@ -67,7 +67,35 @@
#define ATMEL_BASE_PIT64BC ATMEL_BASE_PIT64B0
+/* SAMA7G5 series chip id definitions */
+#define ARCH_ID_SAMA7G5 0x80162100
+#define ARCH_EXID_SAMA7G51 0x00000003
+#define ARCH_EXID_SAMA7G52 0x00000002
+#define ARCH_EXID_SAMA7G53 0x00000001
+#define ARCH_EXID_SAMA7G54 0x00000000
+#define ARCH_EXID_SAMA7G54_D1G 0x00000018
+#define ARCH_EXID_SAMA7G54_D2G 0x00000020
+#define ARCH_EXID_SAMA7G54_D4G 0x00000028
+
+#define cpu_is_sama7g5() (get_chip_id() == ARCH_ID_SAMA7G5)
+#define cpu_is_sama7g51() (cpu_is_sama7g5() && \
+ (get_extension_chip_id() == ARCH_EXID_SAMA7G51))
+#define cpu_is_sama7g52() (cpu_is_sama7g5() && \
+ (get_extension_chip_id() == ARCH_EXID_SAMA7G52))
+#define cpu_is_sama7g53() (cpu_is_sama7g5() && \
+ (get_extension_chip_id() == ARCH_EXID_SAMA7G53))
+#define cpu_is_sama7g54() (cpu_is_sama7g5() && \
+ (get_extension_chip_id() == ARCH_EXID_SAMA7G54))
+#define cpu_is_sama7g54d1g() (cpu_is_sama7g5() && \
+ (get_extension_chip_id() == ARCH_EXID_SAMA7G54_D1G))
+#define cpu_is_sama7g54d2g() (cpu_is_sama7g5() && \
+ (get_extension_chip_id() == ARCH_EXID_SAMA7G54_D2G))
+#define cpu_is_sama7g54d4g() (cpu_is_sama7g5() && \
+ (get_extension_chip_id() == ARCH_EXID_SAMA7G54_D4G))
+
#ifndef __ASSEMBLY__
+unsigned int get_chip_id(void);
+unsigned int get_extension_chip_id(void);
char *get_cpu_name(void);
#endif