sun50i-a64-pinebook.dts revision 1.15
1/* $NetBSD: sun50i-a64-pinebook.dts,v 1.15 2019/02/03 13:19:20 jmcneill Exp $ */
2
3/*-
4 * Copyright (c) 2017-2019 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#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts"
30#include "sun50i-a64.dtsi"
31
32#include <dt-bindings/gpio/gpio.h>
33#include <dt-bindings/input/linux-event-codes.h>
34#include <dt-bindings/interrupt-controller/irq.h>
35#include <dt-bindings/pwm/pwm.h>
36
37/ {
38	chosen {
39		framebuffer@0 {
40			allwinner,pipeline = "mixer0-lcd0";
41		};
42	};
43
44	gpio_keys {
45		lid_switch {
46			/*
47			 * This is listed as PL12 in 4.20.3 sources, but
48			 * we have used PH10 all along.
49			 */
50			gpios = <&pio 7 10 GPIO_ACTIVE_LOW>;	/* PH10 */
51		};
52	};
53
54	sound_spdif {
55		status = "disabled";
56	};
57};
58
59&cpu0 {
60	cpu-supply = <&reg_dcdc2>;
61	operating-points = <
62		/* kHz    uV */
63		1152000 1300000
64		1104000 1260000
65		1008000 1200000
66		816000  1080000
67		648000	1040000
68		408000	1000000
69		>;
70};
71
72&spdif_out {
73	status = "disabled";
74};
75
76&uart1 {
77	pinctrl-names = "default";
78	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
79	status = "okay";
80	bluetooth {
81		compatible = "realtek,rtl8723cs-bt";
82		reset-gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
83		device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
84		host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
85		firmware-postfix = "pinebook";
86	};
87};
88
89&codec {
90	allwinner,pa-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;	/* PH7 */
91	status = "okay";
92};
93
94&codec_analog {
95	status = "okay";
96};
97
98&dai {
99	status = "okay";
100};
101
102&sound {
103	status = "okay";
104};
105
106&de {
107	status = "okay";
108};
109
110&mixer0 {
111	status = "okay";
112};
113
114&pio {
115	lcd_rgb666_pins: lcd-rgb666 {
116		pins = "PD0", "PD1", "PD2", "PD3", "PD4",
117		       "PD5", "PD6", "PD7", "PD8", "PD9",
118		       "PD10", "PD11", "PD12", "PD13",
119		       "PD14", "PD15", "PD16", "PD17",
120		       "PD18", "PD19", "PD20", "PD21";
121		function = "lcd0";
122	};
123};
124
125&tcon0 {
126	pinctrl-names = "default";
127	pinctrl-0 = <&lcd_rgb666_pins>;
128
129	status = "okay";
130};
131
132&tcon0_out {
133	tcon0_out_anx6345: endpoint@0 {
134		reg = <0>;
135		remote-endpoint = <&anx6345_in>;
136	};
137};
138
139&r_pio {
140	r_i2c_pins_a: i2c-a {
141		pins = "PL8", "PL9";
142		function = "s_i2c";
143	};
144};
145
146&r_i2c {
147	pinctrl-names = "default";
148	pinctrl-0 = <&r_i2c_pins_a>;
149	status = "okay";
150
151	anx6345: anx6345@38 {
152		compatible = "analogix,anx6345";
153		reg = <0x38>;
154		reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>;	/* PD24 */
155		panel-supply = <&reg_dc1sw>;
156		dvdd25-supply = <&reg_dldo2>;
157		dvdd12-supply = <&reg_fldo1>;
158
159		port {
160			anx6345_in: endpoint {
161				remote-endpoint = <&tcon0_out_anx6345>;
162			};
163		};
164	};
165};
166