ark1668ed_devb_emmc.dts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. // SPDX-License-Identifier: GPL-2.0
  2. /dts-v1/;
  3. /include/ "skeleton.dtsi"
  4. #include "ark1668ed.dtsi"
  5. #include "ark1668ed-pinctrl.dtsi"
  6. / {
  7. i2c-gpio-0 {
  8. #address-cells = <1>;
  9. #size-cells = <0>;
  10. compatible = "i2c-gpio";
  11. gpios = <&gportc 13 0 /* SDA */
  12. &gportc 12 0 /* SCL */
  13. >;
  14. i2c-gpio,delay-us = <2>; /* clk freq = 500/delay KHz */
  15. i2c-gpio,scl-output-only;
  16. //i2c-gpio,sda-open-drain;
  17. //i2c-gpio,scl-open-drain;
  18. //status = "disabled";
  19. };
  20. i2c-gpio-1 {
  21. #address-cells = <1>;
  22. #size-cells = <0>;
  23. compatible = "i2c-gpio";
  24. gpios = <&gportd 20 0 /* SDA */
  25. &gportd 19 0 /* SCL */
  26. >;
  27. i2c-gpio,delay-us = <2>; /* clk freq = 500/delay KHz */
  28. i2c-gpio,scl-output-only;
  29. //i2c-gpio,sda-open-drain;
  30. //i2c-gpio,scl-open-drain;
  31. //status = "disabled";
  32. };
  33. i2c-gpio-2 {
  34. #address-cells = <1>;
  35. #size-cells = <0>;
  36. compatible = "i2c-gpio";
  37. gpios = <&gportf 31 0 /* SDA */
  38. &gportf 30 0 /* SCL */
  39. >;
  40. i2c-gpio,delay-us = <5>; /* clk freq = 100/delay KHz */
  41. i2c-gpio,scl-output-only;
  42. i2c-gpio,sda-open-drain;
  43. i2c-gpio,scl-open-drain;
  44. //pinctrl-names = "default";
  45. //pinctrl-0 = <&i2c_gpio_pins>;
  46. ark_codec: ark-codec@74 {
  47. compatible = "arkmicro,ark-audio-codec";
  48. reg = <0x74>;/* i2c address(7 bits) */
  49. #sound-dai-cells = <0>;
  50. };
  51. };
  52. i2c-gpio-3 {
  53. #address-cells = <1>;
  54. #size-cells = <0>;
  55. compatible = "i2c-gpio";
  56. gpios = <&gportd 27 0 /* SDA */
  57. &gportd 28 0 /* SCL */
  58. >;
  59. i2c-gpio,delay-us = <5>; /* clk freq = 500/delay KHz */
  60. i2c-gpio,scl-output-only;
  61. //i2c-gpio,sda-open-drain;
  62. //i2c-gpio,scl-open-drain;
  63. codec_ak7604: codec_ak7604@1c {
  64. status = "okay";
  65. compatible = "akm,ak7604";
  66. reg = <0x1c>;/* i2c address(7 bits) */
  67. pinctrl-names = "default";
  68. ak7604,pdn-gpio = <&gportd 29 GPIO_ACTIVE_HIGH>;
  69. #sound-dai-cells = <1>;
  70. };
  71. ak4436_codec: ak4436@13 {
  72. compatible = "asahi-kasei,ak4436";
  73. reg = <0x13>;/* i2c address(7 bits) */
  74. pinctrl-names = "default";
  75. #sound-dai-cells = <0>;
  76. //AVDD-supply = <&vdd_3v3_audio>;
  77. //DVDD-supply = <&vdd_1v8>;
  78. };
  79. es7210_codec: es7210@40 {
  80. compatible = "arkmicro,es7210";
  81. reg = <0x40>;/* i2c address(7 bits) */
  82. pinctrl-names = "default";
  83. #sound-dai-cells = <0>;
  84. };
  85. };
  86. //ark-audio
  87. sound0 {
  88. compatible = "simple-audio-card";
  89. simple-audio-card,name = "ark1668ed devb audio";
  90. simple-audio-card,format = "i2s";
  91. simple-audio-card,dai-link@0 { /* ARK - audio - codec */
  92. format = "i2s";
  93. bitclock-master = <&cpu_master>;
  94. frame-master = <&cpu_master>;
  95. cpu_master: cpu {
  96. sound-dai = <&i2s_audio>;//i2s_audio
  97. };
  98. codec_master: codec {
  99. sound-dai = <&ark_codec>;//External(ADC): ; Internal:ark_codec
  100. };
  101. };
  102. };
  103. //i2s0
  104. sound1 {
  105. compatible = "simple-audio-card";
  106. simple-audio-card,name = "SoundCard1";
  107. simple-audio-card,format = "i2s";
  108. // simple-audio-card,dai-link@0 { /* ARK - audio - codec */
  109. // format = "i2s";
  110. // bitclock-master = <&playback_cpu>;
  111. // frame-master = <&playback_cpu>;
  112. // playback_cpu: cpu {
  113. // sound-dai = <&i2s0_adac>;
  114. // };
  115. // playback_codec: codec {
  116. // sound-dai = <&ak4436_codec>;//External(ADC): ; Internal:ark_codec
  117. // };
  118. // };
  119. simple-audio-card,dai-link@0 { /* ARK - audio - codec */
  120. format = "i2s";
  121. bitclock-master = <&codec_master2>;
  122. frame-master = <&codec_master2>;
  123. cpu_master2: cpu {
  124. sound-dai = <&i2s0_adac>;
  125. };
  126. codec_master2: codec {
  127. sound-dai = <&codec_ak7604 0>;//External(ADC): ; Internal:ark_codec
  128. };
  129. };
  130. };
  131. //i2s1
  132. sound2 {
  133. compatible = "simple-audio-card";
  134. simple-audio-card,name = "SoundCard2";
  135. simple-audio-card,format = "i2s";
  136. simple-audio-card,dai-link@0 { /* ARK - audio - codec */
  137. format = "i2s";
  138. bitclock-master = <&capture_cpu>;
  139. frame-master = <&capture_cpu>;
  140. capture_cpu: cpu {
  141. sound-dai = <&i2s1_adac>;
  142. };
  143. capture_codec: codec {
  144. sound-dai = <&es7210_codec>;//External(ADC): ; Internal:ark_codec
  145. };
  146. };
  147. // simple-audio-card,dai-link@0 { /* ARK - audio - codec */
  148. // format = "i2s";
  149. // bitclock-master = <&codec_master2>;
  150. // frame-master = <&codec_master2>;
  151. // cpu_master2: cpu {
  152. // sound-dai = <&i2s1_adac>;
  153. // };
  154. // codec_master2: codec {
  155. // sound-dai = <&codec_ak7604 0>;//External(ADC): ; Internal:ark_codec
  156. // };
  157. // };
  158. };
  159. carback: carback@0 {
  160. compatible = "arkmicro,ark1668ed-carback";
  161. interrupt-parent = <&gportb>;
  162. interrupts = <6 IRQ_TYPE_EDGE_BOTH>;
  163. detect-gpios = <&gportb 6 GPIO_ACTIVE_HIGH>;
  164. debounce-detect = <0>;
  165. reg = <0x7ea00000 0x400000>;
  166. };
  167. vind0:vind@0 {
  168. compatible = "arkmicro,ark-vin-media", "simple-bus";
  169. #address-cells = <1>;
  170. #size-cells = <1>;
  171. ranges;
  172. reg = <0x50000000 0x1000>;
  173. multi_channel_input = <1>;
  174. select_channel = <0>;
  175. device_id = <0>;
  176. status = "okay";
  177. sensor0:sensor@0 {
  178. device_type = "sensor0";
  179. compatible = "arkmicro,ark-sensor";
  180. sensor0_mname = "rn6854m_mipi";
  181. sensor0_twi_cci_id = <1>; /*i2c slect*/
  182. sensor0_twi_addr = <0x58>; /*i2c addr*/
  183. sensor0_twi_cci_spi = <0>; /*init mode*/
  184. sensor0_reset = <&gportb 17 0>; /*reset gpio set*/
  185. device_id = <0>;
  186. status = "okay";
  187. };
  188. sensor1:sensor@1 {
  189. device_type = "sensor1";
  190. compatible = "arkmicro,ark-sensor";
  191. sensor1_mname = "ark7116_bt656";
  192. sensor1_twi_cci_id = <2>; /*i2c slect*/
  193. sensor1_twi_addr = <0xb2>; /*i2c addr*/
  194. sensor1_twi_cci_spi = <0>; /*init mode*/
  195. sensor1_reset = <&gportd 18 0>; /*reset gpio set*/
  196. device_id = <1>;
  197. status = "okay";
  198. };
  199. sensor2:sensor@2 {
  200. device_type = "sensor2";
  201. compatible = "arkmicro,ark-sensor";
  202. sensor2_mname = "tp2815_mipi";
  203. sensor2_twi_cci_id = <1>; /*i2c slect*/
  204. sensor2_twi_addr = <0x88>; /*i2c addr*/
  205. sensor2_twi_cci_spi = <0>; /*init mode*/
  206. sensor2_reset = <&gportd 18 0>; /*reset gpio set*/
  207. device_id = <2>;
  208. status = "okay";
  209. };
  210. csi0:csi@0 {
  211. device_type = "csi0";
  212. compatible = "arkmicro,ark-csi";
  213. interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
  214. reg = <0x51a00000 0x200>;
  215. device_id = <0>;
  216. csi0_use = <1>;
  217. status = "okay";
  218. };
  219. csi1:csi@1 {
  220. device_type = "csi1";
  221. compatible = "arkmicro,ark-csi";
  222. reg = <0x51a01000 0x200>;
  223. device_id = <1>;
  224. csi1_use = <0>;
  225. status = "okay";
  226. };
  227. csi2:csi@2 {
  228. device_type = "csi2";
  229. compatible = "arkmicro,ark-csi";
  230. reg = <0x51a02000 0x200>;
  231. device_id = <2>;
  232. csi2_use = <0>;
  233. status = "okay";
  234. };
  235. csi3:csi@3 {
  236. device_type = "csi3";
  237. compatible = "arkmicro,ark-csi";
  238. reg = <0x51a03000 0x200>;
  239. device_id = <3>;
  240. csi3_use = <0>;
  241. status = "okay";
  242. };
  243. vinc0:vinc@0 {
  244. device_type = "vinc0";
  245. compatible = "arkmicro,ark-vin-core";
  246. interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
  247. reg = <0x40800000 0x100
  248. 0x41100000 0x1000>;
  249. vinc0_csi_sel = <0>;
  250. #if 1
  251. vinc0_sensor_sel = <0>;
  252. vinc0_pad_sel = <0>;
  253. #else
  254. vinc0_sensor_sel = <1>;
  255. vinc0_pad_sel = <1>; /**use sensor1 ark7116 deinterlace**/
  256. #endif
  257. vinc0_use_deinterlace = <1>;
  258. vinc0_use_carback = <1>;
  259. device_id = <0>;
  260. status = "okay";
  261. };
  262. vinc1:vinc@1 {
  263. device_type = "vinc1";
  264. compatible = "arkmicro,ark-vin-core";
  265. interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
  266. reg = <0x40800400 0x100
  267. 0x41100000 0x1000>;
  268. vinc1_csi_sel = <1>;
  269. vinc1_sensor_sel = <0>;
  270. vinc1_pad_sel = <0>;
  271. vinc1_use_deinterlace = <0>;
  272. vinc1_use_carback = <1>;
  273. device_id = <1>;
  274. status = "okay";
  275. };
  276. vinc2:vinc@2 {
  277. device_type = "vinc2";
  278. compatible = "arkmicro,ark-vin-core";
  279. interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
  280. reg = <0x40800800 0x100
  281. 0x41100000 0x1000>;
  282. vinc2_csi_sel = <2>;
  283. vinc2_sensor_sel = <0>;
  284. vinc2_pad_sel = <0>;
  285. vinc2_use_deinterlace = <0>;
  286. vinc2_use_carback = <1>;
  287. device_id = <2>;
  288. status = "okay";
  289. };
  290. vinc3:vinc@3 {
  291. device_type = "vinc3";
  292. compatible = "arkmicro,ark-vin-core";
  293. interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
  294. reg = <0x40800c00 0x100
  295. 0x41100000 0x1000>;
  296. vinc3_csi_sel = <3>;
  297. vinc3_sensor_sel = <0>;
  298. vinc3_pad_sel = <0>;
  299. vinc3_use_deinterlace = <0>;
  300. vinc3_use_carback = <1>;
  301. device_id = <3>;
  302. status = "okay";
  303. };
  304. };
  305. };
  306. &lcdc {
  307. //display = <&display0>; //ttl
  308. display = <&display1>; //lvds
  309. //display = <&display2>; //mipi
  310. pinctrl-names = "default";
  311. pinctrl-0 = <&pinctrl_lcd_rgb888>;
  312. power-control-gpio = <&gporte 16 GPIO_ACTIVE_HIGH>;
  313. lcdcon-backlight;
  314. pwms = <&pwm0 4 50000 0>;
  315. pwm-names = "backlight";
  316. backlight-value = <20>;
  317. backlight-delay = <200>;
  318. display0: display@0 {
  319. interface-type = "TTL";
  320. bits-per-pixel = <32>;
  321. lcd-wiring-mode = "BGR";
  322. display-timings {
  323. native-mode = <&timing0>;
  324. timing0: timing0 {
  325. clock-frequency = <36000000>;
  326. hactive = <1024>;
  327. vactive = <600>;
  328. hback-porch = <64>;
  329. hfront-porch = <21>;
  330. vback-porch = <16>;
  331. vfront-porch = <24>;
  332. //hsync-len = <21>;
  333. hsync-len = <96>;
  334. //vsync-len = <80>;
  335. vsync-len = <9>;
  336. hsync-active = <1>;
  337. vsync-active = <1>;
  338. de-active = <0>;
  339. pixelclk-active = <0>;
  340. };
  341. };
  342. };
  343. display1: display@1 {
  344. interface-type = "DLVDS";
  345. lvds-con = <0xc7470008>;
  346. lvds-con2 = <0x00397ca4>;
  347. bits-per-pixel = <32>;
  348. fb-buffer-nums = <3>;
  349. lcd-wiring-mode = "RGB";
  350. display-timings {
  351. native-mode = <&timing0>;
  352. timing1: timing1 {
  353. clock-frequency = <120000000>;
  354. hactive = <1920>;
  355. vactive = <720>;
  356. hback-porch = <300>;
  357. hfront-porch = <240>;
  358. vback-porch = <80>;
  359. vfront-porch = <80>;
  360. hsync-len = <36>;
  361. vsync-len = <18>;
  362. hsync-active = <1>;
  363. vsync-active = <1>;
  364. de-active = <0>;
  365. pixelclk-active = <0>;
  366. };
  367. };
  368. };
  369. display2: display@2 {
  370. interface-type = "MIPI";
  371. bits-per-pixel = <32>;
  372. fb-buffer-nums = <3>;
  373. lcd-wiring-mode = "RGB";
  374. display-timings {
  375. native-mode = <&timing2>;
  376. timing2: timing2 {
  377. clock-frequency = <50000000>;
  378. hactive = <480>;
  379. vactive = <1280>;
  380. hback-porch = <16>;
  381. hfront-porch = <36>;
  382. vback-porch = <6>;
  383. vfront-porch = <6>;
  384. hsync-len = <26>;
  385. vsync-len = <16>;
  386. hsync-active = <1>;
  387. vsync-active = <1>;
  388. de-active = <0>;
  389. pixelclk-active = <0>;
  390. };
  391. };
  392. };
  393. };
  394. &i2c0 {
  395. gt911: touchscreen@5d {
  396. compatible = "goodix,gt911";
  397. reg = <0x5d>;
  398. interrupt-parent = <&gportb>;
  399. interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
  400. irq-gpios = <&gportb 18 GPIO_ACTIVE_HIGH>;
  401. reset-gpios = <&gportd 14 GPIO_ACTIVE_HIGH>;
  402. //touchscreen-inverted-x;
  403. };
  404. };
  405. &usb0 {
  406. status = "okay";
  407. reset-gpio = <&gporte 12 GPIO_ACTIVE_LOW>;
  408. };
  409. &usb1 {
  410. status = "okay";
  411. reset-gpio = <&gporte 13 GPIO_ACTIVE_LOW>;
  412. };