sun8i-a23-gt90h-v4.dts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. /*
  2. * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
  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. /dts-v1/;
  43. #include "sun8i-a23.dtsi"
  44. #include "sunxi-common-regulators.dtsi"
  45. #include <dt-bindings/gpio/gpio.h>
  46. #include <dt-bindings/input/input.h>
  47. #include <dt-bindings/pinctrl/sun4i-a10.h>
  48. #include <dt-bindings/pwm/pwm.h>
  49. / {
  50. model = "Allwinner GT90H Dual Core Tablet (v4)";
  51. compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
  52. aliases {
  53. serial0 = &r_uart;
  54. };
  55. backlight: backlight {
  56. compatible = "pwm-backlight";
  57. pinctrl-names = "default";
  58. pinctrl-0 = <&bl_en_pin_gt90h>;
  59. pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  60. brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  61. default-brightness-level = <8>;
  62. enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
  63. };
  64. chosen {
  65. stdout-path = "serial0:115200n8";
  66. };
  67. };
  68. &ehci0 {
  69. status = "okay";
  70. };
  71. &i2c0 {
  72. pinctrl-names = "default";
  73. pinctrl-0 = <&i2c0_pins_a>;
  74. status = "okay";
  75. };
  76. &i2c1 {
  77. pinctrl-names = "default";
  78. pinctrl-0 = <&i2c1_pins_a>;
  79. status = "okay";
  80. };
  81. &lradc {
  82. vref-supply = <&reg_vcc3v0>;
  83. status = "okay";
  84. button@200 {
  85. label = "Volume Up";
  86. linux,code = <KEY_VOLUMEUP>;
  87. channel = <0>;
  88. voltage = <200000>;
  89. };
  90. button@400 {
  91. label = "Volume Down";
  92. linux,code = <KEY_VOLUMEDOWN>;
  93. channel = <0>;
  94. voltage = <400000>;
  95. };
  96. button@600 {
  97. label = "Back";
  98. linux,code = <KEY_BACK>;
  99. channel = <0>;
  100. voltage = <600000>;
  101. };
  102. };
  103. &mmc0 {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
  106. vmmc-supply = <&reg_aldo1>;
  107. bus-width = <4>;
  108. cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
  109. cd-inverted;
  110. status = "okay";
  111. };
  112. &pio {
  113. bl_en_pin_gt90h: bl_en_pin@0 {
  114. allwinner,pins = "PH6";
  115. allwinner,function = "gpio_in";
  116. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  117. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  118. };
  119. mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
  120. allwinner,pins = "PB4";
  121. allwinner,function = "gpio_in";
  122. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  123. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  124. };
  125. };
  126. &pwm {
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&pwm0_pins>;
  129. status = "okay";
  130. };
  131. &r_rsb {
  132. status = "okay";
  133. axp22x: pmic@3a3 {
  134. compatible = "x-powers,axp223";
  135. reg = <0x3a3>;
  136. interrupt-parent = <&nmi_intc>;
  137. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  138. eldoin-supply = <&reg_dcdc1>;
  139. };
  140. };
  141. &r_uart {
  142. pinctrl-names = "default";
  143. pinctrl-0 = <&r_uart_pins_a>;
  144. status = "okay";
  145. };
  146. #include "axp22x.dtsi"
  147. &reg_aldo1 {
  148. regulator-always-on;
  149. regulator-min-microvolt = <3000000>;
  150. regulator-max-microvolt = <3000000>;
  151. regulator-name = "vcc-io";
  152. };
  153. &reg_aldo2 {
  154. regulator-always-on;
  155. regulator-min-microvolt = <2350000>;
  156. regulator-max-microvolt = <2650000>;
  157. regulator-name = "vdd-dll";
  158. };
  159. &reg_aldo3 {
  160. regulator-always-on;
  161. regulator-min-microvolt = <2700000>;
  162. regulator-max-microvolt = <3300000>;
  163. regulator-name = "vcc-pll-avcc";
  164. };
  165. &reg_dc1sw {
  166. regulator-name = "vcc-lcd";
  167. };
  168. &reg_dc5ldo {
  169. regulator-always-on;
  170. regulator-min-microvolt = <900000>;
  171. regulator-max-microvolt = <1400000>;
  172. regulator-name = "vdd-cpus";
  173. };
  174. &reg_dcdc1 {
  175. regulator-always-on;
  176. regulator-min-microvolt = <3000000>;
  177. regulator-max-microvolt = <3000000>;
  178. regulator-name = "vcc-3v0";
  179. };
  180. &reg_dcdc2 {
  181. regulator-always-on;
  182. regulator-min-microvolt = <900000>;
  183. regulator-max-microvolt = <1400000>;
  184. regulator-name = "vdd-sys";
  185. };
  186. &reg_dcdc3 {
  187. regulator-always-on;
  188. regulator-min-microvolt = <900000>;
  189. regulator-max-microvolt = <1400000>;
  190. regulator-name = "vdd-cpu";
  191. };
  192. &reg_dcdc5 {
  193. regulator-always-on;
  194. regulator-min-microvolt = <1500000>;
  195. regulator-max-microvolt = <1500000>;
  196. regulator-name = "vcc-dram";
  197. };
  198. &reg_dldo1 {
  199. regulator-min-microvolt = <3300000>;
  200. regulator-max-microvolt = <3300000>;
  201. regulator-name = "vcc-wifi";
  202. };
  203. &reg_rtc_ldo {
  204. regulator-name = "vcc-rtc";
  205. };
  206. &simplefb_lcd {
  207. vcc-lcd-supply = <&reg_dc1sw>;
  208. };
  209. /*
  210. * FIXME for now we only support host mode and rely on u-boot to have
  211. * turned on Vbus which is controlled by the axp223 pmic on the board.
  212. *
  213. * Once we have axp223 support we should switch to fully supporting otg.
  214. */
  215. &usb_otg {
  216. dr_mode = "host";
  217. status = "okay";
  218. };
  219. &usbphy {
  220. usb1_vbus-supply = <&reg_dldo1>;
  221. status = "okay";
  222. };