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