This includes a preliminary basic DT and a defconfig to get the board
booted. Although there is some DRAM code based on some disassembly, it
is not ready yet, so the SPL doesn't really work, and needs some help
from awboot.

Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
 arch/arm/dts/Makefile                     |  2 +
 arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts | 54 +++++++++++++++++++++++
 configs/mangopi_mq_r_defconfig            | 12 +++++
 3 files changed, 68 insertions(+)
 create mode 100644 arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts
 create mode 100644 configs/mangopi_mq_r_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 43951a7731e..602349b88ab 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -694,6 +694,8 @@ dtb-$(CONFIG_MACH_SUN8I_V3S) += \
        sun8i-s3-pinecube.dtb \
        sun8i-v3-sl631-imx179.dtb \
        sun8i-v3s-licheepi-zero.dtb
+dtb-$(CONFIG_MACH_SUN8I_R528) += \
+       sun8i-t113s-mangopi-mq-r.dtb
 dtb-$(CONFIG_MACH_SUN50I_H5) += \
        sun50i-h5-bananapi-m2-plus.dtb \
        sun50i-h5-emlid-neutis-n5-devboard.dtb \
diff --git a/arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts 
b/arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts
new file mode 100644
index 00000000000..1fa0c46b7dc
--- /dev/null
+++ b/arch/arm/dts/sun8i-t113s-mangopi-mq-r.dts
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// Copyright (C) 2022 Arm Ltd.
+
+/dts-v1/;
+
+#include "sun8i-t113s.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "Mangopi MQ-R";
+       compatible = "mangopi,mq-r", "allwinner,sun8i-t113s";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&dcxo {
+       clock-frequency = <24000000>;
+};
+
+&mmc0 {
+       pinctrl-0 = <&mmc0_pins>;
+       pinctrl-names = "default";
+       vmmc-supply = <&reg_3v3>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+       disable-wp;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pe_pins>;
+       status = "okay";
+};
+
+&pio {
+       uart0_pe_pins: uart0-pe-pins {
+               pins = "PE2", "PE3";
+               function = "uart0";
+       };
+};
diff --git a/configs/mangopi_mq_r_defconfig b/configs/mangopi_mq_r_defconfig
new file mode 100644
index 00000000000..32b1449dc92
--- /dev/null
+++ b/configs/mangopi_mq_r_defconfig
@@ -0,0 +1,12 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-t113s-mangopi-mq-r"
+CONFIG_SUNXI_MINIMUM_DRAM_MB=128
+CONFIG_SPL=y
+CONFIG_MACH_SUN8I_R528=y
+CONFIG_MMC0_CD_PIN="PF6"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_MONITOR_LEN=786432
+# dummy values
+CONFIG_DRAM_CLK=600
+CONFIG_DRAM_ZQ=0
-- 
2.35.5

Reply via email to