sun5i-a13-olinuxino-micro.dts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /*
  2. * Copyright 2012 Maxime Ripard <maxime.ripard@free-electrons.com>
  3. * Copyright 2013 Hans de Goede <hdegoede@redhat.com>
  4. *
  5. * This file is dual-licensed: you can use it either under the terms
  6. * of the GPL or the X11 license, at your option. Note that this dual
  7. * licensing only applies to this file, and not this project as a
  8. * whole.
  9. *
  10. * a) This file is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This file is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * Or, alternatively,
  21. *
  22. * b) Permission is hereby granted, free of charge, to any person
  23. * obtaining a copy of this software and associated documentation
  24. * files (the "Software"), to deal in the Software without
  25. * restriction, including without limitation the rights to use,
  26. * copy, modify, merge, publish, distribute, sublicense, and/or
  27. * sell copies of the Software, and to permit persons to whom the
  28. * Software is furnished to do so, subject to the following
  29. * conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be
  32. * included in all copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  35. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  36. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  37. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  38. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  39. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  40. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. */
  43. /dts-v1/;
  44. #include "sun5i-a13.dtsi"
  45. #include "sunxi-common-regulators.dtsi"
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/pinctrl/sun4i-a10.h>
  48. / {
  49. model = "Olimex A13-Olinuxino Micro";
  50. compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
  51. aliases {
  52. serial0 = &uart1;
  53. };
  54. chosen {
  55. stdout-path = "serial0:115200n8";
  56. };
  57. leds {
  58. compatible = "gpio-leds";
  59. pinctrl-names = "default";
  60. pinctrl-0 = <&led_pins_olinuxinom>;
  61. power {
  62. label = "a13-olinuxino-micro:green:power";
  63. gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
  64. default-state = "on";
  65. };
  66. };
  67. };
  68. &ehci0 {
  69. status = "okay";
  70. };
  71. &i2c0 {
  72. pinctrl-names = "default";
  73. pinctrl-0 = <&i2c0_pins_a>;
  74. status = "okay";
  75. };
  76. &i2c1 {
  77. pinctrl-names = "default";
  78. pinctrl-0 = <&i2c1_pins_a>;
  79. status = "okay";
  80. };
  81. &i2c2 {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&i2c2_pins_a>;
  84. status = "okay";
  85. };
  86. &mmc0 {
  87. pinctrl-names = "default";
  88. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>;
  89. vmmc-supply = <&reg_vcc3v3>;
  90. bus-width = <4>;
  91. cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
  92. cd-inverted;
  93. status = "okay";
  94. };
  95. &ohci0 {
  96. status = "okay";
  97. };
  98. &otg_sram {
  99. status = "okay";
  100. };
  101. &pio {
  102. mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 {
  103. allwinner,pins = "PG0";
  104. allwinner,function = "gpio_in";
  105. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  106. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  107. };
  108. led_pins_olinuxinom: led_pins@0 {
  109. allwinner,pins = "PG9";
  110. allwinner,function = "gpio_out";
  111. allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  112. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  113. };
  114. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  115. allwinner,pins = "PG2";
  116. allwinner,function = "gpio_in";
  117. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  118. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  119. };
  120. usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  121. allwinner,pins = "PG1";
  122. allwinner,function = "gpio_in";
  123. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  124. allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  125. };
  126. usb0_vbus_pin_olinuxinom: usb0_vbus_pin@0 {
  127. allwinner,pins = "PG12";
  128. allwinner,function = "gpio_out";
  129. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  130. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  131. };
  132. usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 {
  133. allwinner,pins = "PG11";
  134. allwinner,function = "gpio_out";
  135. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  136. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  137. };
  138. };
  139. &reg_usb0_vbus {
  140. pinctrl-0 = <&usb0_vbus_pin_olinuxinom>;
  141. gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>;
  142. status = "okay";
  143. };
  144. &reg_usb1_vbus {
  145. pinctrl-0 = <&usb1_vbus_pin_olinuxinom>;
  146. gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
  147. status = "okay";
  148. };
  149. &uart1 {
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&uart1_pins_b>;
  152. status = "okay";
  153. };
  154. &usb_otg {
  155. dr_mode = "otg";
  156. status = "okay";
  157. };
  158. &usbphy {
  159. pinctrl-names = "default";
  160. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  161. usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
  162. usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
  163. usb0_vbus-supply = <&reg_usb0_vbus>;
  164. usb1_vbus-supply = <&reg_usb1_vbus>;
  165. status = "okay";
  166. };