sun7i-a20-wexler-tab7200.dts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. /*
  2. * Copyright 2015 Aleksei Mamlin
  3. * Aleksei Mamlin <[email protected]>
  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. enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  62. power-supply = <&reg_vcc3v3>;
  63. };
  64. chosen {
  65. stdout-path = "serial0:115200n8";
  66. };
  67. };
  68. &codec {
  69. allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
  70. status = "okay";
  71. };
  72. &cpu0 {
  73. cpu-supply = <&reg_dcdc2>;
  74. };
  75. &ehci0 {
  76. status = "okay";
  77. };
  78. &ehci1 {
  79. status = "okay";
  80. };
  81. &i2c0 {
  82. status = "okay";
  83. axp209: pmic@34 {
  84. reg = <0x34>;
  85. interrupt-parent = <&nmi_intc>;
  86. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  87. };
  88. };
  89. #include "axp209.dtsi"
  90. &i2c1 {
  91. status = "okay";
  92. };
  93. &i2c2 {
  94. status = "okay";
  95. gt911: touchscreen@5d {
  96. compatible = "goodix,gt911";
  97. reg = <0x5d>;
  98. interrupt-parent = <&pio>;
  99. interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
  100. irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
  101. reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
  102. touchscreen-swapped-x-y;
  103. };
  104. };
  105. &lradc {
  106. vref-supply = <&reg_vcc3v0>;
  107. status = "okay";
  108. button-571 {
  109. label = "Volume Up";
  110. linux,code = <KEY_VOLUMEUP>;
  111. channel = <0>;
  112. voltage = <571428>;
  113. };
  114. button-761 {
  115. label = "Volume Down";
  116. linux,code = <KEY_VOLUMEDOWN>;
  117. channel = <0>;
  118. voltage = <761904>;
  119. };
  120. };
  121. &mmc0 {
  122. vmmc-supply = <&reg_vcc3v3>;
  123. bus-width = <4>;
  124. cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
  125. status = "okay";
  126. };
  127. &ohci0 {
  128. status = "okay";
  129. };
  130. &ohci1 {
  131. status = "okay";
  132. };
  133. &otg_sram {
  134. status = "okay";
  135. };
  136. &pwm {
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&pwm0_pin>;
  139. status = "okay";
  140. };
  141. &reg_dcdc2 {
  142. regulator-always-on;
  143. regulator-min-microvolt = <1000000>;
  144. regulator-max-microvolt = <1450000>;
  145. regulator-name = "vdd-cpu";
  146. };
  147. &reg_dcdc3 {
  148. regulator-always-on;
  149. regulator-min-microvolt = <1000000>;
  150. regulator-max-microvolt = <1400000>;
  151. regulator-name = "vdd-int-dll";
  152. };
  153. &reg_ldo1 {
  154. regulator-name = "vdd-rtc";
  155. };
  156. &reg_ldo2 {
  157. regulator-always-on;
  158. regulator-min-microvolt = <3000000>;
  159. regulator-max-microvolt = <3000000>;
  160. regulator-name = "avcc";
  161. };
  162. &reg_usb0_vbus {
  163. status = "okay";
  164. };
  165. &reg_usb1_vbus {
  166. status = "okay";
  167. };
  168. &reg_usb2_vbus {
  169. status = "okay";
  170. };
  171. &uart0 {
  172. pinctrl-names = "default";
  173. pinctrl-0 = <&uart0_pb_pins>;
  174. status = "okay";
  175. };
  176. &usb_otg {
  177. dr_mode = "otg";
  178. status = "okay";
  179. };
  180. &usb_power_supply {
  181. status = "okay";
  182. };
  183. &usbphy {
  184. usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
  185. usb0_vbus_power-supply = <&usb_power_supply>;
  186. usb0_vbus-supply = <&reg_usb0_vbus>;
  187. usb1_vbus-supply = <&reg_usb1_vbus>;
  188. usb2_vbus-supply = <&reg_usb2_vbus>;
  189. status = "okay";
  190. };