salvator-common.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /*
  2. * Device Tree Source for common parts of Salvator-X board variants
  3. *
  4. * Copyright (C) 2015-2016 Renesas Electronics Corp.
  5. *
  6. * This file is licensed under the terms of the GNU General Public License
  7. * version 2. This program is licensed "as is" without any warranty of any
  8. * kind, whether express or implied.
  9. */
  10. /*
  11. * SSI-AK4613
  12. *
  13. * This command is required when Playback/Capture
  14. *
  15. * amixer set "DVC Out" 100%
  16. * amixer set "DVC In" 100%
  17. *
  18. * You can use Mute
  19. *
  20. * amixer set "DVC Out Mute" on
  21. * amixer set "DVC In Mute" on
  22. *
  23. * You can use Volume Ramp
  24. *
  25. * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
  26. * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
  27. * amixer set "DVC Out Ramp" on
  28. * aplay xxx.wav &
  29. * amixer set "DVC Out" 80% // Volume Down
  30. * amixer set "DVC Out" 100% // Volume Up
  31. */
  32. #include <dt-bindings/gpio/gpio.h>
  33. / {
  34. aliases {
  35. serial0 = &scif2;
  36. serial1 = &scif1;
  37. ethernet0 = &avb;
  38. };
  39. chosen {
  40. bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
  41. stdout-path = "serial0:115200n8";
  42. };
  43. audio_clkout: audio-clkout {
  44. /*
  45. * This is same as <&rcar_sound 0>
  46. * but needed to avoid cs2000/rcar_sound probe dead-lock
  47. */
  48. compatible = "fixed-clock";
  49. #clock-cells = <0>;
  50. clock-frequency = <11289600>;
  51. };
  52. backlight: backlight {
  53. compatible = "pwm-backlight";
  54. pwms = <&pwm1 0 50000>;
  55. brightness-levels = <256 128 64 16 8 4 0>;
  56. default-brightness-level = <6>;
  57. power-supply = <&reg_12v>;
  58. enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
  59. };
  60. reg_1p8v: regulator0 {
  61. compatible = "regulator-fixed";
  62. regulator-name = "fixed-1.8V";
  63. regulator-min-microvolt = <1800000>;
  64. regulator-max-microvolt = <1800000>;
  65. regulator-boot-on;
  66. regulator-always-on;
  67. };
  68. reg_3p3v: regulator1 {
  69. compatible = "regulator-fixed";
  70. regulator-name = "fixed-3.3V";
  71. regulator-min-microvolt = <3300000>;
  72. regulator-max-microvolt = <3300000>;
  73. regulator-boot-on;
  74. regulator-always-on;
  75. };
  76. reg_12v: regulator2 {
  77. compatible = "regulator-fixed";
  78. regulator-name = "fixed-12V";
  79. regulator-min-microvolt = <12000000>;
  80. regulator-max-microvolt = <12000000>;
  81. regulator-boot-on;
  82. regulator-always-on;
  83. };
  84. sound_card: sound {
  85. compatible = "audio-graph-card";
  86. label = "rcar-sound";
  87. dais = <&rsnd_port0>;
  88. };
  89. vbus0_usb2: regulator-vbus0-usb2 {
  90. compatible = "regulator-fixed";
  91. regulator-name = "USB20_VBUS0";
  92. regulator-min-microvolt = <5000000>;
  93. regulator-max-microvolt = <5000000>;
  94. gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
  95. enable-active-high;
  96. };
  97. vcc_sdhi0: regulator-vcc-sdhi0 {
  98. compatible = "regulator-fixed";
  99. regulator-name = "SDHI0 Vcc";
  100. regulator-min-microvolt = <3300000>;
  101. regulator-max-microvolt = <3300000>;
  102. gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
  103. enable-active-high;
  104. };
  105. vccq_sdhi0: regulator-vccq-sdhi0 {
  106. compatible = "regulator-gpio";
  107. regulator-name = "SDHI0 VccQ";
  108. regulator-min-microvolt = <1800000>;
  109. regulator-max-microvolt = <3300000>;
  110. gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
  111. gpios-states = <1>;
  112. states = <3300000 1
  113. 1800000 0>;
  114. };
  115. vcc_sdhi3: regulator-vcc-sdhi3 {
  116. compatible = "regulator-fixed";
  117. regulator-name = "SDHI3 Vcc";
  118. regulator-min-microvolt = <3300000>;
  119. regulator-max-microvolt = <3300000>;
  120. gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>;
  121. enable-active-high;
  122. };
  123. vccq_sdhi3: regulator-vccq-sdhi3 {
  124. compatible = "regulator-gpio";
  125. regulator-name = "SDHI3 VccQ";
  126. regulator-min-microvolt = <1800000>;
  127. regulator-max-microvolt = <3300000>;
  128. gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
  129. gpios-states = <1>;
  130. states = <3300000 1
  131. 1800000 0>;
  132. };
  133. hdmi0-out {
  134. compatible = "hdmi-connector";
  135. label = "HDMI0 OUT";
  136. type = "a";
  137. port {
  138. hdmi0_con: endpoint {
  139. };
  140. };
  141. };
  142. hdmi1-out {
  143. compatible = "hdmi-connector";
  144. label = "HDMI1 OUT";
  145. type = "a";
  146. port {
  147. hdmi1_con: endpoint {
  148. };
  149. };
  150. };
  151. vga {
  152. compatible = "vga-connector";
  153. port {
  154. vga_in: endpoint {
  155. remote-endpoint = <&adv7123_out>;
  156. };
  157. };
  158. };
  159. vga-encoder {
  160. compatible = "adi,adv7123";
  161. ports {
  162. #address-cells = <1>;
  163. #size-cells = <0>;
  164. port@0 {
  165. reg = <0>;
  166. adv7123_in: endpoint {
  167. remote-endpoint = <&du_out_rgb>;
  168. };
  169. };
  170. port@1 {
  171. reg = <1>;
  172. adv7123_out: endpoint {
  173. remote-endpoint = <&vga_in>;
  174. };
  175. };
  176. };
  177. };
  178. x12_clk: x12 {
  179. compatible = "fixed-clock";
  180. #clock-cells = <0>;
  181. clock-frequency = <24576000>;
  182. };
  183. /* External DU dot clocks */
  184. x21_clk: x21-clock {
  185. compatible = "fixed-clock";
  186. #clock-cells = <0>;
  187. clock-frequency = <33000000>;
  188. };
  189. x22_clk: x22-clock {
  190. compatible = "fixed-clock";
  191. #clock-cells = <0>;
  192. clock-frequency = <33000000>;
  193. };
  194. x23_clk: x23-clock {
  195. compatible = "fixed-clock";
  196. #clock-cells = <0>;
  197. clock-frequency = <25000000>;
  198. };
  199. };
  200. &audio_clk_a {
  201. clock-frequency = <22579200>;
  202. };
  203. &avb {
  204. pinctrl-0 = <&avb_pins>;
  205. pinctrl-names = "default";
  206. renesas,no-ether-link;
  207. phy-handle = <&phy0>;
  208. status = "okay";
  209. phy0: ethernet-phy@0 {
  210. rxc-skew-ps = <1500>;
  211. reg = <0>;
  212. interrupt-parent = <&gpio2>;
  213. interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
  214. reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
  215. };
  216. };
  217. &du {
  218. pinctrl-0 = <&du_pins>;
  219. pinctrl-names = "default";
  220. status = "okay";
  221. ports {
  222. port@0 {
  223. endpoint {
  224. remote-endpoint = <&adv7123_in>;
  225. };
  226. };
  227. };
  228. };
  229. &ehci0 {
  230. status = "okay";
  231. };
  232. &ehci1 {
  233. status = "okay";
  234. };
  235. &extalr_clk {
  236. clock-frequency = <32768>;
  237. };
  238. &hsusb {
  239. status = "okay";
  240. };
  241. &i2c2 {
  242. pinctrl-0 = <&i2c2_pins>;
  243. pinctrl-names = "default";
  244. status = "okay";
  245. clock-frequency = <100000>;
  246. ak4613: codec@10 {
  247. compatible = "asahi-kasei,ak4613";
  248. #sound-dai-cells = <0>;
  249. reg = <0x10>;
  250. clocks = <&rcar_sound 3>;
  251. asahi-kasei,in1-single-end;
  252. asahi-kasei,in2-single-end;
  253. asahi-kasei,out1-single-end;
  254. asahi-kasei,out2-single-end;
  255. asahi-kasei,out3-single-end;
  256. asahi-kasei,out4-single-end;
  257. asahi-kasei,out5-single-end;
  258. asahi-kasei,out6-single-end;
  259. port {
  260. ak4613_endpoint: endpoint {
  261. remote-endpoint = <&rsnd_endpoint0>;
  262. };
  263. };
  264. };
  265. cs2000: clk_multiplier@4f {
  266. #clock-cells = <0>;
  267. compatible = "cirrus,cs2000-cp";
  268. reg = <0x4f>;
  269. clocks = <&audio_clkout>, <&x12_clk>;
  270. clock-names = "clk_in", "ref_clk";
  271. assigned-clocks = <&cs2000>;
  272. assigned-clock-rates = <24576000>; /* 1/1 divide */
  273. };
  274. };
  275. &i2c4 {
  276. status = "okay";
  277. csa_vdd: adc@7c {
  278. compatible = "maxim,max9611";
  279. reg = <0x7c>;
  280. shunt-resistor-micro-ohms = <5000>;
  281. };
  282. csa_dvfs: adc@7f {
  283. compatible = "maxim,max9611";
  284. reg = <0x7f>;
  285. shunt-resistor-micro-ohms = <5000>;
  286. };
  287. };
  288. &i2c_dvfs {
  289. status = "okay";
  290. };
  291. &ohci0 {
  292. status = "okay";
  293. };
  294. &ohci1 {
  295. status = "okay";
  296. };
  297. &pcie_bus_clk {
  298. clock-frequency = <100000000>;
  299. };
  300. &pciec0 {
  301. status = "okay";
  302. };
  303. &pciec1 {
  304. status = "okay";
  305. };
  306. &pfc {
  307. pinctrl-0 = <&scif_clk_pins>;
  308. pinctrl-names = "default";
  309. avb_pins: avb {
  310. mux {
  311. groups = "avb_link", "avb_phy_int", "avb_mdc",
  312. "avb_mii";
  313. function = "avb";
  314. };
  315. pins_mdc {
  316. groups = "avb_mdc";
  317. drive-strength = <24>;
  318. };
  319. pins_mii_tx {
  320. pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
  321. "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
  322. drive-strength = <12>;
  323. };
  324. };
  325. du_pins: du {
  326. groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0";
  327. function = "du";
  328. };
  329. i2c2_pins: i2c2 {
  330. groups = "i2c2_a";
  331. function = "i2c2";
  332. };
  333. pwm1_pins: pwm1 {
  334. groups = "pwm1_a";
  335. function = "pwm1";
  336. };
  337. scif1_pins: scif1 {
  338. groups = "scif1_data_a", "scif1_ctrl";
  339. function = "scif1";
  340. };
  341. scif2_pins: scif2 {
  342. groups = "scif2_data_a";
  343. function = "scif2";
  344. };
  345. scif_clk_pins: scif_clk {
  346. groups = "scif_clk_a";
  347. function = "scif_clk";
  348. };
  349. sdhi0_pins: sd0 {
  350. groups = "sdhi0_data4", "sdhi0_ctrl";
  351. function = "sdhi0";
  352. power-source = <3300>;
  353. };
  354. sdhi0_pins_uhs: sd0_uhs {
  355. groups = "sdhi0_data4", "sdhi0_ctrl";
  356. function = "sdhi0";
  357. power-source = <1800>;
  358. };
  359. sdhi2_pins: sd2 {
  360. groups = "sdhi2_data8", "sdhi2_ctrl";
  361. function = "sdhi2";
  362. power-source = <3300>;
  363. };
  364. sdhi2_pins_uhs: sd2_uhs {
  365. groups = "sdhi2_data8", "sdhi2_ctrl";
  366. function = "sdhi2";
  367. power-source = <1800>;
  368. };
  369. sdhi3_pins: sd3 {
  370. groups = "sdhi3_data4", "sdhi3_ctrl";
  371. function = "sdhi3";
  372. power-source = <3300>;
  373. };
  374. sdhi3_pins_uhs: sd3_uhs {
  375. groups = "sdhi3_data4", "sdhi3_ctrl";
  376. function = "sdhi3";
  377. power-source = <1800>;
  378. };
  379. sound_pins: sound {
  380. groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
  381. function = "ssi";
  382. };
  383. sound_clk_pins: sound_clk {
  384. groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
  385. "audio_clkout_a", "audio_clkout3_a";
  386. function = "audio_clk";
  387. };
  388. usb0_pins: usb0 {
  389. groups = "usb0";
  390. function = "usb0";
  391. };
  392. usb1_pins: usb1 {
  393. mux {
  394. groups = "usb1";
  395. function = "usb1";
  396. };
  397. ovc {
  398. pins = "GP_6_27";
  399. bias-pull-up;
  400. };
  401. pwen {
  402. pins = "GP_6_26";
  403. bias-pull-down;
  404. };
  405. };
  406. };
  407. &pwm1 {
  408. pinctrl-0 = <&pwm1_pins>;
  409. pinctrl-names = "default";
  410. status = "okay";
  411. };
  412. &rcar_sound {
  413. pinctrl-0 = <&sound_pins &sound_clk_pins>;
  414. pinctrl-names = "default";
  415. /* Single DAI */
  416. #sound-dai-cells = <0>;
  417. /* audio_clkout0/1/2/3 */
  418. #clock-cells = <1>;
  419. clock-frequency = <12288000 11289600>;
  420. status = "okay";
  421. /* update <audio_clk_b> to <cs2000> */
  422. clocks = <&cpg CPG_MOD 1005>,
  423. <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
  424. <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
  425. <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
  426. <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
  427. <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
  428. <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
  429. <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
  430. <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
  431. <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
  432. <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
  433. <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
  434. <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
  435. <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
  436. <&audio_clk_a>, <&cs2000>,
  437. <&audio_clk_c>,
  438. <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
  439. ports {
  440. rsnd_port0: port@0 {
  441. rsnd_endpoint0: endpoint {
  442. remote-endpoint = <&ak4613_endpoint>;
  443. dai-format = "left_j";
  444. bitclock-master = <&rsnd_endpoint0>;
  445. frame-master = <&rsnd_endpoint0>;
  446. playback = <&ssi0 &src0 &dvc0>;
  447. capture = <&ssi1 &src1 &dvc1>;
  448. };
  449. };
  450. };
  451. };
  452. &scif1 {
  453. pinctrl-0 = <&scif1_pins>;
  454. pinctrl-names = "default";
  455. uart-has-rtscts;
  456. status = "okay";
  457. };
  458. &scif2 {
  459. pinctrl-0 = <&scif2_pins>;
  460. pinctrl-names = "default";
  461. status = "okay";
  462. };
  463. &scif_clk {
  464. clock-frequency = <14745600>;
  465. };
  466. &sdhi0 {
  467. pinctrl-0 = <&sdhi0_pins>;
  468. pinctrl-1 = <&sdhi0_pins_uhs>;
  469. pinctrl-names = "default", "state_uhs";
  470. vmmc-supply = <&vcc_sdhi0>;
  471. vqmmc-supply = <&vccq_sdhi0>;
  472. cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
  473. wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
  474. bus-width = <4>;
  475. sd-uhs-sdr50;
  476. status = "okay";
  477. };
  478. &sdhi2 {
  479. /* used for on-board 8bit eMMC */
  480. pinctrl-0 = <&sdhi2_pins>;
  481. pinctrl-1 = <&sdhi2_pins_uhs>;
  482. pinctrl-names = "default", "state_uhs";
  483. vmmc-supply = <&reg_3p3v>;
  484. vqmmc-supply = <&reg_1p8v>;
  485. bus-width = <8>;
  486. mmc-hs200-1_8v;
  487. non-removable;
  488. status = "okay";
  489. };
  490. &sdhi3 {
  491. pinctrl-0 = <&sdhi3_pins>;
  492. pinctrl-1 = <&sdhi3_pins_uhs>;
  493. pinctrl-names = "default", "state_uhs";
  494. vmmc-supply = <&vcc_sdhi3>;
  495. vqmmc-supply = <&vccq_sdhi3>;
  496. cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
  497. wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
  498. bus-width = <4>;
  499. sd-uhs-sdr50;
  500. status = "okay";
  501. };
  502. &ssi1 {
  503. shared-pin;
  504. };
  505. &usb2_phy0 {
  506. pinctrl-0 = <&usb0_pins>;
  507. pinctrl-names = "default";
  508. vbus-supply = <&vbus0_usb2>;
  509. status = "okay";
  510. };
  511. &usb2_phy1 {
  512. pinctrl-0 = <&usb1_pins>;
  513. pinctrl-names = "default";
  514. status = "okay";
  515. };
  516. &wdt0 {
  517. timeout-sec = <60>;
  518. status = "okay";
  519. };
  520. &xhci0 {
  521. status = "okay";
  522. };