mediatek: add support for BananaPi BPI-R4 board
[openwrt/staging/dangole.git] / target / linux / mediatek / files-6.1 / arch / arm64 / boot / dts / mediatek / mt7988a-bananapi-bpi-r4-sd.dtso
diff --git a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso
new file mode 100644 (file)
index 0000000..1f5e149
--- /dev/null
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ * Author: Frank Wunderlich <frank-w@public-files.de>
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
+
+       fragment@1 {
+               target-path = "/soc/mmc@11230000";
+               __overlay__ {
+                       pinctrl-names = "default", "state_uhs";
+                       pinctrl-0 = <&mmc0_pins_sdcard>;
+                       pinctrl-1 = <&mmc0_pins_sdcard>;
+                       cd-gpios = <&pio 12 GPIO_ACTIVE_LOW>;
+                       bus-width = <4>;
+                       max-frequency = <52000000>;
+                       cap-sd-highspeed;
+                       vmmc-supply = <&reg_3p3v>;
+                       vqmmc-supply = <&reg_3p3v>;
+                       no-mmc;
+                       status = "okay";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       card@0 {
+                               compatible = "mmc-card";
+                               reg = <0>;
+
+                               block {
+                                       compatible = "block-device";
+                                       partitions {
+                                               block-partition-env {
+                                                       partname = "ubootenv";
+                                                       nvmem-layout {
+                                                               compatible = "u-boot,env-layout";
+                                                       };
+                                               };
+                                               sd_rootfs: block-partition-production {
+                                                       partname = "production";
+                                               };
+                                       };
+                               };
+                       };
+               };
+       };
+
+       fragment@2 {
+               target-path = "/chosen";
+               __overlay__ {
+                       rootdisk-sd = <&sd_rootfs>;
+               };
+       };
+};