1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * DTS for Emlid Neutis N5 Dev board.
4 *
5 * Copyright (C) 2018 Aleksandr Aleksandrov <aleksandr.aleksandrov@emlid.com>
6 */
7
8/dts-v1/;
9
10#include "sun50i-h5-emlid-neutis-n5.dtsi"
11
12/ {
13	model = "Emlid Neutis N5 Developer board";
14	compatible = "emlid,neutis-n5-devboard",
15		     "emlid,neutis-n5",
16		     "allwinner,sun50i-h5";
17
18	aliases {
19		serial0 = &uart0;
20	};
21
22	chosen {
23		stdout-path = "serial0:115200n8";
24	};
25
26	connector {
27		compatible = "hdmi-connector";
28		type = "a";
29
30		port {
31			hdmi_con_in: endpoint {
32				remote-endpoint = <&hdmi_out_con>;
33			};
34		};
35	};
36
37	reg_usb0_vbus: usb0-vbus {
38		compatible = "regulator-fixed";
39		regulator-name = "usb0-vbus";
40		regulator-min-microvolt = <5000000>;
41		regulator-max-microvolt = <5000000>;
42		enable-active-high;
43		gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>;   /* PL9 */
44		status = "okay";
45	};
46
47	vdd_cpux: gpio-regulator {
48		compatible = "regulator-gpio";
49		regulator-name = "vdd-cpux";
50		regulator-type = "voltage";
51		regulator-boot-on;
52		regulator-always-on;
53		regulator-min-microvolt = <1100000>;
54		regulator-max-microvolt = <1300000>;
55		regulator-ramp-delay = <50>; /* 4ms */
56		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
57		gpios-states = <0x1>;
58		states = <1100000 0x0
59			  1300000 0x1>;
60	};
61};
62
63&codec {
64	allwinner,audio-routing =
65		"Line Out", "LINEOUT",
66		"LINEIN", "Line In",
67		"MIC1", "Mic",
68		"MIC2", "Mic",
69		"Mic",  "MBIAS";
70	status = "okay";
71};
72
73&de {
74	status = "okay";
75};
76
77&ehci0 {
78	status = "okay";
79};
80
81&ehci1 {
82	status = "okay";
83};
84
85&ehci2 {
86	status = "okay";
87};
88
89&ehci3 {
90	status = "okay";
91};
92
93&emac {
94	phy-handle = <&int_mii_phy>;
95	phy-mode = "mii";
96	allwinner,leds-active-low;
97	status = "okay";
98};
99
100&hdmi {
101	status = "okay";
102};
103
104&hdmi_out {
105	hdmi_out_con: endpoint {
106		remote-endpoint = <&hdmi_con_in>;
107	};
108};
109
110&mmc0 {
111	vmmc-supply = <&reg_vcc3v3>;
112	bus-width = <4>;
113	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
114	status = "okay";
115};
116
117&ohci0 {
118	status = "okay";
119};
120
121&ohci1 {
122	status = "okay";
123};
124
125&ohci2 {
126	status = "okay";
127};
128
129&ohci3 {
130	status = "okay";
131};
132
133&uart0 {
134	pinctrl-names = "default";
135	pinctrl-0 = <&uart0_pa_pins>;
136	status = "okay";
137};
138
139&usb_otg {
140	dr_mode = "otg";
141	status = "okay";
142};
143
144&usbphy {
145	usb0_id_det-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
146	usb0_vbus-supply = <&reg_usb0_vbus>;
147	status = "okay";
148};
149