spacepaste

  1.  
  2. /*
  3. * Copyright 2018 Lukasz W. Hebda <l.w.hebda@gmail.com>
  4. *
  5. * This file is dual-licensed: you can use it either under the terms
  6. * of the GPL or the X11 license, at your option. Note that this dual
  7. * licensing only applies to this file, and not this project as a
  8. * whole.
  9. *
  10. * a) This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * Or, alternatively,
  21. *
  22. * b) Permission is hereby granted, free of charge, to any person
  23. * obtaining a copy of this software and associated documentation
  24. * files (the "Software"), to deal in the Software without
  25. * restriction, including without limitation the rights to use,
  26. * copy, modify, merge, publish, distribute, sublicense, and/or
  27. * sell copies of the Software, and to permit persons to whom the
  28. * Software is furnished to do so, subject to the following
  29. * conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be
  32. * included in all copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  35. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  36. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  37. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  38. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  39. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  40. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. */
  43. /dts-v1/;
  44. #include "sun4i-a10.dtsi"
  45. #include "sunxi-common-regulators.dtsi"
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/input/input.h>
  48. #include <dt-bindings/interrupt-controller/irq.h>
  49. / {
  50. model = "iNet 3F Rev 06";
  51. compatible = "inet-tek,inet3f-rev06", "allwinner,sun4i-a10";
  52. aliases {
  53. serial0 = &uart0;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. };
  59. &cpu0 {
  60. cpu-supply = <&reg_dcdc2>;
  61. };
  62. &ehci1 {
  63. status = "okay";
  64. };
  65. &i2c0 {
  66. pinctrl-names = "default";
  67. pinctrl-0 = <&i2c0_pins_a>;
  68. status = "okay";
  69. axp209: pmic@34 {
  70. reg = <0x34>;
  71. interrupts = <0>;
  72. };
  73. };
  74. #include "axp209.dtsi"
  75. &i2c1 {
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&i2c1_pins_a>;
  78. status = "okay";
  79. };
  80. &i2c2 {
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&i2c2_pins_a>;
  83. status = "okay";
  84. ft5406ee8: touchscreen@38 {
  85. compatible = "edt,edt-ft5406";
  86. reg = <0x38>;
  87. interrupt-parent = <&pio>;
  88. interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  89. touchscreen-size-x = <1024>;
  90. touchscreen-size-y = <768>;
  91. };
  92. };
  93. &lradc {
  94. vref-supply = <&reg_ldo2>;
  95. status = "okay";
  96. button@200 {
  97. label = "Menu";
  98. linux,code = <KEY_MENU>;
  99. channel = <0>;
  100. voltage = <200000>;
  101. };
  102. button@600 {
  103. label = "Volume Up";
  104. linux,code = <KEY_VOLUMEUP>;
  105. channel = <0>;
  106. voltage = <600000>;
  107. };
  108. button@800 {
  109. label = "Volume Down";
  110. linux,code = <KEY_VOLUMEDOWN>;
  111. channel = <0>;
  112. voltage = <800000>;
  113. };
  114. button@1000 {
  115. label = "Home";
  116. linux,code = <KEY_HOMEPAGE>;
  117. channel = <0>;
  118. voltage = <1000000>;
  119. };
  120. button@1200 {
  121. label = "Esc";
  122. linux,code = <KEY_ESC>;
  123. channel = <0>;
  124. voltage = <1200000>;
  125. };
  126. };
  127. &mmc0 {
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  130. vmmc-supply = <&reg_vcc3v3>;
  131. bus-width = <4>;
  132. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  133. cd-inverted;
  134. status = "okay";
  135. };
  136. &otg_sram {
  137. status = "okay";
  138. };
  139. &pio {
  140. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  141. allwinner,pins = "PH4";
  142. allwinner,function = "gpio_in";
  143. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  144. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  145. };
  146. usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  147. allwinner,pins = "PH5";
  148. allwinner,function = "gpio_in";
  149. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  150. allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  151. };
  152. };
  153. &reg_dcdc2 {
  154. regulator-always-on;
  155. regulator-min-microvolt = <1000000>;
  156. regulator-max-microvolt = <1400000>;
  157. regulator-name = "vdd-cpu";
  158. };
  159. &reg_dcdc3 {
  160. regulator-always-on;
  161. regulator-min-microvolt = <1250000>;
  162. regulator-max-microvolt = <1250000>;
  163. regulator-name = "vdd-int-dll";
  164. };
  165. &reg_ldo1 {
  166. regulator-name = "vdd-rtc";
  167. };
  168. &reg_ldo2 {
  169. regulator-always-on;
  170. regulator-min-microvolt = <3000000>;
  171. regulator-max-microvolt = <3000000>;
  172. regulator-name = "avcc";
  173. };
  174. &reg_usb0_vbus {
  175. status = "okay";
  176. };
  177. &reg_usb2_vbus {
  178. status = "okay";
  179. };
  180. &uart0 {
  181. pinctrl-names = "default";
  182. pinctrl-0 = <&uart0_pins_a>;
  183. status = "okay";
  184. };
  185. &usb_otg {
  186. dr_mode = "otg";
  187. status = "okay";
  188. };
  189. &usbphy {
  190. pinctrl-names = "default";
  191. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  192. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  193. usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  194. usb0_vbus-supply = <&reg_usb0_vbus>;
  195. usb2_vbus-supply = <&reg_usb2_vbus>;
  196. status = "okay";
  197. };
  198.