r8a7793-gose.dts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. /*
  2. * Device Tree Source for the Gose board
  3. *
  4. * Copyright (C) 2014-2015 Renesas Electronics Corporation
  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-AK4643
  12. *
  13. * SW1: 1: AK4643
  14. * 2: CN22
  15. * 3: ADV7511
  16. *
  17. * This command is required when Playback/Capture
  18. *
  19. * amixer set "LINEOUT Mixer DACL" on
  20. * amixer set "DVC Out" 100%
  21. * amixer set "DVC In" 100%
  22. *
  23. * You can use Mute
  24. *
  25. * amixer set "DVC Out Mute" on
  26. * amixer set "DVC In Mute" on
  27. *
  28. * You can use Volume Ramp
  29. *
  30. * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
  31. * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
  32. * amixer set "DVC Out Ramp" on
  33. * aplay xxx.wav &
  34. * amixer set "DVC Out" 80% // Volume Down
  35. * amixer set "DVC Out" 100% // Volume Up
  36. */
  37. /dts-v1/;
  38. #include "r8a7793.dtsi"
  39. #include <dt-bindings/gpio/gpio.h>
  40. #include <dt-bindings/input/input.h>
  41. / {
  42. model = "Gose";
  43. compatible = "renesas,gose", "renesas,r8a7793";
  44. aliases {
  45. serial0 = &scif0;
  46. serial1 = &scif1;
  47. };
  48. chosen {
  49. bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
  50. stdout-path = "serial0:115200n8";
  51. };
  52. memory@40000000 {
  53. device_type = "memory";
  54. reg = <0 0x40000000 0 0x40000000>;
  55. };
  56. gpio-keys {
  57. compatible = "gpio-keys";
  58. key-1 {
  59. gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
  60. linux,code = <KEY_1>;
  61. label = "SW2-1";
  62. wakeup-source;
  63. debounce-interval = <20>;
  64. };
  65. key-2 {
  66. gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
  67. linux,code = <KEY_2>;
  68. label = "SW2-2";
  69. wakeup-source;
  70. debounce-interval = <20>;
  71. };
  72. key-3 {
  73. gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
  74. linux,code = <KEY_3>;
  75. label = "SW2-3";
  76. wakeup-source;
  77. debounce-interval = <20>;
  78. };
  79. key-4 {
  80. gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
  81. linux,code = <KEY_4>;
  82. label = "SW2-4";
  83. wakeup-source;
  84. debounce-interval = <20>;
  85. };
  86. key-a {
  87. gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
  88. linux,code = <KEY_A>;
  89. label = "SW30";
  90. wakeup-source;
  91. debounce-interval = <20>;
  92. };
  93. key-b {
  94. gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
  95. linux,code = <KEY_B>;
  96. label = "SW31";
  97. wakeup-source;
  98. debounce-interval = <20>;
  99. };
  100. key-c {
  101. gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
  102. linux,code = <KEY_C>;
  103. label = "SW32";
  104. wakeup-source;
  105. debounce-interval = <20>;
  106. };
  107. key-d {
  108. gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
  109. linux,code = <KEY_D>;
  110. label = "SW33";
  111. wakeup-source;
  112. debounce-interval = <20>;
  113. };
  114. key-e {
  115. gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
  116. linux,code = <KEY_E>;
  117. label = "SW34";
  118. wakeup-source;
  119. debounce-interval = <20>;
  120. };
  121. key-f {
  122. gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
  123. linux,code = <KEY_F>;
  124. label = "SW35";
  125. wakeup-source;
  126. debounce-interval = <20>;
  127. };
  128. key-g {
  129. gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
  130. linux,code = <KEY_G>;
  131. label = "SW36";
  132. wakeup-source;
  133. debounce-interval = <20>;
  134. };
  135. };
  136. leds {
  137. compatible = "gpio-leds";
  138. led6 {
  139. gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
  140. label = "LED6";
  141. };
  142. led7 {
  143. gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
  144. label = "LED7";
  145. };
  146. led8 {
  147. gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
  148. label = "LED8";
  149. };
  150. };
  151. vcc_sdhi0: regulator-vcc-sdhi0 {
  152. compatible = "regulator-fixed";
  153. regulator-name = "SDHI0 Vcc";
  154. regulator-min-microvolt = <3300000>;
  155. regulator-max-microvolt = <3300000>;
  156. gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
  157. enable-active-high;
  158. };
  159. vccq_sdhi0: regulator-vccq-sdhi0 {
  160. compatible = "regulator-gpio";
  161. regulator-name = "SDHI0 VccQ";
  162. regulator-min-microvolt = <1800000>;
  163. regulator-max-microvolt = <3300000>;
  164. gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
  165. gpios-states = <1>;
  166. states = <3300000 1
  167. 1800000 0>;
  168. };
  169. vcc_sdhi1: regulator-vcc-sdhi1 {
  170. compatible = "regulator-fixed";
  171. regulator-name = "SDHI1 Vcc";
  172. regulator-min-microvolt = <3300000>;
  173. regulator-max-microvolt = <3300000>;
  174. gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
  175. enable-active-high;
  176. };
  177. vccq_sdhi1: regulator-vccq-sdhi1 {
  178. compatible = "regulator-gpio";
  179. regulator-name = "SDHI1 VccQ";
  180. regulator-min-microvolt = <1800000>;
  181. regulator-max-microvolt = <3300000>;
  182. gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
  183. gpios-states = <1>;
  184. states = <3300000 1
  185. 1800000 0>;
  186. };
  187. vcc_sdhi2: regulator-vcc-sdhi2 {
  188. compatible = "regulator-fixed";
  189. regulator-name = "SDHI2 Vcc";
  190. regulator-min-microvolt = <3300000>;
  191. regulator-max-microvolt = <3300000>;
  192. gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
  193. enable-active-high;
  194. };
  195. vccq_sdhi2: regulator-vccq-sdhi2 {
  196. compatible = "regulator-gpio";
  197. regulator-name = "SDHI2 VccQ";
  198. regulator-min-microvolt = <1800000>;
  199. regulator-max-microvolt = <3300000>;
  200. gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
  201. gpios-states = <1>;
  202. states = <3300000 1
  203. 1800000 0>;
  204. };
  205. audio_clock: audio_clock {
  206. compatible = "fixed-clock";
  207. #clock-cells = <0>;
  208. clock-frequency = <11289600>;
  209. };
  210. rsnd_ak4643: sound {
  211. compatible = "simple-audio-card";
  212. simple-audio-card,format = "left_j";
  213. simple-audio-card,bitclock-master = <&sndcodec>;
  214. simple-audio-card,frame-master = <&sndcodec>;
  215. sndcpu: simple-audio-card,cpu {
  216. sound-dai = <&rcar_sound>;
  217. };
  218. sndcodec: simple-audio-card,codec {
  219. sound-dai = <&ak4643>;
  220. clocks = <&audio_clock>;
  221. };
  222. };
  223. hdmi-out {
  224. compatible = "hdmi-connector";
  225. type = "a";
  226. port {
  227. hdmi_con: endpoint {
  228. remote-endpoint = <&adv7511_out>;
  229. };
  230. };
  231. };
  232. x2_clk: x2-clock {
  233. compatible = "fixed-clock";
  234. #clock-cells = <0>;
  235. clock-frequency = <74250000>;
  236. };
  237. x13_clk: x13-clock {
  238. compatible = "fixed-clock";
  239. #clock-cells = <0>;
  240. clock-frequency = <148500000>;
  241. };
  242. };
  243. &du {
  244. pinctrl-0 = <&du_pins>;
  245. pinctrl-names = "default";
  246. status = "okay";
  247. clocks = <&mstp7_clks R8A7793_CLK_DU0>,
  248. <&mstp7_clks R8A7793_CLK_DU1>,
  249. <&mstp7_clks R8A7793_CLK_LVDS0>,
  250. <&x13_clk>, <&x2_clk>;
  251. clock-names = "du.0", "du.1", "lvds.0",
  252. "dclkin.0", "dclkin.1";
  253. ports {
  254. port@0 {
  255. endpoint {
  256. remote-endpoint = <&adv7511_in>;
  257. };
  258. };
  259. port@1 {
  260. lvds_connector: endpoint {
  261. };
  262. };
  263. };
  264. };
  265. &extal_clk {
  266. clock-frequency = <20000000>;
  267. };
  268. &pfc {
  269. pinctrl-0 = <&scif_clk_pins>;
  270. pinctrl-names = "default";
  271. i2c2_pins: i2c2 {
  272. groups = "i2c2";
  273. function = "i2c2";
  274. };
  275. du_pins: du {
  276. groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
  277. function = "du";
  278. };
  279. scif0_pins: scif0 {
  280. groups = "scif0_data_d";
  281. function = "scif0";
  282. };
  283. scif1_pins: scif1 {
  284. groups = "scif1_data_d";
  285. function = "scif1";
  286. };
  287. scif_clk_pins: scif_clk {
  288. groups = "scif_clk";
  289. function = "scif_clk";
  290. };
  291. ether_pins: ether {
  292. groups = "eth_link", "eth_mdio", "eth_rmii";
  293. function = "eth";
  294. };
  295. phy1_pins: phy1 {
  296. groups = "intc_irq0";
  297. function = "intc";
  298. };
  299. sdhi0_pins: sd0 {
  300. renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
  301. renesas,function = "sdhi0";
  302. };
  303. sdhi1_pins: sd1 {
  304. renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
  305. renesas,function = "sdhi1";
  306. };
  307. sdhi2_pins: sd2 {
  308. renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
  309. renesas,function = "sdhi2";
  310. };
  311. qspi_pins: qspi {
  312. groups = "qspi_ctrl", "qspi_data4";
  313. function = "qspi";
  314. };
  315. sound_pins: sound {
  316. groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
  317. function = "ssi";
  318. };
  319. sound_clk_pins: sound_clk {
  320. groups = "audio_clk_a";
  321. function = "audio_clk";
  322. };
  323. };
  324. &ether {
  325. pinctrl-0 = <&ether_pins &phy1_pins>;
  326. pinctrl-names = "default";
  327. phy-handle = <&phy1>;
  328. renesas,ether-link-active-low;
  329. status = "okay";
  330. phy1: ethernet-phy@1 {
  331. reg = <1>;
  332. interrupt-parent = <&irqc0>;
  333. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  334. micrel,led-mode = <1>;
  335. };
  336. };
  337. &cmt0 {
  338. status = "okay";
  339. };
  340. &scif0 {
  341. pinctrl-0 = <&scif0_pins>;
  342. pinctrl-names = "default";
  343. status = "okay";
  344. };
  345. &scif1 {
  346. pinctrl-0 = <&scif1_pins>;
  347. pinctrl-names = "default";
  348. status = "okay";
  349. };
  350. &scif_clk {
  351. clock-frequency = <14745600>;
  352. status = "okay";
  353. };
  354. &sdhi0 {
  355. pinctrl-0 = <&sdhi0_pins>;
  356. pinctrl-names = "default";
  357. vmmc-supply = <&vcc_sdhi0>;
  358. vqmmc-supply = <&vccq_sdhi0>;
  359. cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
  360. wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
  361. status = "okay";
  362. };
  363. &sdhi1 {
  364. pinctrl-0 = <&sdhi1_pins>;
  365. pinctrl-names = "default";
  366. vmmc-supply = <&vcc_sdhi1>;
  367. vqmmc-supply = <&vccq_sdhi1>;
  368. cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
  369. wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
  370. status = "okay";
  371. };
  372. &sdhi2 {
  373. pinctrl-0 = <&sdhi2_pins>;
  374. pinctrl-names = "default";
  375. vmmc-supply = <&vcc_sdhi2>;
  376. vqmmc-supply = <&vccq_sdhi2>;
  377. cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
  378. status = "okay";
  379. };
  380. &qspi {
  381. pinctrl-0 = <&qspi_pins>;
  382. pinctrl-names = "default";
  383. status = "okay";
  384. flash@0 {
  385. compatible = "spansion,s25fl512s", "jedec,spi-nor";
  386. reg = <0>;
  387. spi-max-frequency = <30000000>;
  388. spi-tx-bus-width = <4>;
  389. spi-rx-bus-width = <4>;
  390. spi-cpol;
  391. spi-cpha;
  392. m25p,fast-read;
  393. partitions {
  394. compatible = "fixed-partitions";
  395. #address-cells = <1>;
  396. #size-cells = <1>;
  397. partition@0 {
  398. label = "loader";
  399. reg = <0x00000000 0x00040000>;
  400. read-only;
  401. };
  402. partition@40000 {
  403. label = "user";
  404. reg = <0x00040000 0x00400000>;
  405. read-only;
  406. };
  407. partition@440000 {
  408. label = "flash";
  409. reg = <0x00440000 0x03bc0000>;
  410. };
  411. };
  412. };
  413. };
  414. &i2c2 {
  415. pinctrl-0 = <&i2c2_pins>;
  416. pinctrl-names = "default";
  417. status = "okay";
  418. clock-frequency = <100000>;
  419. ak4643: codec@12 {
  420. compatible = "asahi-kasei,ak4643";
  421. #sound-dai-cells = <0>;
  422. reg = <0x12>;
  423. };
  424. hdmi@39 {
  425. compatible = "adi,adv7511w";
  426. reg = <0x39>;
  427. interrupt-parent = <&gpio3>;
  428. interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
  429. adi,input-depth = <8>;
  430. adi,input-colorspace = "rgb";
  431. adi,input-clock = "1x";
  432. adi,input-style = <1>;
  433. adi,input-justification = "evenly";
  434. ports {
  435. #address-cells = <1>;
  436. #size-cells = <0>;
  437. port@0 {
  438. reg = <0>;
  439. adv7511_in: endpoint {
  440. remote-endpoint = <&du_out_rgb>;
  441. };
  442. };
  443. port@1 {
  444. reg = <1>;
  445. adv7511_out: endpoint {
  446. remote-endpoint = <&hdmi_con>;
  447. };
  448. };
  449. };
  450. };
  451. eeprom@50 {
  452. compatible = "renesas,r1ex24002", "atmel,24c02";
  453. reg = <0x50>;
  454. pagesize = <16>;
  455. };
  456. };
  457. &rcar_sound {
  458. pinctrl-0 = <&sound_pins &sound_clk_pins>;
  459. pinctrl-names = "default";
  460. /* Single DAI */
  461. #sound-dai-cells = <0>;
  462. status = "okay";
  463. rcar_sound,dai {
  464. dai0 {
  465. playback = <&ssi0 &src2 &dvc0>;
  466. capture = <&ssi1 &src3 &dvc1>;
  467. };
  468. };
  469. };
  470. &ssi1 {
  471. shared-pin;
  472. };