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