sun6i-a31s-primo81.dts 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. /*
  2. * Copyright 2014 Siarhei Siamashka <[email protected]>
  3. * Copyright 2015 Karsten Merker <[email protected]>
  4. * Copyright 2015 Chen-Yu Tsai <[email protected]>
  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. / {
  50. model = "MSI Primo81 tablet";
  51. compatible = "msi,primo81", "allwinner,sun6i-a31s";
  52. hdmi-connector {
  53. compatible = "hdmi-connector";
  54. type = "c";
  55. port {
  56. hdmi_con_in: endpoint {
  57. remote-endpoint = <&hdmi_out_con>;
  58. };
  59. };
  60. };
  61. };
  62. &cpu0 {
  63. cpu-supply = <&reg_dcdc3>;
  64. };
  65. &de {
  66. status = "okay";
  67. };
  68. &ehci0 {
  69. /* rtl8188etv wifi is connected here */
  70. status = "okay";
  71. };
  72. &hdmi {
  73. status = "okay";
  74. };
  75. &hdmi_out {
  76. hdmi_out_con: endpoint {
  77. remote-endpoint = <&hdmi_con_in>;
  78. };
  79. };
  80. &i2c0 {
  81. /* pull-ups and device VDDIO use AXP221 DLDO3 */
  82. status = "failed";
  83. };
  84. &i2c1 {
  85. status = "okay";
  86. ctp@5d {
  87. compatible = "goodix,gt911";
  88. reg = <0x5d>;
  89. interrupt-parent = <&pio>;
  90. interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
  91. touchscreen-swapped-x-y;
  92. };
  93. };
  94. &i2c2 {
  95. status = "okay";
  96. accelerometer@1c {
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&mma8452_int_primo81>;
  99. compatible = "fsl,mma8452";
  100. reg = <0x1c>;
  101. interrupt-parent = <&pio>;
  102. interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
  103. };
  104. };
  105. &lradc {
  106. vref-supply = <&reg_aldo3>;
  107. status = "okay";
  108. button-158 {
  109. label = "Volume Up";
  110. linux,code = <KEY_VOLUMEUP>;
  111. channel = <0>;
  112. voltage = <158730>;
  113. };
  114. button-349 {
  115. label = "Volume Down";
  116. linux,code = <KEY_VOLUMEDOWN>;
  117. channel = <0>;
  118. voltage = <349206>;
  119. };
  120. };
  121. &mmc0 {
  122. vmmc-supply = <&reg_dcdc1>;
  123. bus-width = <4>;
  124. cd-gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
  125. status = "okay";
  126. };
  127. &pio {
  128. mma8452_int_primo81: mma8452-int-pin {
  129. pins = "PA9";
  130. function = "gpio_in";
  131. bias-pull-up;
  132. };
  133. };
  134. &p2wi {
  135. status = "okay";
  136. axp22x: pmic@68 {
  137. compatible = "x-powers,axp221";
  138. reg = <0x68>;
  139. interrupt-parent = <&r_intc>;
  140. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  141. x-powers,drive-vbus-en;
  142. };
  143. };
  144. #include "axp22x.dtsi"
  145. &battery_power_supply {
  146. status = "okay";
  147. };
  148. &reg_aldo3 {
  149. regulator-always-on;
  150. regulator-min-microvolt = <2700000>;
  151. regulator-max-microvolt = <3300000>;
  152. regulator-name = "avcc";
  153. };
  154. &reg_dc1sw {
  155. regulator-name = "vcc-lcd";
  156. };
  157. &reg_dc5ldo {
  158. regulator-min-microvolt = <700000>;
  159. regulator-max-microvolt = <1320000>;
  160. regulator-name = "vdd-cpus"; /* This is an educated guess */
  161. };
  162. &reg_dcdc1 {
  163. regulator-always-on;
  164. regulator-min-microvolt = <3000000>;
  165. regulator-max-microvolt = <3000000>;
  166. regulator-name = "vcc-3v0";
  167. };
  168. &reg_dcdc2 {
  169. regulator-min-microvolt = <700000>;
  170. regulator-max-microvolt = <1320000>;
  171. regulator-name = "vdd-gpu";
  172. };
  173. &reg_dcdc3 {
  174. regulator-always-on;
  175. regulator-min-microvolt = <700000>;
  176. regulator-max-microvolt = <1320000>;
  177. regulator-name = "vdd-cpu";
  178. };
  179. &reg_dcdc4 {
  180. regulator-always-on;
  181. regulator-min-microvolt = <700000>;
  182. regulator-max-microvolt = <1320000>;
  183. regulator-name = "vdd-sys-dll";
  184. };
  185. &reg_dcdc5 {
  186. regulator-always-on;
  187. regulator-min-microvolt = <1500000>;
  188. regulator-max-microvolt = <1500000>;
  189. regulator-name = "vcc-dram";
  190. };
  191. &reg_dldo1 {
  192. regulator-min-microvolt = <3300000>;
  193. regulator-max-microvolt = <3300000>;
  194. regulator-name = "vcc-wifi";
  195. };
  196. &reg_dldo3 {
  197. regulator-min-microvolt = <2800000>;
  198. regulator-max-microvolt = <2800000>;
  199. regulator-name = "vddio-csi";
  200. };
  201. &reg_drivevbus {
  202. regulator-name = "usb0-vbus";
  203. status = "okay";
  204. };
  205. &reg_eldo3 {
  206. regulator-min-microvolt = <1080000>;
  207. regulator-max-microvolt = <1320000>;
  208. regulator-name = "vdd-mipi-bridge";
  209. };
  210. &simplefb_lcd {
  211. vcc-lcd-supply = <&reg_dc1sw>;
  212. vdd-mipi-bridge-supply = <&reg_eldo3>;
  213. };
  214. &usb_otg {
  215. dr_mode = "otg";
  216. status = "okay";
  217. };
  218. &usb_power_supply {
  219. status = "okay";
  220. };
  221. &usbphy {
  222. usb0_id_det-gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
  223. usb0_vbus_power-supply = <&usb_power_supply>;
  224. usb0_vbus-supply = <&reg_drivevbus>;
  225. usb1_vbus-supply = <&reg_dldo1>;
  226. status = "okay";
  227. };