sun50i-a64-bananapi-m64.dts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. // Copyright (c) 2016 ARM Ltd.
  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 = "BananaPi-M64";
  9. compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";
  10. aliases {
  11. ethernet0 = &emac;
  12. serial0 = &uart0;
  13. serial1 = &uart1;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. hdmi-connector {
  19. compatible = "hdmi-connector";
  20. type = "a";
  21. port {
  22. hdmi_con_in: endpoint {
  23. remote-endpoint = <&hdmi_out_con>;
  24. };
  25. };
  26. };
  27. leds {
  28. compatible = "gpio-leds";
  29. led-0 {
  30. label = "bananapi-m64:red:pwr";
  31. gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
  32. default-state = "on";
  33. };
  34. led-1 {
  35. label = "bananapi-m64:green:user";
  36. gpios = <&pio 4 14 GPIO_ACTIVE_HIGH>; /* PE14 */
  37. };
  38. led-2 {
  39. label = "bananapi-m64:blue:user";
  40. gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
  41. };
  42. };
  43. wifi_pwrseq: wifi_pwrseq {
  44. compatible = "mmc-pwrseq-simple";
  45. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  46. clocks = <&rtc CLK_OSC32K_FANOUT>;
  47. clock-names = "ext_clock";
  48. };
  49. };
  50. &codec {
  51. status = "okay";
  52. };
  53. &codec_analog {
  54. cpvdd-supply = <&reg_eldo1>;
  55. status = "okay";
  56. };
  57. &cpu0 {
  58. cpu-supply = <&reg_dcdc2>;
  59. };
  60. &cpu1 {
  61. cpu-supply = <&reg_dcdc2>;
  62. };
  63. &cpu2 {
  64. cpu-supply = <&reg_dcdc2>;
  65. };
  66. &cpu3 {
  67. cpu-supply = <&reg_dcdc2>;
  68. };
  69. &dai {
  70. status = "okay";
  71. };
  72. &de {
  73. status = "okay";
  74. };
  75. &ehci0 {
  76. status = "okay";
  77. };
  78. &ehci1 {
  79. status = "okay";
  80. };
  81. &emac {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&rgmii_pins>;
  84. phy-mode = "rgmii-id";
  85. phy-handle = <&ext_rgmii_phy>;
  86. phy-supply = <&reg_dc1sw>;
  87. status = "okay";
  88. };
  89. &hdmi {
  90. hvcc-supply = <&reg_dldo1>;
  91. status = "okay";
  92. };
  93. &hdmi_out {
  94. hdmi_out_con: endpoint {
  95. remote-endpoint = <&hdmi_con_in>;
  96. };
  97. };
  98. &i2c1 {
  99. status = "okay";
  100. };
  101. &i2c1_pins {
  102. bias-pull-up;
  103. };
  104. &mdio {
  105. ext_rgmii_phy: ethernet-phy@1 {
  106. compatible = "ethernet-phy-ieee802.3-c22";
  107. reg = <1>;
  108. };
  109. };
  110. &mmc0 {
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&mmc0_pins>;
  113. vmmc-supply = <&reg_dcdc1>;
  114. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  115. disable-wp;
  116. bus-width = <4>;
  117. status = "okay";
  118. };
  119. &mmc1 {
  120. pinctrl-names = "default";
  121. pinctrl-0 = <&mmc1_pins>;
  122. vmmc-supply = <&reg_dldo2>;
  123. vqmmc-supply = <&reg_dldo4>;
  124. mmc-pwrseq = <&wifi_pwrseq>;
  125. bus-width = <4>;
  126. non-removable;
  127. status = "okay";
  128. brcmf: wifi@1 {
  129. reg = <1>;
  130. compatible = "brcm,bcm4329-fmac";
  131. interrupt-parent = <&r_pio>;
  132. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  133. interrupt-names = "host-wake";
  134. };
  135. };
  136. &mmc2 {
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
  139. vmmc-supply = <&reg_dcdc1>;
  140. bus-width = <8>;
  141. non-removable;
  142. cap-mmc-hw-reset;
  143. status = "okay";
  144. };
  145. &ohci0 {
  146. status = "okay";
  147. };
  148. &ohci1 {
  149. status = "okay";
  150. };
  151. &r_rsb {
  152. status = "okay";
  153. axp803: pmic@3a3 {
  154. compatible = "x-powers,axp803";
  155. reg = <0x3a3>;
  156. interrupt-parent = <&r_intc>;
  157. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  158. x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
  159. };
  160. };
  161. #include "axp803.dtsi"
  162. &ac_power_supply {
  163. status = "okay";
  164. };
  165. &battery_power_supply {
  166. status = "okay";
  167. };
  168. &reg_aldo1 {
  169. /*
  170. * This regulator also drives the PE pingroup GPIOs,
  171. * which also controls two LEDs.
  172. */
  173. regulator-always-on;
  174. regulator-min-microvolt = <2800000>;
  175. regulator-max-microvolt = <2800000>;
  176. regulator-name = "afvcc-csi";
  177. };
  178. &reg_aldo2 {
  179. regulator-always-on;
  180. regulator-min-microvolt = <1800000>;
  181. regulator-max-microvolt = <3300000>;
  182. regulator-name = "vcc-pl";
  183. };
  184. &reg_aldo3 {
  185. regulator-always-on;
  186. regulator-min-microvolt = <3000000>;
  187. regulator-max-microvolt = <3000000>;
  188. regulator-name = "vcc-pll-avcc";
  189. };
  190. &reg_dc1sw {
  191. /*
  192. * This regulator also indirectly drives the PD pingroup GPIOs,
  193. * which also controls the power LED.
  194. */
  195. regulator-always-on;
  196. regulator-name = "vcc-phy";
  197. };
  198. &reg_dcdc1 {
  199. regulator-always-on;
  200. regulator-min-microvolt = <3300000>;
  201. regulator-max-microvolt = <3300000>;
  202. regulator-name = "vcc-3v3";
  203. };
  204. &reg_dcdc2 {
  205. regulator-always-on;
  206. regulator-min-microvolt = <1040000>;
  207. regulator-max-microvolt = <1300000>;
  208. regulator-name = "vdd-cpux";
  209. };
  210. /* DCDC3 is polyphased with DCDC2 */
  211. &reg_dcdc5 {
  212. regulator-always-on;
  213. regulator-min-microvolt = <1500000>;
  214. regulator-max-microvolt = <1500000>;
  215. regulator-name = "vcc-dram";
  216. };
  217. &reg_dcdc6 {
  218. regulator-always-on;
  219. regulator-min-microvolt = <1100000>;
  220. regulator-max-microvolt = <1100000>;
  221. regulator-name = "vdd-sys";
  222. };
  223. &reg_dldo1 {
  224. regulator-min-microvolt = <3300000>;
  225. regulator-max-microvolt = <3300000>;
  226. regulator-name = "vcc-hdmi-dsi";
  227. };
  228. &reg_dldo2 {
  229. regulator-min-microvolt = <3300000>;
  230. regulator-max-microvolt = <3300000>;
  231. regulator-name = "vcc-wifi";
  232. };
  233. &reg_dldo4 {
  234. regulator-min-microvolt = <1800000>;
  235. regulator-max-microvolt = <3300000>;
  236. regulator-name = "vcc-wifi-io";
  237. };
  238. &reg_drivevbus {
  239. regulator-name = "usb0-vbus";
  240. status = "okay";
  241. };
  242. &reg_eldo1 {
  243. regulator-min-microvolt = <1800000>;
  244. regulator-max-microvolt = <1800000>;
  245. regulator-name = "cpvdd";
  246. };
  247. &reg_fldo1 {
  248. regulator-min-microvolt = <1200000>;
  249. regulator-max-microvolt = <1200000>;
  250. regulator-name = "vcc-1v2-hsic";
  251. };
  252. /*
  253. * The A64 chip cannot work without this regulator off, although
  254. * it seems to be only driving the AR100 core.
  255. * Maybe we don't still know well about CPUs domain.
  256. */
  257. &reg_fldo2 {
  258. regulator-always-on;
  259. regulator-min-microvolt = <1100000>;
  260. regulator-max-microvolt = <1100000>;
  261. regulator-name = "vdd-cpus";
  262. };
  263. &reg_rtc_ldo {
  264. regulator-name = "vcc-rtc";
  265. };
  266. &simplefb_hdmi {
  267. vcc-hdmi-supply = <&reg_dldo1>;
  268. };
  269. &sound {
  270. status = "okay";
  271. simple-audio-card,widgets = "Headphone", "Headphone Jack",
  272. "Microphone", "Microphone Jack",
  273. "Microphone", "Onboard Microphone";
  274. simple-audio-card,routing =
  275. "Left DAC", "DACL",
  276. "Right DAC", "DACR",
  277. "ADCL", "Left ADC",
  278. "ADCR", "Right ADC",
  279. "Headphone Jack", "HP",
  280. "MIC2", "Microphone Jack",
  281. "Onboard Microphone", "MBIAS",
  282. "MIC1", "Onboard Microphone";
  283. };
  284. &uart0 {
  285. pinctrl-names = "default";
  286. pinctrl-0 = <&uart0_pb_pins>;
  287. status = "okay";
  288. };
  289. &uart1 {
  290. pinctrl-names = "default";
  291. pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  292. uart-has-rtscts;
  293. status = "okay";
  294. bluetooth {
  295. compatible = "brcm,bcm43438-bt";
  296. clocks = <&rtc CLK_OSC32K_FANOUT>;
  297. clock-names = "lpo";
  298. vbat-supply = <&reg_dldo2>;
  299. vddio-supply = <&reg_dldo4>;
  300. device-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
  301. host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
  302. shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
  303. };
  304. };
  305. &usb_otg {
  306. dr_mode = "otg";
  307. status = "okay";
  308. };
  309. &usb_power_supply {
  310. status = "okay";
  311. };
  312. &usbphy {
  313. usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
  314. usb0_vbus_power-supply = <&usb_power_supply>;
  315. usb0_vbus-supply = <&reg_drivevbus>;
  316. status = "okay";
  317. };