Module Name:    src
Committed By:   jmcneill
Date:           Sun Nov  7 17:11:58 UTC 2021

Modified Files:
        src/sys/arch/arm/amlogic: meson_sdhc.c
        src/sys/arch/arm/sunxi: sunxi_thermal.c
        src/sys/dev/fdt: fdt_panel.c

Log Message:
dts: adapt to dts-5.15 bindings


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/amlogic/meson_sdhc.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/sunxi/sunxi_thermal.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/fdt_panel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/amlogic/meson_sdhc.c
diff -u src/sys/arch/arm/amlogic/meson_sdhc.c:1.5 src/sys/arch/arm/amlogic/meson_sdhc.c:1.6
--- src/sys/arch/arm/amlogic/meson_sdhc.c:1.5	Sat Aug  7 16:18:43 2021
+++ src/sys/arch/arm/amlogic/meson_sdhc.c	Sun Nov  7 17:11:58 2021
@@ -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 <jmcne...@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_s
 }
 
 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, devic
 	}
 
 	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;
 	}
 

Index: src/sys/arch/arm/sunxi/sunxi_thermal.c
diff -u src/sys/arch/arm/sunxi/sunxi_thermal.c:1.13 src/sys/arch/arm/sunxi/sunxi_thermal.c:1.14
--- src/sys/arch/arm/sunxi/sunxi_thermal.c:1.13	Wed Jan 27 03:10:20 2021
+++ src/sys/arch/arm/sunxi/sunxi_thermal.c	Sun Nov  7 17:11:58 2021
@@ -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 <jmcne...@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
 };
 
 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 },

Index: src/sys/dev/fdt/fdt_panel.c
diff -u src/sys/dev/fdt/fdt_panel.c:1.3 src/sys/dev/fdt/fdt_panel.c:1.4
--- src/sys/dev/fdt/fdt_panel.c:1.3	Wed Jan 27 03:10:21 2021
+++ src/sys/dev/fdt/fdt_panel.c	Sun Nov  7 17:11:58 2021
@@ -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 <jakll...@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,
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "simple-panel" },
+	{ .compat = "boe,nv140fhmn49" },
 	DEVICE_COMPAT_EOL
 };
 

Reply via email to