xref: /freebsd-src/sys/contrib/device-tree/src/arm/allwinner/sun8i-q8-common.dtsi (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1f126890aSEmmanuel Vadot/*
2f126890aSEmmanuel Vadot * Copyright 2015 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#include "sunxi-reference-design-tablet.dtsi"
43f126890aSEmmanuel Vadot#include "sun8i-reference-design-tablet.dtsi"
44f126890aSEmmanuel Vadot
45f126890aSEmmanuel Vadot/ {
46f126890aSEmmanuel Vadot	aliases {
47f126890aSEmmanuel Vadot		serial0 = &r_uart;
48f126890aSEmmanuel Vadot		/* Make u-boot set mac-address for wifi without an eeprom */
49f126890aSEmmanuel Vadot		ethernet0 = &sdio_wifi;
50f126890aSEmmanuel Vadot	};
51f126890aSEmmanuel Vadot
52f126890aSEmmanuel Vadot	panel: panel {
53f126890aSEmmanuel Vadot		/* Tablet dts should provide panel compatible */
54f126890aSEmmanuel Vadot		backlight = <&backlight>;
55f126890aSEmmanuel Vadot		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
56f126890aSEmmanuel Vadot		power-supply = <&reg_dc1sw>;
57f126890aSEmmanuel Vadot
58f126890aSEmmanuel Vadot		port {
59f126890aSEmmanuel Vadot			panel_input: endpoint {
60f126890aSEmmanuel Vadot				remote-endpoint = <&tcon0_out_lcd>;
61f126890aSEmmanuel Vadot			};
62f126890aSEmmanuel Vadot		};
63f126890aSEmmanuel Vadot	};
64f126890aSEmmanuel Vadot
65*7d0873ebSEmmanuel Vadot	wifi_pwrseq: pwrseq {
66f126890aSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
67f126890aSEmmanuel Vadot		/*
68f126890aSEmmanuel Vadot		 * Q8 boards use various PL# pins as wifi-en. On other boards
69f126890aSEmmanuel Vadot		 * these may be connected to a wifi module output pin. To avoid
70f126890aSEmmanuel Vadot		 * short-circuits we configure these as inputs with pull-ups via
71f126890aSEmmanuel Vadot		 * pinctrl, instead of listing them as active-low reset-gpios.
72f126890aSEmmanuel Vadot		 */
73f126890aSEmmanuel Vadot		pinctrl-names = "default";
74f126890aSEmmanuel Vadot		pinctrl-0 = <&wifi_pwrseq_pin_q8>;
75f126890aSEmmanuel Vadot		/* The esp8089 needs 200 ms after driving wifi-en high */
76f126890aSEmmanuel Vadot		post-power-on-delay-ms = <200>;
77f126890aSEmmanuel Vadot	};
78f126890aSEmmanuel Vadot};
79f126890aSEmmanuel Vadot
80f126890aSEmmanuel Vadot&de {
81f126890aSEmmanuel Vadot	status = "okay";
82f126890aSEmmanuel Vadot};
83f126890aSEmmanuel Vadot
84f126890aSEmmanuel Vadot&ehci0 {
85f126890aSEmmanuel Vadot	status  = "okay";
86f126890aSEmmanuel Vadot};
87f126890aSEmmanuel Vadot
88f126890aSEmmanuel Vadot&mmc1 {
89f126890aSEmmanuel Vadot	pinctrl-names = "default";
90f126890aSEmmanuel Vadot	pinctrl-0 = <&mmc1_pg_pins>;
91f126890aSEmmanuel Vadot	vmmc-supply = <&reg_dldo1>;
92f126890aSEmmanuel Vadot	mmc-pwrseq = <&wifi_pwrseq>;
93f126890aSEmmanuel Vadot	bus-width = <4>;
94f126890aSEmmanuel Vadot	non-removable;
95f126890aSEmmanuel Vadot	status = "okay";
96f126890aSEmmanuel Vadot
97*7d0873ebSEmmanuel Vadot	sdio_wifi: wifi@1 {
98f126890aSEmmanuel Vadot		reg = <1>;
99f126890aSEmmanuel Vadot	};
100f126890aSEmmanuel Vadot};
101f126890aSEmmanuel Vadot
102f126890aSEmmanuel Vadot&r_pio {
103f126890aSEmmanuel Vadot	wifi_pwrseq_pin_q8: wifi-pwrseq-pins {
104f126890aSEmmanuel Vadot		pins = "PL6", "PL7", "PL11";
105f126890aSEmmanuel Vadot		function = "gpio_in";
106f126890aSEmmanuel Vadot		bias-pull-up;
107f126890aSEmmanuel Vadot	};
108f126890aSEmmanuel Vadot};
109f126890aSEmmanuel Vadot
110f126890aSEmmanuel Vadot&tcon0 {
111f126890aSEmmanuel Vadot	pinctrl-names = "default";
112f126890aSEmmanuel Vadot	pinctrl-0 = <&lcd_rgb666_pins>;
113f126890aSEmmanuel Vadot	status = "okay";
114f126890aSEmmanuel Vadot};
115f126890aSEmmanuel Vadot
116f126890aSEmmanuel Vadot&usbphy {
117f126890aSEmmanuel Vadot	usb1_vbus-supply = <&reg_dldo1>;
118f126890aSEmmanuel Vadot};
119