sun8i-reference-design-tablet.dtsi 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. * Copyright 2015 Hans de Goede <[email protected]>
  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 file 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 file 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. * Or, alternatively,
  20. *
  21. * b) Permission is hereby granted, free of charge, to any person
  22. * obtaining a copy of this software and associated documentation
  23. * files (the "Software"), to deal in the Software without
  24. * restriction, including without limitation the rights to use,
  25. * copy, modify, merge, publish, distribute, sublicense, and/or
  26. * sell copies of the Software, and to permit persons to whom the
  27. * Software is furnished to do so, subject to the following
  28. * conditions:
  29. *
  30. * The above copyright notice and this permission notice shall be
  31. * included in all copies or substantial portions of the Software.
  32. *
  33. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40. * OTHER DEALINGS IN THE SOFTWARE.
  41. */
  42. #include "sunxi-reference-design-tablet.dtsi"
  43. #include <dt-bindings/pwm/pwm.h>
  44. / {
  45. aliases {
  46. serial0 = &r_uart;
  47. };
  48. backlight: backlight {
  49. compatible = "pwm-backlight";
  50. pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  51. brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  52. default-brightness-level = <8>;
  53. enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
  54. power-supply = <&reg_dc1sw>;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. };
  60. &i2c0 {
  61. /*
  62. * The gsl1680 is rated at 400KHz and it will not work reliable at
  63. * 100KHz, this has been confirmed on multiple different q8 tablets.
  64. * The gsl1680 is the only device on this bus.
  65. */
  66. clock-frequency = <400000>;
  67. touchscreen: touchscreen@40 {
  68. reg = <0x40>;
  69. interrupt-parent = <&pio>;
  70. interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
  71. power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  72. /* Tablet dts must provide reg and compatible */
  73. status = "disabled";
  74. };
  75. };
  76. &mmc0 {
  77. vmmc-supply = <&reg_dcdc1>;
  78. bus-width = <4>;
  79. cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
  80. status = "okay";
  81. };
  82. &r_rsb {
  83. status = "okay";
  84. axp22x: pmic@3a3 {
  85. compatible = "x-powers,axp223";
  86. reg = <0x3a3>;
  87. interrupt-parent = <&r_intc>;
  88. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  89. eldoin-supply = <&reg_dcdc1>;
  90. drivevbus-supply = <&reg_vcc5v0>;
  91. x-powers,drive-vbus-en;
  92. };
  93. };
  94. #include "axp223.dtsi"
  95. &ac_power_supply {
  96. status = "okay";
  97. };
  98. &battery_power_supply {
  99. status = "okay";
  100. };
  101. &reg_aldo1 {
  102. regulator-always-on;
  103. regulator-min-microvolt = <3000000>;
  104. regulator-max-microvolt = <3000000>;
  105. regulator-name = "vcc-io";
  106. };
  107. &reg_aldo2 {
  108. regulator-always-on;
  109. regulator-min-microvolt = <2350000>;
  110. regulator-max-microvolt = <2650000>;
  111. regulator-name = "vdd-dll";
  112. };
  113. &reg_aldo3 {
  114. regulator-always-on;
  115. regulator-min-microvolt = <2700000>;
  116. regulator-max-microvolt = <3300000>;
  117. regulator-name = "vcc-pll-avcc";
  118. };
  119. &reg_dc1sw {
  120. regulator-name = "vcc-lcd";
  121. };
  122. &reg_dc5ldo {
  123. regulator-always-on;
  124. regulator-min-microvolt = <900000>;
  125. regulator-max-microvolt = <1400000>;
  126. regulator-name = "vdd-cpus";
  127. };
  128. &reg_dcdc1 {
  129. regulator-always-on;
  130. regulator-min-microvolt = <3000000>;
  131. regulator-max-microvolt = <3000000>;
  132. regulator-name = "vcc-3v0";
  133. };
  134. &reg_dcdc2 {
  135. regulator-always-on;
  136. regulator-min-microvolt = <900000>;
  137. regulator-max-microvolt = <1400000>;
  138. regulator-name = "vdd-sys";
  139. };
  140. &reg_dcdc3 {
  141. regulator-always-on;
  142. regulator-min-microvolt = <900000>;
  143. regulator-max-microvolt = <1400000>;
  144. regulator-name = "vdd-cpu";
  145. };
  146. &reg_dcdc5 {
  147. regulator-always-on;
  148. regulator-min-microvolt = <1500000>;
  149. regulator-max-microvolt = <1500000>;
  150. regulator-name = "vcc-dram";
  151. };
  152. &reg_dldo1 {
  153. regulator-min-microvolt = <3300000>;
  154. regulator-max-microvolt = <3300000>;
  155. regulator-name = "vcc-wifi";
  156. };
  157. &reg_drivevbus {
  158. regulator-name = "usb0-vbus";
  159. status = "okay";
  160. };
  161. &reg_ldo_io1 {
  162. regulator-min-microvolt = <3300000>;
  163. regulator-max-microvolt = <3300000>;
  164. regulator-name = "vcc-touchscreen";
  165. status = "okay";
  166. };
  167. &reg_rtc_ldo {
  168. regulator-name = "vcc-rtc";
  169. };
  170. &cpu0 {
  171. cpu-supply = <&reg_dcdc2>;
  172. };
  173. &r_uart {
  174. pinctrl-names = "default";
  175. pinctrl-0 = <&r_uart_pins_a>;
  176. status = "okay";
  177. };
  178. &simplefb_lcd {
  179. vcc-lcd-supply = <&reg_dc1sw>;
  180. };
  181. &usb_otg {
  182. dr_mode = "otg";
  183. status = "okay";
  184. };
  185. &usb_power_supply {
  186. status = "okay";
  187. };
  188. &usbphy {
  189. usb0_id_det-gpios = <&pio 7 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH8 */
  190. usb0_vbus_power-supply = <&usb_power_supply>;
  191. usb0_vbus-supply = <&reg_drivevbus>;
  192. status = "okay";
  193. };