xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun5i-a13-pocketbook-614-plus.dts (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1*caa67b06SDenis Burkov// SPDX-License-Identifier: GPL-2.0+
2*caa67b06SDenis Burkov/*
3*caa67b06SDenis Burkov * Copyright 2024 Denis Burkov <hitechshell@mail.ru>
4*caa67b06SDenis Burkov */
5*caa67b06SDenis Burkov
6*caa67b06SDenis Burkov/dts-v1/;
7*caa67b06SDenis Burkov#include "sun5i-a13.dtsi"
8*caa67b06SDenis Burkov#include "sunxi-common-regulators.dtsi"
9*caa67b06SDenis Burkov
10*caa67b06SDenis Burkov#include <dt-bindings/gpio/gpio.h>
11*caa67b06SDenis Burkov#include <dt-bindings/input/input.h>
12*caa67b06SDenis Burkov#include <dt-bindings/interrupt-controller/irq.h>
13*caa67b06SDenis Burkov#include <dt-bindings/leds/common.h>
14*caa67b06SDenis Burkov
15*caa67b06SDenis Burkov/ {
16*caa67b06SDenis Burkov	model = "PocketBook 614 Plus";
17*caa67b06SDenis Burkov	compatible = "pocketbook,614-plus", "allwinner,sun5i-a13";
18*caa67b06SDenis Burkov
19*caa67b06SDenis Burkov	aliases {
20*caa67b06SDenis Burkov		serial0 = &uart1;
21*caa67b06SDenis Burkov	};
22*caa67b06SDenis Burkov
23*caa67b06SDenis Burkov	chosen {
24*caa67b06SDenis Burkov		stdout-path = "serial0:115200n8";
25*caa67b06SDenis Burkov	};
26*caa67b06SDenis Burkov
27*caa67b06SDenis Burkov	leds {
28*caa67b06SDenis Burkov		compatible = "gpio-leds";
29*caa67b06SDenis Burkov
30*caa67b06SDenis Burkov		led-0 {
31*caa67b06SDenis Burkov			color = <LED_COLOR_ID_WHITE>;
32*caa67b06SDenis Burkov			function = LED_FUNCTION_POWER;
33*caa67b06SDenis Burkov			linux,default-trigger = "default-on";
34*caa67b06SDenis Burkov			gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */
35*caa67b06SDenis Burkov		};
36*caa67b06SDenis Burkov	};
37*caa67b06SDenis Burkov
38*caa67b06SDenis Burkov	gpio-keys {
39*caa67b06SDenis Burkov		compatible = "gpio-keys";
40*caa67b06SDenis Burkov
41*caa67b06SDenis Burkov		key-0 {
42*caa67b06SDenis Burkov			label = "Right";
43*caa67b06SDenis Burkov			linux,code = <KEY_NEXT>;
44*caa67b06SDenis Burkov			gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */
45*caa67b06SDenis Burkov		};
46*caa67b06SDenis Burkov
47*caa67b06SDenis Burkov		key-1 {
48*caa67b06SDenis Burkov			label = "Left";
49*caa67b06SDenis Burkov			linux,code = <KEY_PREVIOUS>;
50*caa67b06SDenis Burkov			gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
51*caa67b06SDenis Burkov		};
52*caa67b06SDenis Burkov	};
53*caa67b06SDenis Burkov
54*caa67b06SDenis Burkov	reg_3v3_mmc0: regulator-mmc0 {
55*caa67b06SDenis Burkov		compatible = "regulator-fixed";
56*caa67b06SDenis Burkov		regulator-name = "vdd-mmc0";
57*caa67b06SDenis Burkov		regulator-min-microvolt = <3300000>;
58*caa67b06SDenis Burkov		regulator-max-microvolt = <3300000>;
59*caa67b06SDenis Burkov		gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */
60*caa67b06SDenis Burkov		vin-supply = <&reg_vcc3v3>;
61*caa67b06SDenis Burkov	};
62*caa67b06SDenis Burkov};
63*caa67b06SDenis Burkov
64*caa67b06SDenis Burkov&cpu0 {
65*caa67b06SDenis Burkov	cpu-supply = <&reg_dcdc2>;
66*caa67b06SDenis Burkov};
67*caa67b06SDenis Burkov
68*caa67b06SDenis Burkov&ehci0 {
69*caa67b06SDenis Burkov	status = "okay";
70*caa67b06SDenis Burkov};
71*caa67b06SDenis Burkov
72*caa67b06SDenis Burkov&i2c0 {
73*caa67b06SDenis Burkov	status = "okay";
74*caa67b06SDenis Burkov
75*caa67b06SDenis Burkov	axp209: pmic@34 {
76*caa67b06SDenis Burkov		compatible = "x-powers,axp209";
77*caa67b06SDenis Burkov		reg = <0x34>;
78*caa67b06SDenis Burkov		interrupts = <0>;
79*caa67b06SDenis Burkov	};
80*caa67b06SDenis Burkov};
81*caa67b06SDenis Burkov
82*caa67b06SDenis Burkov#include "axp209.dtsi"
83*caa67b06SDenis Burkov
84*caa67b06SDenis Burkov&i2c1 {
85*caa67b06SDenis Burkov	status = "okay";
86*caa67b06SDenis Burkov
87*caa67b06SDenis Burkov	pcf8563: rtc@51 {
88*caa67b06SDenis Burkov		compatible = "nxp,pcf8563";
89*caa67b06SDenis Burkov		reg = <0x51>;
90*caa67b06SDenis Burkov		#clock-cells = <0>;
91*caa67b06SDenis Burkov	};
92*caa67b06SDenis Burkov};
93*caa67b06SDenis Burkov
94*caa67b06SDenis Burkov&lradc {
95*caa67b06SDenis Burkov	vref-supply = <&reg_ldo2>;
96*caa67b06SDenis Burkov	status = "okay";
97*caa67b06SDenis Burkov
98*caa67b06SDenis Burkov	button-300 {
99*caa67b06SDenis Burkov		label = "Down";
100*caa67b06SDenis Burkov		linux,code = <KEY_DOWN>;
101*caa67b06SDenis Burkov		channel = <0>;
102*caa67b06SDenis Burkov		voltage = <300000>;
103*caa67b06SDenis Burkov	};
104*caa67b06SDenis Burkov
105*caa67b06SDenis Burkov	button-700 {
106*caa67b06SDenis Burkov		label = "Up";
107*caa67b06SDenis Burkov		linux,code = <KEY_UP>;
108*caa67b06SDenis Burkov		channel = <0>;
109*caa67b06SDenis Burkov		voltage = <700000>;
110*caa67b06SDenis Burkov	};
111*caa67b06SDenis Burkov
112*caa67b06SDenis Burkov	button-1000 {
113*caa67b06SDenis Burkov		label = "Left";
114*caa67b06SDenis Burkov		linux,code = <KEY_LEFT>;
115*caa67b06SDenis Burkov		channel = <0>;
116*caa67b06SDenis Burkov		voltage = <1000000>;
117*caa67b06SDenis Burkov	};
118*caa67b06SDenis Burkov
119*caa67b06SDenis Burkov	button-1200 {
120*caa67b06SDenis Burkov		label = "Menu";
121*caa67b06SDenis Burkov		linux,code = <KEY_MENU>;
122*caa67b06SDenis Burkov		channel = <0>;
123*caa67b06SDenis Burkov		voltage = <1200000>;
124*caa67b06SDenis Burkov	};
125*caa67b06SDenis Burkov
126*caa67b06SDenis Burkov	button-1500 {
127*caa67b06SDenis Burkov		label = "Right";
128*caa67b06SDenis Burkov		linux,code = <KEY_RIGHT>;
129*caa67b06SDenis Burkov		channel = <0>;
130*caa67b06SDenis Burkov		voltage = <1500000>;
131*caa67b06SDenis Burkov	};
132*caa67b06SDenis Burkov};
133*caa67b06SDenis Burkov
134*caa67b06SDenis Burkov&mmc0 {
135*caa67b06SDenis Burkov	vmmc-supply = <&reg_3v3_mmc0>;
136*caa67b06SDenis Burkov	bus-width = <4>;
137*caa67b06SDenis Burkov	cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
138*caa67b06SDenis Burkov	status = "okay";
139*caa67b06SDenis Burkov};
140*caa67b06SDenis Burkov
141*caa67b06SDenis Burkov&mmc2 {
142*caa67b06SDenis Burkov	pinctrl-names = "default";
143*caa67b06SDenis Burkov	pinctrl-0 = <&mmc2_4bit_pc_pins>;
144*caa67b06SDenis Burkov	vmmc-supply = <&reg_vcc3v3>;
145*caa67b06SDenis Burkov	bus-width = <4>;
146*caa67b06SDenis Burkov	non-removable;
147*caa67b06SDenis Burkov	status = "okay";
148*caa67b06SDenis Burkov};
149*caa67b06SDenis Burkov
150*caa67b06SDenis Burkov&ohci0 {
151*caa67b06SDenis Burkov	status = "okay";
152*caa67b06SDenis Burkov};
153*caa67b06SDenis Burkov
154*caa67b06SDenis Burkov&otg_sram {
155*caa67b06SDenis Burkov	status = "okay";
156*caa67b06SDenis Burkov};
157*caa67b06SDenis Burkov
158*caa67b06SDenis Burkov&reg_dcdc2 {
159*caa67b06SDenis Burkov	regulator-always-on;
160*caa67b06SDenis Burkov	regulator-min-microvolt = <1000000>;
161*caa67b06SDenis Burkov	regulator-max-microvolt = <1500000>;
162*caa67b06SDenis Burkov	regulator-name = "vdd-cpu";
163*caa67b06SDenis Burkov};
164*caa67b06SDenis Burkov
165*caa67b06SDenis Burkov&reg_dcdc3 {
166*caa67b06SDenis Burkov	regulator-always-on;
167*caa67b06SDenis Burkov	regulator-min-microvolt = <1000000>;
168*caa67b06SDenis Burkov	regulator-max-microvolt = <1400000>;
169*caa67b06SDenis Burkov	regulator-name = "vdd-int-dll";
170*caa67b06SDenis Burkov};
171*caa67b06SDenis Burkov
172*caa67b06SDenis Burkov&reg_ldo1 {
173*caa67b06SDenis Burkov	regulator-name = "vdd-rtc";
174*caa67b06SDenis Burkov};
175*caa67b06SDenis Burkov
176*caa67b06SDenis Burkov&reg_ldo2 {
177*caa67b06SDenis Burkov	regulator-always-on;
178*caa67b06SDenis Burkov	regulator-min-microvolt = <3000000>;
179*caa67b06SDenis Burkov	regulator-max-microvolt = <3000000>;
180*caa67b06SDenis Burkov	regulator-name = "avcc";
181*caa67b06SDenis Burkov};
182*caa67b06SDenis Burkov
183*caa67b06SDenis Burkov&reg_usb0_vbus {
184*caa67b06SDenis Burkov	status = "okay";
185*caa67b06SDenis Burkov	gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
186*caa67b06SDenis Burkov};
187*caa67b06SDenis Burkov
188*caa67b06SDenis Burkov&reg_usb1_vbus {
189*caa67b06SDenis Burkov	gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
190*caa67b06SDenis Burkov	status = "okay";
191*caa67b06SDenis Burkov};
192*caa67b06SDenis Burkov
193*caa67b06SDenis Burkov&uart1 {
194*caa67b06SDenis Burkov	pinctrl-names = "default";
195*caa67b06SDenis Burkov	pinctrl-0 = <&uart1_pg_pins>;
196*caa67b06SDenis Burkov	status = "okay";
197*caa67b06SDenis Burkov};
198*caa67b06SDenis Burkov
199*caa67b06SDenis Burkov&usb_otg {
200*caa67b06SDenis Burkov	dr_mode = "otg";
201*caa67b06SDenis Burkov	status = "okay";
202*caa67b06SDenis Burkov};
203*caa67b06SDenis Burkov
204*caa67b06SDenis Burkov&usb_power_supply {
205*caa67b06SDenis Burkov	status = "okay";
206*caa67b06SDenis Burkov};
207*caa67b06SDenis Burkov
208*caa67b06SDenis Burkov&battery_power_supply {
209*caa67b06SDenis Burkov	status = "okay";
210*caa67b06SDenis Burkov};
211*caa67b06SDenis Burkov
212*caa67b06SDenis Burkov&usbphy {
213*caa67b06SDenis Burkov	usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
214*caa67b06SDenis Burkov	usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>;
215*caa67b06SDenis Burkov	usb0_vbus-supply = <&reg_usb0_vbus>;
216*caa67b06SDenis Burkov	usb1_vbus-supply = <&reg_usb1_vbus>;
217*caa67b06SDenis Burkov	status = "okay";
218*caa67b06SDenis Burkov};
219