sun7i-a20-orangepi-mini.dts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /*
  2. * Copyright 2015 Hans de Goede <[email protected]>
  3. *
  4. * Hans de Goede <[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 "sun7i-a20.dtsi"
  46. #include "sunxi-common-regulators.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/interrupt-controller/irq.h>
  49. / {
  50. model = "Orange Pi Mini";
  51. compatible = "xunlong,orangepi-mini", "allwinner,sun7i-a20";
  52. aliases {
  53. serial0 = &uart0;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. hdmi-connector {
  59. compatible = "hdmi-connector";
  60. type = "a";
  61. port {
  62. hdmi_con_in: endpoint {
  63. remote-endpoint = <&hdmi_out_con>;
  64. };
  65. };
  66. };
  67. leds {
  68. compatible = "gpio-leds";
  69. led-0 {
  70. label = "orangepi:green:usr";
  71. gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
  72. };
  73. led-1 {
  74. label = "orangepi:blue:usr";
  75. gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; /* PH25 */
  76. };
  77. };
  78. reg_gmac_3v3: gmac-3v3 {
  79. compatible = "regulator-fixed";
  80. regulator-name = "gmac-3v3";
  81. regulator-min-microvolt = <3300000>;
  82. regulator-max-microvolt = <3300000>;
  83. startup-delay-us = <100000>;
  84. enable-active-high;
  85. gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
  86. };
  87. };
  88. &ahci {
  89. status = "okay";
  90. };
  91. &codec {
  92. status = "okay";
  93. };
  94. &de {
  95. status = "okay";
  96. };
  97. &ehci0 {
  98. status = "okay";
  99. };
  100. &ehci1 {
  101. status = "okay";
  102. };
  103. &gmac {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&gmac_rgmii_pins>;
  106. phy-handle = <&phy1>;
  107. phy-mode = "rgmii";
  108. phy-supply = <&reg_gmac_3v3>;
  109. status = "okay";
  110. };
  111. &hdmi {
  112. status = "okay";
  113. };
  114. &hdmi_out {
  115. hdmi_out_con: endpoint {
  116. remote-endpoint = <&hdmi_con_in>;
  117. };
  118. };
  119. &i2c0 {
  120. status = "okay";
  121. axp209: pmic@34 {
  122. reg = <0x34>;
  123. interrupt-parent = <&nmi_intc>;
  124. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  125. };
  126. };
  127. #include "axp209.dtsi"
  128. &ir0 {
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&ir0_rx_pin>;
  131. status = "okay";
  132. };
  133. &gmac_mdio {
  134. phy1: ethernet-phy@1 {
  135. reg = <1>;
  136. };
  137. };
  138. &mmc0 {
  139. vmmc-supply = <&reg_vcc3v3>;
  140. bus-width = <4>;
  141. cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
  142. status = "okay";
  143. };
  144. &mmc3 {
  145. vmmc-supply = <&reg_vcc3v3>;
  146. bus-width = <4>;
  147. cd-gpios = <&pio 7 11 GPIO_ACTIVE_LOW>; /* PH11 */
  148. status = "okay";
  149. };
  150. &otg_sram {
  151. status = "okay";
  152. };
  153. &reg_dcdc2 {
  154. regulator-always-on;
  155. regulator-min-microvolt = <1000000>;
  156. regulator-max-microvolt = <1500000>;
  157. regulator-name = "vdd-cpu";
  158. };
  159. &reg_dcdc3 {
  160. regulator-always-on;
  161. regulator-min-microvolt = <1000000>;
  162. regulator-max-microvolt = <1400000>;
  163. regulator-name = "vdd-int-pll";
  164. };
  165. &reg_ldo1 {
  166. regulator-name = "vdd-rtc";
  167. };
  168. &reg_ldo2 {
  169. regulator-always-on;
  170. regulator-min-microvolt = <3000000>;
  171. regulator-max-microvolt = <3000000>;
  172. regulator-name = "avcc";
  173. };
  174. &reg_usb0_vbus {
  175. status = "okay";
  176. };
  177. &reg_usb1_vbus {
  178. gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
  179. status = "okay";
  180. };
  181. &reg_usb2_vbus {
  182. gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
  183. status = "okay";
  184. };
  185. &uart0 {
  186. pinctrl-names = "default";
  187. pinctrl-0 = <&uart0_pb_pins>;
  188. status = "okay";
  189. };
  190. &usb_otg {
  191. dr_mode = "otg";
  192. status = "okay";
  193. };
  194. &usb_power_supply {
  195. status = "okay";
  196. };
  197. &usbphy {
  198. usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
  199. usb0_vbus_power-supply = <&usb_power_supply>;
  200. usb0_vbus-supply = <&reg_usb0_vbus>;
  201. usb1_vbus-supply = <&reg_usb1_vbus>;
  202. usb2_vbus-supply = <&reg_usb2_vbus>;
  203. status = "okay";
  204. };