summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2021-11-07 17:11:58 +0000
committerjmcneill <jmcneill@NetBSD.org>2021-11-07 17:11:58 +0000
commitf0643dbdff070205cd02b0c5c1eabb0df447942d (patch)
treec791039d603e91b6233c02aae3fe4535f338b5b6
parent9824a45c164fb0f529a868929120551eab732e75 (diff)
dts: adapt to dts-5.15 bindings
-rw-r--r--sys/arch/arm/amlogic/meson_sdhc.c17
-rw-r--r--sys/arch/arm/sunxi/sunxi_thermal.c12
-rw-r--r--sys/dev/fdt/fdt_panel.c5
3 files changed, 25 insertions, 9 deletions
diff --git a/sys/arch/arm/amlogic/meson_sdhc.c b/sys/arch/arm/amlogic/meson_sdhc.c
index 4981a2d2a11..ab0d39134f3 100644
--- a/sys/arch/arm/amlogic/meson_sdhc.c
+++ b/sys/arch/arm/amlogic/meson_sdhc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_sdhc.c,v 1.5 2021/08/07 16:18:43 thorpej Exp $ */
+/* $NetBSD: meson_sdhc.c,v 1.6 2021/11/07 17:11:58 jmcneill Exp $ */
/*-
* Copyright (c) 2015-2019 Jared McNeill <jmcneill@invisible.ca>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: meson_sdhc.c,v 1.5 2021/08/07 16:18:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_sdhc.c,v 1.6 2021/11/07 17:11:58 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -151,7 +151,8 @@ meson_sdhc_set_clear(struct meson_sdhc_softc *sc, bus_addr_t reg, uint32_t set,
}
static const struct device_compatible_entry compat_data[] = {
- { .compat = "amlogic,meson8b-sdhc" },
+ { .compat = "amlogic,meson8-sdhc" },
+ { .compat = "amlogic,meson8b-sdhc" }, /* DTCOMPAT */
DEVICE_COMPAT_EOL
};
@@ -191,14 +192,20 @@ meson_sdhc_attach(device_t parent, device_t self, void *aux)
}
clk_core = fdtbus_clock_get(phandle, "core");
+ if (clk_core == NULL) {
+ clk_core = fdtbus_clock_get(phandle, "pclk");
+ }
if (clk_core == NULL || clk_enable(clk_core) != 0) {
- aprint_error(": failed to enable core clock\n");
+ aprint_error(": failed to enable core/pclk clock\n");
return;
}
clk_clkin = fdtbus_clock_get(phandle, "clkin");
+ if (clk_clkin == NULL) {
+ clk_clkin = fdtbus_clock_get(phandle, "clkin2");
+ }
if (clk_clkin == NULL || clk_enable(clk_clkin) != 0) {
- aprint_error(": failed to get clkin clock\n");
+ aprint_error(": failed to get clkin/clkin2 clock\n");
return;
}
diff --git a/sys/arch/arm/sunxi/sunxi_thermal.c b/sys/arch/arm/sunxi/sunxi_thermal.c
index 155f1aec0ab..ffd6bf4c565 100644
--- a/sys/arch/arm/sunxi/sunxi_thermal.c
+++ b/sys/arch/arm/sunxi/sunxi_thermal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_thermal.c,v 1.13 2021/01/27 03:10:20 thorpej Exp $ */
+/* $NetBSD: sunxi_thermal.c,v 1.14 2021/11/07 17:11:58 jmcneill Exp $ */
/*-
* Copyright (c) 2016-2017 Jared McNeill <jmcneill@invisible.ca>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_thermal.c,v 1.13 2021/01/27 03:10:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_thermal.c,v 1.14 2021/11/07 17:11:58 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -306,6 +306,14 @@ static const struct sunxi_thermal_config h5_config = {
};
static struct device_compatible_entry compat_data[] = {
+ { .compat = "allwinner,sun8i-a83t-ths", .data = &a83t_config },
+ { .compat = "allwinner,sun8i-h3-ths", .data = &h3_config },
+ { .compat = "allwinner,sun50i-a64-ths", .data = &a64_config },
+ { .compat = "allwinner,sun50i-h5-ths", .data = &h5_config },
+
+ /*
+ * DTCOMPAT: Old compat strings. Do not add to this list.
+ */
{ .compat = "allwinner,sun8i-a83t-ts", .data = &a83t_config },
{ .compat = "allwinner,sun8i-h3-ts", .data = &h3_config },
{ .compat = "allwinner,sun50i-a64-ts", .data = &a64_config },
diff --git a/sys/dev/fdt/fdt_panel.c b/sys/dev/fdt/fdt_panel.c
index cc864d334cb..15764ca469d 100644
--- a/sys/dev/fdt/fdt_panel.c
+++ b/sys/dev/fdt/fdt_panel.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_panel.c,v 1.3 2021/01/27 03:10:21 thorpej Exp $ */
+/* $NetBSD: fdt_panel.c,v 1.4 2021/11/07 17:11:58 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jonathan A. Kollasch <jakllsch@kollasch.net>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_panel.c,v 1.3 2021/01/27 03:10:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_panel.c,v 1.4 2021/11/07 17:11:58 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_panel.c,v 1.3 2021/01/27 03:10:21 thorpej Exp $"
static const struct device_compatible_entry compat_data[] = {
{ .compat = "simple-panel" },
+ { .compat = "boe,nv140fhmn49" },
DEVICE_COMPAT_EOL
};