sun4i-a10-inet1.dts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. /dts-v1/;
  43. #include "sun4i-a10.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/interrupt-controller/irq.h>
  48. #include <dt-bindings/pwm/pwm.h>
  49. / {
  50. model = "iNet-1";
  51. compatible = "inet-tek,inet1", "allwinner,sun4i-a10";
  52. aliases {
  53. serial0 = &uart0;
  54. };
  55. backlight: backlight {
  56. compatible = "pwm-backlight";
  57. pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  58. brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  59. default-brightness-level = <8>;
  60. enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  61. power-supply = <&reg_vcc3v3>;
  62. };
  63. chosen {
  64. stdout-path = "serial0:115200n8";
  65. };
  66. };
  67. &codec {
  68. status = "okay";
  69. };
  70. &cpu0 {
  71. cpu-supply = <&reg_dcdc2>;
  72. };
  73. &ehci0 {
  74. status = "okay";
  75. };
  76. &ehci1 {
  77. status = "okay";
  78. };
  79. &i2c0 {
  80. status = "okay";
  81. axp209: pmic@34 {
  82. reg = <0x34>;
  83. interrupts = <0>;
  84. };
  85. };
  86. #include "axp209.dtsi"
  87. &i2c1 {
  88. status = "okay";
  89. /* Accelerometer */
  90. bma250@18 {
  91. compatible = "bosch,bma250";
  92. reg = <0x18>;
  93. interrupt-parent = <&pio>;
  94. interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
  95. };
  96. };
  97. &i2c2 {
  98. status = "okay";
  99. ft5x: touchscreen@38 {
  100. compatible = "edt,edt-ft5406";
  101. reg = <0x38>;
  102. interrupt-parent = <&pio>;
  103. interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  104. wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
  105. touchscreen-size-x = <600>;
  106. touchscreen-size-y = <1024>;
  107. touchscreen-swapped-x-y;
  108. };
  109. };
  110. &lradc {
  111. vref-supply = <&reg_ldo2>;
  112. status = "okay";
  113. button-200 {
  114. label = "Volume Up";
  115. linux,code = <KEY_VOLUMEUP>;
  116. channel = <0>;
  117. voltage = <200000>;
  118. };
  119. button-1000 {
  120. label = "Volume Down";
  121. linux,code = <KEY_VOLUMEDOWN>;
  122. channel = <0>;
  123. voltage = <1000000>;
  124. };
  125. button-1200 {
  126. label = "Home";
  127. linux,code = <KEY_HOMEPAGE>;
  128. channel = <0>;
  129. voltage = <1200000>;
  130. };
  131. };
  132. &mmc0 {
  133. vmmc-supply = <&reg_vcc3v3>;
  134. bus-width = <4>;
  135. cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
  136. status = "okay";
  137. };
  138. &ohci0 {
  139. status = "okay";
  140. };
  141. &otg_sram {
  142. status = "okay";
  143. };
  144. &pwm {
  145. pinctrl-names = "default";
  146. pinctrl-0 = <&pwm0_pin>;
  147. status = "okay";
  148. };
  149. &reg_dcdc2 {
  150. regulator-always-on;
  151. regulator-min-microvolt = <1000000>;
  152. regulator-max-microvolt = <1400000>;
  153. regulator-name = "vdd-cpu";
  154. };
  155. &reg_dcdc3 {
  156. regulator-always-on;
  157. regulator-min-microvolt = <1250000>;
  158. regulator-max-microvolt = <1250000>;
  159. regulator-name = "vdd-int-dll";
  160. };
  161. &reg_ldo1 {
  162. regulator-name = "vdd-rtc";
  163. };
  164. &reg_ldo2 {
  165. regulator-always-on;
  166. regulator-min-microvolt = <3000000>;
  167. regulator-max-microvolt = <3000000>;
  168. regulator-name = "avcc";
  169. };
  170. &reg_usb0_vbus {
  171. status = "okay";
  172. };
  173. &reg_usb1_vbus {
  174. status = "okay";
  175. };
  176. &reg_usb2_vbus {
  177. status = "okay";
  178. };
  179. &uart0 {
  180. pinctrl-names = "default";
  181. pinctrl-0 = <&uart0_pb_pins>;
  182. status = "okay";
  183. };
  184. &usb_otg {
  185. dr_mode = "otg";
  186. status = "okay";
  187. };
  188. &usbphy {
  189. usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
  190. usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
  191. usb0_vbus-supply = <&reg_usb0_vbus>;
  192. usb1_vbus-supply = <&reg_usb1_vbus>;
  193. usb2_vbus-supply = <&reg_usb2_vbus>;
  194. status = "okay";
  195. };