r8a7794-silk.dts 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Device Tree Source for the SILK board
  4. *
  5. * Copyright (C) 2014 Renesas Electronics Corporation
  6. * Copyright (C) 2014-2015 Renesas Solutions Corp.
  7. * Copyright (C) 2014-2015 Cogent Embedded, Inc.
  8. */
  9. /*
  10. * SSI-AK4643
  11. *
  12. * SW1: 2-1: AK4643
  13. * 2-3: ADV7511
  14. *
  15. * This command is required before playback/capture:
  16. *
  17. * amixer set "LINEOUT Mixer DACL" on
  18. */
  19. /dts-v1/;
  20. #include "r8a7794.dtsi"
  21. #include <dt-bindings/gpio/gpio.h>
  22. #include <dt-bindings/input/input.h>
  23. / {
  24. model = "SILK";
  25. compatible = "renesas,silk", "renesas,r8a7794";
  26. aliases {
  27. serial0 = &scif2;
  28. i2c9 = &gpioi2c1;
  29. i2c10 = &i2chdmi;
  30. mmc0 = &mmcif0;
  31. mmc1 = &sdhi1;
  32. };
  33. chosen {
  34. bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
  35. stdout-path = "serial0:115200n8";
  36. };
  37. memory@40000000 {
  38. device_type = "memory";
  39. reg = <0 0x40000000 0 0x40000000>;
  40. };
  41. keyboard {
  42. compatible = "gpio-keys";
  43. pinctrl-0 = <&keyboard_pins>;
  44. pinctrl-names = "default";
  45. key-3 {
  46. gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
  47. linux,code = <KEY_3>;
  48. label = "SW3";
  49. wakeup-source;
  50. debounce-interval = <20>;
  51. };
  52. key-4 {
  53. gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
  54. linux,code = <KEY_4>;
  55. label = "SW4";
  56. wakeup-source;
  57. debounce-interval = <20>;
  58. };
  59. key-6 {
  60. gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
  61. linux,code = <KEY_6>;
  62. label = "SW6";
  63. wakeup-source;
  64. debounce-interval = <20>;
  65. };
  66. key-a {
  67. gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
  68. linux,code = <KEY_A>;
  69. label = "SW12-1";
  70. wakeup-source;
  71. debounce-interval = <20>;
  72. };
  73. key-b {
  74. gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
  75. linux,code = <KEY_B>;
  76. label = "SW12-2";
  77. wakeup-source;
  78. debounce-interval = <20>;
  79. };
  80. key-c {
  81. gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
  82. linux,code = <KEY_C>;
  83. label = "SW12-3";
  84. wakeup-source;
  85. debounce-interval = <20>;
  86. };
  87. key-d {
  88. gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
  89. linux,code = <KEY_D>;
  90. label = "SW12-4";
  91. wakeup-source;
  92. debounce-interval = <20>;
  93. };
  94. };
  95. d3_3v: regulator-d3-3v {
  96. compatible = "regulator-fixed";
  97. regulator-name = "D3.3V";
  98. regulator-min-microvolt = <3300000>;
  99. regulator-max-microvolt = <3300000>;
  100. regulator-boot-on;
  101. regulator-always-on;
  102. };
  103. vcc_sdhi1: regulator-vcc-sdhi1 {
  104. compatible = "regulator-fixed";
  105. regulator-name = "SDHI1 Vcc";
  106. regulator-min-microvolt = <3300000>;
  107. regulator-max-microvolt = <3300000>;
  108. gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
  109. enable-active-high;
  110. };
  111. vccq_sdhi1: regulator-vccq-sdhi1 {
  112. compatible = "regulator-gpio";
  113. regulator-name = "SDHI1 VccQ";
  114. regulator-min-microvolt = <1800000>;
  115. regulator-max-microvolt = <3300000>;
  116. gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
  117. gpios-states = <1>;
  118. states = <3300000 1>, <1800000 0>;
  119. };
  120. vga-encoder {
  121. compatible = "adi,adv7123";
  122. ports {
  123. #address-cells = <1>;
  124. #size-cells = <0>;
  125. port@0 {
  126. reg = <0>;
  127. adv7123_in: endpoint {
  128. remote-endpoint = <&du_out_rgb1>;
  129. };
  130. };
  131. port@1 {
  132. reg = <1>;
  133. adv7123_out: endpoint {
  134. remote-endpoint = <&vga_in>;
  135. };
  136. };
  137. };
  138. };
  139. hdmi-out {
  140. compatible = "hdmi-connector";
  141. type = "a";
  142. port {
  143. hdmi_con: endpoint {
  144. remote-endpoint = <&adv7511_out>;
  145. };
  146. };
  147. };
  148. vga {
  149. compatible = "vga-connector";
  150. port {
  151. vga_in: endpoint {
  152. remote-endpoint = <&adv7123_out>;
  153. };
  154. };
  155. };
  156. x2_clk: x2-clock {
  157. compatible = "fixed-clock";
  158. #clock-cells = <0>;
  159. clock-frequency = <148500000>;
  160. };
  161. x3_clk: x3-clock {
  162. compatible = "fixed-clock";
  163. #clock-cells = <0>;
  164. clock-frequency = <74250000>;
  165. };
  166. x9_clk: audio_clock {
  167. compatible = "fixed-clock";
  168. #clock-cells = <0>;
  169. clock-frequency = <12288000>;
  170. };
  171. sound {
  172. compatible = "simple-audio-card";
  173. simple-audio-card,format = "left_j";
  174. simple-audio-card,bitclock-master = <&soundcodec>;
  175. simple-audio-card,frame-master = <&soundcodec>;
  176. simple-audio-card,cpu {
  177. sound-dai = <&rcar_sound>;
  178. };
  179. soundcodec: simple-audio-card,codec {
  180. sound-dai = <&ak4643>;
  181. clocks = <&x9_clk>;
  182. };
  183. };
  184. gpioi2c1: i2c-9 {
  185. #address-cells = <1>;
  186. #size-cells = <0>;
  187. compatible = "i2c-gpio";
  188. status = "disabled";
  189. scl-gpios = <&gpio4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  190. sda-gpios = <&gpio4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  191. i2c-gpio,delay-us = <5>;
  192. };
  193. /*
  194. * A fallback to GPIO is provided for I2C1.
  195. */
  196. i2chdmi: i2c-10 {
  197. compatible = "i2c-demux-pinctrl";
  198. i2c-parent = <&i2c1>, <&gpioi2c1>;
  199. i2c-bus-name = "i2c-hdmi";
  200. #address-cells = <1>;
  201. #size-cells = <0>;
  202. ak4643: codec@12 {
  203. compatible = "asahi-kasei,ak4643";
  204. #sound-dai-cells = <0>;
  205. reg = <0x12>;
  206. };
  207. composite-in@20 {
  208. compatible = "adi,adv7180";
  209. reg = <0x20>;
  210. port {
  211. adv7180: endpoint {
  212. bus-width = <8>;
  213. remote-endpoint = <&vin0ep>;
  214. };
  215. };
  216. };
  217. hdmi@39 {
  218. compatible = "adi,adv7511w";
  219. reg = <0x39>;
  220. interrupt-parent = <&gpio5>;
  221. interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
  222. adi,input-depth = <8>;
  223. adi,input-colorspace = "rgb";
  224. adi,input-clock = "1x";
  225. ports {
  226. #address-cells = <1>;
  227. #size-cells = <0>;
  228. port@0 {
  229. reg = <0>;
  230. adv7511_in: endpoint {
  231. remote-endpoint = <&du_out_rgb0>;
  232. };
  233. };
  234. port@1 {
  235. reg = <1>;
  236. adv7511_out: endpoint {
  237. remote-endpoint = <&hdmi_con>;
  238. };
  239. };
  240. };
  241. };
  242. eeprom@50 {
  243. compatible = "renesas,r1ex24002", "atmel,24c02";
  244. reg = <0x50>;
  245. pagesize = <16>;
  246. };
  247. };
  248. };
  249. &extal_clk {
  250. clock-frequency = <20000000>;
  251. };
  252. &pfc {
  253. pinctrl-0 = <&scif_clk_pins>;
  254. pinctrl-names = "default";
  255. scif2_pins: scif2 {
  256. groups = "scif2_data";
  257. function = "scif2";
  258. };
  259. scif_clk_pins: scif_clk {
  260. groups = "scif_clk";
  261. function = "scif_clk";
  262. };
  263. ether_pins: ether {
  264. groups = "eth_link", "eth_mdio", "eth_rmii";
  265. function = "eth";
  266. };
  267. phy1_pins: phy1 {
  268. groups = "intc_irq8";
  269. function = "intc";
  270. };
  271. i2c1_pins: i2c1 {
  272. groups = "i2c1";
  273. function = "i2c1";
  274. };
  275. mmcif0_pins: mmcif0 {
  276. groups = "mmc_data8", "mmc_ctrl";
  277. function = "mmc";
  278. };
  279. sdhi1_pins: sd1 {
  280. groups = "sdhi1_data4", "sdhi1_ctrl";
  281. function = "sdhi1";
  282. };
  283. qspi_pins: qspi {
  284. groups = "qspi_ctrl", "qspi_data4";
  285. function = "qspi";
  286. };
  287. vin0_pins: vin0 {
  288. groups = "vin0_data8", "vin0_clk";
  289. function = "vin0";
  290. };
  291. usb0_pins: usb0 {
  292. groups = "usb0";
  293. function = "usb0";
  294. };
  295. usb1_pins: usb1 {
  296. groups = "usb1";
  297. function = "usb1";
  298. };
  299. du0_pins: du0 {
  300. groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out";
  301. function = "du0";
  302. };
  303. du1_pins: du1 {
  304. groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out";
  305. function = "du1";
  306. };
  307. keyboard_pins: keyboard {
  308. pins = "GP_3_9", "GP_3_10", "GP_3_11", "GP_3_12";
  309. bias-pull-up;
  310. };
  311. ssi_pins: sound {
  312. groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
  313. function = "ssi";
  314. };
  315. audio_clk_pins: audio_clk {
  316. groups = "audio_clkc";
  317. function = "audio_clk";
  318. };
  319. };
  320. &scif2 {
  321. pinctrl-0 = <&scif2_pins>;
  322. pinctrl-names = "default";
  323. status = "okay";
  324. };
  325. &scif_clk {
  326. clock-frequency = <14745600>;
  327. };
  328. &ether {
  329. pinctrl-0 = <&ether_pins>, <&phy1_pins>;
  330. pinctrl-names = "default";
  331. phy-handle = <&phy1>;
  332. renesas,ether-link-active-low;
  333. status = "okay";
  334. phy1: ethernet-phy@1 {
  335. compatible = "ethernet-phy-id0022.1537",
  336. "ethernet-phy-ieee802.3-c22";
  337. reg = <1>;
  338. interrupt-parent = <&irqc0>;
  339. interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
  340. micrel,led-mode = <1>;
  341. reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
  342. };
  343. };
  344. &i2c1 {
  345. pinctrl-0 = <&i2c1_pins>;
  346. pinctrl-names = "i2c-hdmi";
  347. clock-frequency = <400000>;
  348. };
  349. &i2c7 {
  350. status = "okay";
  351. clock-frequency = <100000>;
  352. pmic@58 {
  353. compatible = "dlg,da9063";
  354. reg = <0x58>;
  355. interrupt-parent = <&gpio3>;
  356. interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
  357. interrupt-controller;
  358. onkey {
  359. compatible = "dlg,da9063-onkey";
  360. };
  361. rtc {
  362. compatible = "dlg,da9063-rtc";
  363. };
  364. watchdog {
  365. compatible = "dlg,da9063-watchdog";
  366. };
  367. };
  368. };
  369. &mmcif0 {
  370. pinctrl-0 = <&mmcif0_pins>;
  371. pinctrl-names = "default";
  372. vmmc-supply = <&d3_3v>;
  373. vqmmc-supply = <&d3_3v>;
  374. bus-width = <8>;
  375. non-removable;
  376. status = "okay";
  377. };
  378. &sdhi1 {
  379. pinctrl-0 = <&sdhi1_pins>;
  380. pinctrl-names = "default";
  381. vmmc-supply = <&vcc_sdhi1>;
  382. vqmmc-supply = <&vccq_sdhi1>;
  383. cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
  384. status = "okay";
  385. };
  386. &qspi {
  387. pinctrl-0 = <&qspi_pins>;
  388. pinctrl-names = "default";
  389. status = "okay";
  390. flash@0 {
  391. compatible = "spansion,s25fl512s", "jedec,spi-nor";
  392. reg = <0>;
  393. spi-max-frequency = <30000000>;
  394. spi-tx-bus-width = <4>;
  395. spi-rx-bus-width = <4>;
  396. spi-cpol;
  397. spi-cpha;
  398. m25p,fast-read;
  399. partitions {
  400. compatible = "fixed-partitions";
  401. #address-cells = <1>;
  402. #size-cells = <1>;
  403. partition@0 {
  404. label = "loader";
  405. reg = <0x00000000 0x00040000>;
  406. read-only;
  407. };
  408. partition@40000 {
  409. label = "user";
  410. reg = <0x00040000 0x00400000>;
  411. read-only;
  412. };
  413. partition@440000 {
  414. label = "flash";
  415. reg = <0x00440000 0x03bc0000>;
  416. };
  417. };
  418. };
  419. };
  420. /* composite video input */
  421. &vin0 {
  422. status = "okay";
  423. pinctrl-0 = <&vin0_pins>;
  424. pinctrl-names = "default";
  425. port {
  426. vin0ep: endpoint {
  427. remote-endpoint = <&adv7180>;
  428. bus-width = <8>;
  429. };
  430. };
  431. };
  432. &pci0 {
  433. status = "okay";
  434. pinctrl-0 = <&usb0_pins>;
  435. pinctrl-names = "default";
  436. };
  437. &pci1 {
  438. status = "okay";
  439. pinctrl-0 = <&usb1_pins>;
  440. pinctrl-names = "default";
  441. };
  442. &usbphy {
  443. status = "okay";
  444. };
  445. &du {
  446. pinctrl-0 = <&du0_pins>, <&du1_pins>;
  447. pinctrl-names = "default";
  448. status = "okay";
  449. clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
  450. <&x2_clk>, <&x3_clk>;
  451. clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
  452. ports {
  453. port@0 {
  454. endpoint {
  455. remote-endpoint = <&adv7511_in>;
  456. };
  457. };
  458. port@1 {
  459. endpoint {
  460. remote-endpoint = <&adv7123_in>;
  461. };
  462. };
  463. };
  464. };
  465. &rcar_sound {
  466. pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>;
  467. pinctrl-names = "default";
  468. status = "okay";
  469. /* Single DAI */
  470. #sound-dai-cells = <0>;
  471. rcar_sound,dai {
  472. dai0 {
  473. playback = <&ssi0>;
  474. capture = <&ssi1>;
  475. };
  476. };
  477. };
  478. &rwdt {
  479. timeout-sec = <60>;
  480. status = "okay";
  481. };
  482. &ssi1 {
  483. shared-pin;
  484. };