sun6i-a31s-yones-toptech-bs1078-v2.dts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /*
  2. * Copyright 2015 Lawrence Yu <lyu@micile.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 "sun6i-a31s.dtsi"
  44. #include "sunxi-common-regulators.dtsi"
  45. #include <dt-bindings/gpio/gpio.h>
  46. #include <dt-bindings/pinctrl/sun4i-a10.h>
  47. / {
  48. model = "Yones TopTech BS1078 v2 Tablet";
  49. compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
  50. aliases {
  51. serial0 = &uart0;
  52. i2c1 = &i2c1;
  53. i2c2 = &i2c2;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. };
  59. &i2c1 {
  60. pinctrl-names = "default";
  61. pinctrl-0 = <&i2c1_pins_a>;
  62. status = "okay";
  63. };
  64. &i2c2 {
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&i2c2_pins_a>;
  67. status = "okay";
  68. };
  69. &ehci0 {
  70. status = "okay";
  71. };
  72. &ehci1 {
  73. status = "okay";
  74. };
  75. &ohci0 {
  76. status = "okay";
  77. };
  78. &ohci1 {
  79. status = "okay";
  80. };
  81. &pio {
  82. mmc0_cd_pin_bs1078v2: mmc0_cd_pin@0 {
  83. allwinner,pins = "PA8";
  84. allwinner,function = "gpio_in";
  85. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  86. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  87. };
  88. };
  89. &mmc0 {
  90. pinctrl-names = "default";
  91. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>;
  92. vmmc-supply = <&reg_vcc3v0>;
  93. bus-width = <4>;
  94. cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
  95. cd-inverted;
  96. status = "okay";
  97. };
  98. &mmc0_pins_a {
  99. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  100. };
  101. &p2wi {
  102. status = "okay";
  103. axp22x: pmic@68 {
  104. compatible = "x-powers,axp221";
  105. reg = <0x68>;
  106. interrupt-parent = <&nmi_intc>;
  107. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  108. };
  109. };
  110. #include "axp22x.dtsi"
  111. &reg_aldo3 {
  112. regulator-always-on;
  113. regulator-min-microvolt = <2700000>;
  114. regulator-max-microvolt = <3300000>;
  115. regulator-name = "avcc";
  116. };
  117. &reg_dc1sw {
  118. regulator-name = "vcc-lcd-usb2";
  119. };
  120. &reg_dc5ldo {
  121. regulator-min-microvolt = <700000>;
  122. regulator-max-microvolt = <1320000>;
  123. regulator-name = "vdd-cpus";
  124. };
  125. &reg_dcdc1 {
  126. regulator-always-on;
  127. regulator-min-microvolt = <3000000>;
  128. regulator-max-microvolt = <3000000>;
  129. regulator-name = "vcc-3v0";
  130. };
  131. &reg_dcdc2 {
  132. regulator-min-microvolt = <700000>;
  133. regulator-max-microvolt = <1320000>;
  134. regulator-name = "vdd-gpu";
  135. };
  136. &reg_dcdc3 {
  137. regulator-always-on;
  138. regulator-min-microvolt = <700000>;
  139. regulator-max-microvolt = <1320000>;
  140. regulator-name = "vdd-cpu";
  141. };
  142. &reg_dcdc4 {
  143. regulator-always-on;
  144. regulator-min-microvolt = <700000>;
  145. regulator-max-microvolt = <1320000>;
  146. regulator-name = "vdd-sys-dll";
  147. };
  148. &reg_dcdc5 {
  149. regulator-always-on;
  150. regulator-min-microvolt = <1500000>;
  151. regulator-max-microvolt = <1500000>;
  152. regulator-name = "vcc-dram";
  153. };
  154. &reg_dldo1 {
  155. regulator-min-microvolt = <3300000>;
  156. regulator-max-microvolt = <3300000>;
  157. regulator-name = "vcc-wifi";
  158. };
  159. /* Voltage source for I2C pullup resistors for I2C Bus 0 */
  160. &reg_dldo3 {
  161. regulator-min-microvolt = <2800000>;
  162. regulator-max-microvolt = <2800000>;
  163. regulator-name = "vddio-csi";
  164. };
  165. &uart0 {
  166. pinctrl-names = "default";
  167. pinctrl-0 = <&uart0_pins_a>;
  168. status = "okay";
  169. };
  170. &usbphy {
  171. usb1_vbus-supply = <&reg_dldo1>;
  172. usb2_vbus-supply = <&reg_dc1sw>;
  173. status = "okay";
  174. };