at91: add kernel support for sama7g5 soc
[openwrt/staging/dedeckeh.git] / target / linux / at91 / patches-5.10 / 217-ARM-at91-sama7-introduce-sama7-SoC-family.patch
1 From dea645bce478cc72a2bf2413ec873927d1471442 Mon Sep 17 00:00:00 2001
2 From: Eugen Hristev <eugen.hristev@microchip.com>
3 Date: Thu, 15 Apr 2021 13:50:08 +0300
4 Subject: [PATCH 217/247] ARM: at91: sama7: introduce sama7 SoC family
5
6 Introduce new family of SoCs, sama7, and first SoC, sama7g5.
7
8 Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
9 [claudiu.beznea@microchip.com: keep only the sama7_dt]
10 Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
11 Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
12 Link: https://lore.kernel.org/r/20210415105010.569620-23-claudiu.beznea@microchip.com
13 ---
14 arch/arm/mach-at91/Makefile | 1 +
15 arch/arm/mach-at91/sama7.c | 32 ++++++++++++++++++++++++++++++++
16 2 files changed, 33 insertions(+)
17 create mode 100644 arch/arm/mach-at91/sama7.c
18
19 diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
20 index f565490f1b70..522b680b6446 100644
21 --- a/arch/arm/mach-at91/Makefile
22 +++ b/arch/arm/mach-at91/Makefile
23 @@ -8,6 +8,7 @@ obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o
24 obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o
25 obj-$(CONFIG_SOC_SAM9X60) += sam9x60.o
26 obj-$(CONFIG_SOC_SAMA5) += sama5.o
27 +obj-$(CONFIG_SOC_SAMA7) += sama7.o
28 obj-$(CONFIG_SOC_SAMV7) += samv7.o
29
30 # Power Management
31 diff --git a/arch/arm/mach-at91/sama7.c b/arch/arm/mach-at91/sama7.c
32 new file mode 100644
33 index 000000000000..19d7bcbc97f1
34 --- /dev/null
35 +++ b/arch/arm/mach-at91/sama7.c
36 @@ -0,0 +1,32 @@
37 +// SPDX-License-Identifier: GPL-2.0-or-later
38 +/*
39 + * Setup code for SAMA7
40 + *
41 + * Copyright (C) 2021 Microchip Technology, Inc. and its subsidiaries
42 + *
43 + */
44 +
45 +#include <linux/of.h>
46 +#include <linux/of_platform.h>
47 +
48 +#include <asm/mach/arch.h>
49 +#include <asm/system_misc.h>
50 +
51 +#include "generic.h"
52 +
53 +static void __init sama7_dt_device_init(void)
54 +{
55 + of_platform_default_populate(NULL, NULL, NULL);
56 +}
57 +
58 +static const char *const sama7_dt_board_compat[] __initconst = {
59 + "microchip,sama7",
60 + NULL
61 +};
62 +
63 +DT_MACHINE_START(sama7_dt, "Microchip SAMA7")
64 + /* Maintainer: Microchip */
65 + .init_machine = sama7_dt_device_init,
66 + .dt_compat = sama7_dt_board_compat,
67 +MACHINE_END
68 +
69 --
70 2.32.0
71