sun50i-a64-pinebook.dts revision 1.10
1/* $NetBSD: sun50i-a64-pinebook.dts,v 1.10 2018/05/10 11:06:13 jmcneill Exp $ */
2
3/*-
4 * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29/dts-v1/;
30
31#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi"
32#include "sun50i-a64.dtsi"
33
34#include <dt-bindings/gpio/gpio.h>
35#include <dt-bindings/input/linux-event-codes.h>
36#include <dt-bindings/interrupt-controller/irq.h>
37#include <dt-bindings/pwm/pwm.h>
38
39/ {
40	model = "Pine64 Pinebook";
41	compatible = "pine64,pinebook", "allwinner,sun50i-a64";
42
43	aliases {
44		serial0 = &uart0;
45	};
46
47	chosen {
48		stdout-path = "serial0:115200n8";
49
50		framebuffer@0 {
51			allwinner,pipeline = "mixer0-lcd0";
52		};
53	};
54
55	gpio_keys {
56		compatible = "gpio-keys";
57
58		lid_switch {
59			label = "Lid Switch";
60			gpios = <&pio 7 10 GPIO_ACTIVE_LOW>;	/* PH10 */
61			linux,input-type = <EV_SW>;
62			linux,code = <SW_LID>;
63			linux,can-disable;
64		};
65	};
66
67	backlight: backlight {
68		compatible = "pwm-backlight";
69		pwms = <&pwm 0 50000 0>;
70		brightness-levels = <0 30 40 50 60 70 80 90 100>;
71		default-brightness-level = <6>;
72		enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>;	/* PD23 */
73	};
74
75	reg_vcc3v3: vcc3v3 {
76		regulator-fixed;
77		regulator-name = "vcc3v3";
78		regulator-min-microvolt = <3300000>;
79		regulator-max-microvolt = <3300000>;
80	};
81
82	sound_spdif {
83		status = "disabled";
84	};
85};
86
87&spdif_out {
88	status = "disabled";
89};
90
91&ehci0 {
92	status = "okay";
93};
94
95&ehci1 {
96	status = "okay";
97};
98
99&ohci0 {
100	status = "okay";
101};
102
103&ohci1 {
104	status = "okay";
105};
106
107&usb_otg {
108	dr_mode = "host";
109	status = "okay";
110};
111
112&usbphy {
113	status = "okay";
114};
115
116&mmc0 {
117	pinctrl-names = "default";
118	pinctrl-0 = <&mmc0_pins>;
119	vmmc-supply = <&reg_vcc3v3>;
120	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
121	disable-wp;
122	bus-width = <4>;
123	status = "okay";
124};
125
126&mmc1 {
127	pinctrl-names = "default";
128	pinctrl-0 = <&mmc1_pins>;
129	vmmc-supply = <&reg_dldo4>;
130	vqmmc-supply = <&reg_eldo1>;
131	bus-width = <4>;
132	non-removable;
133	status = "okay";
134
135	rtl8723cs: wifi@1 {
136		reg = <1>;
137	};
138};
139
140&mmc2 {
141	pinctrl-names = "default";
142	pinctrl-0 = <&mmc2_pins>;
143	vmmc-supply = <&reg_dcdc1>;
144	bus-width = <8>;
145	non-removable;
146	cap-mmc-hw-reset;
147	status = "okay";
148};
149
150&uart0 {
151	pinctrl-names = "default";
152	pinctrl-0 = <&uart0_pins_a>;
153	status = "okay";
154};
155
156&pwm {
157	pinctrl-names = "default";
158	pinctrl-0 = <&pwm0_pins>;
159	status = "okay";
160};
161
162&r_rsb {
163	status = "okay";
164
165	axp803: pmic@3a3 {
166		compatible = "x-powers,axp803";
167		reg = <0x3a3>;
168		interrupt-parent = <&r_intc>;
169		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
170	};
171};
172
173#include "axp803.dtsi"
174
175&codec {
176	allwinner,pa-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;	/* PH7 */
177	status = "okay";
178};
179
180&codec_analog {
181	status = "okay";
182};
183
184&dai {
185	status = "okay";
186};
187
188&sound {
189	status = "okay";
190};
191