sun50i-a64-olinuxino.dts 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. // Copyright (C) 2017 Jagan Teki <[email protected]>
  3. /dts-v1/;
  4. #include "sun50i-a64.dtsi"
  5. #include "sun50i-a64-cpu-opp.dtsi"
  6. #include <dt-bindings/gpio/gpio.h>
  7. / {
  8. model = "Olimex A64-Olinuxino";
  9. compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64";
  10. aliases {
  11. ethernet0 = &emac;
  12. serial0 = &uart0;
  13. };
  14. chosen {
  15. stdout-path = "serial0:115200n8";
  16. };
  17. hdmi-connector {
  18. compatible = "hdmi-connector";
  19. type = "a";
  20. port {
  21. hdmi_con_in: endpoint {
  22. remote-endpoint = <&hdmi_out_con>;
  23. };
  24. };
  25. };
  26. leds {
  27. compatible = "gpio-leds";
  28. led-0 {
  29. label = "a64-olinuxino:red:user";
  30. gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
  31. };
  32. };
  33. reg_usb1_vbus: usb1-vbus {
  34. compatible = "regulator-fixed";
  35. regulator-name = "usb1-vbus";
  36. regulator-min-microvolt = <5000000>;
  37. regulator-max-microvolt = <5000000>;
  38. regulator-boot-on;
  39. enable-active-high;
  40. gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
  41. status = "okay";
  42. };
  43. wifi_pwrseq: wifi_pwrseq {
  44. compatible = "mmc-pwrseq-simple";
  45. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  46. };
  47. };
  48. &codec {
  49. status = "okay";
  50. };
  51. &codec_analog {
  52. cpvdd-supply = <&reg_eldo1>;
  53. status = "okay";
  54. };
  55. &cpu0 {
  56. cpu-supply = <&reg_dcdc2>;
  57. };
  58. &cpu1 {
  59. cpu-supply = <&reg_dcdc2>;
  60. };
  61. &cpu2 {
  62. cpu-supply = <&reg_dcdc2>;
  63. };
  64. &cpu3 {
  65. cpu-supply = <&reg_dcdc2>;
  66. };
  67. &dai {
  68. status = "okay";
  69. };
  70. &de {
  71. status = "okay";
  72. };
  73. &ehci0 {
  74. status = "okay";
  75. };
  76. &ehci1 {
  77. status = "okay";
  78. };
  79. &emac {
  80. pinctrl-names = "default";
  81. pinctrl-0 = <&rgmii_pins>;
  82. phy-mode = "rgmii";
  83. phy-handle = <&ext_rgmii_phy>;
  84. phy-supply = <&reg_dcdc1>;
  85. allwinner,tx-delay-ps = <600>;
  86. status = "okay";
  87. };
  88. &hdmi {
  89. hvcc-supply = <&reg_dldo1>;
  90. status = "okay";
  91. };
  92. &hdmi_out {
  93. hdmi_out_con: endpoint {
  94. remote-endpoint = <&hdmi_con_in>;
  95. };
  96. };
  97. &mdio {
  98. ext_rgmii_phy: ethernet-phy@1 {
  99. compatible = "ethernet-phy-ieee802.3-c22";
  100. reg = <1>;
  101. };
  102. };
  103. &mmc0 {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&mmc0_pins>;
  106. vmmc-supply = <&reg_dcdc1>;
  107. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  108. disable-wp;
  109. bus-width = <4>;
  110. status = "okay";
  111. };
  112. &mmc1 {
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&mmc1_pins>;
  115. vmmc-supply = <&reg_dcdc1>;
  116. vqmmc-supply = <&reg_dldo4>;
  117. mmc-pwrseq = <&wifi_pwrseq>;
  118. bus-width = <4>;
  119. non-removable;
  120. status = "okay";
  121. rtl8723bs: wifi@1 {
  122. reg = <1>;
  123. interrupt-parent = <&r_pio>;
  124. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  125. interrupt-names = "host-wake";
  126. };
  127. };
  128. &ohci0 {
  129. status = "okay";
  130. };
  131. &ohci1 {
  132. status = "okay";
  133. };
  134. &pio {
  135. vcc-pc-supply = <&reg_dcdc1>;
  136. vcc-pd-supply = <&reg_dcdc1>;
  137. vcc-pe-supply = <&reg_aldo1>;
  138. vcc-pg-supply = <&reg_dldo4>;
  139. };
  140. &r_pio {
  141. /*
  142. * FIXME: We can't add that supply for now since it would
  143. * create a circular dependency between pinctrl, the regulator
  144. * and the RSB Bus.
  145. *
  146. * vcc-pl-supply = <&reg_aldo2>;
  147. */
  148. };
  149. &pio {
  150. vcc-pa-supply = <&reg_dcdc1>;
  151. vcc-pb-supply = <&reg_dcdc1>;
  152. vcc-pc-supply = <&reg_dcdc1>;
  153. vcc-pd-supply = <&reg_dcdc1>;
  154. vcc-pe-supply = <&reg_aldo1>;
  155. vcc-pf-supply = <&reg_dcdc1>;
  156. vcc-pg-supply = <&reg_dldo4>;
  157. vcc-ph-supply = <&reg_dcdc1>;
  158. };
  159. &r_rsb {
  160. status = "okay";
  161. axp803: pmic@3a3 {
  162. compatible = "x-powers,axp803";
  163. reg = <0x3a3>;
  164. interrupt-parent = <&r_intc>;
  165. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  166. x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
  167. };
  168. };
  169. /* VCC-PL is powered by aldo2 but we cannot add it as the RSB */
  170. /* interface used to talk to the PMIC in on the PL pins */
  171. /* &r_pio { */
  172. /* vcc-pl-supply = <&reg_aldo2>; */
  173. /* }; */
  174. #include "axp803.dtsi"
  175. &ac_power_supply {
  176. status = "okay";
  177. };
  178. &battery_power_supply {
  179. status = "okay";
  180. };
  181. &reg_aldo1 {
  182. regulator-always-on;
  183. regulator-min-microvolt = <2800000>;
  184. regulator-max-microvolt = <2800000>;
  185. regulator-name = "vcc-pe";
  186. };
  187. &reg_aldo2 {
  188. regulator-always-on;
  189. regulator-min-microvolt = <3300000>;
  190. regulator-max-microvolt = <3300000>;
  191. regulator-name = "vcc-pl";
  192. };
  193. &reg_aldo3 {
  194. regulator-always-on;
  195. regulator-min-microvolt = <3000000>;
  196. regulator-max-microvolt = <3000000>;
  197. regulator-name = "vcc-pll-avcc";
  198. };
  199. &reg_dcdc1 {
  200. regulator-always-on;
  201. regulator-min-microvolt = <3300000>;
  202. regulator-max-microvolt = <3300000>;
  203. regulator-name = "vcc-3v3";
  204. };
  205. &reg_dcdc2 {
  206. regulator-always-on;
  207. regulator-min-microvolt = <1040000>;
  208. regulator-max-microvolt = <1300000>;
  209. regulator-name = "vdd-cpux";
  210. };
  211. /* DCDC3 is polyphased with DCDC2 */
  212. /*
  213. * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
  214. * 1.35V that the PMIC can drive.
  215. */
  216. &reg_dcdc5 {
  217. regulator-always-on;
  218. regulator-min-microvolt = <1360000>;
  219. regulator-max-microvolt = <1360000>;
  220. regulator-name = "vcc-ddr3";
  221. };
  222. &reg_dcdc6 {
  223. regulator-always-on;
  224. regulator-min-microvolt = <1100000>;
  225. regulator-max-microvolt = <1100000>;
  226. regulator-name = "vdd-sys";
  227. };
  228. &reg_dldo1 {
  229. regulator-min-microvolt = <3300000>;
  230. regulator-max-microvolt = <3300000>;
  231. regulator-name = "vcc-hdmi";
  232. };
  233. &reg_dldo2 {
  234. regulator-min-microvolt = <3300000>;
  235. regulator-max-microvolt = <3300000>;
  236. regulator-name = "vcc-mipi";
  237. };
  238. &reg_dldo3 {
  239. regulator-min-microvolt = <2800000>;
  240. regulator-max-microvolt = <2800000>;
  241. regulator-name = "vcc-avdd-csi";
  242. };
  243. &reg_dldo4 {
  244. regulator-min-microvolt = <3300000>;
  245. regulator-max-microvolt = <3300000>;
  246. regulator-name = "vcc-wifi-io";
  247. };
  248. &reg_drivevbus {
  249. regulator-name = "usb0-vbus";
  250. status = "okay";
  251. };
  252. &reg_eldo1 {
  253. regulator-min-microvolt = <1800000>;
  254. regulator-max-microvolt = <1800000>;
  255. regulator-name = "cpvdd";
  256. };
  257. &reg_eldo2 {
  258. regulator-min-microvolt = <1800000>;
  259. regulator-max-microvolt = <1800000>;
  260. regulator-name = "vcc-dvdd-csi";
  261. };
  262. &reg_fldo1 {
  263. regulator-min-microvolt = <1200000>;
  264. regulator-max-microvolt = <1200000>;
  265. regulator-name = "vcc-1v2-hsic";
  266. };
  267. /*
  268. * The A64 chip cannot work without this regulator off, although
  269. * it seems to be only driving the AR100 core.
  270. * Maybe we don't still know well about CPUs domain.
  271. */
  272. &reg_fldo2 {
  273. regulator-always-on;
  274. regulator-min-microvolt = <1100000>;
  275. regulator-max-microvolt = <1100000>;
  276. regulator-name = "vdd-cpus";
  277. };
  278. &reg_rtc_ldo {
  279. regulator-name = "vcc-rtc";
  280. };
  281. &simplefb_hdmi {
  282. vcc-hdmi-supply = <&reg_dldo1>;
  283. };
  284. &sound {
  285. simple-audio-card,aux-devs = <&codec_analog>;
  286. simple-audio-card,widgets = "Microphone", "Microphone Jack Left",
  287. "Microphone", "Microphone Jack Right",
  288. "Headphone", "Headphone Jack";
  289. simple-audio-card,routing = "Left DAC", "DACL",
  290. "Right DAC", "DACR",
  291. "Headphone Jack", "HP",
  292. "ADCL", "Left ADC",
  293. "ADCR", "Right ADC",
  294. "Microphone Jack Left", "MBIAS",
  295. "MIC1", "Microphone Jack Left",
  296. "Microphone Jack Right", "MBIAS",
  297. "MIC2", "Microphone Jack Right";
  298. status = "okay";
  299. };
  300. &uart0 {
  301. pinctrl-names = "default";
  302. pinctrl-0 = <&uart0_pb_pins>;
  303. status = "okay";
  304. };
  305. &usb_otg {
  306. dr_mode = "otg";
  307. status = "okay";
  308. };
  309. &usbphy {
  310. status = "okay";
  311. usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
  312. usb0_vbus-supply = <&reg_drivevbus>;
  313. usb1_vbus-supply = <&reg_usb1_vbus>;
  314. };