sun5i-a13-olinuxino.dts 4.9 KB

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