Advertisement
Guest User

sun7i-a20-tpc9150.dts

a guest
Mar 26th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.99 KB | None | 0 0
  1. /*
  2. * Copyright 2020 Nikola Pavlica <pavlica.nikola@xxxxxxxxx>
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. * a) This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public
  20. * License along with this library; if not, write to the Free
  21. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  22. * MA 02110-1301 USA
  23. *
  24. * Or, alternatively,
  25. *
  26. * b) Permission is hereby granted, free of charge, to any person
  27. * obtaining a copy of this software and associated documentation
  28. * files (the "Software"), to deal in the Software without
  29. * restriction, including without limitation the rights to use,
  30. * copy, modify, merge, publish, distribute, sublicense, and/or
  31. * sell copies of the Software, and to permit persons to whom the
  32. * Software is furnished to do so, subject to the following
  33. * conditions:
  34. *
  35. * The above copyright notice and this permission notice shall be
  36. * included in all copies or substantial portions of the Software.
  37. *
  38. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  39. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  40. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  41. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  42. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  43. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  44. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  45. * OTHER DEALINGS IN THE SOFTWARE.
  46. */
  47.  
  48. /dts-v1/;
  49. #include "sun7i-a20.dtsi"
  50. #include "sunxi-common-regulators.dtsi"
  51.  
  52. #include <dt-bindings/gpio/gpio.h>
  53. #include <dt-bindings/input/input.h>
  54. #include <dt-bindings/interrupt-controller/irq.h>
  55. #include <dt-bindings/pwm/pwm.h>
  56.  
  57. / {
  58. model = "Vivax TPC-9150 tablet";
  59. compatible = "vivax,tpc9150", "allwinner,sun7i-a20";
  60.  
  61. aliases {
  62. serial0 = &uart0;
  63. };
  64.  
  65. backlight: backlight {
  66. compatible = "pwm-backlight";
  67. pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  68. brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  69. default-brightness-level = <8>;
  70. enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  71. };
  72.  
  73. chosen {
  74. stdout-path = "serial0:115200n8";
  75. };
  76.  
  77. hdmi-connector {
  78. compatible = "hdmi-connector";
  79. type = "a";
  80.  
  81. port {
  82. hdmi_con_in: endpoint {
  83. remote-endpoint = <&hdmi_out_con>;
  84. };
  85. };
  86. };
  87.  
  88. reg_axp_ipsout: axp_ipsout {
  89. compatible = "regulator-fixed";
  90. regulator-name = "axp-ipsout";
  91. regulator-min-microvolt = <5000000>;
  92. regulator-max-microvolt = <5000000>;
  93. regulator-always-on;
  94. };
  95. };
  96.  
  97. &ahci {
  98. target-supply = <&reg_ahci_5v>;
  99. status = "okay";
  100. };
  101.  
  102. &codec {
  103. allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
  104. status = "okay";
  105. };
  106.  
  107. &de {
  108. status = "okay";
  109. };
  110.  
  111. &ehci0 {
  112. status = "okay";
  113. };
  114.  
  115. &ehci1 {
  116. status = "okay";
  117. };
  118.  
  119. &hdmi {
  120. status = "okay";
  121. };
  122.  
  123. &hdmi_out {
  124. hdmi_out_con: endpoint {
  125. remote-endpoint = <&hdmi_con_in>;
  126. };
  127. };
  128.  
  129. &i2c0 {
  130. status = "okay";
  131.  
  132. axp209: pmic@34 {
  133. reg = <0x34>;
  134. interrupt-parent = <&nmi_intc>;
  135. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  136. };
  137. };
  138.  
  139. #include "axp209.dtsi"
  140.  
  141. &i2c1 {
  142. status = "okay";
  143. };
  144.  
  145. &i2c2 {
  146. status = "okay";
  147.  
  148. ft5x: touchscreen@38 {
  149. compatible = "edt,edt-ft5406";
  150. reg = <0x38>;
  151. interrupt-parent = <&pio>;
  152. interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  153. wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
  154. touchscreen-size-x = <600>;
  155. touchscreen-size-y = <1024>;
  156. };
  157. };
  158.  
  159. &lradc {
  160. vref-supply = <&reg_vcc3v0>;
  161. status = "okay";
  162. };
  163.  
  164. &mmc0 {
  165. vmmc-supply = <&reg_vcc3v3>;
  166. bus-width = <4>;
  167. cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
  168. status = "okay";
  169. };
  170.  
  171. &ohci0 {
  172. status = "okay";
  173. };
  174.  
  175. &ohci1 {
  176. status = "okay";
  177. };
  178.  
  179. &otg_sram {
  180. status = "okay";
  181. };
  182.  
  183. &pio {
  184. usb0_id_detect_pin: usb0-id-detect-pin {
  185. pins = "PH4";
  186. function = "gpio_in";
  187. bias-pull-up;
  188. };
  189. };
  190.  
  191. &reg_dcdc2 {
  192. regulator-always-on;
  193. regulator-min-microvolt = <1000000>;
  194. regulator-max-microvolt = <1400000>;
  195. regulator-name = "vdd-cpu";
  196. };
  197.  
  198. &reg_dcdc3 {
  199. regulator-always-on;
  200. regulator-min-microvolt = <1000000>;
  201. regulator-max-microvolt = <1250000>;
  202. regulator-name = "vdd-int-dll";
  203. };
  204.  
  205. &reg_ldo1 {
  206. regulator-name = "vdd-rtc";
  207. };
  208.  
  209. &reg_ldo2 {
  210. regulator-always-on;
  211. regulator-min-microvolt = <3000000>;
  212. regulator-max-microvolt = <3000000>;
  213. regulator-name = "avcc";
  214. };
  215.  
  216. &reg_ldo3 {
  217. regulator-min-microvolt = <2800000>;
  218. regulator-max-microvolt = <2800000>;
  219. regulator-name = "vddio-csi0";
  220. regulator-soft-start;
  221. regulator-ramp-delay = <1600>;
  222. };
  223.  
  224. &reg_ldo4 {
  225. regulator-min-microvolt = <2800000>;
  226. regulator-max-microvolt = <2800000>;
  227. regulator-name = "vddio-csi1";
  228. };
  229.  
  230.  
  231. &reg_usb0_vbus {
  232. status = "okay";
  233. };
  234.  
  235. &reg_usb1_vbus {
  236. status = "okay";
  237. };
  238.  
  239. &reg_usb2_vbus {
  240. status = "okay";
  241. };
  242.  
  243. &uart0 {
  244. pinctrl-names = "default";
  245. pinctrl-0 = <&uart0_pb_pins>;
  246. status = "okay";
  247. };
  248.  
  249. &usb_otg {
  250. dr_mode = "otg";
  251. status = "okay";
  252. };
  253.  
  254. &usbphy {
  255. pinctrl-names = "default";
  256. pinctrl-0 = <&usb0_id_detect_pin>;
  257. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  258. usb0_vbus_power-supply = <&usb_power_supply>;
  259. usb0_vbus-supply = <&reg_usb0_vbus>;
  260. usb1_vbus-supply = <&reg_usb1_vbus>;
  261. usb2_vbus-supply = <&reg_usb2_vbus>;
  262. status = "okay";
  263. };
  264.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement