sun7i-a20-wexler-tab7200.dts 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. /*
  2. * Copyright 2015 Aleksei Mamlin
  3. * Aleksei Mamlin <mamlinav@gmail.com>
  4. *
  5. * This file is dual-licensed: you can use it either under the terms
  6. * of the GPL or the X11 license, at your option. Note that this dual
  7. * licensing only applies to this file, and not this project as a
  8. * whole.
  9. *
  10. * a) This file is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This file is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * Or, alternatively,
  21. *
  22. * b) Permission is hereby granted, free of charge, to any person
  23. * obtaining a copy of this software and associated documentation
  24. * files (the "Software"), to deal in the Software without
  25. * restriction, including without limitation the rights to use,
  26. * copy, modify, merge, publish, distribute, sublicense, and/or
  27. * sell copies of the Software, and to permit persons to whom the
  28. * Software is furnished to do so, subject to the following
  29. * conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be
  32. * included in all copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  35. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  36. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  37. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  38. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  39. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  40. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. */
  43. /dts-v1/;
  44. #include "sun7i-a20.dtsi"
  45. #include "sunxi-common-regulators.dtsi"
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/input/input.h>
  48. #include <dt-bindings/interrupt-controller/irq.h>
  49. #include <dt-bindings/pwm/pwm.h>
  50. / {
  51. model = "Wexler TAB7200";
  52. compatible = "wexler,tab7200", "allwinner,sun7i-a20";
  53. aliases {
  54. serial0 = &uart0;
  55. };
  56. backlight {
  57. compatible = "pwm-backlight";
  58. pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  59. brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  60. default-brightness-level = <8>;
  61. pinctrl-names = "default";
  62. pinctrl-0 = <&bl_enable_pin>;
  63. enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  64. };
  65. chosen {
  66. stdout-path = "serial0:115200n8";
  67. };
  68. };
  69. &codec {
  70. pinctrl-names = "default";
  71. pinctrl-0 = <&codec_pa_pin>;
  72. allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
  73. status = "okay";
  74. };
  75. &cpu0 {
  76. cpu-supply = <&reg_dcdc2>;
  77. };
  78. &ehci0 {
  79. status = "okay";
  80. };
  81. &ehci1 {
  82. status = "okay";
  83. };
  84. &i2c0 {
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&i2c0_pins_a>;
  87. status = "okay";
  88. axp209: pmic@34 {
  89. reg = <0x34>;
  90. interrupt-parent = <&nmi_intc>;
  91. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  92. };
  93. };
  94. #include "axp209.dtsi"
  95. &i2c1 {
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&i2c1_pins_a>;
  98. status = "okay";
  99. };
  100. &i2c2 {
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&i2c2_pins_a>;
  103. status = "okay";
  104. gt911: touchscreen@5d {
  105. compatible = "goodix,gt911";
  106. reg = <0x5d>;
  107. interrupt-parent = <&pio>;
  108. interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
  109. pinctrl-names = "default";
  110. pinctrl-0 = <&ts_reset_pin>;
  111. irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
  112. reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
  113. touchscreen-swapped-x-y;
  114. };
  115. };
  116. &lradc {
  117. vref-supply = <&reg_vcc3v0>;
  118. status = "okay";
  119. button@571 {
  120. label = "Volume Up";
  121. linux,code = <KEY_VOLUMEUP>;
  122. channel = <0>;
  123. voltage = <571428>;
  124. };
  125. button@761 {
  126. label = "Volume Down";
  127. linux,code = <KEY_VOLUMEDOWN>;
  128. channel = <0>;
  129. voltage = <761904>;
  130. };
  131. };
  132. &mmc0 {
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  135. vmmc-supply = <&reg_vcc3v3>;
  136. bus-width = <4>;
  137. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  138. cd-inverted;
  139. status = "okay";
  140. };
  141. &ohci0 {
  142. status = "okay";
  143. };
  144. &ohci1 {
  145. status = "okay";
  146. };
  147. &otg_sram {
  148. status = "okay";
  149. };
  150. &pio {
  151. bl_enable_pin: bl_enable_pin@0 {
  152. allwinner,pins = "PH7";
  153. allwinner,function = "gpio_out";
  154. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  155. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  156. };
  157. codec_pa_pin: codec_pa_pin@0 {
  158. allwinner,pins = "PH15";
  159. allwinner,function = "gpio_out";
  160. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  161. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  162. };
  163. ts_reset_pin: ts_reset_pin@0 {
  164. allwinner,pins = "PB13";
  165. allwinner,function = "gpio_out";
  166. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  167. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  168. };
  169. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  170. allwinner,pins = "PH4";
  171. allwinner,function = "gpio_in";
  172. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  173. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  174. };
  175. };
  176. &pwm {
  177. pinctrl-names = "default";
  178. pinctrl-0 = <&pwm0_pins_a>;
  179. status = "okay";
  180. };
  181. &reg_dcdc2 {
  182. regulator-always-on;
  183. regulator-min-microvolt = <1000000>;
  184. regulator-max-microvolt = <1450000>;
  185. regulator-name = "vdd-cpu";
  186. };
  187. &reg_dcdc3 {
  188. regulator-always-on;
  189. regulator-min-microvolt = <1000000>;
  190. regulator-max-microvolt = <1400000>;
  191. regulator-name = "vdd-int-dll";
  192. };
  193. &reg_ldo1 {
  194. regulator-name = "vdd-rtc";
  195. };
  196. &reg_ldo2 {
  197. regulator-always-on;
  198. regulator-min-microvolt = <3000000>;
  199. regulator-max-microvolt = <3000000>;
  200. regulator-name = "avcc";
  201. };
  202. &reg_usb0_vbus {
  203. status = "okay";
  204. };
  205. &reg_usb1_vbus {
  206. status = "okay";
  207. };
  208. &reg_usb2_vbus {
  209. status = "okay";
  210. };
  211. &uart0 {
  212. pinctrl-names = "default";
  213. pinctrl-0 = <&uart0_pins_a>;
  214. status = "okay";
  215. };
  216. &usb_otg {
  217. dr_mode = "otg";
  218. status = "okay";
  219. };
  220. &usb_power_supply {
  221. status = "okay";
  222. };
  223. &usbphy {
  224. pinctrl-names = "default";
  225. pinctrl-0 = <&usb0_id_detect_pin>;
  226. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  227. usb0_vbus_power-supply = <&usb_power_supply>;
  228. usb0_vbus-supply = <&reg_usb0_vbus>;
  229. usb1_vbus-supply = <&reg_usb1_vbus>;
  230. usb2_vbus-supply = <&reg_usb2_vbus>;
  231. status = "okay";
  232. };