sun50i-a64-amarula-relic.dts 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. // Copyright (C) 2018 Amarula Solutions B.V.
  3. // Author: Jagan Teki <[email protected]>
  4. /dts-v1/;
  5. #include "sun50i-a64.dtsi"
  6. #include "sun50i-a64-cpu-opp.dtsi"
  7. #include <dt-bindings/gpio/gpio.h>
  8. / {
  9. model = "Amarula A64-Relic";
  10. compatible = "amarula,a64-relic", "allwinner,sun50i-a64";
  11. aliases {
  12. serial0 = &uart0;
  13. };
  14. chosen {
  15. stdout-path = "serial0:115200n8";
  16. };
  17. i2c {
  18. compatible = "i2c-gpio";
  19. sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>;
  20. scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>;
  21. i2c-gpio,delay-us = <5>;
  22. #address-cells = <1>;
  23. #size-cells = <0>;
  24. ov5640: camera@3c {
  25. compatible = "ovti,ov5640";
  26. reg = <0x3c>;
  27. pinctrl-names = "default";
  28. pinctrl-0 = <&csi_mclk_pin>;
  29. clocks = <&ccu CLK_CSI_MCLK>;
  30. clock-names = "xclk";
  31. AVDD-supply = <&reg_aldo1>;
  32. DOVDD-supply = <&reg_dldo3>;
  33. DVDD-supply = <&reg_eldo3>;
  34. reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */
  35. powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */
  36. port {
  37. ov5640_ep: endpoint {
  38. remote-endpoint = <&csi_ep>;
  39. bus-width = <8>;
  40. hsync-active = <1>; /* Active high */
  41. vsync-active = <0>; /* Active low */
  42. data-active = <1>; /* Active high */
  43. pclk-sample = <1>; /* Rising */
  44. };
  45. };
  46. };
  47. };
  48. wifi_pwrseq: wifi-pwrseq {
  49. compatible = "mmc-pwrseq-simple";
  50. clocks = <&rtc CLK_OSC32K_FANOUT>;
  51. clock-names = "ext_clock";
  52. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
  53. };
  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. &csi {
  68. status = "okay";
  69. port {
  70. csi_ep: endpoint {
  71. remote-endpoint = <&ov5640_ep>;
  72. bus-width = <8>;
  73. hsync-active = <1>; /* Active high */
  74. vsync-active = <0>; /* Active low */
  75. data-active = <1>; /* Active high */
  76. pclk-sample = <1>; /* Rising */
  77. };
  78. };
  79. };
  80. &ehci0 {
  81. status = "okay";
  82. };
  83. &i2c0 {
  84. status = "okay";
  85. sensor@48 {
  86. compatible = "st,stlm75";
  87. reg = <0x48>;
  88. };
  89. };
  90. &i2c0_pins {
  91. bias-pull-up;
  92. };
  93. &i2c1 {
  94. status = "okay";
  95. touchscreen@5d {
  96. compatible = "goodix,gt5663";
  97. reg = <0x5d>;
  98. AVDD28-supply = <&reg_ldo_io0>; /* VCC-CTP: GPIO0-LDO */
  99. interrupt-parent = <&pio>;
  100. interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>;
  101. irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* CTP-INT: PH4 */
  102. reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* CTP-RST: PH8 */
  103. touchscreen-inverted-x;
  104. touchscreen-inverted-y;
  105. };
  106. };
  107. &mmc1 {
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&mmc1_pins>;
  110. vmmc-supply = <&reg_dcdc1>;
  111. /*
  112. * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but
  113. * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with
  114. * 0Ohm register to vcc-io-wifi so eldo1 is used.
  115. */
  116. vqmmc-supply = <&reg_eldo1>;
  117. mmc-pwrseq = <&wifi_pwrseq>;
  118. bus-width = <4>;
  119. non-removable;
  120. status = "okay";
  121. brcmf: wifi@1 {
  122. reg = <1>;
  123. compatible = "brcm,bcm4329-fmac";
  124. interrupt-parent = <&r_pio>;
  125. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */
  126. interrupt-names = "host-wake";
  127. };
  128. };
  129. &mmc2 {
  130. pinctrl-names = "default";
  131. pinctrl-0 = <&mmc2_pins>;
  132. vmmc-supply = <&reg_dcdc1>;
  133. bus-width = <8>;
  134. non-removable;
  135. cap-mmc-hw-reset;
  136. status = "okay";
  137. };
  138. &ohci0 {
  139. status = "okay";
  140. };
  141. &r_rsb {
  142. status = "okay";
  143. axp803: pmic@3a3 {
  144. compatible = "x-powers,axp803";
  145. reg = <0x3a3>;
  146. interrupt-parent = <&r_intc>;
  147. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  148. x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
  149. };
  150. };
  151. #include "axp803.dtsi"
  152. &reg_aldo1 {
  153. regulator-always-on;
  154. regulator-min-microvolt = <2800000>;
  155. regulator-max-microvolt = <2800000>;
  156. regulator-name = "avdd-csi";
  157. };
  158. &reg_aldo2 {
  159. regulator-always-on;
  160. regulator-min-microvolt = <1800000>;
  161. regulator-max-microvolt = <3300000>;
  162. regulator-name = "vcc-pl";
  163. };
  164. &reg_aldo3 {
  165. regulator-always-on;
  166. regulator-min-microvolt = <3000000>;
  167. regulator-max-microvolt = <3000000>;
  168. regulator-name = "vcc-pll-avcc";
  169. };
  170. &reg_dcdc1 {
  171. regulator-always-on;
  172. regulator-min-microvolt = <3300000>;
  173. regulator-max-microvolt = <3300000>;
  174. regulator-name = "vcc-3v3";
  175. };
  176. &reg_dcdc2 {
  177. regulator-always-on;
  178. regulator-min-microvolt = <1040000>;
  179. regulator-max-microvolt = <1300000>;
  180. regulator-name = "vdd-cpux";
  181. };
  182. /* DCDC3 is polyphased with DCDC2 */
  183. &reg_dcdc5 {
  184. regulator-always-on;
  185. regulator-min-microvolt = <1500000>;
  186. regulator-max-microvolt = <1500000>;
  187. regulator-name = "vcc-dram";
  188. };
  189. &reg_dcdc6 {
  190. regulator-always-on;
  191. regulator-min-microvolt = <1100000>;
  192. regulator-max-microvolt = <1100000>;
  193. regulator-name = "vdd-sys";
  194. };
  195. &reg_dldo1 {
  196. regulator-min-microvolt = <3300000>;
  197. regulator-max-microvolt = <3300000>;
  198. regulator-name = "vcc-hdmi-dsi-sensor";
  199. };
  200. &reg_dldo2 {
  201. regulator-min-microvolt = <3300000>;
  202. regulator-max-microvolt = <3300000>;
  203. regulator-name = "vcc-mipi";
  204. };
  205. &reg_dldo3 {
  206. regulator-min-microvolt = <2800000>;
  207. regulator-max-microvolt = <2800000>;
  208. regulator-name = "dovdd-csi";
  209. };
  210. &reg_dldo4 {
  211. regulator-min-microvolt = <3300000>;
  212. regulator-max-microvolt = <3300000>;
  213. regulator-name = "vcc-wifi-io";
  214. };
  215. &reg_drivevbus {
  216. regulator-name = "usb0-vbus";
  217. status = "okay";
  218. };
  219. &reg_eldo1 {
  220. regulator-always-on;
  221. regulator-min-microvolt = <1800000>;
  222. regulator-max-microvolt = <1800000>;
  223. regulator-name = "cpvdd";
  224. };
  225. &reg_eldo3 {
  226. regulator-min-microvolt = <1800000>;
  227. regulator-max-microvolt = <1800000>;
  228. regulator-name = "dvdd-csi";
  229. };
  230. &reg_fldo1 {
  231. regulator-min-microvolt = <1200000>;
  232. regulator-max-microvolt = <1200000>;
  233. regulator-name = "vcc-1v2-hsic";
  234. };
  235. /*
  236. * The A64 chip cannot work without this regulator off, although
  237. * it seems to be only driving the AR100 core.
  238. * Maybe we don't still know well about CPUs domain.
  239. */
  240. &reg_fldo2 {
  241. regulator-always-on;
  242. regulator-min-microvolt = <1100000>;
  243. regulator-max-microvolt = <1100000>;
  244. regulator-name = "vdd-cpus";
  245. };
  246. &reg_ldo_io0 {
  247. regulator-min-microvolt = <2800000>;
  248. regulator-max-microvolt = <2800000>;
  249. regulator-name = "vcc-ctp";
  250. status = "okay";
  251. };
  252. &reg_rtc_ldo {
  253. regulator-name = "vcc-rtc";
  254. };
  255. &uart0 {
  256. pinctrl-names = "default";
  257. pinctrl-0 = <&uart0_pb_pins>;
  258. status = "okay";
  259. };
  260. &usb_otg {
  261. dr_mode = "otg";
  262. status = "okay";
  263. };
  264. &usbphy {
  265. usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
  266. usb0_vbus-supply = <&reg_drivevbus>;
  267. status = "okay";
  268. };