xref: /freebsd-src/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-mangopi-mq-pro.dts (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1*84943d6fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2cb7aa33aSEmmanuel Vadot// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
3cb7aa33aSEmmanuel Vadot
4cb7aa33aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
5cb7aa33aSEmmanuel Vadot#include <dt-bindings/leds/common.h>
6cb7aa33aSEmmanuel Vadot
7cb7aa33aSEmmanuel Vadot/dts-v1/;
8cb7aa33aSEmmanuel Vadot
9cb7aa33aSEmmanuel Vadot#include "sun20i-d1.dtsi"
10cb7aa33aSEmmanuel Vadot#include "sun20i-common-regulators.dtsi"
11cb7aa33aSEmmanuel Vadot
12cb7aa33aSEmmanuel Vadot/ {
13cb7aa33aSEmmanuel Vadot	model = "MangoPi MQ Pro";
14cb7aa33aSEmmanuel Vadot	compatible = "widora,mangopi-mq-pro", "allwinner,sun20i-d1";
15cb7aa33aSEmmanuel Vadot
16cb7aa33aSEmmanuel Vadot	aliases {
17cb7aa33aSEmmanuel Vadot		ethernet0 = &rtl8723ds;
18cb7aa33aSEmmanuel Vadot		serial0 = &uart0;
19cb7aa33aSEmmanuel Vadot	};
20cb7aa33aSEmmanuel Vadot
21cb7aa33aSEmmanuel Vadot	chosen {
22cb7aa33aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
23cb7aa33aSEmmanuel Vadot	};
24cb7aa33aSEmmanuel Vadot
25cb7aa33aSEmmanuel Vadot	leds {
26cb7aa33aSEmmanuel Vadot		compatible = "gpio-leds";
27cb7aa33aSEmmanuel Vadot
28cb7aa33aSEmmanuel Vadot		led-0 {
29cb7aa33aSEmmanuel Vadot			color = <LED_COLOR_ID_BLUE>;
30cb7aa33aSEmmanuel Vadot			function = LED_FUNCTION_STATUS;
31cb7aa33aSEmmanuel Vadot			gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
32cb7aa33aSEmmanuel Vadot		};
33cb7aa33aSEmmanuel Vadot	};
34cb7aa33aSEmmanuel Vadot
35cb7aa33aSEmmanuel Vadot	reg_avdd2v8: avdd2v8 {
36cb7aa33aSEmmanuel Vadot		compatible = "regulator-fixed";
37cb7aa33aSEmmanuel Vadot		regulator-name = "avdd2v8";
38cb7aa33aSEmmanuel Vadot		regulator-min-microvolt = <2800000>;
39cb7aa33aSEmmanuel Vadot		regulator-max-microvolt = <2800000>;
40cb7aa33aSEmmanuel Vadot		vin-supply = <&reg_vcc_3v3>;
41cb7aa33aSEmmanuel Vadot	};
42cb7aa33aSEmmanuel Vadot
43cb7aa33aSEmmanuel Vadot	reg_dvdd: dvdd {
44cb7aa33aSEmmanuel Vadot		compatible = "regulator-fixed";
45cb7aa33aSEmmanuel Vadot		regulator-name = "dvdd";
46cb7aa33aSEmmanuel Vadot		regulator-min-microvolt = <1200000>;
47cb7aa33aSEmmanuel Vadot		regulator-max-microvolt = <1200000>;
48cb7aa33aSEmmanuel Vadot		vin-supply = <&reg_vcc_3v3>;
49cb7aa33aSEmmanuel Vadot	};
50cb7aa33aSEmmanuel Vadot
51cb7aa33aSEmmanuel Vadot	reg_vdd_cpu: vdd-cpu {
52cb7aa33aSEmmanuel Vadot		compatible = "regulator-fixed";
53cb7aa33aSEmmanuel Vadot		regulator-name = "vdd-cpu";
54cb7aa33aSEmmanuel Vadot		regulator-min-microvolt = <1100000>;
55cb7aa33aSEmmanuel Vadot		regulator-max-microvolt = <1100000>;
56cb7aa33aSEmmanuel Vadot		vin-supply = <&reg_vcc>;
57cb7aa33aSEmmanuel Vadot	};
58cb7aa33aSEmmanuel Vadot
59cb7aa33aSEmmanuel Vadot	wifi_pwrseq: wifi-pwrseq {
60cb7aa33aSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
61cb7aa33aSEmmanuel Vadot		reset-gpios = <&pio 6 17 GPIO_ACTIVE_LOW>; /* PG17 */
62cb7aa33aSEmmanuel Vadot	};
63cb7aa33aSEmmanuel Vadot};
64cb7aa33aSEmmanuel Vadot
65cb7aa33aSEmmanuel Vadot&cpu0 {
66cb7aa33aSEmmanuel Vadot	cpu-supply = <&reg_vdd_cpu>;
67cb7aa33aSEmmanuel Vadot};
68cb7aa33aSEmmanuel Vadot
69cb7aa33aSEmmanuel Vadot&dcxo {
70cb7aa33aSEmmanuel Vadot	clock-frequency = <24000000>;
71cb7aa33aSEmmanuel Vadot};
72cb7aa33aSEmmanuel Vadot
73cb7aa33aSEmmanuel Vadot&ehci1 {
74cb7aa33aSEmmanuel Vadot	status = "okay";
75cb7aa33aSEmmanuel Vadot};
76cb7aa33aSEmmanuel Vadot
77cb7aa33aSEmmanuel Vadot&mmc0 {
78cb7aa33aSEmmanuel Vadot	bus-width = <4>;
79cb7aa33aSEmmanuel Vadot	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
80cb7aa33aSEmmanuel Vadot	disable-wp;
81cb7aa33aSEmmanuel Vadot	vmmc-supply = <&reg_vcc_3v3>;
82cb7aa33aSEmmanuel Vadot	vqmmc-supply = <&reg_vcc_3v3>;
83cb7aa33aSEmmanuel Vadot	pinctrl-0 = <&mmc0_pins>;
84cb7aa33aSEmmanuel Vadot	pinctrl-names = "default";
85cb7aa33aSEmmanuel Vadot	status = "okay";
86cb7aa33aSEmmanuel Vadot};
87cb7aa33aSEmmanuel Vadot
88cb7aa33aSEmmanuel Vadot&mmc1 {
89cb7aa33aSEmmanuel Vadot	bus-width = <4>;
90cb7aa33aSEmmanuel Vadot	mmc-pwrseq = <&wifi_pwrseq>;
91cb7aa33aSEmmanuel Vadot	non-removable;
92cb7aa33aSEmmanuel Vadot	vmmc-supply = <&reg_vcc_3v3>;
93cb7aa33aSEmmanuel Vadot	vqmmc-supply = <&reg_vcc_3v3>;
94cb7aa33aSEmmanuel Vadot	pinctrl-0 = <&mmc1_pins>;
95cb7aa33aSEmmanuel Vadot	pinctrl-names = "default";
96cb7aa33aSEmmanuel Vadot	status = "okay";
97cb7aa33aSEmmanuel Vadot
98cb7aa33aSEmmanuel Vadot	rtl8723ds: wifi@1 {
99cb7aa33aSEmmanuel Vadot		reg = <1>;
100cb7aa33aSEmmanuel Vadot		interrupt-parent = <&pio>;
101cb7aa33aSEmmanuel Vadot		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 */
102cb7aa33aSEmmanuel Vadot		interrupt-names = "host-wake";
103cb7aa33aSEmmanuel Vadot	};
104cb7aa33aSEmmanuel Vadot};
105cb7aa33aSEmmanuel Vadot
106cb7aa33aSEmmanuel Vadot&ohci1 {
107cb7aa33aSEmmanuel Vadot	status = "okay";
108cb7aa33aSEmmanuel Vadot};
109cb7aa33aSEmmanuel Vadot
110cb7aa33aSEmmanuel Vadot&pio {
111cb7aa33aSEmmanuel Vadot	vcc-pe-supply = <&reg_avdd2v8>;
112cb7aa33aSEmmanuel Vadot};
113cb7aa33aSEmmanuel Vadot
114cb7aa33aSEmmanuel Vadot&uart0 {
115cb7aa33aSEmmanuel Vadot	pinctrl-0 = <&uart0_pb8_pins>;
116cb7aa33aSEmmanuel Vadot	pinctrl-names = "default";
117cb7aa33aSEmmanuel Vadot	status = "okay";
118cb7aa33aSEmmanuel Vadot};
119cb7aa33aSEmmanuel Vadot
120cb7aa33aSEmmanuel Vadot&uart1 {
121cb7aa33aSEmmanuel Vadot	uart-has-rtscts;
122cb7aa33aSEmmanuel Vadot	pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
123cb7aa33aSEmmanuel Vadot	pinctrl-names = "default";
124cb7aa33aSEmmanuel Vadot	status = "okay";
125cb7aa33aSEmmanuel Vadot
126cb7aa33aSEmmanuel Vadot	bluetooth {
127cb7aa33aSEmmanuel Vadot		compatible = "realtek,rtl8723ds-bt";
128cb7aa33aSEmmanuel Vadot		device-wake-gpios = <&pio 6 18 GPIO_ACTIVE_HIGH>; /* PG18 */
129cb7aa33aSEmmanuel Vadot		enable-gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */
130cb7aa33aSEmmanuel Vadot		host-wake-gpios = <&pio 6 14 GPIO_ACTIVE_HIGH>; /* PG14 */
131cb7aa33aSEmmanuel Vadot	};
132cb7aa33aSEmmanuel Vadot};
133cb7aa33aSEmmanuel Vadot
134cb7aa33aSEmmanuel Vadot&usb_otg {
135cb7aa33aSEmmanuel Vadot	dr_mode = "peripheral";
136cb7aa33aSEmmanuel Vadot	status = "okay";
137cb7aa33aSEmmanuel Vadot};
138cb7aa33aSEmmanuel Vadot
139cb7aa33aSEmmanuel Vadot&usbphy {
140cb7aa33aSEmmanuel Vadot	usb1_vbus-supply = <&reg_vcc>;
141cb7aa33aSEmmanuel Vadot	status = "okay";
142cb7aa33aSEmmanuel Vadot};
143