sun50i-h6-pine-h64.dts 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. // Copyright (c) 2017 Icenowy Zheng <[email protected]>
  3. /dts-v1/;
  4. #include "sun50i-h6.dtsi"
  5. #include "sun50i-h6-cpu-opp.dtsi"
  6. #include <dt-bindings/gpio/gpio.h>
  7. / {
  8. model = "Pine H64 model A";
  9. compatible = "pine64,pine-h64", "allwinner,sun50i-h6";
  10. aliases {
  11. ethernet0 = &emac;
  12. serial0 = &uart0;
  13. spi0 = &spi0;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. ext_osc32k: ext_osc32k_clk {
  19. #clock-cells = <0>;
  20. compatible = "fixed-clock";
  21. clock-frequency = <32768>;
  22. clock-output-names = "ext_osc32k";
  23. };
  24. hdmi_connector: connector {
  25. compatible = "hdmi-connector";
  26. type = "a";
  27. ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
  28. port {
  29. hdmi_con_in: endpoint {
  30. remote-endpoint = <&hdmi_out_con>;
  31. };
  32. };
  33. };
  34. leds {
  35. compatible = "gpio-leds";
  36. led-0 {
  37. label = "pine-h64:green:heartbeat";
  38. gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
  39. };
  40. led-1 {
  41. label = "pine-h64:white:link";
  42. gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */
  43. };
  44. led-2 {
  45. label = "pine-h64:blue:status";
  46. gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
  47. };
  48. };
  49. reg_gmac_3v3: gmac-3v3 {
  50. compatible = "regulator-fixed";
  51. regulator-name = "vcc-gmac-3v3";
  52. regulator-min-microvolt = <3300000>;
  53. regulator-max-microvolt = <3300000>;
  54. startup-delay-us = <100000>;
  55. gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>;
  56. enable-active-high;
  57. };
  58. reg_usb_vbus: vbus {
  59. compatible = "regulator-fixed";
  60. regulator-name = "usb-vbus";
  61. regulator-min-microvolt = <5000000>;
  62. regulator-max-microvolt = <5000000>;
  63. startup-delay-us = <100000>;
  64. gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>;
  65. enable-active-high;
  66. };
  67. };
  68. &cpu0 {
  69. cpu-supply = <&reg_dcdca>;
  70. };
  71. &de {
  72. status = "okay";
  73. };
  74. &ehci0 {
  75. status = "okay";
  76. };
  77. &ehci3 {
  78. status = "okay";
  79. };
  80. &emac {
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&ext_rgmii_pins>;
  83. phy-mode = "rgmii-id";
  84. phy-handle = <&ext_rgmii_phy>;
  85. phy-supply = <&reg_gmac_3v3>;
  86. allwinner,rx-delay-ps = <200>;
  87. allwinner,tx-delay-ps = <200>;
  88. status = "okay";
  89. };
  90. &gpu {
  91. mali-supply = <&reg_dcdcc>;
  92. status = "okay";
  93. };
  94. &hdmi {
  95. status = "okay";
  96. };
  97. &hdmi_out {
  98. hdmi_out_con: endpoint {
  99. remote-endpoint = <&hdmi_con_in>;
  100. };
  101. };
  102. &mdio {
  103. ext_rgmii_phy: ethernet-phy@1 {
  104. compatible = "ethernet-phy-ieee802.3-c22";
  105. reg = <1>;
  106. };
  107. };
  108. &mmc0 {
  109. vmmc-supply = <&reg_cldo1>;
  110. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  111. bus-width = <4>;
  112. status = "okay";
  113. };
  114. &mmc2 {
  115. vmmc-supply = <&reg_cldo1>;
  116. vqmmc-supply = <&reg_bldo2>;
  117. non-removable;
  118. cap-mmc-hw-reset;
  119. mmc-hs200-1_8v;
  120. bus-width = <8>;
  121. status = "okay";
  122. };
  123. &ohci0 {
  124. status = "okay";
  125. };
  126. &ohci3 {
  127. status = "okay";
  128. };
  129. &pio {
  130. vcc-pc-supply = <&reg_bldo2>;
  131. vcc-pd-supply = <&reg_cldo1>;
  132. vcc-pg-supply = <&reg_aldo1>;
  133. };
  134. &r_i2c {
  135. status = "okay";
  136. axp805: pmic@36 {
  137. compatible = "x-powers,axp805", "x-powers,axp806";
  138. reg = <0x36>;
  139. interrupt-parent = <&r_intc>;
  140. interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
  141. interrupt-controller;
  142. #interrupt-cells = <1>;
  143. x-powers,self-working-mode;
  144. regulators {
  145. reg_aldo1: aldo1 {
  146. regulator-always-on;
  147. regulator-min-microvolt = <3300000>;
  148. regulator-max-microvolt = <3300000>;
  149. regulator-name = "vcc-pl";
  150. };
  151. reg_aldo2: aldo2 {
  152. regulator-min-microvolt = <3300000>;
  153. regulator-max-microvolt = <3300000>;
  154. regulator-name = "vcc-ac200";
  155. regulator-enable-ramp-delay = <100000>;
  156. };
  157. reg_aldo3: aldo3 {
  158. /* This regulator is connected with CLDO1 */
  159. regulator-always-on;
  160. regulator-min-microvolt = <3300000>;
  161. regulator-max-microvolt = <3300000>;
  162. regulator-name = "vcc-3v3-1";
  163. };
  164. reg_bldo1: bldo1 {
  165. regulator-always-on;
  166. regulator-min-microvolt = <1800000>;
  167. regulator-max-microvolt = <1800000>;
  168. regulator-name = "vcc-bias-pll";
  169. };
  170. reg_bldo2: bldo2 {
  171. regulator-always-on;
  172. regulator-min-microvolt = <1800000>;
  173. regulator-max-microvolt = <1800000>;
  174. regulator-name = "vcc-efuse-pcie-hdmi-io";
  175. };
  176. reg_bldo3: bldo3 {
  177. regulator-always-on;
  178. regulator-min-microvolt = <1800000>;
  179. regulator-max-microvolt = <1800000>;
  180. regulator-name = "vcc-dcxoio";
  181. };
  182. bldo4 {
  183. /* unused */
  184. };
  185. reg_cldo1: cldo1 {
  186. /* This regulator is connected with ALDO3 */
  187. regulator-always-on;
  188. regulator-min-microvolt = <3300000>;
  189. regulator-max-microvolt = <3300000>;
  190. regulator-name = "vcc-3v3-2";
  191. };
  192. reg_cldo2: cldo2 {
  193. regulator-min-microvolt = <3300000>;
  194. regulator-max-microvolt = <3300000>;
  195. regulator-name = "vcc-wifi-1";
  196. };
  197. reg_cldo3: cldo3 {
  198. regulator-min-microvolt = <3300000>;
  199. regulator-max-microvolt = <3300000>;
  200. regulator-name = "vcc-wifi-2";
  201. };
  202. reg_dcdca: dcdca {
  203. regulator-always-on;
  204. regulator-min-microvolt = <810000>;
  205. regulator-max-microvolt = <1160000>;
  206. regulator-ramp-delay = <2500>;
  207. regulator-name = "vdd-cpu";
  208. };
  209. reg_dcdcc: dcdcc {
  210. regulator-enable-ramp-delay = <32000>;
  211. regulator-min-microvolt = <810000>;
  212. regulator-max-microvolt = <1080000>;
  213. regulator-ramp-delay = <2500>;
  214. regulator-name = "vdd-gpu";
  215. };
  216. reg_dcdcd: dcdcd {
  217. regulator-always-on;
  218. regulator-min-microvolt = <960000>;
  219. regulator-max-microvolt = <960000>;
  220. regulator-name = "vdd-sys";
  221. };
  222. reg_dcdce: dcdce {
  223. regulator-always-on;
  224. regulator-min-microvolt = <1200000>;
  225. regulator-max-microvolt = <1200000>;
  226. regulator-name = "vcc-dram";
  227. };
  228. sw {
  229. /* unused */
  230. };
  231. };
  232. };
  233. pcf8563: rtc@51 {
  234. compatible = "nxp,pcf8563";
  235. reg = <0x51>;
  236. interrupt-parent = <&r_intc>;
  237. interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
  238. #clock-cells = <0>;
  239. };
  240. };
  241. &r_ir {
  242. status = "okay";
  243. };
  244. &r_pio {
  245. vcc-pm-supply = <&reg_aldo1>;
  246. };
  247. &rtc {
  248. clocks = <&ext_osc32k>;
  249. };
  250. /*
  251. * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI
  252. * flash and eMMC at the same time, as one of them would fail probing.
  253. * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can
  254. * fix this up in no eMMC is connected.
  255. */
  256. &spi0 {
  257. pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>;
  258. pinctrl-names = "default";
  259. status = "disabled";
  260. flash@0 {
  261. compatible = "winbond,w25q128", "jedec,spi-nor";
  262. reg = <0>;
  263. spi-max-frequency = <4000000>;
  264. };
  265. };
  266. &uart0 {
  267. pinctrl-names = "default";
  268. pinctrl-0 = <&uart0_ph_pins>;
  269. status = "okay";
  270. };
  271. &usb2otg {
  272. dr_mode = "host";
  273. status = "okay";
  274. };
  275. &usb2phy {
  276. usb0_vbus-supply = <&reg_usb_vbus>;
  277. usb3_vbus-supply = <&reg_usb_vbus>;
  278. status = "okay";
  279. };