sun5i-a13-olinuxino.dts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /*
  2. * Copyright 2012 Maxime Ripard
  3. *
  4. * Maxime Ripard <maxime.ripard@free-electrons.com>
  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 "sun5i-a13.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/pinctrl/sun4i-a10.h>
  50. / {
  51. model = "Olimex A13-Olinuxino";
  52. compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
  53. aliases {
  54. serial0 = &uart1;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. leds {
  60. compatible = "gpio-leds";
  61. pinctrl-names = "default";
  62. pinctrl-0 = <&led_pins_olinuxino>;
  63. power {
  64. gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
  65. default-state = "on";
  66. };
  67. };
  68. };
  69. &ehci0 {
  70. status = "okay";
  71. };
  72. &i2c0 {
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&i2c0_pins_a>;
  75. status = "okay";
  76. axp209: pmic@34 {
  77. compatible = "x-powers,axp209";
  78. reg = <0x34>;
  79. interrupts = <0>;
  80. interrupt-controller;
  81. #interrupt-cells = <1>;
  82. };
  83. };
  84. &i2c1 {
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&i2c1_pins_a>;
  87. status = "okay";
  88. };
  89. &i2c2 {
  90. pinctrl-names = "default";
  91. pinctrl-0 = <&i2c2_pins_a>;
  92. status = "okay";
  93. };
  94. &lradc {
  95. vref-supply = <&reg_vcc3v0>;
  96. status = "okay";
  97. button@191 {
  98. label = "Volume Up";
  99. linux,code = <KEY_VOLUMEUP>;
  100. channel = <0>;
  101. voltage = <191274>;
  102. };
  103. button@392 {
  104. label = "Volume Down";
  105. linux,code = <KEY_VOLUMEDOWN>;
  106. channel = <0>;
  107. voltage = <392644>;
  108. };
  109. button@601 {
  110. label = "Menu";
  111. linux,code = <KEY_MENU>;
  112. channel = <0>;
  113. voltage = <601151>;
  114. };
  115. button@795 {
  116. label = "Enter";
  117. linux,code = <KEY_ENTER>;
  118. channel = <0>;
  119. voltage = <795090>;
  120. };
  121. button@987 {
  122. label = "Home";
  123. linux,code = <KEY_HOMEPAGE>;
  124. channel = <0>;
  125. voltage = <987387>;
  126. };
  127. };
  128. &mmc0 {
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
  131. vmmc-supply = <&reg_vcc3v3>;
  132. bus-width = <4>;
  133. cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
  134. cd-inverted;
  135. status = "okay";
  136. };
  137. &ohci0 {
  138. status = "okay";
  139. };
  140. &otg_sram {
  141. status = "okay";
  142. };
  143. &pio {
  144. mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
  145. allwinner,pins = "PG0";
  146. allwinner,function = "gpio_in";
  147. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  148. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  149. };
  150. led_pins_olinuxino: led_pins@0 {
  151. allwinner,pins = "PG9";
  152. allwinner,function = "gpio_out";
  153. allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  154. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  155. };
  156. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  157. allwinner,pins = "PG2";
  158. allwinner,function = "gpio_in";
  159. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  160. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  161. };
  162. usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  163. allwinner,pins = "PG1";
  164. allwinner,function = "gpio_in";
  165. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  166. allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  167. };
  168. usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 {
  169. allwinner,pins = "PG11";
  170. allwinner,function = "gpio_out";
  171. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  172. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  173. };
  174. };
  175. &reg_usb0_vbus {
  176. status = "okay";
  177. gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
  178. };
  179. &reg_usb1_vbus {
  180. pinctrl-0 = <&usb1_vbus_pin_olinuxino>;
  181. gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
  182. status = "okay";
  183. };
  184. &uart1 {
  185. pinctrl-names = "default";
  186. pinctrl-0 = <&uart1_pins_b>;
  187. status = "okay";
  188. };
  189. &usb_otg {
  190. dr_mode = "otg";
  191. status = "okay";
  192. };
  193. &usb0_vbus_pin_a {
  194. allwinner,pins = "PG12";
  195. };
  196. &usbphy {
  197. pinctrl-names = "default";
  198. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  199. usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
  200. usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
  201. usb0_vbus-supply = <&reg_usb0_vbus>;
  202. usb1_vbus-supply = <&reg_usb1_vbus>;
  203. status = "okay";
  204. };