Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/fdt dts: adapt to dts-5.15 bindings



details:   https://anonhg.NetBSD.org/src/rev/77d906a35f7c
branches:  trunk
changeset: 1024860:77d906a35f7c
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Nov 07 17:11:58 2021 +0000

description:
dts: adapt to dts-5.15 bindings

diffstat:

 sys/arch/arm/amlogic/meson_sdhc.c  |  17 ++++++++++++-----
 sys/arch/arm/sunxi/sunxi_thermal.c |  12 ++++++++++--
 sys/dev/fdt/fdt_panel.c            |   5 +++--
 3 files changed, 25 insertions(+), 9 deletions(-)

diffs (110 lines):

diff -r 18410700cd0e -r 77d906a35f7c sys/arch/arm/amlogic/meson_sdhc.c
--- a/sys/arch/arm/amlogic/meson_sdhc.c Sun Nov 07 17:11:43 2021 +0000
+++ b/sys/arch/arm/amlogic/meson_sdhc.c Sun Nov 07 17:11:58 2021 +0000
@@ -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@localhost>
@@ -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 @@
 }
 
 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 @@
        }
 
        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 -r 18410700cd0e -r 77d906a35f7c sys/arch/arm/sunxi/sunxi_thermal.c
--- a/sys/arch/arm/sunxi/sunxi_thermal.c        Sun Nov 07 17:11:43 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_thermal.c        Sun Nov 07 17:11:58 2021 +0000
@@ -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@localhost>
@@ -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 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 -r 18410700cd0e -r 77d906a35f7c sys/dev/fdt/fdt_panel.c
--- a/sys/dev/fdt/fdt_panel.c   Sun Nov 07 17:11:43 2021 +0000
+++ b/sys/dev/fdt/fdt_panel.c   Sun Nov 07 17:11:58 2021 +0000
@@ -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@localhost>
@@ -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 @@
 
 static const struct device_compatible_entry compat_data[] = {
        { .compat = "simple-panel" },
+       { .compat = "boe,nv140fhmn49" },
        DEVICE_COMPAT_EOL
 };
 



Home | Main Index | Thread Index | Old Index