Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / boot / dts / sun5i-a13-pocketbook-touch-lux-3.dts
blobe9ef97c9c893b6a819fdd9b3cd14a3417c449ae8
1 // SPDX-License-Identifier: GPL-2.0 OR MIT
2 /*
3  * Copyright 2019 Ondrej Jirman <megous@megous.com>
4  */
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>
14 / {
15         model = "PocketBook Touch Lux 3";
16         compatible = "pocketbook,touch-lux-3", "allwinner,sun5i-a13";
18         aliases {
19                 serial0 = &uart1;
20                 i2c0 = &i2c0;
21                 i2c1 = &i2c1;
22                 i2c2 = &i2c2;
23         };
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         };
33         chosen {
34                 stdout-path = "serial0:115200n8";
35         };
37         leds {
38                 compatible = "gpio-leds";
40                 power {
41                         gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */
42                         default-state = "on";
43                 };
44         };
46         gpio-keys {
47                 compatible = "gpio-keys";
48                 autorepeat;
49                 label = "GPIO Keys";
51                 key-right {
52                         label = "Right";
53                         linux,code = <KEY_RIGHT>;
54                         gpios = <&pio 6 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PG9 */
55                 };
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         };
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         };
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         };
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         };
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         };
104 &cpu0 {
105         cpu-supply = <&reg_dcdc2>;
108 &ehci0 {
109         status = "okay";
112 &i2c0 {
113         status = "okay";
115         axp209: pmic@34 {
116                 reg = <0x34>;
117                 interrupts = <0>;
118         };
121 #include "axp209.dtsi"
123 &i2c1 {
124         status = "okay";
126         pcf8563: rtc@51 {
127                 compatible = "nxp,pcf8563";
128                 reg = <0x51>;
129         };
132 &i2c2 {
133         status = "okay";
135         /* Touchpanel is connected here. */
138 &lradc {
139         vref-supply = <&reg_ldo2>;
140         status = "okay";
142         button-200 {
143                 label = "Home";
144                 linux,code = <KEY_HOME>;
145                 channel = <0>;
146                 voltage = <200000>;
147         };
149         button-400 {
150                 label = "Menu";
151                 linux,code = <KEY_MENU>;
152                 channel = <0>;
153                 voltage = <400000>;
154         };
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";
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";
173 &ohci0 {
174         status = "okay";
177 &otg_sram {
178         status = "okay";
181 &pwm {
182         pinctrl-names = "default";
183         pinctrl-0 = <&pwm0_pin>;
184         status = "okay";
187 &reg_dcdc2 {
188         regulator-always-on;
189         regulator-min-microvolt = <1000000>;
190         regulator-max-microvolt = <1400000>;
191         regulator-name = "vdd-cpu";
194 &reg_dcdc3 {
195         regulator-always-on;
196         regulator-min-microvolt = <1200000>;
197         regulator-max-microvolt = <1200000>;
198         regulator-name = "vdd-int-pll";
201 &reg_ldo1 {
202         regulator-name = "vdd-rtc";
205 &reg_ldo2 {
206         regulator-always-on;
207         regulator-min-microvolt = <3000000>;
208         regulator-max-microvolt = <3000000>;
209         regulator-name = "avcc";
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>;
221 &spi2 {
222         pinctrl-names = "default";
223         pinctrl-0 = <&spi2_pe_pins>, <&spi2_cs0_pe_pin>;
224         status = "okay";
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         };
235 &uart1 {
236         pinctrl-names = "default";
237         pinctrl-0 = <&uart1_pg_pins>;
238         status = "okay";
241 &usb_otg {
242         dr_mode = "peripheral";
243         status = "okay";
246 &battery_power_supply {
247         status = "okay";
250 &usb_power_supply {
251         status = "okay";
254 &usbphy {
255         usb1_vbus-supply = <&reg_ldo3>;
256         status = "okay";