blob: 4c7c9b1415147331f5e0ae33db0f3d813d8d7473 [file] [log] [blame]
Patrick Williams8dd68482022-10-04 07:57:18 -05001From 3523b1bac430f10f02a31f7d013ea369e29656be Mon Sep 17 00:00:00 2001
Brad Bishopbec4ebc2022-08-03 09:55:16 -04002From: Rui Miguel Silva <rui.silva@linaro.org>
3Date: Tue, 15 Feb 2022 09:44:10 +0000
Patrick Williams8dd68482022-10-04 07:57:18 -05004Subject: [PATCH 02/26] arm: add support to corstone1000 platform
Brad Bishopbec4ebc2022-08-03 09:55:16 -04005
6Corstone1000 is a platform from arm, which includes pre
7verified Corstone SSE710 sub-system that combines Cortex-A and
8Cortex-M processors [0].
9
10This code adds the support for the Cortex-A35 implementation
11at host side, it contains also the necessary bits to support
12the Corstone 1000 FVP (Fixed Virtual Platform) [1] and also the
13FPGA MPS3 board implementation of this platform. [2]
14
150: https://documentation-service.arm.com/static/619e02b1f45f0b1fbf3a8f16
161: https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
172: https://documentation-service.arm.com/static/61f3f4d7fa8173727a1b71bf
18
19Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
20Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Patrick Williams8dd68482022-10-04 07:57:18 -050021Upstream-Status: Accepted [2022.10-rc1]
Brad Bishopbec4ebc2022-08-03 09:55:16 -040022---
23 arch/arm/Kconfig | 8 ++
24 arch/arm/dts/Makefile | 3 +
25 arch/arm/dts/corstone1000-fvp.dts | 23 +++
26 arch/arm/dts/corstone1000-mps3.dts | 32 +++++
27 arch/arm/dts/corstone1000.dtsi | 169 +++++++++++++++++++++++
28 board/armltd/corstone1000/Kconfig | 12 ++
29 board/armltd/corstone1000/MAINTAINERS | 7 +
30 board/armltd/corstone1000/Makefile | 7 +
Patrick Williams92b42cb2022-09-03 06:53:57 -050031 board/armltd/corstone1000/corstone1000.c | 125 +++++++++++++++++
Brad Bishopbec4ebc2022-08-03 09:55:16 -040032 configs/corstone1000_defconfig | 80 +++++++++++
33 include/configs/corstone1000.h | 86 ++++++++++++
Patrick Williams92b42cb2022-09-03 06:53:57 -050034 11 files changed, 552 insertions(+)
Brad Bishopbec4ebc2022-08-03 09:55:16 -040035 create mode 100644 arch/arm/dts/corstone1000-fvp.dts
36 create mode 100644 arch/arm/dts/corstone1000-mps3.dts
37 create mode 100644 arch/arm/dts/corstone1000.dtsi
38 create mode 100644 board/armltd/corstone1000/Kconfig
39 create mode 100644 board/armltd/corstone1000/MAINTAINERS
40 create mode 100644 board/armltd/corstone1000/Makefile
41 create mode 100644 board/armltd/corstone1000/corstone1000.c
42 create mode 100644 configs/corstone1000_defconfig
43 create mode 100644 include/configs/corstone1000.h
44
45diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
Patrick Williams8dd68482022-10-04 07:57:18 -050046index 9898c7d68e..2fc2b7d20f 100644
Brad Bishopbec4ebc2022-08-03 09:55:16 -040047--- a/arch/arm/Kconfig
48+++ b/arch/arm/Kconfig
Patrick Williams92b42cb2022-09-03 06:53:57 -050049@@ -1347,6 +1347,12 @@ config ARCH_VEXPRESS64
50 select ENV_IS_IN_FLASH if MTD
51 imply DISTRO_DEFAULTS
Brad Bishopbec4ebc2022-08-03 09:55:16 -040052
53+config TARGET_CORSTONE1000
54+ bool "Support Corstone1000 Platform"
55+ select ARM64
56+ select PL01X_SERIAL
57+ select DM
58+
59 config TARGET_TOTAL_COMPUTE
60 bool "Support Total Compute Platform"
61 select ARM64
Patrick Williams92b42cb2022-09-03 06:53:57 -050062@@ -2295,6 +2301,8 @@ source "arch/arm/mach-npcm/Kconfig"
Brad Bishopbec4ebc2022-08-03 09:55:16 -040063
64 source "board/armltd/total_compute/Kconfig"
65
66+source "board/armltd/corstone1000/Kconfig"
67+
68 source "board/bosch/shc/Kconfig"
69 source "board/bosch/guardian/Kconfig"
70 source "board/Marvell/octeontx/Kconfig"
71diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
Patrick Williams8dd68482022-10-04 07:57:18 -050072index a7e0d9f6c0..8c8f15b6a8 100644
Brad Bishopbec4ebc2022-08-03 09:55:16 -040073--- a/arch/arm/dts/Makefile
74+++ b/arch/arm/dts/Makefile
Patrick Williams92b42cb2022-09-03 06:53:57 -050075@@ -1265,6 +1265,9 @@ dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb
Brad Bishopbec4ebc2022-08-03 09:55:16 -040076
77 dtb-$(CONFIG_ARCH_QEMU) += qemu-arm.dtb qemu-arm64.dtb
78
79+dtb-$(CONFIG_TARGET_CORSTONE1000) += corstone1000-mps3.dtb \
80+ corstone1000-fvp.dtb
81+
82 include $(srctree)/scripts/Makefile.dts
83
84 targets += $(dtb-y)
85diff --git a/arch/arm/dts/corstone1000-fvp.dts b/arch/arm/dts/corstone1000-fvp.dts
86new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -050087index 0000000000..1fcc137a49
Brad Bishopbec4ebc2022-08-03 09:55:16 -040088--- /dev/null
89+++ b/arch/arm/dts/corstone1000-fvp.dts
90@@ -0,0 +1,23 @@
91+// SPDX-License-Identifier: GPL-2.0 or MIT
92+/*
93+ * Copyright (c) 2022, Arm Limited. All rights reserved.
94+ * Copyright (c) 2022, Linaro Limited. All rights reserved.
95+ *
96+ */
97+
98+/dts-v1/;
99+
100+#include "corstone1000.dtsi"
101+
102+/ {
103+ model = "ARM Corstone1000 FVP (Fixed Virtual Platform)";
104+ compatible = "arm,corstone1000-fvp";
105+
106+ smsc: ethernet@4010000 {
107+ compatible = "smsc,lan91c111";
108+ reg = <0x40100000 0x10000>;
109+ phy-mode = "mii";
110+ interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
111+ reg-io-width = <2>;
112+ };
113+};
114diff --git a/arch/arm/dts/corstone1000-mps3.dts b/arch/arm/dts/corstone1000-mps3.dts
115new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500116index 0000000000..e3146747c2
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400117--- /dev/null
118+++ b/arch/arm/dts/corstone1000-mps3.dts
119@@ -0,0 +1,32 @@
120+// SPDX-License-Identifier: GPL-2.0 or MIT
121+/*
122+ * Copyright (c) 2022, Arm Limited. All rights reserved.
123+ * Copyright (c) 2022, Linaro Limited. All rights reserved.
124+ *
125+ */
126+
127+/dts-v1/;
128+
129+#include "corstone1000.dtsi"
130+
131+/ {
132+ model = "ARM Corstone1000 FPGA MPS3 board";
133+ compatible = "arm,corstone1000-mps3";
134+
135+ smsc: ethernet@4010000 {
136+ compatible = "smsc,lan9220", "smsc,lan9115";
137+ reg = <0x40100000 0x10000>;
138+ phy-mode = "mii";
139+ interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
140+ reg-io-width = <2>;
141+ smsc,irq-push-pull;
142+ };
143+
144+ usb_host: usb@40200000 {
145+ compatible = "nxp,usb-isp1763";
146+ reg = <0x40200000 0x100000>;
147+ interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
148+ bus-width = <16>;
149+ dr_mode = "host";
150+ };
151+};
152diff --git a/arch/arm/dts/corstone1000.dtsi b/arch/arm/dts/corstone1000.dtsi
153new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500154index 0000000000..d0194aa893
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400155--- /dev/null
156+++ b/arch/arm/dts/corstone1000.dtsi
157@@ -0,0 +1,169 @@
158+// SPDX-License-Identifier: GPL-2.0 or MIT
159+/*
160+ * Copyright (c) 2022, Arm Limited. All rights reserved.
161+ * Copyright (c) 2022, Linaro Limited. All rights reserved.
162+ *
163+ */
164+
165+#include <dt-bindings/interrupt-controller/arm-gic.h>
166+
167+/ {
168+ interrupt-parent = <&gic>;
169+ #address-cells = <1>;
170+ #size-cells = <1>;
171+
172+ aliases {
173+ serial0 = &uart0;
174+ serial1 = &uart1;
175+ };
176+
177+ chosen {
178+ stdout-path = "serial0:115200n8";
179+ };
180+
181+ cpus {
182+ #address-cells = <1>;
183+ #size-cells = <0>;
184+
185+ cpu: cpu@0 {
186+ device_type = "cpu";
187+ compatible = "arm,cortex-a35";
188+ reg = <0>;
189+ next-level-cache = <&L2_0>;
190+ };
191+ };
192+
193+ memory@88200000 {
194+ device_type = "memory";
195+ reg = <0x88200000 0x77e00000>;
196+ };
197+
198+ gic: interrupt-controller@1c000000 {
199+ compatible = "arm,gic-400";
200+ #interrupt-cells = <3>;
201+ #address-cells = <0>;
202+ interrupt-controller;
203+ reg = <0x1c010000 0x1000>,
204+ <0x1c02f000 0x2000>,
205+ <0x1c04f000 0x1000>,
206+ <0x1c06f000 0x2000>;
207+ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(1) |
208+ IRQ_TYPE_LEVEL_LOW)>;
209+ };
210+
211+ L2_0: l2-cache0 {
212+ compatible = "cache";
213+ cache-level = <2>;
214+ cache-size = <0x80000>;
215+ cache-line-size = <64>;
216+ cache-sets = <1024>;
217+ };
218+
219+ refclk100mhz: refclk100mhz {
220+ compatible = "fixed-clock";
221+ #clock-cells = <0>;
222+ clock-frequency = <100000000>;
223+ clock-output-names = "apb_pclk";
224+ };
225+
226+ smbclk: refclk24mhzx2 {
227+ /* Reference 24MHz clock x 2 */
228+ compatible = "fixed-clock";
229+ #clock-cells = <0>;
230+ clock-frequency = <48000000>;
231+ clock-output-names = "smclk";
232+ };
233+
234+ timer {
235+ compatible = "arm,armv8-timer";
236+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) |
237+ IRQ_TYPE_LEVEL_LOW)>,
238+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) |
239+ IRQ_TYPE_LEVEL_LOW)>,
240+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) |
241+ IRQ_TYPE_LEVEL_LOW)>,
242+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) |
243+ IRQ_TYPE_LEVEL_LOW)>;
244+ };
245+
246+ uartclk: uartclk {
247+ /* UART clock - 50MHz */
248+ compatible = "fixed-clock";
249+ #clock-cells = <0>;
250+ clock-frequency = <50000000>;
251+ clock-output-names = "uartclk";
252+ };
253+
254+ psci {
255+ compatible = "arm,psci-1.0", "arm,psci-0.2";
256+ method = "smc";
257+ };
258+
259+ soc {
260+ compatible = "simple-bus";
261+ #address-cells = <1>;
262+ #size-cells = <1>;
263+ interrupt-parent = <&gic>;
264+ ranges;
265+
266+ timer@1a220000 {
267+ compatible = "arm,armv7-timer-mem";
268+ reg = <0x1a220000 0x1000>;
269+ #address-cells = <1>;
270+ #size-cells = <1>;
271+ clock-frequency = <50000000>;
272+ ranges;
273+
274+ frame@1a230000 {
275+ frame-number = <0>;
276+ interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
277+ reg = <0x1a230000 0x1000>;
278+ };
279+ };
280+
281+ uart0: serial@1a510000 {
282+ compatible = "arm,pl011", "arm,primecell";
283+ reg = <0x1a510000 0x1000>;
284+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
285+ clocks = <&uartclk>, <&refclk100mhz>;
286+ clock-names = "uartclk", "apb_pclk";
287+ };
288+
289+ uart1: serial@1a520000 {
290+ compatible = "arm,pl011", "arm,primecell";
291+ reg = <0x1a520000 0x1000>;
292+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
293+ clocks = <&uartclk>, <&refclk100mhz>;
294+ clock-names = "uartclk", "apb_pclk";
295+ };
296+
297+ mhu_hse1: mailbox@1b820000 {
298+ compatible = "arm,mhuv2-tx", "arm,primecell";
299+ reg = <0x1b820000 0x1000>;
300+ clocks = <&refclk100mhz>;
301+ clock-names = "apb_pclk";
302+ interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
303+ #mbox-cells = <2>;
304+ arm,mhuv2-protocols = <0 0>;
305+ secure-status = "okay"; /* secure-world-only */
306+ status = "disabled";
307+ };
308+
309+ mhu_seh1: mailbox@1b830000 {
310+ compatible = "arm,mhuv2-rx", "arm,primecell";
311+ reg = <0x1b830000 0x1000>;
312+ clocks = <&refclk100mhz>;
313+ clock-names = "apb_pclk";
314+ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
315+ #mbox-cells = <2>;
316+ arm,mhuv2-protocols = <0 0>;
317+ secure-status = "okay"; /* secure-world-only */
318+ status = "disabled";
319+ };
320+ };
321+
322+ arm_ffa: arm_ffa {
323+ compatible = "arm,ffa";
324+ method = "smc";
325+ };
326+};
327diff --git a/board/armltd/corstone1000/Kconfig b/board/armltd/corstone1000/Kconfig
328new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500329index 0000000000..709674d4cf
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400330--- /dev/null
331+++ b/board/armltd/corstone1000/Kconfig
332@@ -0,0 +1,12 @@
333+if TARGET_CORSTONE1000
334+
335+config SYS_BOARD
336+ default "corstone1000"
337+
338+config SYS_VENDOR
339+ default "armltd"
340+
341+config SYS_CONFIG_NAME
342+ default "corstone1000"
343+
344+endif
345diff --git a/board/armltd/corstone1000/MAINTAINERS b/board/armltd/corstone1000/MAINTAINERS
346new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500347index 0000000000..8c905686de
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400348--- /dev/null
349+++ b/board/armltd/corstone1000/MAINTAINERS
350@@ -0,0 +1,7 @@
351+CORSTONE1000 BOARD
352+M: Rui Miguel Silva <rui.silva@linaro.org>
353+M: Vishnu Banavath <vishnu.banavath@arm.com>
354+S: Maintained
355+F: board/armltd/corstone1000/
356+F: include/configs/corstone1000.h
357+F: configs/corstone1000_defconfig
358diff --git a/board/armltd/corstone1000/Makefile b/board/armltd/corstone1000/Makefile
359new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500360index 0000000000..77a82c2892
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400361--- /dev/null
362+++ b/board/armltd/corstone1000/Makefile
363@@ -0,0 +1,7 @@
364+# SPDX-License-Identifier: GPL-2.0+
365+#
366+# (C) Copyright 2022 Arm Limited
367+# (C) Copyright 2022 Linaro
368+# Rui Miguel Silva <rui.silva@linaro.org>
369+
370+obj-y := corstone1000.o
371diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c
372new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500373index 0000000000..2fa485ff37
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400374--- /dev/null
375+++ b/board/armltd/corstone1000/corstone1000.c
Patrick Williams92b42cb2022-09-03 06:53:57 -0500376@@ -0,0 +1,125 @@
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400377+// SPDX-License-Identifier: GPL-2.0+
378+/*
379+ * (C) Copyright 2022 ARM Limited
380+ * (C) Copyright 2022 Linaro
381+ * Rui Miguel Silva <rui.silva@linaro.org>
382+ */
383+
384+#include <common.h>
385+#include <dm.h>
386+#include <dm/platform_data/serial_pl01x.h>
387+#include <asm/armv8/mmu.h>
388+#include <asm/global_data.h>
389+
390+
391+static const struct pl01x_serial_plat serial_plat = {
392+ .base = V2M_UART0,
393+ .type = TYPE_PL011,
394+ .clock = CONFIG_PL011_CLOCK,
395+};
396+
397+U_BOOT_DRVINFO(corstone1000_serials) = {
398+ .name = "serial_pl01x",
399+ .plat = &serial_plat,
400+};
401+
402+static struct mm_region corstone1000_mem_map[] = {
403+ {
404+ /* CVM */
405+ .virt = 0x02000000UL,
406+ .phys = 0x02000000UL,
407+ .size = 0x02000000UL,
408+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
409+ PTE_BLOCK_INNER_SHARE
410+ }, {
411+ /* QSPI */
412+ .virt = 0x08000000UL,
413+ .phys = 0x08000000UL,
414+ .size = 0x08000000UL,
415+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
416+ PTE_BLOCK_INNER_SHARE
417+ }, {
418+ /* Host Peripherals */
419+ .virt = 0x1A000000UL,
420+ .phys = 0x1A000000UL,
421+ .size = 0x26000000UL,
422+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
423+ PTE_BLOCK_NON_SHARE |
424+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
425+ }, {
426+ /* USB */
427+ .virt = 0x40200000UL,
428+ .phys = 0x40200000UL,
429+ .size = 0x00100000UL,
430+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
431+ PTE_BLOCK_NON_SHARE |
432+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
433+ }, {
434+ /* ethernet */
435+ .virt = 0x40100000UL,
436+ .phys = 0x40100000UL,
437+ .size = 0x00100000UL,
438+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
439+ PTE_BLOCK_NON_SHARE |
440+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
441+ }, {
442+ /* OCVM */
443+ .virt = 0x80000000UL,
444+ .phys = 0x80000000UL,
445+ .size = 0x80000000UL,
446+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
447+ PTE_BLOCK_INNER_SHARE
448+ }, {
449+ /* List terminator */
450+ 0,
451+ }
452+};
453+
454+struct mm_region *mem_map = corstone1000_mem_map;
455+
Patrick Williams92b42cb2022-09-03 06:53:57 -0500456+void set_dfu_alt_info(char *interface, char *devstr)
457+{
458+}
459+
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400460+int board_init(void)
461+{
462+ return 0;
463+}
464+
465+int dram_init(void)
466+{
467+ gd->ram_size = PHYS_SDRAM_1_SIZE;
468+
469+ return 0;
470+}
471+
472+int dram_init_banksize(void)
473+{
474+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
475+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
476+
477+ return 0;
478+}
479+
480+/*
481+ * Board specific ethernet initialization routine.
482+ * */
483+int board_eth_init(struct bd_info *bis)
484+{
485+ int rc = 0;
486+
487+#ifndef CONFIG_DM_ETH
488+#ifdef CONFIG_SMC91111
489+ rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
490+#endif
491+#ifdef CONFIG_SMC911X
492+ rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
493+#endif
494+#endif
495+
496+ return rc;
497+}
498+
499+void reset_cpu(ulong addr)
500+{
501+}
502diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig
503new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500504index 0000000000..02f931b0d4
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400505--- /dev/null
506+++ b/configs/corstone1000_defconfig
507@@ -0,0 +1,80 @@
508+CONFIG_ARM=y
509+CONFIG_TARGET_CORSTONE1000=y
510+CONFIG_SYS_TEXT_BASE=0x80000000
511+CONFIG_SYS_MALLOC_F_LEN=0x2000
512+CONFIG_SYS_MALLOC_LEN=0x2000000
513+CONFIG_SYS_LOAD_ADDR=0x82100000
514+CONFIG_NR_DRAM_BANKS=1
515+CONFIG_IDENT_STRING=" corstone1000 aarch64 "
516+CONFIG_FIT=y
517+CONFIG_BOOTDELAY=3
518+CONFIG_USE_BOOTARGS=y
519+CONFIG_BOOTARGS="console=ttyAMA0 loglevel=9 ip=dhcp earlyprintk"
520+CONFIG_LOGLEVEL=7
521+# CONFIG_DISPLAY_CPUINFO is not set
522+# CONFIG_DISPLAY_BOARDINFO is not set
523+CONFIG_HUSH_PARSER=y
524+CONFIG_SYS_PROMPT="corstone1000# "
525+# CONFIG_CMD_CONSOLE is not set
526+CONFIG_CMD_BOOTZ=y
527+CONFIG_CMD_BOOTM=y
528+CONFIG_CMD_LOADM=y
529+CONFIG_CMD_BOOTEFI=y
530+CONFIG_EFI_LOADER=y
531+CONFIG_EFI_PARTITION=y
532+CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y
533+CONFIG_CMD_BOOTEFI_HELLO=y
534+# CONFIG_CMD_XIMG is not set
535+# CONFIG_CMD_ENV_EXISTS is not set
536+CONFIG_CMD_NVEDIT_EFI=y
537+# CONFIG_CMD_LOADS is not set
538+CONFIG_CMD_USB=y
539+CONFIG_CMD_ITEST=y
540+# CONFIG_CMD_SETEXPR is not set
541+# CONFIG_CMD_NFS is not set
542+CONFIG_CMD_MII=y
543+CONFIG_CMD_CACHE=y
544+CONFIG_CMD_EFIDEBUG=y
545+CONFIG_CMD_FAT=y
546+CONFIG_OF_CONTROL=y
547+CONFIG_REGMAP=y
548+# CONFIG_MMC is not set
549+CONFIG_DM_SERIAL=y
550+CONFIG_USB=y
551+CONFIG_DM_USB=y
552+CONFIG_USB_STORAGE=y
553+CONFIG_EFI_MM_COMM_TEE=y
554+# CONFIG_OPTEE is not set
555+# CONFIG_GENERATE_SMBIOS_TABLE is not set
556+# CONFIG_HEXDUMP is not set
557+CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
558+CONFIG_EFI_CAPSULE_ON_DISK=y
559+# CONFIG_EFI_CAPSULE_ON_DISK_EARLY is not set
560+# CONFIG_EFI_CAPSULE_AUTHENTICATE is not set
561+CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
562+CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y
563+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
564+CONFIG_EFI_SECURE_BOOT=y
565+CONFIG_DM_RTC=y
566+CONFIG_CMD_RTC=y
567+CONFIG_EFI_GET_TIME=y
568+CONFIG_EFI_SET_TIME=y
569+CONFIG_RTC_EMULATION=y
570+CONFIG_PSCI_RESET=y
571+CONFIG_DISTRO_DEFAULTS=y
572+CONFIG_CMD_DHCP=y
573+CONFIG_SMC911X=y
574+CONFIG_SMC911X_BASE=0x40100000
575+CONFIG_DM_ETH=y
576+CONFIG_PHY_SMSC=y
577+CONFIG_CMD_BOOTEFI_SELFTEST=y
578+CONFIG_CMD_TIME=y
579+CONFIG_CMD_GETTIME=y
580+CONFIG_NET_RANDOM_ETHADDR=y
581+CONFIG_VERSION_VARIABLE=y
582+CONFIG_PHYLIB=y
583+CONFIG_PHY=y
584+CONFIG_RAM=y
585+CONFIG_ERRNO_STR=y
586+CONFIG_CMD_EDITENV=y
587+CONFIG_MISC=y
588diff --git a/include/configs/corstone1000.h b/include/configs/corstone1000.h
589new file mode 100644
Patrick Williams8dd68482022-10-04 07:57:18 -0500590index 0000000000..cf166f107e
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400591--- /dev/null
592+++ b/include/configs/corstone1000.h
593@@ -0,0 +1,86 @@
594+/* SPDX-License-Identifier: GPL-2.0+ */
595+/*
596+ * (C) Copyright 2022 ARM Limited
597+ * (C) Copyright 2022 Linaro
598+ * Rui Miguel Silva <rui.silva@linaro.org>
599+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
600+ *
601+ * Configuration for Corstone1000. Parts were derived from other ARM
602+ * configurations.
603+ */
604+
605+#ifndef __CORSTONE1000_H
606+#define __CORSTONE1000_H
607+
608+#include <linux/sizes.h>
609+
610+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x03f00000)
611+#define CONFIG_SKIP_LOWLEVEL_INIT
612+
613+#define CONFIG_SYS_HZ 1000
614+
615+#define V2M_SRAM0 0x02000000
616+#define V2M_QSPI 0x08000000
617+
618+#define V2M_DEBUG 0x10000000
619+#define V2M_BASE_PERIPH 0x1A000000
620+
621+#define V2M_BASE 0x80000000
622+
623+#define V2M_PERIPH_OFFSET(x) (x << 16)
624+
625+#define V2M_SYSID (V2M_BASE_PERIPH)
626+#define V2M_SYSCTL (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(1))
627+
628+#define V2M_COUNTER_CTL (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(32))
629+#define V2M_COUNTER_READ (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(33))
630+
631+#define V2M_TIMER_CTL (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(34))
632+#define V2M_TIMER_BASE0 (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(35))
633+
634+#define V2M_UART0 (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(81))
635+#define V2M_UART1 (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(82))
636+
637+#define CONFIG_PL011_CLOCK 50000000
638+
639+/* Physical Memory Map */
640+#define PHYS_SDRAM_1 (V2M_BASE)
641+#define PHYS_SDRAM_1_SIZE 0x80000000
642+
643+#define CONFIG_ENV_SECT_SIZE SZ_64K
644+
645+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
646+
647+/* Monitor Command Prompt */
648+#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
649+#define CONFIG_SYS_MAXARGS 64 /* max command args */
650+
651+#define CONFIG_EXTRA_ENV_SETTINGS \
652+ "usb_pgood_delay=250\0" \
653+ "boot_bank_flag=0x08002000\0" \
654+ "kernel_addr_bank_0=0x083EE000\0" \
655+ "kernel_addr_bank_1=0x0936E000\0" \
656+ "retrieve_kernel_load_addr=" \
657+ "if itest.l *${boot_bank_flag} == 0; then " \
658+ "setenv kernel_addr $kernel_addr_bank_0;" \
659+ "else " \
660+ "setenv kernel_addr $kernel_addr_bank_1;" \
661+ "fi;" \
662+ "\0" \
663+ "kernel_addr_r=0x88200000\0" \
664+ "fdt_high=0xffffffff\0"
665+
666+/*
667+ * config_distro_bootcmd define the boot command to distro_bootcmd, but we here
668+ * want to first try to load a kernel if exists, override that config then
669+ */
670+#undef CONFIG_BOOTCOMMAND
671+
672+#define CONFIG_BOOTCOMMAND \
673+ "run retrieve_kernel_load_addr;" \
674+ "echo Loading kernel from $kernel_addr to memory ... ;" \
675+ "loadm $kernel_addr $kernel_addr_r 0xc00000;" \
676+ "usb start; usb reset;" \
677+ "run distro_bootcmd;" \
678+ "bootefi $kernel_addr_r $fdtcontroladdr;"
679+#endif
680--
Patrick Williams8dd68482022-10-04 07:57:18 -05006812.17.1
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400682