1 From 3cf55c25453517960d72b56d1ba8f12840b1990e Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sat, 9 Jul 2022 17:43:17 -0500
4 Subject: [PATCH 031/117] riscv: dts: allwinner: Add MangoPi MQ Pro devicetree
6 The MangoPi MQ Pro is a tiny SBC with a layout compatible to the
7 Raspberry Pi Zero. It includes the Allwinner D1 SoC, 512M or 1G of DDR3,
8 and an RTL8723DS-based WiFi/Bluetooth module.
10 The board also exposes GPIO Port E via a connector on the end of the
11 board, which can support either a camera or an RMII Ethernet PHY. The
12 additional regulators supply that connector.
14 Signed-off-by: Samuel Holland <samuel@sholland.org>
16 arch/riscv/boot/dts/allwinner/Makefile | 1 +
17 .../allwinner/sun20i-d1-mangopi-mq-pro.dts | 128 ++++++++++++++++++
18 2 files changed, 129 insertions(+)
19 create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dts
21 --- a/arch/riscv/boot/dts/allwinner/Makefile
22 +++ b/arch/riscv/boot/dts/allwinner/Makefile
23 @@ -3,4 +3,5 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-li
24 dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv-86-panel-720p.dtb
25 dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv-dock.dtb
26 dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv.dtb
27 +dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-mangopi-mq-pro.dtb
28 dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-nezha.dtb
30 +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dts
32 +// SPDX-License-Identifier: (GPL-2.0+ or MIT)
33 +// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
37 +#include <dt-bindings/gpio/gpio.h>
39 +#include "sun20i-d1.dtsi"
40 +#include "sun20i-d1-common-regulators.dtsi"
43 + model = "MangoPi MQ Pro";
44 + compatible = "widora,mangopi-mq-pro", "allwinner,sun20i-d1";
47 + ethernet0 = &rtl8723ds;
53 + stdout-path = "serial0:115200n8";
56 + reg_avdd2v8: avdd2v8 {
57 + compatible = "regulator-fixed";
58 + regulator-name = "avdd2v8";
59 + regulator-min-microvolt = <2800000>;
60 + regulator-max-microvolt = <2800000>;
61 + vin-supply = <®_vcc_3v3>;
65 + compatible = "regulator-fixed";
66 + regulator-name = "dvdd";
67 + regulator-min-microvolt = <1200000>;
68 + regulator-max-microvolt = <1200000>;
69 + vin-supply = <®_vcc_3v3>;
72 + reg_vdd_cpu: vdd-cpu {
73 + compatible = "regulator-fixed";
74 + regulator-name = "vdd-cpu";
75 + regulator-min-microvolt = <1100000>;
76 + regulator-max-microvolt = <1100000>;
77 + vin-supply = <®_vcc>;
80 + wifi_pwrseq: wifi-pwrseq {
81 + compatible = "mmc-pwrseq-simple";
82 + reset-gpios = <&pio 6 17 GPIO_ACTIVE_LOW>; /* PG17 */
87 + cpu-supply = <®_vdd_cpu>;
96 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
98 + vmmc-supply = <®_vcc_3v3>;
99 + vqmmc-supply = <®_vcc_3v3>;
100 + pinctrl-0 = <&mmc0_pins>;
101 + pinctrl-names = "default";
107 + mmc-pwrseq = <&wifi_pwrseq>;
109 + vmmc-supply = <®_vcc_3v3>;
110 + vqmmc-supply = <®_vcc_3v3>;
111 + pinctrl-0 = <&mmc1_pins>;
112 + pinctrl-names = "default";
115 + rtl8723ds: wifi@1 {
117 + interrupt-parent = <&pio>;
118 + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 */
119 + interrupt-names = "host-wake";
128 + vcc-pe-supply = <®_avdd2v8>;
132 + pinctrl-0 = <&uart0_pb8_pins>;
133 + pinctrl-names = "default";
139 + pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
140 + pinctrl-names = "default";
144 + compatible = "realtek,rtl8723ds-bt";
145 + device-wake-gpios = <&pio 6 18 GPIO_ACTIVE_HIGH>; /* PG18 */
146 + enable-gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */
147 + host-wake-gpios = <&pio 6 14 GPIO_ACTIVE_HIGH>; /* PG14 */
152 + dr_mode = "peripheral";
157 + usb0_vbus-supply = <®_vcc>;