• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright 2019 Ondrej Jirman <megous@megous.com>
4 */
5
6/dts-v1/;
7#include "sun5i-a13.dtsi"
8#include "sunxi-common-regulators.dtsi"
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/pwm/pwm.h>
13
14/ {
15	model = "PocketBook Touch Lux 3";
16	compatible = "pocketbook,touch-lux-3", "allwinner,sun5i-a13";
17
18	aliases {
19		serial0 = &uart1;
20		i2c0 = &i2c0;
21		i2c1 = &i2c1;
22		i2c2 = &i2c2;
23	};
24
25	backlight {
26		compatible = "pwm-backlight";
27		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
28		enable-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
29		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
30		default-brightness-level = <8>;
31	};
32
33	chosen {
34		stdout-path = "serial0:115200n8";
35	};
36
37	leds {
38		compatible = "gpio-leds";
39
40		power {
41			gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */
42			default-state = "on";
43		};
44	};
45
46	gpio-keys {
47		compatible = "gpio-keys";
48		autorepeat;
49		label = "GPIO Keys";
50
51		key-right {
52			label = "Right";
53			linux,code = <KEY_RIGHT>;
54			gpios = <&pio 6 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PG9 */
55		};
56
57		key-left {
58			label = "Left";
59			linux,code = <KEY_LEFT>;
60			gpios = <&pio 6 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PG10 */
61		};
62	};
63
64	reg_1v8: regulator-1v8 {
65		compatible = "regulator-fixed";
66		regulator-name = "vdd-1v8-nor-ctp";
67		regulator-min-microvolt = <1800000>;
68		regulator-max-microvolt = <1800000>;
69		gpio = <&pio 2 15 GPIO_ACTIVE_HIGH>;
70		enable-active-high;
71	};
72
73	reg_1v8_nor: regulator-nor {
74		compatible = "regulator-fixed";
75		regulator-name = "vdd-nor";
76		regulator-min-microvolt = <1800000>;
77		regulator-max-microvolt = <1800000>;
78		gpio = <&pio 2 14 GPIO_ACTIVE_HIGH>;
79		enable-active-high;
80		vin-supply = <&reg_1v8>;
81		regulator-always-on;
82	};
83
84	reg_1v8_ctp: regulator-ctp {
85		compatible = "regulator-fixed";
86		regulator-name = "vdd-ctp";
87		regulator-min-microvolt = <1800000>;
88		regulator-max-microvolt = <1800000>;
89		gpio = <&pio 2 13 GPIO_ACTIVE_HIGH>;
90		enable-active-high;
91		vin-supply = <&reg_1v8>;
92	};
93
94	reg_3v3_mmc0: regulator-mmc0 {
95		compatible = "regulator-fixed";
96		regulator-name = "vdd-mmc0";
97		regulator-min-microvolt = <3300000>;
98		regulator-max-microvolt = <3300000>;
99		gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */
100		vin-supply = <&reg_vcc3v3>;
101	};
102};
103
104&cpu0 {
105	cpu-supply = <&reg_dcdc2>;
106};
107
108&ehci0 {
109	status = "okay";
110};
111
112&i2c0 {
113	status = "okay";
114
115	axp209: pmic@34 {
116		reg = <0x34>;
117		interrupts = <0>;
118	};
119};
120
121#include "axp209.dtsi"
122
123&i2c1 {
124	status = "okay";
125
126	pcf8563: rtc@51 {
127		compatible = "nxp,pcf8563";
128		reg = <0x51>;
129	};
130};
131
132&i2c2 {
133	status = "okay";
134
135	/* Touchpanel is connected here. */
136};
137
138&lradc {
139	vref-supply = <&reg_ldo2>;
140	status = "okay";
141
142	button-200 {
143		label = "Home";
144		linux,code = <KEY_HOME>;
145		channel = <0>;
146		voltage = <200000>;
147	};
148
149	button-400 {
150		label = "Menu";
151		linux,code = <KEY_MENU>;
152		channel = <0>;
153		voltage = <400000>;
154	};
155};
156
157&mmc0 {
158	vmmc-supply = <&reg_3v3_mmc0>;
159	bus-width = <4>;
160	cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
161	status = "okay";
162};
163
164&mmc2 {
165	pinctrl-names = "default";
166	pinctrl-0 = <&mmc2_4bit_pc_pins>;
167	vmmc-supply = <&reg_vcc3v3>;
168	bus-width = <4>;
169	non-removable;
170	status = "okay";
171};
172
173&ohci0 {
174	status = "okay";
175};
176
177&otg_sram {
178	status = "okay";
179};
180
181&pwm {
182	pinctrl-names = "default";
183	pinctrl-0 = <&pwm0_pin>;
184	status = "okay";
185};
186
187&reg_dcdc2 {
188	regulator-always-on;
189	regulator-min-microvolt = <1000000>;
190	regulator-max-microvolt = <1400000>;
191	regulator-name = "vdd-cpu";
192};
193
194&reg_dcdc3 {
195	regulator-always-on;
196	regulator-min-microvolt = <1200000>;
197	regulator-max-microvolt = <1200000>;
198	regulator-name = "vdd-int-pll";
199};
200
201&reg_ldo1 {
202	regulator-name = "vdd-rtc";
203};
204
205&reg_ldo2 {
206	regulator-always-on;
207	regulator-min-microvolt = <3000000>;
208	regulator-max-microvolt = <3000000>;
209	regulator-name = "avcc";
210};
211
212&reg_ldo3 {
213	regulator-min-microvolt = <3300000>;
214	regulator-max-microvolt = <3300000>;
215	regulator-name = "vcc-wifi";
216	/* We need this otherwise the LDO3 would overload */
217	regulator-soft-start;
218	regulator-ramp-delay = <1600>;
219};
220
221&spi2 {
222	pinctrl-names = "default";
223	pinctrl-0 = <&spi2_pe_pins>, <&spi2_cs0_pe_pin>;
224	status = "okay";
225
226	epd_flash: flash@0 {
227		#address-cells = <1>;
228		#size-cells = <1>;
229		compatible = "macronix,mx25u4033", "jedec,spi-nor";
230		reg = <0>;
231		spi-max-frequency = <4000000>;
232	};
233};
234
235&uart1 {
236	pinctrl-names = "default";
237	pinctrl-0 = <&uart1_pg_pins>;
238	status = "okay";
239};
240
241&usb_otg {
242	dr_mode = "peripheral";
243	status = "okay";
244};
245
246&battery_power_supply {
247	status = "okay";
248};
249
250&usb_power_supply {
251	status = "okay";
252};
253
254&usbphy {
255	usb1_vbus-supply = <&reg_ldo3>;
256	status = "okay";
257};
258