summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/pine64-quartz64/board.c
diff options
context:
space:
mode:
authorMichael Riesch <michael.riesch@wolfvision.net>2021-11-10 11:45:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-11-17 08:45:59 +0100
commit8d14f8e898b4cd4d9ff76b6afcbaf25bf37aa1e7 (patch)
tree3105ddec3b876d92b97b59157598581fe581cd63 /arch/arm/boards/pine64-quartz64/board.c
parent3f2f5980d517b6a71ffe54e615bd3a4b58b1c295 (diff)
downloadbarebox-8d14f8e898b4cd4d9ff76b6afcbaf25bf37aa1e7.tar.gz
barebox-8d14f8e898b4cd4d9ff76b6afcbaf25bf37aa1e7.tar.xz
arm: rockchip: add support for the quartz64 board
The Pine64 Quartz64 board features the Rockchip RK3566, a reduced but largely identical version of the RK3568. Two models (A and B) of the Quartz64 board are envisaged, where this patch targets the already available model A. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/pine64-quartz64/board.c')
-rw-r--r--arch/arm/boards/pine64-quartz64/board.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/boards/pine64-quartz64/board.c b/arch/arm/boards/pine64-quartz64/board.c
new file mode 100644
index 0000000000..981de90dd7
--- /dev/null
+++ b/arch/arm/boards/pine64-quartz64/board.c
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include <common.h>
+#include <init.h>
+
+struct quartz64_model {
+ const char *name;
+ const char *shortname;
+};
+
+static int quartz64_probe(struct device_d *dev)
+{
+ const struct quartz64_model *model;
+
+ model = device_get_match_data(dev);
+
+ barebox_set_model(model->name);
+ barebox_set_hostname(model->shortname);
+
+ return 0;
+}
+
+static const struct quartz64_model quartz64a = {
+ .name = "Pine64 Quartz64 Model A",
+ .shortname = "quartz64a",
+};
+
+static const struct of_device_id quartz64_of_match[] = {
+ {
+ .compatible = "pine64,quartz64-a",
+ .data = &quartz64a,
+ },
+ { /* sentinel */ },
+};
+
+static struct driver_d quartz64_board_driver = {
+ .name = "board-quartz64",
+ .probe = quartz64_probe,
+ .of_compatible = quartz64_of_match,
+};
+coredevice_platform_driver(quartz64_board_driver);