diff options
| author | Yu-Chien Peter Lin <peter.lin@sifive.com> | 2026-02-24 11:17:31 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-04-06 10:49:21 +0530 |
| commit | 0402b8e3dce9ac71d1c0951cf9716f88ba8dccfc (patch) | |
| tree | 9eadf6ae8387ec1b58bfaa2b33952c2412b554d0 | |
| parent | 4813a2042096b7860655761aad973723293a552e (diff) | |
| download | opensbi-0402b8e3dce9ac71d1c0951cf9716f88ba8dccfc.tar.gz opensbi-0402b8e3dce9ac71d1c0951cf9716f88ba8dccfc.tar.bz2 opensbi-0402b8e3dce9ac71d1c0951cf9716f88ba8dccfc.zip | |
platform: sifive: Add initial support for SiFive development platform
Add initial platform support for SiFive development platforms
with the "sifive-dev" compatible string.
Reviewed-by: Greentime Hu <greentime.hu@sifive.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Link: https://lore.kernel.org/r/20260224031733.3817148-1-peter.lin@sifive.com
Signed-off-by: Anup Patel <anup@brainfault.org>
| -rw-r--r-- | platform/generic/Kconfig | 4 | ||||
| -rw-r--r-- | platform/generic/configs/defconfig | 1 | ||||
| -rw-r--r-- | platform/generic/sifive/objects.mk | 3 | ||||
| -rw-r--r-- | platform/generic/sifive/sifive_dev_platform.c | 23 |
4 files changed, 31 insertions, 0 deletions
diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig index 2627998a..600273d1 100644 --- a/platform/generic/Kconfig +++ b/platform/generic/Kconfig @@ -66,6 +66,10 @@ config PLATFORM_RENESAS_RZFIVE select ANDES_PMU default n +config PLATFORM_SIFIVE_DEV + bool "SiFive development platform support" + default n + config PLATFORM_SIFIVE_FU540 bool "SiFive FU540 support" default n diff --git a/platform/generic/configs/defconfig b/platform/generic/configs/defconfig index 346058f5..debc5f86 100644 --- a/platform/generic/configs/defconfig +++ b/platform/generic/configs/defconfig @@ -5,6 +5,7 @@ CONFIG_PLATFORM_ESWIN_EIC770X=y CONFIG_PLATFORM_OPENHWGROUP_ARIANE=y CONFIG_PLATFORM_OPENHWGROUP_OPENPITON=y CONFIG_PLATFORM_RENESAS_RZFIVE=y +CONFIG_PLATFORM_SIFIVE_DEV=y CONFIG_PLATFORM_SIFIVE_FU540=y CONFIG_PLATFORM_SIFIVE_FU740=y CONFIG_PLATFORM_SOPHGO_SG2042=y diff --git a/platform/generic/sifive/objects.mk b/platform/generic/sifive/objects.mk index d75e444a..d32e1273 100644 --- a/platform/generic/sifive/objects.mk +++ b/platform/generic/sifive/objects.mk @@ -2,6 +2,9 @@ # SPDX-License-Identifier: BSD-2-Clause # +carray-platform_override_modules-$(CONFIG_PLATFORM_SIFIVE_DEV) += sifive_dev_platform +platform-objs-$(CONFIG_PLATFORM_SIFIVE_DEV) += sifive/sifive_dev_platform.o + carray-platform_override_modules-$(CONFIG_PLATFORM_SIFIVE_FU540) += sifive_fu540 platform-objs-$(CONFIG_PLATFORM_SIFIVE_FU540) += sifive/fu540.o diff --git a/platform/generic/sifive/sifive_dev_platform.c b/platform/generic/sifive/sifive_dev_platform.c new file mode 100644 index 00000000..facc044f --- /dev/null +++ b/platform/generic/sifive/sifive_dev_platform.c @@ -0,0 +1,23 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 SiFive Inc. + */ + +#include <platform_override.h> + +static int sifive_platform_init(const void *fdt, int nodeoff, + const struct fdt_match *match) +{ + return 0; +} + +static const struct fdt_match sifive_dev_platform_match[] = { + { .compatible = "sifive-dev" }, + { }, +}; + +const struct fdt_driver sifive_dev_platform = { + .match_table = sifive_dev_platform_match, + .init = sifive_platform_init, +}; |
