Private
Public Access
2
0

platform: add radxa zero3 support

Signed-off-by: Nascs <nascs@radxa.com>
This commit is contained in:
Nascs
2024-07-12 07:01:57 +00:00
committed by Tom Ingleby
parent a62c0949e5
commit 8a37e75f4a
7 changed files with 37 additions and 4 deletions

View File

@@ -46,13 +46,14 @@ ARM
* [96Boards](../master/docs/96boards.md)
* [ADLINK IPi-SMARC ARM](../master/docs/adlink_ipi_arm.md)
* [Radxa CM3](../master/docs/radxa_cm3.md)
* [Radxa CM5 IO](../master/docs/radxa_cm5_io.md)
* [Radxa E25](../master/docs/radxa_e25.md)
* [Radxa ROCK 3A](../master/docs/radxa_rock_3a.md)
* [Radxa ROCK 3B](../master/docs/radxa_rock_3b.md)
* [Radxa ROCK 3C](../master/docs/radxa_rock_3c.md)
* [Radxa ROCK 5A](../master/docs/radxa_rock_5a.md)
* [Radxa ROCK 5B](../master/docs/radxa_rock_5b.md)
* [Radxa CM5 IO](../master/docs/radxa_cm5_io.md)
* [Radxa ZERO3](../master/docs/radxa_zero3.md)
* [Rock Pi 4](../master/docs/rockpi4.md)
* [Orange Pi Prime](../master/docs/orange_pi_prime.md)

View File

@@ -62,6 +62,7 @@ Specific platform information for supported platforms is documented here:
- @ref radxa_rock_3c
- @ref radxa_rock_5a
- @ref radxa_rock_5b
- @ref radxa_zero3
- @ref rockpi4
## DEBUGGING

View File

@@ -70,6 +70,7 @@ Specific platform information for supported platforms is documented here:
- @ref radxa_rock_3c
- @ref radxa_rock_5a
- @ref radxa_rock_5b
- @ref radxa_zero3
- @ref rockpi4
## DEBUGGING

20
docs/radxa_zero3.md Normal file
View File

@@ -0,0 +1,20 @@
Radxa ZERO 3 {#_Radxa}
=====================
Radxa ZERO 3 is an ultra-small, versatile platform that can be used for a wide variety of applications, including IoT devices, machine learning edge computing, home automation, education, and entertainment.
The ZERO 3W and ZERO 3E differ only in storage and network interfaces.
Pin Mapping
-----------
The Radxa ZERO 3's GPIO pinout is compatible with the [Radxa ROCK 3C](./radxa_rock_3c.md).
Supports
--------
You can find additional product support in the following channels:
- [Product Info](https://docs.radxa.com/en/zero/zero3)
- [Forums](https://forum.radxa.com/c/rock3)
- [Github](https://github.com/radxa)

View File

@@ -21,6 +21,7 @@ extern "C" {
#define MRAA_RADXA_ROCK_3C_AIO_COUNT 0
#define MRAA_RADXA_ROCK_3C_PIN_COUNT 40
#define PLATFORM_NAME_RADXA_ROCK_3C "Radxa ROCK3 Model C"
#define PLATFORM_NAME_RADXA_ZERO3 "Radxa ZERO 3"
mraa_board_t *
mraa_radxa_rock_3c();

View File

@@ -110,7 +110,8 @@ mraa_arm_platform()
platform_type = MRAA_RADXA_ROCK_3A;
else if (mraa_file_contains("/proc/device-tree/model", PLATFORM_NAME_RADXA_ROCK_3B))
platform_type = MRAA_RADXA_ROCK_3B;
else if (mraa_file_contains("/proc/device-tree/model", PLATFORM_NAME_RADXA_ROCK_3C))
else if (mraa_file_contains("/proc/device-tree/model", PLATFORM_NAME_RADXA_ROCK_3C) ||
mraa_file_contains("/proc/device-tree/model", PLATFORM_NAME_RADXA_ZERO3))
platform_type = MRAA_RADXA_ROCK_3C;
else if (mraa_file_contains("/proc/device-tree/model", PLATFORM_NAME_RADXA_ROCK_5A))
platform_type = MRAA_RADXA_ROCK_5A;

View File

@@ -49,11 +49,19 @@ mraa_radxa_rock_3c()
return NULL;
}
if (mraa_file_contains("/proc/device-tree/model", PLATFORM_NAME_RADXA_ROCK_3C)) {
b->platform_name = PLATFORM_NAME_RADXA_ROCK_3C;
} else if (mraa_file_contains("/proc/device-tree/model", PLATFORM_NAME_RADXA_ZERO3)) {
b->platform_name = PLATFORM_NAME_RADXA_ZERO3;
} else {
syslog(LOG_ERR, "An unknown product detected. Fail early...");
free(b);
return NULL;
}
// pin mux for buses are setup by default by kernel so tell mraa to ignore them
b->no_bus_mux = 1;
b->phy_pin_count = MRAA_RADXA_ROCK_3C_PIN_COUNT + 1;
b->platform_name = PLATFORM_NAME_RADXA_ROCK_3C;
b->chardev_capable = 1;
// UART