sun7i-a20-olinuxino-lime.dts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. /*
  2. * This is based on sun4i-a10-olinuxino-lime.dts
  3. *
  4. * Copyright 2014 - Hans de Goede <[email protected]>
  5. * Copyright (c) 2014 FUKAUMI Naoki <[email protected]>
  6. *
  7. * This file is dual-licensed: you can use it either under the terms
  8. * of the GPL or the X11 license, at your option. Note that this dual
  9. * licensing only applies to this file, and not this project as a
  10. * whole.
  11. *
  12. * a) This file is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * This file is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * Or, alternatively,
  23. *
  24. * b) Permission is hereby granted, free of charge, to any person
  25. * obtaining a copy of this software and associated documentation
  26. * files (the "Software"), to deal in the Software without
  27. * restriction, including without limitation the rights to use,
  28. * copy, modify, merge, publish, distribute, sublicense, and/or
  29. * sell copies of the Software, and to permit persons to whom the
  30. * Software is furnished to do so, subject to the following
  31. * conditions:
  32. *
  33. * The above copyright notice and this permission notice shall be
  34. * included in all copies or substantial portions of the Software.
  35. *
  36. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  37. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  38. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  39. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  40. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  41. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  42. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  43. * OTHER DEALINGS IN THE SOFTWARE.
  44. */
  45. /dts-v1/;
  46. #include "sun7i-a20.dtsi"
  47. #include "sunxi-common-regulators.dtsi"
  48. #include <dt-bindings/gpio/gpio.h>
  49. #include <dt-bindings/interrupt-controller/irq.h>
  50. / {
  51. model = "Olimex A20-OLinuXino-LIME";
  52. compatible = "olimex,a20-olinuxino-lime", "allwinner,sun7i-a20";
  53. aliases {
  54. serial0 = &uart0;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. hdmi-connector {
  60. compatible = "hdmi-connector";
  61. type = "a";
  62. port {
  63. hdmi_con_in: endpoint {
  64. remote-endpoint = <&hdmi_out_con>;
  65. };
  66. };
  67. };
  68. leds {
  69. compatible = "gpio-leds";
  70. pinctrl-names = "default";
  71. pinctrl-0 = <&led_pins_olinuxinolime>;
  72. led {
  73. label = "a20-olinuxino-lime:green:usr";
  74. gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
  75. default-state = "on";
  76. };
  77. };
  78. };
  79. &ahci {
  80. target-supply = <&reg_ahci_5v>;
  81. status = "okay";
  82. };
  83. &de {
  84. status = "okay";
  85. };
  86. &ehci0 {
  87. status = "okay";
  88. };
  89. &ehci1 {
  90. status = "okay";
  91. };
  92. &gmac {
  93. pinctrl-names = "default";
  94. pinctrl-0 = <&gmac_mii_pins>;
  95. phy-handle = <&phy1>;
  96. phy-mode = "mii";
  97. status = "okay";
  98. };
  99. &hdmi {
  100. status = "okay";
  101. };
  102. &hdmi_out {
  103. hdmi_out_con: endpoint {
  104. remote-endpoint = <&hdmi_con_in>;
  105. };
  106. };
  107. &i2c0 {
  108. status = "okay";
  109. axp209: pmic@34 {
  110. compatible = "x-powers,axp209";
  111. reg = <0x34>;
  112. interrupt-parent = <&nmi_intc>;
  113. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  114. interrupt-controller;
  115. #interrupt-cells = <1>;
  116. };
  117. };
  118. &i2c1 {
  119. status = "okay";
  120. eeprom: eeprom@50 {
  121. compatible = "atmel,24c16";
  122. reg = <0x50>;
  123. pagesize = <16>;
  124. };
  125. };
  126. &gmac_mdio {
  127. phy1: ethernet-phy@1 {
  128. reg = <1>;
  129. };
  130. };
  131. &mmc0 {
  132. vmmc-supply = <&reg_vcc3v3>;
  133. bus-width = <4>;
  134. cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
  135. status = "okay";
  136. };
  137. &ohci0 {
  138. status = "okay";
  139. };
  140. &ohci1 {
  141. status = "okay";
  142. };
  143. &otg_sram {
  144. status = "okay";
  145. };
  146. &pio {
  147. led_pins_olinuxinolime: led-pins {
  148. pins = "PH2";
  149. function = "gpio_out";
  150. drive-strength = <20>;
  151. };
  152. };
  153. &reg_ahci_5v {
  154. gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
  155. status = "okay";
  156. };
  157. &reg_usb0_vbus {
  158. status = "okay";
  159. };
  160. &reg_usb1_vbus {
  161. status = "okay";
  162. };
  163. &reg_usb2_vbus {
  164. status = "okay";
  165. };
  166. &uart0 {
  167. pinctrl-names = "default";
  168. pinctrl-0 = <&uart0_pb_pins>;
  169. status = "okay";
  170. };
  171. &usb_otg {
  172. dr_mode = "otg";
  173. status = "okay";
  174. };
  175. &usbphy {
  176. usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
  177. usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
  178. usb0_vbus-supply = <&reg_usb0_vbus>;
  179. usb1_vbus-supply = <&reg_usb1_vbus>;
  180. usb2_vbus-supply = <&reg_usb2_vbus>;
  181. status = "okay";
  182. };