sun50i-h5-orangepi-prime.dts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. /*
  2. * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz>
  3. *
  4. * Based on sun50i-h5-orangepi-pc2.dts, which is:
  5. * Copyright (C) 2016 ARM Ltd.
  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 "sun50i-h5.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. #include <dt-bindings/input/input.h>
  49. / {
  50. model = "Xunlong Orange Pi Prime";
  51. compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
  52. aliases {
  53. ethernet0 = &emac;
  54. serial0 = &uart0;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. 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. pwr {
  71. label = "orangepi:green:pwr";
  72. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
  73. default-state = "on";
  74. };
  75. status {
  76. label = "orangepi:red:status";
  77. gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
  78. };
  79. };
  80. r-gpio-keys {
  81. compatible = "gpio-keys";
  82. sw4 {
  83. label = "sw4";
  84. linux,code = <BTN_0>;
  85. gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
  86. };
  87. };
  88. reg_gmac_3v3: gmac-3v3 {
  89. compatible = "regulator-fixed";
  90. regulator-name = "gmac-3v3";
  91. regulator-min-microvolt = <3300000>;
  92. regulator-max-microvolt = <3300000>;
  93. startup-delay-us = <100000>;
  94. enable-active-high;
  95. gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
  96. };
  97. reg_vcc3v3: vcc3v3 {
  98. compatible = "regulator-fixed";
  99. regulator-name = "vcc3v3";
  100. regulator-min-microvolt = <3300000>;
  101. regulator-max-microvolt = <3300000>;
  102. };
  103. reg_usb0_vbus: usb0-vbus {
  104. compatible = "regulator-fixed";
  105. regulator-name = "usb0-vbus";
  106. regulator-min-microvolt = <5000000>;
  107. regulator-max-microvolt = <5000000>;
  108. enable-active-high;
  109. gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
  110. status = "okay";
  111. };
  112. wifi_pwrseq: wifi_pwrseq {
  113. compatible = "mmc-pwrseq-simple";
  114. reset-gpios = <&pio 2 14 GPIO_ACTIVE_LOW>; /* PC14 */
  115. };
  116. };
  117. &codec {
  118. allwinner,audio-routing =
  119. "Line Out", "LINEOUT",
  120. "MIC1", "Mic",
  121. "Mic", "MBIAS";
  122. status = "okay";
  123. };
  124. &de {
  125. status = "okay";
  126. };
  127. &ehci0 {
  128. status = "okay";
  129. };
  130. &ehci1 {
  131. status = "okay";
  132. };
  133. &ehci2 {
  134. status = "okay";
  135. };
  136. &ehci3 {
  137. status = "okay";
  138. };
  139. &emac {
  140. pinctrl-names = "default";
  141. pinctrl-0 = <&emac_rgmii_pins>;
  142. phy-supply = <&reg_gmac_3v3>;
  143. phy-handle = <&ext_rgmii_phy>;
  144. phy-mode = "rgmii";
  145. status = "okay";
  146. };
  147. &external_mdio {
  148. ext_rgmii_phy: ethernet-phy@1 {
  149. compatible = "ethernet-phy-ieee802.3-c22";
  150. reg = <1>;
  151. };
  152. };
  153. &hdmi {
  154. status = "okay";
  155. };
  156. &hdmi_out {
  157. hdmi_out_con: endpoint {
  158. remote-endpoint = <&hdmi_con_in>;
  159. };
  160. };
  161. &ir {
  162. pinctrl-names = "default";
  163. pinctrl-0 = <&ir_pins_a>;
  164. status = "okay";
  165. };
  166. &mmc0 {
  167. vmmc-supply = <&reg_vcc3v3>;
  168. bus-width = <4>;
  169. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  170. status = "okay";
  171. };
  172. &mmc1 {
  173. vmmc-supply = <&reg_vcc3v3>;
  174. mmc-pwrseq = <&wifi_pwrseq>;
  175. bus-width = <4>;
  176. non-removable;
  177. status = "okay";
  178. };
  179. &ohci0 {
  180. status = "okay";
  181. };
  182. &ohci1 {
  183. status = "okay";
  184. };
  185. &ohci2 {
  186. status = "okay";
  187. };
  188. &ohci3 {
  189. status = "okay";
  190. };
  191. &uart0 {
  192. pinctrl-names = "default";
  193. pinctrl-0 = <&uart0_pins_a>;
  194. status = "okay";
  195. };
  196. &uart1 {
  197. pinctrl-names = "default";
  198. pinctrl-0 = <&uart1_pins>;
  199. status = "disabled";
  200. };
  201. &uart2 {
  202. pinctrl-names = "default";
  203. pinctrl-0 = <&uart2_pins>;
  204. status = "disabled";
  205. };
  206. &usb_otg {
  207. dr_mode = "otg";
  208. status = "okay";
  209. };
  210. &usbphy {
  211. /* USB Type-A ports' VBUS is always on */
  212. usb0_id_det-gpios = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */
  213. usb0_vbus-supply = <&reg_usb0_vbus>;
  214. status = "okay";
  215. };