diff --git sys/dev/mmc/host/dwmmc.c.old sys/dev/mmc/host/dwmmc.c
index 8cedcd0b9fe8..3486d9926995 100644
--- sys/dev/mmc/host/dwmmc.c.old
+++ sys/dev/mmc/host/dwmmc.c
@@ -36,6 +36,7 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include "opt_platform.h"
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/conf.h>
@@ -52,12 +53,14 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/mmc/bridge.h>
 #include <dev/mmc/mmcbrvar.h>
+#ifdef FDT
 #include <dev/mmc/mmc_fdt_helpers.h>
 
 #include <dev/fdt/fdt_common.h>
 #include <dev/ofw/openfirm.h>
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
+#endif
 
 #include <machine/bus.h>
 #include <machine/cpu.h>
@@ -482,8 +485,12 @@ dwmmc_card_task(void *arg, int pending __unused)
 #else
 	DWMMC_LOCK(sc);
 
+#ifdef FDT
 	if (READ4(sc, SDMMC_CDETECT) == 0 ||
 	    (sc->mmc_helper.props & MMC_PROP_BROKEN_CD)) {
+#else
+	if (READ4(sc, SDMMC_CDETECT) == 0) {
+#endif
 		if (sc->child == NULL) {
 			if (bootverbose)
 				device_printf(sc->dev, "Card inserted\n");
@@ -511,6 +518,7 @@ dwmmc_card_task(void *arg, int pending __unused)
 #endif /* MMCCAM */
 }
 
+#ifdef FDT
 static int
 parse_fdt(struct dwmmc_softc *sc)
 {
@@ -667,6 +675,7 @@ parse_fdt(struct dwmmc_softc *sc)
 fail:
 	return (ENXIO);
 }
+#endif
 
 int
 dwmmc_attach(device_t dev)
@@ -681,12 +690,14 @@ dwmmc_attach(device_t dev)
 	/* Why not to use Auto Stop? It save a hundred of irq per second */
 	sc->use_auto_stop = 1;
 
-	error = parse_fdt(sc);
-	if (error != 0) {
-		device_printf(dev, "Can't get FDT property.\n");
+#ifdef FDT
+	parse_fdt(sc);
+#else
+	if (!sc->bus_hz) {
+		device_printf(dev, "Can't get device properties\n");
 		return (ENXIO);
 	}
-
+#endif
 	DWMMC_LOCK_INIT(sc);
 
 	if (bus_alloc_resources(dev, dwmmc_spec, sc->res)) {
@@ -895,7 +906,9 @@ dwmmc_update_ios(device_t brdev, device_t reqdev)
 		break;
 	}
 
+#ifdef	FDT
 	mmc_fdt_set_power(&sc->mmc_helper, ios->power_mode);
+#endif
 
 	if (ios->bus_width == bus_width_8)
 		WRITE4(sc, SDMMC_CTYPE, SDMMC_CTYPE_8BIT);
diff --git sys/dev/mmc/host/dwmmc_var.h.old b/sys/dev/mmc/host/dwmmc_var.h
index cd4c5f2b6051..7b7dc8b29316 100644
--- sys/dev/mmc/host/dwmmc_var.h.old
+++ sys/dev/mmc/host/dwmmc_var.h
@@ -54,7 +54,9 @@ struct dwmmc_softc {
 	device_t		dev;
 	void			*intr_cookie;
 	struct mmc_host		host;
+#ifdef FDT
 	struct mmc_helper	mmc_helper;
+#endif
 	struct mtx		sc_mtx;
 #ifdef MMCCAM
 	union ccb *		ccb;
--- /dev/null	2022-10-20 23:07:15.402556000 +0300
+++ sys/dev/mmc/host/dwmmc_acpi.c	2022-10-20 18:42:56.345706000 +0300
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2022 Soren Schmidt <sos@deepcore.dk>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "opt_platform.h"
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/taskqueue.h>
+#include <dev/mmc/bridge.h>
+#ifdef FDT
+#include <dev/mmc/mmc_fdt_helpers.h>
+#endif
+#include <dev/mmc/mmcreg.h>
+#include <dev/mmc/host/dwmmc_var.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <dev/acpica/acpivar.h>
+#include <dev/acpica/acpi_subr.h>
+
+#include "opt_mmccam.h"
+
+static const struct acpi_compat_data compat_data[] = {
+	{"rockchip,rk3568-dw-mshc",	1},
+	{"rockchip,rk3288-dw-mshc",	1},
+	{NULL,				0},
+};
+
+static int
+dwmmc_acpi_probe(device_t dev)
+{
+	ACPI_HANDLE handle;
+
+        if (!(handle = acpi_get_handle(dev)) || !acpi_MatchHid(handle, "PRP0001"))
+                return (ENXIO);
+
+	if (!acpi_dsd_search_compatible(dev, compat_data)->acd_data)
+                return ENXIO;
+
+	device_set_desc(dev, "Synopsys DesignWare Mobile Storage Host Controller");
+	return BUS_PROBE_VENDOR;
+}
+
+static int
+dwmmc_acpi_attach(device_t dev)
+{
+	struct dwmmc_softc *sc = device_get_softc(dev);
+	ACPI_HANDLE handle = acpi_get_handle(dev);
+	ACPI_OBJECT *obj;
+        ACPI_BUFFER buf;
+        ACPI_STATUS status;
+
+        /* Set some defaults for freq and supported mode */
+	sc->hwtype = HWTYPE_ROCKCHIP;
+        sc->host.caps = MMC_CAP_SIGNALING_330;
+        sc->host.f_min = 400000;
+        sc->host.f_max = 200000000;
+        sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340;
+
+	buf.Pointer = NULL;
+        buf.Length = ACPI_ALLOCATE_BUFFER;
+	status = acpi_dsd_property(handle, "bus-width", &buf, ACPI_TYPE_INTEGER, &obj);
+	if (ACPI_SUCCESS(status)) {
+		switch (obj->Integer.Value) {
+		case 1:
+			break;
+		case 4:
+			sc->host.caps |= MMC_CAP_4_BIT_DATA;
+			break;
+		case 8:
+			sc->host.caps |= MMC_CAP_8_BIT_DATA;
+			break;
+		default:
+			device_printf(dev, "Unsupported bus-width=%ld/n", obj->Integer.Value);
+		}
+	}
+        if (buf.Pointer)
+                AcpiOsFree(buf.Pointer);
+	buf.Pointer = NULL;
+        buf.Length = ACPI_ALLOCATE_BUFFER;
+	status = acpi_dsd_property(handle, "fifo-depth", &buf, ACPI_TYPE_INTEGER, &obj);
+	if (ACPI_SUCCESS(status))
+		sc->fifo_depth = obj->Integer.Value;
+        if (buf.Pointer)
+                AcpiOsFree(buf.Pointer);
+	buf.Pointer = NULL;
+        buf.Length = ACPI_ALLOCATE_BUFFER;
+	status = acpi_dsd_property(handle, "max-frequency", &buf, ACPI_TYPE_INTEGER, &obj);
+	if (ACPI_SUCCESS(status))
+		sc->bus_hz = obj->Integer.Value;
+        if (buf.Pointer)
+                AcpiOsFree(buf.Pointer);
+	buf.Pointer = NULL;
+        buf.Length = ACPI_ALLOCATE_BUFFER;
+	status = acpi_dsd_property(handle, "cap-sd-highspeed", &buf, ACPI_TYPE_INTEGER, &obj);
+	if (ACPI_SUCCESS(status))
+		sc->host.caps |= MMC_CAP_HSPEED;
+        if (buf.Pointer)
+                AcpiOsFree(buf.Pointer);
+
+	return (dwmmc_attach(dev));
+}
+
+static device_method_t dwmmc_acpi_methods[] = {
+	/* bus interface */
+	DEVMETHOD(device_probe, dwmmc_acpi_probe),
+	DEVMETHOD(device_attach, dwmmc_acpi_attach),
+
+	DEVMETHOD_END
+};
+
+#ifdef FREE13
+static devclass_t dwmmc_acpi_devclass;
+
+DEFINE_CLASS_1(dwmmc_acpi, dwmmc_acpi_driver, dwmmc_acpi_methods,
+    sizeof(struct dwmmc_softc), dwmmc_driver);
+
+DRIVER_MODULE(dwmmc_acpi, acpi, dwmmc_acpi_driver, dwmmc_acpi_devclass, 0, 0);
+#else
+DEFINE_CLASS_1(dwmmc_acpi, dwmmc_acpi_driver, dwmmc_acpi_methods,
+    sizeof(struct dwmmc_softc), dwmmc_driver);
+
+DRIVER_MODULE(dwmmc_acpi, acpi, dwmmc_acpi_driver, 0, 0);
+#endif
+MODULE_DEPEND(dwmmc_acpi, acpi, 1, 1, 1);
+
+#ifndef MMCCAM
+MMC_DECLARE_BRIDGE(dwmmc_acpi);
+#endif
