sun7i-a20-olinuxino-lime.dts 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /*
  2. * This is based on sun4i-a10-olinuxino-lime.dts
  3. *
  4. * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
  5. * Copyright (c) 2014 FUKAUMI Naoki <naobsd@gmail.com>
  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. #include <dt-bindings/pinctrl/sun4i-a10.h>
  51. / {
  52. model = "Olimex A20-OLinuXino-LIME";
  53. compatible = "olimex,a20-olinuxino-lime", "allwinner,sun7i-a20";
  54. aliases {
  55. serial0 = &uart0;
  56. };
  57. chosen {
  58. stdout-path = "serial0:115200n8";
  59. };
  60. leds {
  61. compatible = "gpio-leds";
  62. pinctrl-names = "default";
  63. pinctrl-0 = <&led_pins_olinuxinolime>;
  64. green {
  65. label = "a20-olinuxino-lime:green:usr";
  66. gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
  67. default-state = "on";
  68. };
  69. };
  70. };
  71. &ahci {
  72. target-supply = <&reg_ahci_5v>;
  73. status = "okay";
  74. };
  75. &ehci0 {
  76. status = "okay";
  77. };
  78. &ehci1 {
  79. status = "okay";
  80. };
  81. &gmac {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&gmac_pins_mii_a>;
  84. phy = <&phy1>;
  85. phy-mode = "mii";
  86. status = "okay";
  87. phy1: ethernet-phy@1 {
  88. reg = <1>;
  89. };
  90. };
  91. &i2c0 {
  92. pinctrl-names = "default";
  93. pinctrl-0 = <&i2c0_pins_a>;
  94. status = "okay";
  95. axp209: pmic@34 {
  96. compatible = "x-powers,axp209";
  97. reg = <0x34>;
  98. interrupt-parent = <&nmi_intc>;
  99. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  100. interrupt-controller;
  101. #interrupt-cells = <1>;
  102. };
  103. };
  104. &i2c1 {
  105. pinctrl-names = "default";
  106. pinctrl-0 = <&i2c1_pins_a>;
  107. status = "okay";
  108. eeprom: eeprom@50 {
  109. compatible = "atmel,24c16";
  110. reg = <0x50>;
  111. pagesize = <16>;
  112. };
  113. };
  114. &mmc0 {
  115. pinctrl-names = "default";
  116. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  117. vmmc-supply = <&reg_vcc3v3>;
  118. bus-width = <4>;
  119. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  120. cd-inverted;
  121. status = "okay";
  122. };
  123. &ohci0 {
  124. status = "okay";
  125. };
  126. &ohci1 {
  127. status = "okay";
  128. };
  129. &otg_sram {
  130. status = "okay";
  131. };
  132. &pio {
  133. ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
  134. allwinner,pins = "PC3";
  135. allwinner,function = "gpio_out";
  136. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  137. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  138. };
  139. led_pins_olinuxinolime: led_pins@0 {
  140. allwinner,pins = "PH2";
  141. allwinner,function = "gpio_out";
  142. allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  143. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  144. };
  145. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  146. allwinner,pins = "PH4";
  147. allwinner,function = "gpio_in";
  148. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  149. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  150. };
  151. usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  152. allwinner,pins = "PH5";
  153. allwinner,function = "gpio_in";
  154. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  155. allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  156. };
  157. };
  158. &reg_ahci_5v {
  159. pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
  160. gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
  161. status = "okay";
  162. };
  163. &reg_usb0_vbus {
  164. status = "okay";
  165. };
  166. &reg_usb1_vbus {
  167. status = "okay";
  168. };
  169. &reg_usb2_vbus {
  170. status = "okay";
  171. };
  172. &uart0 {
  173. pinctrl-names = "default";
  174. pinctrl-0 = <&uart0_pins_a>;
  175. status = "okay";
  176. };
  177. &usb_otg {
  178. dr_mode = "otg";
  179. status = "okay";
  180. };
  181. &usbphy {
  182. pinctrl-names = "default";
  183. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  184. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  185. usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  186. usb0_vbus-supply = <&reg_usb0_vbus>;
  187. usb1_vbus-supply = <&reg_usb1_vbus>;
  188. usb2_vbus-supply = <&reg_usb2_vbus>;
  189. status = "okay";
  190. };