Skip to content

Commit 20c5db6

Browse files
Andre-ARMjernejsk
authored andcommitted
ARM: dts: sunxi: add MangoPi MQ-R-T113 board
The MangoPi MQ-R-T113 is a small SBC with the Allwinner T113-s3 SoC. The SoC features two Arm Cortex-A7 cores and 128 MB of co-packaged DDR3 DRAM. The board adds mostly connectors and the required regulators, plus a Realtek RTL8189FTV WiFi chip. Power comes in via a USB-C connector wired as a peripheral, and there is a second USB-C connector usable as a host port. Add a .dtsi file describing most of the board's peripherals, and include that from the actual board .dts file. This allows to re-use the .dtsi for the MQ-R-F113 RISC-V variant of that board. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20230320005249.13403-5-andre.przywara@arm.com Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
1 parent c908060 commit 20c5db6

3 files changed

Lines changed: 162 additions & 0 deletions

File tree

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
13971397
sun8i-s3-elimo-initium.dtb \
13981398
sun8i-s3-lichee-zero-plus.dtb \
13991399
sun8i-s3-pinecube.dtb \
1400+
sun8i-t113s-mangopi-mq-r-t113.dtb \
14001401
sun8i-t3-cqa3t-bv3.dtb \
14011402
sun8i-v3-sl631-imx179.dtb \
14021403
sun8i-v3s-licheepi-zero.dtb \
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2+
// Copyright (C) 2022 Arm Ltd.
3+
4+
#include <dt-bindings/interrupt-controller/irq.h>
5+
6+
/dts-v1/;
7+
8+
#include "sun8i-t113s.dtsi"
9+
#include "sunxi-d1s-t113-mangopi-mq-r.dtsi"
10+
11+
/ {
12+
model = "MangoPi MQ-R-T113";
13+
compatible = "widora,mangopi-mq-r-t113", "allwinner,sun8i-t113s";
14+
15+
aliases {
16+
ethernet0 = &rtl8189ftv;
17+
};
18+
};
19+
20+
&cpu0 {
21+
cpu-supply = <&reg_vcc_core>;
22+
};
23+
24+
&cpu1 {
25+
cpu-supply = <&reg_vcc_core>;
26+
};
27+
28+
&mmc1 {
29+
rtl8189ftv: wifi@1 {
30+
reg = <1>;
31+
interrupt-parent = <&pio>;
32+
interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 = WL_WAKE_AP */
33+
interrupt-names = "host-wake";
34+
};
35+
};
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2+
// Copyright (C) 2022 Arm Ltd.
3+
/*
4+
* Common peripherals and configurations for MangoPi MQ-R boards.
5+
*/
6+
7+
#include <dt-bindings/gpio/gpio.h>
8+
#include <dt-bindings/leds/common.h>
9+
10+
/ {
11+
aliases {
12+
serial3 = &uart3;
13+
};
14+
15+
chosen {
16+
stdout-path = "serial3:115200n8";
17+
};
18+
19+
leds {
20+
compatible = "gpio-leds";
21+
22+
led-0 {
23+
color = <LED_COLOR_ID_BLUE>;
24+
function = LED_FUNCTION_STATUS;
25+
gpios = <&pio 3 22 GPIO_ACTIVE_LOW>; /* PD22 */
26+
};
27+
};
28+
29+
/* board wide 5V supply directly from the USB-C socket */
30+
reg_vcc5v: regulator-5v {
31+
compatible = "regulator-fixed";
32+
regulator-name = "vcc-5v";
33+
regulator-min-microvolt = <5000000>;
34+
regulator-max-microvolt = <5000000>;
35+
regulator-always-on;
36+
};
37+
38+
/* SY8008 DC/DC regulator on the board */
39+
reg_3v3: regulator-3v3 {
40+
compatible = "regulator-fixed";
41+
regulator-name = "vcc-3v3";
42+
regulator-min-microvolt = <3300000>;
43+
regulator-max-microvolt = <3300000>;
44+
vin-supply = <&reg_vcc5v>;
45+
};
46+
47+
/* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */
48+
reg_vcc_core: regulator-core {
49+
compatible = "regulator-fixed";
50+
regulator-name = "vcc-core";
51+
regulator-min-microvolt = <880000>;
52+
regulator-max-microvolt = <880000>;
53+
vin-supply = <&reg_vcc5v>;
54+
};
55+
56+
/* XC6206 LDO on the board */
57+
reg_avdd2v8: regulator-avdd {
58+
compatible = "regulator-fixed";
59+
regulator-name = "avdd2v8";
60+
regulator-min-microvolt = <2800000>;
61+
regulator-max-microvolt = <2800000>;
62+
vin-supply = <&reg_3v3>;
63+
};
64+
65+
wifi_pwrseq: wifi-pwrseq {
66+
compatible = "mmc-pwrseq-simple";
67+
reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */
68+
};
69+
};
70+
71+
&dcxo {
72+
clock-frequency = <24000000>;
73+
};
74+
75+
&ehci1 {
76+
status = "okay";
77+
};
78+
79+
&mmc0 {
80+
pinctrl-0 = <&mmc0_pins>;
81+
pinctrl-names = "default";
82+
vmmc-supply = <&reg_3v3>;
83+
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
84+
disable-wp;
85+
bus-width = <4>;
86+
status = "okay";
87+
};
88+
89+
&mmc1 {
90+
pinctrl-0 = <&mmc1_pins>;
91+
pinctrl-names = "default";
92+
vmmc-supply = <&reg_3v3>;
93+
non-removable;
94+
bus-width = <4>;
95+
mmc-pwrseq = <&wifi_pwrseq>;
96+
status = "okay";
97+
};
98+
99+
&ohci1 {
100+
status = "okay";
101+
};
102+
103+
&pio {
104+
vcc-pb-supply = <&reg_3v3>;
105+
vcc-pd-supply = <&reg_3v3>;
106+
vcc-pe-supply = <&reg_avdd2v8>;
107+
vcc-pf-supply = <&reg_3v3>;
108+
vcc-pg-supply = <&reg_3v3>;
109+
};
110+
111+
&uart3 {
112+
pinctrl-names = "default";
113+
pinctrl-0 = <&uart3_pb_pins>;
114+
status = "okay";
115+
};
116+
117+
/* The USB-C socket has its CC pins pulled to GND, so is hardwired as a UFP. */
118+
&usb_otg {
119+
dr_mode = "peripheral";
120+
status = "okay";
121+
};
122+
123+
&usbphy {
124+
usb1_vbus-supply = <&reg_vcc5v>;
125+
status = "okay";
126+
};

0 commit comments

Comments
 (0)