diff --git a/README.md b/README.md index 179fc474..ead9887c 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ platforms is presented below: - [x] Raspberry Pi 4 - [x] QEMU virt - [x] Arm Fixed Virtual Platforms +- [x] Toradex Verdin iMX8M Plus (w/ Dahlia Carrier Board) - [ ] BeagleBone AI-64 - [ ] NXP MCIMX8M-EVK - [ ] 96Boards ROCK960 diff --git a/src/platform/imx8mp-verdin/desc.c b/src/platform/imx8mp-verdin/desc.c new file mode 100644 index 00000000..5e0bd142 --- /dev/null +++ b/src/platform/imx8mp-verdin/desc.c @@ -0,0 +1,32 @@ +/** + * SPDX-License-Identifier: Apache-2.0 + * Copyright (c) Bao Project and Contributors. All rights reserved. + */ + +#include + +struct platform platform = { + .cpu_num = 4, + .region_num = 1, + .regions = (struct mem_region[]) { + { + .base = 0x40000000, + .size = 0x80000000, // 2 GiB + }, + }, + + .console = { + .base = 0x30880000, + }, + + .arch = { + .gic = { + .gicd_addr = 0x38800000, + .gicr_addr = 0x38880000, + .gicc_addr = 0x31000000, + .gicv_addr = 0x31010000, + .gich_addr = 0x31020000, + .maintenance_id = 25 + }, + } +}; diff --git a/src/platform/imx8mp-verdin/inc/plat/platform.h b/src/platform/imx8mp-verdin/inc/plat/platform.h new file mode 100644 index 00000000..9aadbb26 --- /dev/null +++ b/src/platform/imx8mp-verdin/inc/plat/platform.h @@ -0,0 +1,11 @@ +/** + * SPDX-License-Identifier: Apache-2.0 + * Copyright (c) Bao Project and Contributors. All rights reserved. + */ + +#ifndef PLAT_PLATFORM_H +#define PLAT_PLATFORM_H + +#include + +#endif diff --git a/src/platform/imx8mp-verdin/inc/plat/psci.h b/src/platform/imx8mp-verdin/inc/plat/psci.h new file mode 100644 index 00000000..5b64d9b9 --- /dev/null +++ b/src/platform/imx8mp-verdin/inc/plat/psci.h @@ -0,0 +1,18 @@ +/** + * SPDX-License-Identifier: Apache-2.0 + * Copyright (c) Bao Project and Contributors. All rights reserved. + */ + +#ifndef PLAT_PSCI_H +#define PLAT_PSCI_H + +#define PSCI_POWER_STATE_LVL_0 0x0000000 +#define PSCI_POWER_STATE_LVL_1 0x1000000 +#define PSCI_POWER_STATE_LVL_2 0x2000000 +#define PSCI_STATE_TYPE_STANDBY 0x00000 +#define PSCI_STATE_TYPE_BIT (1UL << 16) +#define PSCI_STATE_TYPE_POWERDOWN PSCI_STATE_TYPE_BIT + +#define PLAT_PSCI_POWERDOWN_NOT_SUPPORTED 1 + +#endif // PLAT_PSCI_H diff --git a/src/platform/imx8mp-verdin/objects.mk b/src/platform/imx8mp-verdin/objects.mk new file mode 100644 index 00000000..851bee38 --- /dev/null +++ b/src/platform/imx8mp-verdin/objects.mk @@ -0,0 +1,4 @@ +## SPDX-License-Identifier: Apache-2.0 +## Copyright (c) Bao Project and Contributors. All rights reserved. + +boards-objs-y+=desc.o diff --git a/src/platform/imx8mp-verdin/platform.mk b/src/platform/imx8mp-verdin/platform.mk new file mode 100644 index 00000000..ca280e9a --- /dev/null +++ b/src/platform/imx8mp-verdin/platform.mk @@ -0,0 +1,18 @@ +## SPDX-License-Identifier: Apache-2.0 +## Copyright (c) Bao Project and Contributors. All rights reserved. + +# Architecture definition +ARCH:=armv8 +# CPU definition +CPU:=cortex-a53 + +GIC_VERSION:=GICV3 + +drivers = imx_uart + +platform_description:=desc.c + +platform-cppflags = +platform-cflags = -mcpu=$(CPU) +platform-asflags = +platform-ldflags =