sun4i-a10-inet97fv2.dts 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. /*
  2. * Copyright 2014 Open Source Support GmbH
  3. *
  4. * David Lanzendörfer <david.lanzendoerfer@o2s.ch>
  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 "sun4i-a10.dtsi"
  46. #include "sunxi-common-regulators.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/input/input.h>
  49. #include <dt-bindings/interrupt-controller/irq.h>
  50. / {
  51. model = "INet-97F Rev 02";
  52. compatible = "primux,inet97fv2", "allwinner,sun4i-a10";
  53. aliases {
  54. serial0 = &uart0;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. };
  60. &cpu0 {
  61. cpu-supply = <&reg_dcdc2>;
  62. };
  63. &ehci1 {
  64. status = "okay";
  65. };
  66. &i2c0 {
  67. pinctrl-names = "default";
  68. pinctrl-0 = <&i2c0_pins_a>;
  69. status = "okay";
  70. axp209: pmic@34 {
  71. reg = <0x34>;
  72. interrupts = <0>;
  73. };
  74. };
  75. #include "axp209.dtsi"
  76. &i2c1 {
  77. pinctrl-names = "default";
  78. pinctrl-0 = <&i2c1_pins_a>;
  79. status = "okay";
  80. };
  81. &i2c2 {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&i2c2_pins_a>;
  84. status = "okay";
  85. ft5406ee8: touchscreen@38 {
  86. compatible = "edt,edt-ft5406";
  87. reg = <0x38>;
  88. interrupt-parent = <&pio>;
  89. interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  90. touchscreen-size-x = <800>;
  91. touchscreen-size-y = <480>;
  92. };
  93. };
  94. &lradc {
  95. vref-supply = <&reg_ldo2>;
  96. status = "okay";
  97. button@200 {
  98. label = "Menu";
  99. linux,code = <KEY_MENU>;
  100. channel = <0>;
  101. voltage = <200000>;
  102. };
  103. button@600 {
  104. label = "Volume Up";
  105. linux,code = <KEY_VOLUMEUP>;
  106. channel = <0>;
  107. voltage = <600000>;
  108. };
  109. button@800 {
  110. label = "Volume Down";
  111. linux,code = <KEY_VOLUMEDOWN>;
  112. channel = <0>;
  113. voltage = <800000>;
  114. };
  115. button@1000 {
  116. label = "Home";
  117. linux,code = <KEY_HOMEPAGE>;
  118. channel = <0>;
  119. voltage = <1000000>;
  120. };
  121. button@1200 {
  122. label = "Esc";
  123. linux,code = <KEY_ESC>;
  124. channel = <0>;
  125. voltage = <1200000>;
  126. };
  127. };
  128. &mmc0 {
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  131. vmmc-supply = <&reg_vcc3v3>;
  132. bus-width = <4>;
  133. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  134. cd-inverted;
  135. status = "okay";
  136. };
  137. &otg_sram {
  138. status = "okay";
  139. };
  140. &pio {
  141. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  142. allwinner,pins = "PH4";
  143. allwinner,function = "gpio_in";
  144. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  145. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  146. };
  147. usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  148. allwinner,pins = "PH5";
  149. allwinner,function = "gpio_in";
  150. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  151. allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  152. };
  153. };
  154. &reg_dcdc2 {
  155. regulator-always-on;
  156. regulator-min-microvolt = <1000000>;
  157. regulator-max-microvolt = <1400000>;
  158. regulator-name = "vdd-cpu";
  159. };
  160. &reg_dcdc3 {
  161. regulator-always-on;
  162. regulator-min-microvolt = <1250000>;
  163. regulator-max-microvolt = <1250000>;
  164. regulator-name = "vdd-int-dll";
  165. };
  166. &reg_ldo1 {
  167. regulator-name = "vdd-rtc";
  168. };
  169. &reg_ldo2 {
  170. regulator-always-on;
  171. regulator-min-microvolt = <3000000>;
  172. regulator-max-microvolt = <3000000>;
  173. regulator-name = "avcc";
  174. };
  175. &reg_usb0_vbus {
  176. status = "okay";
  177. };
  178. &reg_usb2_vbus {
  179. status = "okay";
  180. };
  181. &uart0 {
  182. pinctrl-names = "default";
  183. pinctrl-0 = <&uart0_pins_a>;
  184. status = "okay";
  185. };
  186. &usb_otg {
  187. dr_mode = "otg";
  188. status = "okay";
  189. };
  190. &usbphy {
  191. pinctrl-names = "default";
  192. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  193. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  194. usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  195. usb0_vbus-supply = <&reg_usb0_vbus>;
  196. usb2_vbus-supply = <&reg_usb2_vbus>;
  197. status = "okay";
  198. };