draak.dtsi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Device Tree Source for the Draak board
  4. *
  5. * Copyright (C) 2016-2018 Renesas Electronics Corp.
  6. * Copyright (C) 2017 Glider bvba
  7. */
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/input/input.h>
  10. / {
  11. model = "Renesas Draak board";
  12. compatible = "renesas,draak";
  13. aliases {
  14. serial0 = &scif2;
  15. ethernet0 = &avb;
  16. };
  17. audio_clkout: audio-clkout {
  18. /*
  19. * This is same as <&rcar_sound 0>
  20. * but needed to avoid cs2000/rcar_sound probe dead-lock
  21. */
  22. compatible = "fixed-clock";
  23. #clock-cells = <0>;
  24. clock-frequency = <12288000>;
  25. };
  26. backlight: backlight {
  27. compatible = "pwm-backlight";
  28. pwms = <&pwm1 0 50000>;
  29. brightness-levels = <512 511 505 494 473 440 392 327 241 133 0>;
  30. default-brightness-level = <10>;
  31. power-supply = <&reg_12p0v>;
  32. enable-gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
  33. };
  34. chosen {
  35. bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
  36. stdout-path = "serial0:115200n8";
  37. };
  38. composite-in {
  39. compatible = "composite-video-connector";
  40. port {
  41. composite_con_in: endpoint {
  42. remote-endpoint = <&adv7180_in>;
  43. };
  44. };
  45. };
  46. hdmi-in {
  47. compatible = "hdmi-connector";
  48. type = "a";
  49. port {
  50. hdmi_con_in: endpoint {
  51. remote-endpoint = <&adv7612_in>;
  52. };
  53. };
  54. };
  55. hdmi-out {
  56. compatible = "hdmi-connector";
  57. type = "a";
  58. port {
  59. hdmi_con_out: endpoint {
  60. remote-endpoint = <&adv7511_out>;
  61. };
  62. };
  63. };
  64. keys {
  65. compatible = "gpio-keys";
  66. pinctrl-0 = <&keys_pins>;
  67. pinctrl-names = "default";
  68. key-1 {
  69. gpios = <&gpio4 12 GPIO_ACTIVE_LOW>;
  70. linux,code = <KEY_1>;
  71. label = "SW56-1";
  72. wakeup-source;
  73. debounce-interval = <20>;
  74. };
  75. key-2 {
  76. gpios = <&gpio4 13 GPIO_ACTIVE_LOW>;
  77. linux,code = <KEY_2>;
  78. label = "SW56-2";
  79. wakeup-source;
  80. debounce-interval = <20>;
  81. };
  82. key-3 {
  83. gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;
  84. linux,code = <KEY_3>;
  85. label = "SW56-3";
  86. wakeup-source;
  87. debounce-interval = <20>;
  88. };
  89. key-4 {
  90. gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
  91. linux,code = <KEY_4>;
  92. label = "SW56-4";
  93. wakeup-source;
  94. debounce-interval = <20>;
  95. };
  96. };
  97. lvds-decoder {
  98. compatible = "thine,thc63lvd1024";
  99. vcc-supply = <&reg_3p3v>;
  100. ports {
  101. #address-cells = <1>;
  102. #size-cells = <0>;
  103. port@0 {
  104. reg = <0>;
  105. thc63lvd1024_in: endpoint {
  106. remote-endpoint = <&lvds0_out>;
  107. };
  108. };
  109. port@2 {
  110. reg = <2>;
  111. thc63lvd1024_out: endpoint {
  112. remote-endpoint = <&adv7511_in>;
  113. };
  114. };
  115. };
  116. };
  117. memory@48000000 {
  118. device_type = "memory";
  119. /* first 128MB is reserved for secure area. */
  120. reg = <0x0 0x48000000 0x0 0x18000000>;
  121. };
  122. reg_1p8v: regulator-1p8v {
  123. compatible = "regulator-fixed";
  124. regulator-name = "fixed-1.8V";
  125. regulator-min-microvolt = <1800000>;
  126. regulator-max-microvolt = <1800000>;
  127. regulator-boot-on;
  128. regulator-always-on;
  129. };
  130. reg_3p3v: regulator-3p3v {
  131. compatible = "regulator-fixed";
  132. regulator-name = "fixed-3.3V";
  133. regulator-min-microvolt = <3300000>;
  134. regulator-max-microvolt = <3300000>;
  135. regulator-boot-on;
  136. regulator-always-on;
  137. };
  138. reg_12p0v: regulator-12p0v {
  139. compatible = "regulator-fixed";
  140. regulator-name = "D12.0V";
  141. regulator-min-microvolt = <12000000>;
  142. regulator-max-microvolt = <12000000>;
  143. regulator-boot-on;
  144. regulator-always-on;
  145. };
  146. sound_card: sound {
  147. compatible = "audio-graph-card";
  148. dais = <&rsnd_port0 /* ak4613 */
  149. /* HDMI is not yet supported */
  150. >;
  151. };
  152. vga {
  153. compatible = "vga-connector";
  154. port {
  155. vga_in: endpoint {
  156. remote-endpoint = <&adv7123_out>;
  157. };
  158. };
  159. };
  160. vga-encoder {
  161. compatible = "adi,adv7123";
  162. ports {
  163. #address-cells = <1>;
  164. #size-cells = <0>;
  165. port@0 {
  166. reg = <0>;
  167. adv7123_in: endpoint {
  168. remote-endpoint = <&du_out_rgb>;
  169. };
  170. };
  171. port@1 {
  172. reg = <1>;
  173. adv7123_out: endpoint {
  174. remote-endpoint = <&vga_in>;
  175. };
  176. };
  177. };
  178. };
  179. x12_clk: x12 {
  180. compatible = "fixed-clock";
  181. #clock-cells = <0>;
  182. clock-frequency = <74250000>;
  183. };
  184. x19_clk: x19 {
  185. compatible = "fixed-clock";
  186. #clock-cells = <0>;
  187. clock-frequency = <24576000>;
  188. };
  189. };
  190. &audio_clk_b {
  191. /*
  192. * X11 is connected to VI4_FIELD/SCIF_CLK/AUDIO_CLKB,
  193. * and R-Car Sound uses AUDIO_CLKB.
  194. * Note is that schematic indicates VI4_FIELD conection only
  195. * not AUDIO_CLKB at SoC page.
  196. * And this VI4_FIELD/SCIF_CLK/AUDIO_CLKB is connected to SW60.
  197. * SW60 should be 1-2.
  198. */
  199. clock-frequency = <22579200>;
  200. };
  201. &avb {
  202. pinctrl-0 = <&avb0_pins>;
  203. pinctrl-names = "default";
  204. renesas,no-ether-link;
  205. phy-handle = <&phy0>;
  206. status = "okay";
  207. phy0: ethernet-phy@0 {
  208. compatible = "ethernet-phy-id0022.1622",
  209. "ethernet-phy-ieee802.3-c22";
  210. rxc-skew-ps = <1500>;
  211. reg = <0>;
  212. interrupt-parent = <&gpio5>;
  213. interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
  214. reset-gpios = <&gpio5 18 GPIO_ACTIVE_LOW>;
  215. /*
  216. * TX clock internal delay mode is required for reliable
  217. * 1Gbps communication using the KSZ9031RNX phy present on
  218. * the Draak board, however, TX clock internal delay mode
  219. * isn't supported on R-Car D3(e). Thus, limit speed to
  220. * 100Mbps for reliable communication.
  221. */
  222. max-speed = <100>;
  223. };
  224. };
  225. &can0 {
  226. pinctrl-0 = <&can0_pins>;
  227. pinctrl-names = "default";
  228. status = "okay";
  229. };
  230. &can1 {
  231. pinctrl-0 = <&can1_pins>;
  232. pinctrl-names = "default";
  233. status = "okay";
  234. };
  235. &du {
  236. pinctrl-0 = <&du_pins>;
  237. pinctrl-names = "default";
  238. status = "okay";
  239. clocks = <&cpg CPG_MOD 724>,
  240. <&cpg CPG_MOD 723>,
  241. <&x12_clk>;
  242. clock-names = "du.0", "du.1", "dclkin.0";
  243. ports {
  244. port@0 {
  245. du_out_rgb: endpoint {
  246. remote-endpoint = <&adv7123_in>;
  247. };
  248. };
  249. };
  250. };
  251. &ehci0 {
  252. dr_mode = "host";
  253. status = "okay";
  254. };
  255. &extal_clk {
  256. clock-frequency = <48000000>;
  257. };
  258. &hsusb {
  259. dr_mode = "host";
  260. status = "okay";
  261. };
  262. &i2c0 {
  263. pinctrl-0 = <&i2c0_pins>;
  264. pinctrl-names = "default";
  265. status = "okay";
  266. ak4613: codec@10 {
  267. compatible = "asahi-kasei,ak4613";
  268. #sound-dai-cells = <0>;
  269. reg = <0x10>;
  270. clocks = <&rcar_sound 0>; /* audio_clkout */
  271. asahi-kasei,in1-single-end;
  272. asahi-kasei,in2-single-end;
  273. asahi-kasei,out1-single-end;
  274. asahi-kasei,out2-single-end;
  275. asahi-kasei,out3-single-end;
  276. asahi-kasei,out4-single-end;
  277. asahi-kasei,out5-single-end;
  278. asahi-kasei,out6-single-end;
  279. port {
  280. ak4613_endpoint: endpoint {
  281. remote-endpoint = <&rsnd_for_ak4613>;
  282. };
  283. };
  284. };
  285. composite-in@20 {
  286. compatible = "adi,adv7180cp";
  287. reg = <0x20>;
  288. ports {
  289. #address-cells = <1>;
  290. #size-cells = <0>;
  291. port@0 {
  292. reg = <0>;
  293. adv7180_in: endpoint {
  294. remote-endpoint = <&composite_con_in>;
  295. };
  296. };
  297. port@3 {
  298. reg = <3>;
  299. /*
  300. * The VIN4 video input path is shared between
  301. * CVBS and HDMI inputs through SW[49-53]
  302. * switches.
  303. *
  304. * CVBS is the default selection, link it to
  305. * VIN4 here.
  306. */
  307. adv7180_out: endpoint {
  308. remote-endpoint = <&vin4_in>;
  309. };
  310. };
  311. };
  312. };
  313. hdmi-encoder@39 {
  314. compatible = "adi,adv7511w";
  315. reg = <0x39>, <0x3f>, <0x3c>, <0x38>;
  316. reg-names = "main", "edid", "cec", "packet";
  317. interrupt-parent = <&gpio1>;
  318. interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
  319. adi,input-depth = <8>;
  320. adi,input-colorspace = "rgb";
  321. adi,input-clock = "1x";
  322. ports {
  323. #address-cells = <1>;
  324. #size-cells = <0>;
  325. port@0 {
  326. reg = <0>;
  327. adv7511_in: endpoint {
  328. remote-endpoint = <&thc63lvd1024_out>;
  329. };
  330. };
  331. port@1 {
  332. reg = <1>;
  333. adv7511_out: endpoint {
  334. remote-endpoint = <&hdmi_con_out>;
  335. };
  336. };
  337. };
  338. };
  339. hdmi-decoder@4c {
  340. compatible = "adi,adv7612";
  341. reg = <0x4c>;
  342. default-input = <0>;
  343. ports {
  344. #address-cells = <1>;
  345. #size-cells = <0>;
  346. port@0 {
  347. reg = <0>;
  348. adv7612_in: endpoint {
  349. remote-endpoint = <&hdmi_con_in>;
  350. };
  351. };
  352. port@2 {
  353. reg = <2>;
  354. /*
  355. * The VIN4 video input path is shared between
  356. * CVBS and HDMI inputs through SW[49-53]
  357. * switches.
  358. *
  359. * CVBS is the default selection, leave HDMI
  360. * not connected here.
  361. */
  362. adv7612_out: endpoint {
  363. pclk-sample = <0>;
  364. hsync-active = <0>;
  365. vsync-active = <0>;
  366. };
  367. };
  368. };
  369. };
  370. cs2000: clk-multiplier@4f {
  371. #clock-cells = <0>;
  372. compatible = "cirrus,cs2000-cp";
  373. reg = <0x4f>;
  374. clocks = <&audio_clkout>, <&x19_clk>; /* audio_clkout_1, x19 */
  375. clock-names = "clk_in", "ref_clk";
  376. assigned-clocks = <&cs2000>;
  377. assigned-clock-rates = <24576000>; /* 1/1 divide */
  378. };
  379. eeprom@50 {
  380. compatible = "rohm,br24t01", "atmel,24c01";
  381. reg = <0x50>;
  382. pagesize = <8>;
  383. };
  384. };
  385. &i2c1 {
  386. pinctrl-0 = <&i2c1_pins>;
  387. pinctrl-names = "default";
  388. status = "okay";
  389. };
  390. &lvds0 {
  391. status = "okay";
  392. clocks = <&cpg CPG_MOD 727>,
  393. <&x12_clk>,
  394. <&extal_clk>;
  395. clock-names = "fck", "dclkin.0", "extal";
  396. ports {
  397. port@1 {
  398. lvds0_out: endpoint {
  399. remote-endpoint = <&thc63lvd1024_in>;
  400. };
  401. };
  402. };
  403. };
  404. &lvds1 {
  405. /*
  406. * Even though the LVDS1 output is not connected, the encoder must be
  407. * enabled to supply a pixel clock to the DU for the DPAD output when
  408. * LVDS0 is in use.
  409. */
  410. status = "okay";
  411. clocks = <&cpg CPG_MOD 727>,
  412. <&x12_clk>,
  413. <&extal_clk>;
  414. clock-names = "fck", "dclkin.0", "extal";
  415. };
  416. &ohci0 {
  417. dr_mode = "host";
  418. status = "okay";
  419. };
  420. &pfc {
  421. avb0_pins: avb {
  422. groups = "avb0_link", "avb0_mdio", "avb0_mii";
  423. function = "avb0";
  424. };
  425. can0_pins: can0 {
  426. groups = "can0_data_a";
  427. function = "can0";
  428. };
  429. can1_pins: can1 {
  430. groups = "can1_data_a";
  431. function = "can1";
  432. };
  433. du_pins: du {
  434. groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
  435. function = "du";
  436. };
  437. i2c0_pins: i2c0 {
  438. groups = "i2c0";
  439. function = "i2c0";
  440. };
  441. i2c1_pins: i2c1 {
  442. groups = "i2c1";
  443. function = "i2c1";
  444. };
  445. keys_pins: keys {
  446. pins = "GP_4_12", "GP_4_13", "GP_4_14", "GP_4_15";
  447. bias-pull-up;
  448. };
  449. pwm0_pins: pwm0 {
  450. groups = "pwm0_c";
  451. function = "pwm0";
  452. };
  453. pwm1_pins: pwm1 {
  454. groups = "pwm1_c";
  455. function = "pwm1";
  456. };
  457. rpc_pins: rpc {
  458. groups = "rpc_clk2", "rpc_ctrl", "rpc_data", "rpc_reset",
  459. "rpc_int";
  460. function = "rpc";
  461. };
  462. scif2_pins: scif2 {
  463. groups = "scif2_data";
  464. function = "scif2";
  465. };
  466. sdhi2_pins: sd2 {
  467. groups = "mmc_data8", "mmc_ctrl";
  468. function = "mmc";
  469. power-source = <1800>;
  470. };
  471. sdhi2_pins_uhs: sd2_uhs {
  472. groups = "mmc_data8", "mmc_ctrl";
  473. function = "mmc";
  474. power-source = <1800>;
  475. };
  476. sound_pins: sound {
  477. groups = "ssi34_ctrl", "ssi3_data", "ssi4_data_a";
  478. function = "ssi";
  479. };
  480. sound_clk_pins: sound-clk {
  481. groups = "audio_clk_a", "audio_clk_b",
  482. "audio_clkout", "audio_clkout1";
  483. function = "audio_clk";
  484. };
  485. usb0_pins: usb0 {
  486. groups = "usb0";
  487. function = "usb0";
  488. };
  489. vin4_pins_cvbs: vin4 {
  490. groups = "vin4_data8", "vin4_sync", "vin4_clk";
  491. function = "vin4";
  492. };
  493. };
  494. &pwm0 {
  495. pinctrl-0 = <&pwm0_pins>;
  496. pinctrl-names = "default";
  497. status = "okay";
  498. };
  499. &pwm1 {
  500. pinctrl-0 = <&pwm1_pins>;
  501. pinctrl-names = "default";
  502. status = "okay";
  503. };
  504. &rcar_sound {
  505. pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
  506. pinctrl-names = "default";
  507. /* Single DAI */
  508. #sound-dai-cells = <0>;
  509. /* audio_clkout0/1 */
  510. #clock-cells = <1>;
  511. clock-frequency = <12288000 11289600>;
  512. status = "okay";
  513. clocks = <&cpg CPG_MOD 1005>,
  514. <&cpg CPG_MOD 1011>, <&cpg CPG_MOD 1012>,
  515. <&cpg CPG_MOD 1025>, <&cpg CPG_MOD 1026>,
  516. <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
  517. <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
  518. <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
  519. <&cs2000>, <&audio_clk_b>,
  520. <&cpg CPG_CORE R8A77995_CLK_ZA2>;
  521. ports {
  522. rsnd_port0: port {
  523. rsnd_for_ak4613: endpoint {
  524. remote-endpoint = <&ak4613_endpoint>;
  525. dai-format = "left_j";
  526. bitclock-master = <&rsnd_for_ak4613>;
  527. frame-master = <&rsnd_for_ak4613>;
  528. playback = <&ssi3>, <&src5>, <&dvc0>;
  529. capture = <&ssi4>, <&src6>, <&dvc1>;
  530. };
  531. };
  532. };
  533. };
  534. &rpc {
  535. pinctrl-0 = <&rpc_pins>;
  536. pinctrl-names = "default";
  537. /* Left disabled. To be enabled by firmware when unlocked. */
  538. flash@0 {
  539. compatible = "cypress,hyperflash", "cfi-flash";
  540. reg = <0>;
  541. partitions {
  542. compatible = "fixed-partitions";
  543. #address-cells = <1>;
  544. #size-cells = <1>;
  545. bootparam@0 {
  546. reg = <0x00000000 0x040000>;
  547. read-only;
  548. };
  549. bl2@40000 {
  550. reg = <0x00040000 0x140000>;
  551. read-only;
  552. };
  553. cert_header_sa6@180000 {
  554. reg = <0x00180000 0x040000>;
  555. read-only;
  556. };
  557. bl31@1c0000 {
  558. reg = <0x001c0000 0x040000>;
  559. read-only;
  560. };
  561. tee@200000 {
  562. reg = <0x00200000 0x440000>;
  563. read-only;
  564. };
  565. uboot@640000 {
  566. reg = <0x00640000 0x100000>;
  567. read-only;
  568. };
  569. dtb@740000 {
  570. reg = <0x00740000 0x080000>;
  571. };
  572. kernel@7c0000 {
  573. reg = <0x007c0000 0x1400000>;
  574. };
  575. user@1bc0000 {
  576. reg = <0x01bc0000 0x2440000>;
  577. };
  578. };
  579. };
  580. };
  581. &rwdt {
  582. timeout-sec = <60>;
  583. status = "okay";
  584. };
  585. &scif2 {
  586. pinctrl-0 = <&scif2_pins>;
  587. pinctrl-names = "default";
  588. status = "okay";
  589. };
  590. &sdhi2 {
  591. /* used for on-board eMMC */
  592. pinctrl-0 = <&sdhi2_pins>;
  593. pinctrl-1 = <&sdhi2_pins_uhs>;
  594. pinctrl-names = "default", "state_uhs";
  595. vmmc-supply = <&reg_3p3v>;
  596. vqmmc-supply = <&reg_1p8v>;
  597. bus-width = <8>;
  598. mmc-hs200-1_8v;
  599. no-sd;
  600. no-sdio;
  601. non-removable;
  602. status = "okay";
  603. };
  604. &ssi4 {
  605. shared-pin;
  606. };
  607. &usb2_phy0 {
  608. pinctrl-0 = <&usb0_pins>;
  609. pinctrl-names = "default";
  610. renesas,no-otg-pins;
  611. status = "okay";
  612. };
  613. &vin4 {
  614. pinctrl-0 = <&vin4_pins_cvbs>;
  615. pinctrl-names = "default";
  616. status = "okay";
  617. ports {
  618. port {
  619. vin4_in: endpoint {
  620. remote-endpoint = <&adv7180_out>;
  621. };
  622. };
  623. };
  624. };