xref: /freebsd/sys/contrib/device-tree/src/arm/allwinner/sun8i-h3-orangepi-lite.dts (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1f126890aSEmmanuel Vadot/*
2f126890aSEmmanuel Vadot * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
3f126890aSEmmanuel Vadot *
4f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms
5f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual
6f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a
7f126890aSEmmanuel Vadot * whole.
8f126890aSEmmanuel Vadot *
9f126890aSEmmanuel Vadot *  a) This file is free software; you can redistribute it and/or
10f126890aSEmmanuel Vadot *     modify it under the terms of the GNU General Public License as
11f126890aSEmmanuel Vadot *     published by the Free Software Foundation; either version 2 of the
12f126890aSEmmanuel Vadot *     License, or (at your option) any later version.
13f126890aSEmmanuel Vadot *
14f126890aSEmmanuel Vadot *     This file is distributed in the hope that it will be useful,
15f126890aSEmmanuel Vadot *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16f126890aSEmmanuel Vadot *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17f126890aSEmmanuel Vadot *     GNU General Public License for more details.
18f126890aSEmmanuel Vadot *
19f126890aSEmmanuel Vadot * Or, alternatively,
20f126890aSEmmanuel Vadot *
21f126890aSEmmanuel Vadot *  b) Permission is hereby granted, free of charge, to any person
22f126890aSEmmanuel Vadot *     obtaining a copy of this software and associated documentation
23f126890aSEmmanuel Vadot *     files (the "Software"), to deal in the Software without
24f126890aSEmmanuel Vadot *     restriction, including without limitation the rights to use,
25f126890aSEmmanuel Vadot *     copy, modify, merge, publish, distribute, sublicense, and/or
26f126890aSEmmanuel Vadot *     sell copies of the Software, and to permit persons to whom the
27f126890aSEmmanuel Vadot *     Software is furnished to do so, subject to the following
28f126890aSEmmanuel Vadot *     conditions:
29f126890aSEmmanuel Vadot *
30f126890aSEmmanuel Vadot *     The above copyright notice and this permission notice shall be
31f126890aSEmmanuel Vadot *     included in all copies or substantial portions of the Software.
32f126890aSEmmanuel Vadot *
33f126890aSEmmanuel Vadot *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34f126890aSEmmanuel Vadot *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35f126890aSEmmanuel Vadot *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36f126890aSEmmanuel Vadot *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37f126890aSEmmanuel Vadot *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38f126890aSEmmanuel Vadot *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39f126890aSEmmanuel Vadot *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40f126890aSEmmanuel Vadot *     OTHER DEALINGS IN THE SOFTWARE.
41f126890aSEmmanuel Vadot */
42f126890aSEmmanuel Vadot
43f126890aSEmmanuel Vadot/dts-v1/;
44f126890aSEmmanuel Vadot#include "sun8i-h3.dtsi"
45f126890aSEmmanuel Vadot#include "sunxi-common-regulators.dtsi"
46f126890aSEmmanuel Vadot
47f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
48f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
49f126890aSEmmanuel Vadot
50f126890aSEmmanuel Vadot/ {
51f126890aSEmmanuel Vadot	model = "Xunlong Orange Pi Lite";
52f126890aSEmmanuel Vadot	compatible = "xunlong,orangepi-lite", "allwinner,sun8i-h3";
53f126890aSEmmanuel Vadot
54f126890aSEmmanuel Vadot	aliases {
55f126890aSEmmanuel Vadot		/* The H3 emac is not used so the wifi is ethernet0 */
56f126890aSEmmanuel Vadot		ethernet0 = &rtl8189ftv;
57f126890aSEmmanuel Vadot		serial0 = &uart0;
58f126890aSEmmanuel Vadot	};
59f126890aSEmmanuel Vadot
60f126890aSEmmanuel Vadot	chosen {
61f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
62f126890aSEmmanuel Vadot	};
63f126890aSEmmanuel Vadot
64f126890aSEmmanuel Vadot	connector {
65f126890aSEmmanuel Vadot		compatible = "hdmi-connector";
66f126890aSEmmanuel Vadot		type = "a";
67f126890aSEmmanuel Vadot
68f126890aSEmmanuel Vadot		port {
69f126890aSEmmanuel Vadot			hdmi_con_in: endpoint {
70f126890aSEmmanuel Vadot				remote-endpoint = <&hdmi_out_con>;
71f126890aSEmmanuel Vadot			};
72f126890aSEmmanuel Vadot		};
73f126890aSEmmanuel Vadot	};
74f126890aSEmmanuel Vadot
75f126890aSEmmanuel Vadot	leds {
76f126890aSEmmanuel Vadot		compatible = "gpio-leds";
77f126890aSEmmanuel Vadot
78f126890aSEmmanuel Vadot		pwr_led {
79f126890aSEmmanuel Vadot			label = "orangepi:green:pwr";
80f126890aSEmmanuel Vadot			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
81f126890aSEmmanuel Vadot			default-state = "on";
82f126890aSEmmanuel Vadot		};
83f126890aSEmmanuel Vadot
84f126890aSEmmanuel Vadot		status_led {
85f126890aSEmmanuel Vadot			label = "orangepi:red:status";
86f126890aSEmmanuel Vadot			gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
87f126890aSEmmanuel Vadot		};
88f126890aSEmmanuel Vadot	};
89f126890aSEmmanuel Vadot
90f126890aSEmmanuel Vadot	gpio-keys {
91f126890aSEmmanuel Vadot		compatible = "gpio-keys";
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot		switch-4 {
94f126890aSEmmanuel Vadot			label = "sw4";
95f126890aSEmmanuel Vadot			linux,code = <BTN_0>;
96f126890aSEmmanuel Vadot			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
97f126890aSEmmanuel Vadot		};
98f126890aSEmmanuel Vadot	};
99f126890aSEmmanuel Vadot};
100f126890aSEmmanuel Vadot
101f126890aSEmmanuel Vadot&de {
102f126890aSEmmanuel Vadot	status = "okay";
103f126890aSEmmanuel Vadot};
104f126890aSEmmanuel Vadot
105f126890aSEmmanuel Vadot&ehci1 {
106f126890aSEmmanuel Vadot	status = "okay";
107f126890aSEmmanuel Vadot};
108f126890aSEmmanuel Vadot
109f126890aSEmmanuel Vadot&ehci2 {
110f126890aSEmmanuel Vadot	status = "okay";
111f126890aSEmmanuel Vadot};
112f126890aSEmmanuel Vadot
113f126890aSEmmanuel Vadot&hdmi {
114f126890aSEmmanuel Vadot	status = "okay";
115f126890aSEmmanuel Vadot};
116f126890aSEmmanuel Vadot
117f126890aSEmmanuel Vadot&hdmi_out {
118f126890aSEmmanuel Vadot	hdmi_out_con: endpoint {
119f126890aSEmmanuel Vadot		remote-endpoint = <&hdmi_con_in>;
120f126890aSEmmanuel Vadot	};
121f126890aSEmmanuel Vadot};
122f126890aSEmmanuel Vadot
123f126890aSEmmanuel Vadot&ir {
124f126890aSEmmanuel Vadot	pinctrl-names = "default";
125f126890aSEmmanuel Vadot	pinctrl-0 = <&r_ir_rx_pin>;
126f126890aSEmmanuel Vadot	status = "okay";
127f126890aSEmmanuel Vadot};
128f126890aSEmmanuel Vadot
129f126890aSEmmanuel Vadot&mmc0 {
130f126890aSEmmanuel Vadot	vmmc-supply = <&reg_vcc3v3>;
131f126890aSEmmanuel Vadot	bus-width = <4>;
132f126890aSEmmanuel Vadot	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
133f126890aSEmmanuel Vadot	status = "okay";
134f126890aSEmmanuel Vadot};
135f126890aSEmmanuel Vadot
136f126890aSEmmanuel Vadot&mmc1 {
137f126890aSEmmanuel Vadot	vmmc-supply = <&reg_vcc3v3>;
138f126890aSEmmanuel Vadot	bus-width = <4>;
139f126890aSEmmanuel Vadot	non-removable;
140f126890aSEmmanuel Vadot	status = "okay";
141f126890aSEmmanuel Vadot
142f126890aSEmmanuel Vadot	/*
143f126890aSEmmanuel Vadot	 * Explicitly define the sdio device, so that we can add an ethernet
144f126890aSEmmanuel Vadot	 * alias for it (which e.g. makes u-boot set a mac-address).
145f126890aSEmmanuel Vadot	 */
146*7d0873ebSEmmanuel Vadot	rtl8189ftv: wifi@1 {
147f126890aSEmmanuel Vadot		reg = <1>;
148f126890aSEmmanuel Vadot	};
149f126890aSEmmanuel Vadot};
150f126890aSEmmanuel Vadot
151f126890aSEmmanuel Vadot&ohci1 {
152f126890aSEmmanuel Vadot	status = "okay";
153f126890aSEmmanuel Vadot};
154f126890aSEmmanuel Vadot
155f126890aSEmmanuel Vadot&ohci2 {
156f126890aSEmmanuel Vadot	status = "okay";
157f126890aSEmmanuel Vadot};
158f126890aSEmmanuel Vadot
159f126890aSEmmanuel Vadot&uart0 {
160f126890aSEmmanuel Vadot	pinctrl-names = "default";
161f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pa_pins>;
162f126890aSEmmanuel Vadot	status = "okay";
163f126890aSEmmanuel Vadot};
164f126890aSEmmanuel Vadot
165f126890aSEmmanuel Vadot&usbphy {
166f126890aSEmmanuel Vadot	/* USB VBUS is always on */
167f126890aSEmmanuel Vadot	status = "okay";
168f126890aSEmmanuel Vadot};
169