Skip to content

Commit 96a78ae

Browse files
DavidMCerdeirajosecm
authored andcommitted
feat(platforms/imx8mp-verdin): add platform
Signed-off-by: David Cerdeira <davidmcerdeira@gmail.com>
1 parent af88205 commit 96a78ae

File tree

6 files changed

+84
-0
lines changed

6 files changed

+84
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ platforms is presented below:
4444
- [x] Raspberry Pi 4
4545
- [x] QEMU virt
4646
- [x] Arm Fixed Virtual Platforms
47+
- [x] Toradex Verdin iMX8M Plus (w/ Dahlia Carrier Board)
4748
- [ ] BeagleBone AI-64
4849
- [ ] NXP MCIMX8M-EVK
4950
- [ ] 96Boards ROCK960

src/platform/imx8mp-verdin/desc.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* SPDX-License-Identifier: Apache-2.0
3+
* Copyright (c) Bao Project and Contributors. All rights reserved.
4+
*/
5+
6+
#include <platform.h>
7+
8+
struct platform platform = {
9+
.cpu_num = 4,
10+
.region_num = 1,
11+
.regions = (struct mem_region[]) {
12+
{
13+
.base = 0x40000000,
14+
.size = 0x80000000, // 2 GiB
15+
},
16+
},
17+
18+
.console = {
19+
.base = 0x30880000,
20+
},
21+
22+
.arch = {
23+
.gic = {
24+
.gicd_addr = 0x38800000,
25+
.gicr_addr = 0x38880000,
26+
.gicc_addr = 0x31000000,
27+
.gicv_addr = 0x31010000,
28+
.gich_addr = 0x31020000,
29+
.maintenance_id = 25
30+
},
31+
}
32+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* SPDX-License-Identifier: Apache-2.0
3+
* Copyright (c) Bao Project and Contributors. All rights reserved.
4+
*/
5+
6+
#ifndef PLAT_PLATFORM_H
7+
#define PLAT_PLATFORM_H
8+
9+
#include <drivers/imx_uart.h>
10+
11+
#endif
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* SPDX-License-Identifier: Apache-2.0
3+
* Copyright (c) Bao Project and Contributors. All rights reserved.
4+
*/
5+
6+
#ifndef PLAT_PSCI_H
7+
#define PLAT_PSCI_H
8+
9+
#define PSCI_POWER_STATE_LVL_0 0x0000000
10+
#define PSCI_POWER_STATE_LVL_1 0x1000000
11+
#define PSCI_POWER_STATE_LVL_2 0x2000000
12+
#define PSCI_STATE_TYPE_STANDBY 0x00000
13+
#define PSCI_STATE_TYPE_BIT (1UL << 16)
14+
#define PSCI_STATE_TYPE_POWERDOWN PSCI_STATE_TYPE_BIT
15+
16+
#define PLAT_PSCI_POWERDOWN_NOT_SUPPORTED 1
17+
18+
#endif // PLAT_PSCI_H

src/platform/imx8mp-verdin/objects.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## SPDX-License-Identifier: Apache-2.0
2+
## Copyright (c) Bao Project and Contributors. All rights reserved.
3+
4+
boards-objs-y+=desc.o
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## SPDX-License-Identifier: Apache-2.0
2+
## Copyright (c) Bao Project and Contributors. All rights reserved.
3+
4+
# Architecture definition
5+
ARCH:=armv8
6+
# CPU definition
7+
CPU:=cortex-a53
8+
9+
GIC_VERSION:=GICV3
10+
11+
drivers = imx_uart
12+
13+
platform_description:=desc.c
14+
15+
platform-cppflags =
16+
platform-cflags = -mcpu=$(CPU)
17+
platform-asflags =
18+
platform-ldflags =

0 commit comments

Comments
 (0)