sun5i-a13-pocketbook-touch-lux-3.dts 4.6 KB

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