sun6i-a31s-primo81.dts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. /*
  2. * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
  3. * Copyright 2015 Karsten Merker <merker@debian.org>
  4. * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
  5. *
  6. * This file is dual-licensed: you can use it either under the terms
  7. * of the GPL or the X11 license, at your option. Note that this dual
  8. * licensing only applies to this file, and not this project as a
  9. * whole.
  10. *
  11. * a) This file is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This file is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * Or, alternatively,
  22. *
  23. * b) Permission is hereby granted, free of charge, to any person
  24. * obtaining a copy of this software and associated documentation
  25. * files (the "Software"), to deal in the Software without
  26. * restriction, including without limitation the rights to use,
  27. * copy, modify, merge, publish, distribute, sublicense, and/or
  28. * sell copies of the Software, and to permit persons to whom the
  29. * Software is furnished to do so, subject to the following
  30. * conditions:
  31. *
  32. * The above copyright notice and this permission notice shall be
  33. * included in all copies or substantial portions of the Software.
  34. *
  35. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  36. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  37. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  38. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  39. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  40. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  41. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  42. * OTHER DEALINGS IN THE SOFTWARE.
  43. */
  44. /dts-v1/;
  45. #include "sun6i-a31s.dtsi"
  46. #include "sunxi-common-regulators.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/input/input.h>
  49. #include <dt-bindings/pinctrl/sun4i-a10.h>
  50. / {
  51. model = "MSI Primo81 tablet";
  52. compatible = "msi,primo81", "allwinner,sun6i-a31s";
  53. };
  54. &cpu0 {
  55. cpu-supply = <&reg_dcdc3>;
  56. };
  57. &ehci0 {
  58. /* rtl8188etv wifi is connected here */
  59. status = "okay";
  60. };
  61. &i2c0 {
  62. /* pull-ups and device VDDIO use AXP221 DLDO3 */
  63. pinctrl-names = "default";
  64. pinctrl-0 = <&i2c0_pins_a>;
  65. status = "failed";
  66. };
  67. &i2c1 {
  68. pinctrl-names = "default";
  69. pinctrl-0 = <&i2c1_pins_a>;
  70. status = "okay";
  71. ctp@5d {
  72. pinctrl-names = "default";
  73. pinctrl-0 = <&gt911_int_primo81>;
  74. compatible = "goodix,gt911";
  75. reg = <0x5d>;
  76. interrupt-parent = <&pio>;
  77. interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
  78. touchscreen-swapped-x-y;
  79. };
  80. };
  81. &i2c2 {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&i2c2_pins_a>;
  84. status = "okay";
  85. accelerometer@1c {
  86. pinctrl-names = "default";
  87. pinctrl-0 = <&mma8452_int_primo81>;
  88. compatible = "fsl,mma8452";
  89. reg = <0x1c>;
  90. interrupt-parent = <&pio>;
  91. interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
  92. #io-channel-cells = <1>;
  93. };
  94. };
  95. &lradc {
  96. vref-supply = <&reg_aldo3>;
  97. status = "okay";
  98. button@158 {
  99. label = "Volume Up";
  100. linux,code = <KEY_VOLUMEUP>;
  101. channel = <0>;
  102. voltage = <158730>;
  103. };
  104. button@349 {
  105. label = "Volume Down";
  106. linux,code = <KEY_VOLUMEDOWN>;
  107. channel = <0>;
  108. voltage = <349206>;
  109. };
  110. };
  111. &mmc0 {
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
  114. vmmc-supply = <&reg_dcdc1>;
  115. bus-width = <4>;
  116. cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
  117. cd-inverted;
  118. status = "okay";
  119. };
  120. &pio {
  121. gt911_int_primo81: gt911_int_pin@0 {
  122. allwinner,pins = "PA3";
  123. allwinner,function = "gpio_in";
  124. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  125. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  126. };
  127. mma8452_int_primo81: mma8452_int_pin@0 {
  128. allwinner,pins = "PA9";
  129. allwinner,function = "gpio_in";
  130. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  131. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  132. };
  133. mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
  134. allwinner,pins = "PA8";
  135. allwinner,function = "gpio_in";
  136. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  137. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  138. };
  139. };
  140. &p2wi {
  141. status = "okay";
  142. axp22x: pmic@68 {
  143. compatible = "x-powers,axp221";
  144. reg = <0x68>;
  145. interrupt-parent = <&nmi_intc>;
  146. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  147. };
  148. };
  149. #include "axp22x.dtsi"
  150. &reg_aldo3 {
  151. regulator-always-on;
  152. regulator-min-microvolt = <2700000>;
  153. regulator-max-microvolt = <3300000>;
  154. regulator-name = "avcc";
  155. };
  156. &reg_dc1sw {
  157. regulator-name = "vcc-lcd";
  158. };
  159. &reg_dc5ldo {
  160. regulator-min-microvolt = <700000>;
  161. regulator-max-microvolt = <1320000>;
  162. regulator-name = "vdd-cpus"; /* This is an educated guess */
  163. };
  164. &reg_dcdc1 {
  165. regulator-always-on;
  166. regulator-min-microvolt = <3000000>;
  167. regulator-max-microvolt = <3000000>;
  168. regulator-name = "vcc-3v0";
  169. };
  170. &reg_dcdc2 {
  171. regulator-min-microvolt = <700000>;
  172. regulator-max-microvolt = <1320000>;
  173. regulator-name = "vdd-gpu";
  174. };
  175. &reg_dcdc3 {
  176. regulator-always-on;
  177. regulator-min-microvolt = <700000>;
  178. regulator-max-microvolt = <1320000>;
  179. regulator-name = "vdd-cpu";
  180. };
  181. &reg_dcdc4 {
  182. regulator-always-on;
  183. regulator-min-microvolt = <700000>;
  184. regulator-max-microvolt = <1320000>;
  185. regulator-name = "vdd-sys-dll";
  186. };
  187. &reg_dcdc5 {
  188. regulator-always-on;
  189. regulator-min-microvolt = <1500000>;
  190. regulator-max-microvolt = <1500000>;
  191. regulator-name = "vcc-dram";
  192. };
  193. &reg_dldo1 {
  194. regulator-min-microvolt = <3300000>;
  195. regulator-max-microvolt = <3300000>;
  196. regulator-name = "vcc-wifi";
  197. };
  198. &reg_dldo3 {
  199. regulator-min-microvolt = <2800000>;
  200. regulator-max-microvolt = <2800000>;
  201. regulator-name = "vddio-csi";
  202. };
  203. &reg_eldo3 {
  204. regulator-min-microvolt = <1080000>;
  205. regulator-max-microvolt = <1320000>;
  206. regulator-name = "vdd-mipi-bridge";
  207. };
  208. &simplefb_lcd {
  209. vcc-lcd-supply = <&reg_dc1sw>;
  210. vdd-mipi-bridge-supply = <&reg_eldo3>;
  211. };
  212. &usb_otg {
  213. /* otg support requires support for AXP221 usb-power-supply and GPIO */
  214. dr_mode = "host";
  215. status = "okay";
  216. };
  217. &usbphy {
  218. usb1_vbus-supply = <&reg_dldo1>;
  219. status = "okay";
  220. };