board-armadillo800eva.c 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200
  1. /*
  2. * armadillo 800 eva board support
  3. *
  4. * Copyright (C) 2012 Renesas Solutions Corp.
  5. * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; version 2 of the License.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. *
  20. */
  21. #include <linux/clk.h>
  22. #include <linux/delay.h>
  23. #include <linux/err.h>
  24. #include <linux/kernel.h>
  25. #include <linux/input.h>
  26. #include <linux/irq.h>
  27. #include <linux/platform_device.h>
  28. #include <linux/gpio.h>
  29. #include <linux/gpio_keys.h>
  30. #include <linux/pinctrl/machine.h>
  31. #include <linux/regulator/fixed.h>
  32. #include <linux/regulator/machine.h>
  33. #include <linux/sh_eth.h>
  34. #include <linux/videodev2.h>
  35. #include <linux/usb/renesas_usbhs.h>
  36. #include <linux/mfd/tmio.h>
  37. #include <linux/mmc/host.h>
  38. #include <linux/mmc/sh_mmcif.h>
  39. #include <linux/mmc/sh_mobile_sdhi.h>
  40. #include <linux/i2c-gpio.h>
  41. #include <mach/common.h>
  42. #include <mach/irqs.h>
  43. #include <mach/r8a7740.h>
  44. #include <media/mt9t112.h>
  45. #include <media/sh_mobile_ceu.h>
  46. #include <media/soc_camera.h>
  47. #include <asm/page.h>
  48. #include <asm/mach-types.h>
  49. #include <asm/mach/arch.h>
  50. #include <asm/mach/map.h>
  51. #include <asm/mach/time.h>
  52. #include <asm/hardware/cache-l2x0.h>
  53. #include <video/sh_mobile_lcdc.h>
  54. #include <video/sh_mobile_hdmi.h>
  55. #include <sound/sh_fsi.h>
  56. #include <sound/simple_card.h>
  57. #include "sh-gpio.h"
  58. /*
  59. * CON1 Camera Module
  60. * CON2 Extension Bus
  61. * CON3 HDMI Output
  62. * CON4 Composite Video Output
  63. * CON5 H-UDI JTAG
  64. * CON6 ARM JTAG
  65. * CON7 SD1
  66. * CON8 SD2
  67. * CON9 RTC BackUp
  68. * CON10 Monaural Mic Input
  69. * CON11 Stereo Headphone Output
  70. * CON12 Audio Line Output(L)
  71. * CON13 Audio Line Output(R)
  72. * CON14 AWL13 Module
  73. * CON15 Extension
  74. * CON16 LCD1
  75. * CON17 LCD2
  76. * CON19 Power Input
  77. * CON20 USB1
  78. * CON21 USB2
  79. * CON22 Serial
  80. * CON23 LAN
  81. * CON24 USB3
  82. * LED1 Camera LED(Yellow)
  83. * LED2 Power LED (Green)
  84. * ED3-LED6 User LED(Yellow)
  85. * LED7 LAN link LED(Green)
  86. * LED8 LAN activity LED(Yellow)
  87. */
  88. /*
  89. * DipSwitch
  90. *
  91. * SW1
  92. *
  93. * -12345678-+---------------+----------------------------
  94. * 1 | boot | hermit
  95. * 0 | boot | OS auto boot
  96. * -12345678-+---------------+----------------------------
  97. * 00 | boot device | eMMC
  98. * 10 | boot device | SDHI0 (CON7)
  99. * 01 | boot device | -
  100. * 11 | boot device | Extension Buss (CS0)
  101. * -12345678-+---------------+----------------------------
  102. * 0 | Extension Bus | D8-D15 disable, eMMC enable
  103. * 1 | Extension Bus | D8-D15 enable, eMMC disable
  104. * -12345678-+---------------+----------------------------
  105. * 0 | SDHI1 | COM8 disable, COM14 enable
  106. * 1 | SDHI1 | COM8 enable, COM14 disable
  107. * -12345678-+---------------+----------------------------
  108. * 0 | USB0 | COM20 enable, COM24 disable
  109. * 1 | USB0 | COM20 disable, COM24 enable
  110. * -12345678-+---------------+----------------------------
  111. * 00 | JTAG | SH-X2
  112. * 10 | JTAG | ARM
  113. * 01 | JTAG | -
  114. * 11 | JTAG | Boundary Scan
  115. *-----------+---------------+----------------------------
  116. */
  117. /*
  118. * FSI-WM8978
  119. *
  120. * this command is required when playback.
  121. *
  122. * # amixer set "Headphone" 50
  123. *
  124. * this command is required when capture.
  125. *
  126. * # amixer set "Input PGA" 15
  127. * # amixer set "Left Input Mixer MicP" on
  128. * # amixer set "Left Input Mixer MicN" on
  129. * # amixer set "Right Input Mixer MicN" on
  130. * # amixer set "Right Input Mixer MicP" on
  131. */
  132. /*
  133. * USB function
  134. *
  135. * When you use USB Function,
  136. * set SW1.6 ON, and connect cable to CN24.
  137. *
  138. * USBF needs workaround on R8A7740 chip.
  139. * These are a little bit complex.
  140. * see
  141. * usbhsf_power_ctrl()
  142. */
  143. #define IRQ7 evt2irq(0x02e0)
  144. #define USBCR1 IOMEM(0xe605810a)
  145. #define USBH 0xC6700000
  146. #define USBH_USBCTR 0x10834
  147. struct usbhsf_private {
  148. struct clk *phy;
  149. struct clk *usb24;
  150. struct clk *pci;
  151. struct clk *func;
  152. struct clk *host;
  153. void __iomem *usbh_base;
  154. struct renesas_usbhs_platform_info info;
  155. };
  156. #define usbhsf_get_priv(pdev) \
  157. container_of(renesas_usbhs_get_info(pdev), \
  158. struct usbhsf_private, info)
  159. static int usbhsf_get_id(struct platform_device *pdev)
  160. {
  161. return USBHS_GADGET;
  162. }
  163. static void usbhsf_power_ctrl(struct platform_device *pdev,
  164. void __iomem *base, int enable)
  165. {
  166. struct usbhsf_private *priv = usbhsf_get_priv(pdev);
  167. /*
  168. * Work around for USB Function.
  169. * It needs USB host clock, and settings
  170. */
  171. if (enable) {
  172. /*
  173. * enable all the related usb clocks
  174. * for usb workaround
  175. */
  176. clk_enable(priv->usb24);
  177. clk_enable(priv->pci);
  178. clk_enable(priv->host);
  179. clk_enable(priv->func);
  180. clk_enable(priv->phy);
  181. /*
  182. * set USBCR1
  183. *
  184. * Port1 is driven by USB function,
  185. * Port2 is driven by USB HOST
  186. * One HOST (Port1 or Port2 is HOST)
  187. * USB PLL input clock = 24MHz
  188. */
  189. __raw_writew(0xd750, USBCR1);
  190. mdelay(1);
  191. /*
  192. * start USB Host
  193. */
  194. __raw_writel(0x0000000c, priv->usbh_base + USBH_USBCTR);
  195. __raw_writel(0x00000008, priv->usbh_base + USBH_USBCTR);
  196. mdelay(10);
  197. /*
  198. * USB PHY Power ON
  199. */
  200. __raw_writew(0xd770, USBCR1);
  201. __raw_writew(0x4000, base + 0x102); /* USBF :: SUSPMODE */
  202. } else {
  203. __raw_writel(0x0000010f, priv->usbh_base + USBH_USBCTR);
  204. __raw_writew(0xd7c0, USBCR1); /* GPIO */
  205. clk_disable(priv->phy);
  206. clk_disable(priv->func); /* usb work around */
  207. clk_disable(priv->host); /* usb work around */
  208. clk_disable(priv->pci); /* usb work around */
  209. clk_disable(priv->usb24); /* usb work around */
  210. }
  211. }
  212. static int usbhsf_get_vbus(struct platform_device *pdev)
  213. {
  214. return gpio_get_value(209);
  215. }
  216. static irqreturn_t usbhsf_interrupt(int irq, void *data)
  217. {
  218. struct platform_device *pdev = data;
  219. renesas_usbhs_call_notify_hotplug(pdev);
  220. return IRQ_HANDLED;
  221. }
  222. static void usbhsf_hardware_exit(struct platform_device *pdev)
  223. {
  224. struct usbhsf_private *priv = usbhsf_get_priv(pdev);
  225. if (!IS_ERR(priv->phy))
  226. clk_put(priv->phy);
  227. if (!IS_ERR(priv->usb24))
  228. clk_put(priv->usb24);
  229. if (!IS_ERR(priv->pci))
  230. clk_put(priv->pci);
  231. if (!IS_ERR(priv->host))
  232. clk_put(priv->host);
  233. if (!IS_ERR(priv->func))
  234. clk_put(priv->func);
  235. if (priv->usbh_base)
  236. iounmap(priv->usbh_base);
  237. priv->phy = NULL;
  238. priv->usb24 = NULL;
  239. priv->pci = NULL;
  240. priv->host = NULL;
  241. priv->func = NULL;
  242. priv->usbh_base = NULL;
  243. free_irq(IRQ7, pdev);
  244. }
  245. static int usbhsf_hardware_init(struct platform_device *pdev)
  246. {
  247. struct usbhsf_private *priv = usbhsf_get_priv(pdev);
  248. int ret;
  249. priv->phy = clk_get(&pdev->dev, "phy");
  250. priv->usb24 = clk_get(&pdev->dev, "usb24");
  251. priv->pci = clk_get(&pdev->dev, "pci");
  252. priv->func = clk_get(&pdev->dev, "func");
  253. priv->host = clk_get(&pdev->dev, "host");
  254. priv->usbh_base = ioremap_nocache(USBH, 0x20000);
  255. if (IS_ERR(priv->phy) ||
  256. IS_ERR(priv->usb24) ||
  257. IS_ERR(priv->pci) ||
  258. IS_ERR(priv->host) ||
  259. IS_ERR(priv->func) ||
  260. !priv->usbh_base) {
  261. dev_err(&pdev->dev, "USB clock setting failed\n");
  262. usbhsf_hardware_exit(pdev);
  263. return -EIO;
  264. }
  265. ret = request_irq(IRQ7, usbhsf_interrupt, IRQF_TRIGGER_NONE,
  266. dev_name(&pdev->dev), pdev);
  267. if (ret) {
  268. dev_err(&pdev->dev, "request_irq err\n");
  269. return ret;
  270. }
  271. irq_set_irq_type(IRQ7, IRQ_TYPE_EDGE_BOTH);
  272. /* usb24 use 1/1 of parent clock (= usb24s = 24MHz) */
  273. clk_set_rate(priv->usb24,
  274. clk_get_rate(clk_get_parent(priv->usb24)));
  275. return 0;
  276. }
  277. static struct usbhsf_private usbhsf_private = {
  278. .info = {
  279. .platform_callback = {
  280. .get_id = usbhsf_get_id,
  281. .get_vbus = usbhsf_get_vbus,
  282. .hardware_init = usbhsf_hardware_init,
  283. .hardware_exit = usbhsf_hardware_exit,
  284. .power_ctrl = usbhsf_power_ctrl,
  285. },
  286. .driver_param = {
  287. .buswait_bwait = 5,
  288. .detection_delay = 5,
  289. .d0_rx_id = SHDMA_SLAVE_USBHS_RX,
  290. .d1_tx_id = SHDMA_SLAVE_USBHS_TX,
  291. },
  292. }
  293. };
  294. static struct resource usbhsf_resources[] = {
  295. {
  296. .name = "USBHS",
  297. .start = 0xe6890000,
  298. .end = 0xe6890104 - 1,
  299. .flags = IORESOURCE_MEM,
  300. },
  301. {
  302. .start = evt2irq(0x0A20),
  303. .flags = IORESOURCE_IRQ,
  304. },
  305. };
  306. static struct platform_device usbhsf_device = {
  307. .name = "renesas_usbhs",
  308. .dev = {
  309. .platform_data = &usbhsf_private.info,
  310. },
  311. .id = -1,
  312. .num_resources = ARRAY_SIZE(usbhsf_resources),
  313. .resource = usbhsf_resources,
  314. };
  315. /* Ether */
  316. static struct sh_eth_plat_data sh_eth_platdata = {
  317. .phy = 0x00, /* LAN8710A */
  318. .edmac_endian = EDMAC_LITTLE_ENDIAN,
  319. .register_type = SH_ETH_REG_GIGABIT,
  320. .phy_interface = PHY_INTERFACE_MODE_MII,
  321. };
  322. static struct resource sh_eth_resources[] = {
  323. {
  324. .start = 0xe9a00000,
  325. .end = 0xe9a00800 - 1,
  326. .flags = IORESOURCE_MEM,
  327. }, {
  328. .start = 0xe9a01800,
  329. .end = 0xe9a02000 - 1,
  330. .flags = IORESOURCE_MEM,
  331. }, {
  332. .start = evt2irq(0x0500),
  333. .flags = IORESOURCE_IRQ,
  334. },
  335. };
  336. static struct platform_device sh_eth_device = {
  337. .name = "sh-eth",
  338. .id = -1,
  339. .dev = {
  340. .platform_data = &sh_eth_platdata,
  341. },
  342. .resource = sh_eth_resources,
  343. .num_resources = ARRAY_SIZE(sh_eth_resources),
  344. };
  345. /* LCDC */
  346. static struct fb_videomode lcdc0_mode = {
  347. .name = "AMPIER/AM-800480",
  348. .xres = 800,
  349. .yres = 480,
  350. .left_margin = 88,
  351. .right_margin = 40,
  352. .hsync_len = 128,
  353. .upper_margin = 20,
  354. .lower_margin = 5,
  355. .vsync_len = 5,
  356. .sync = 0,
  357. };
  358. static struct sh_mobile_lcdc_info lcdc0_info = {
  359. .clock_source = LCDC_CLK_BUS,
  360. .ch[0] = {
  361. .chan = LCDC_CHAN_MAINLCD,
  362. .fourcc = V4L2_PIX_FMT_RGB565,
  363. .interface_type = RGB24,
  364. .clock_divider = 5,
  365. .flags = 0,
  366. .lcd_modes = &lcdc0_mode,
  367. .num_modes = 1,
  368. .panel_cfg = {
  369. .width = 111,
  370. .height = 68,
  371. },
  372. },
  373. };
  374. static struct resource lcdc0_resources[] = {
  375. [0] = {
  376. .name = "LCD0",
  377. .start = 0xfe940000,
  378. .end = 0xfe943fff,
  379. .flags = IORESOURCE_MEM,
  380. },
  381. [1] = {
  382. .start = intcs_evt2irq(0x580),
  383. .flags = IORESOURCE_IRQ,
  384. },
  385. };
  386. static struct platform_device lcdc0_device = {
  387. .name = "sh_mobile_lcdc_fb",
  388. .num_resources = ARRAY_SIZE(lcdc0_resources),
  389. .resource = lcdc0_resources,
  390. .id = 0,
  391. .dev = {
  392. .platform_data = &lcdc0_info,
  393. .coherent_dma_mask = ~0,
  394. },
  395. };
  396. /*
  397. * LCDC1/HDMI
  398. */
  399. static struct sh_mobile_hdmi_info hdmi_info = {
  400. .flags = HDMI_OUTPUT_PUSH_PULL |
  401. HDMI_OUTPUT_POLARITY_HI |
  402. HDMI_32BIT_REG |
  403. HDMI_HAS_HTOP1 |
  404. HDMI_SND_SRC_SPDIF,
  405. };
  406. static struct resource hdmi_resources[] = {
  407. [0] = {
  408. .name = "HDMI",
  409. .start = 0xe6be0000,
  410. .end = 0xe6be03ff,
  411. .flags = IORESOURCE_MEM,
  412. },
  413. [1] = {
  414. .start = evt2irq(0x1700),
  415. .flags = IORESOURCE_IRQ,
  416. },
  417. [2] = {
  418. .name = "HDMI emma3pf",
  419. .start = 0xe6be4000,
  420. .end = 0xe6be43ff,
  421. .flags = IORESOURCE_MEM,
  422. },
  423. };
  424. static struct platform_device hdmi_device = {
  425. .name = "sh-mobile-hdmi",
  426. .num_resources = ARRAY_SIZE(hdmi_resources),
  427. .resource = hdmi_resources,
  428. .id = -1,
  429. .dev = {
  430. .platform_data = &hdmi_info,
  431. },
  432. };
  433. static const struct fb_videomode lcdc1_mode = {
  434. .name = "HDMI 720p",
  435. .xres = 1280,
  436. .yres = 720,
  437. .pixclock = 13468,
  438. .left_margin = 220,
  439. .right_margin = 110,
  440. .hsync_len = 40,
  441. .upper_margin = 20,
  442. .lower_margin = 5,
  443. .vsync_len = 5,
  444. .refresh = 60,
  445. .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
  446. };
  447. static struct sh_mobile_lcdc_info hdmi_lcdc_info = {
  448. .clock_source = LCDC_CLK_PERIPHERAL, /* HDMI clock */
  449. .ch[0] = {
  450. .chan = LCDC_CHAN_MAINLCD,
  451. .fourcc = V4L2_PIX_FMT_RGB565,
  452. .interface_type = RGB24,
  453. .clock_divider = 1,
  454. .flags = LCDC_FLAGS_DWPOL,
  455. .lcd_modes = &lcdc1_mode,
  456. .num_modes = 1,
  457. .tx_dev = &hdmi_device,
  458. .panel_cfg = {
  459. .width = 1280,
  460. .height = 720,
  461. },
  462. },
  463. };
  464. static struct resource hdmi_lcdc_resources[] = {
  465. [0] = {
  466. .name = "LCDC1",
  467. .start = 0xfe944000,
  468. .end = 0xfe948000 - 1,
  469. .flags = IORESOURCE_MEM,
  470. },
  471. [1] = {
  472. .start = intcs_evt2irq(0x1780),
  473. .flags = IORESOURCE_IRQ,
  474. },
  475. };
  476. static struct platform_device hdmi_lcdc_device = {
  477. .name = "sh_mobile_lcdc_fb",
  478. .num_resources = ARRAY_SIZE(hdmi_lcdc_resources),
  479. .resource = hdmi_lcdc_resources,
  480. .id = 1,
  481. .dev = {
  482. .platform_data = &hdmi_lcdc_info,
  483. .coherent_dma_mask = ~0,
  484. },
  485. };
  486. /* GPIO KEY */
  487. #define GPIO_KEY(c, g, d, ...) \
  488. { .code = c, .gpio = g, .desc = d, .active_low = 1, __VA_ARGS__ }
  489. static struct gpio_keys_button gpio_buttons[] = {
  490. GPIO_KEY(KEY_POWER, 99, "SW3", .wakeup = 1),
  491. GPIO_KEY(KEY_BACK, 100, "SW4"),
  492. GPIO_KEY(KEY_MENU, 97, "SW5"),
  493. GPIO_KEY(KEY_HOME, 98, "SW6"),
  494. };
  495. static struct gpio_keys_platform_data gpio_key_info = {
  496. .buttons = gpio_buttons,
  497. .nbuttons = ARRAY_SIZE(gpio_buttons),
  498. };
  499. static struct platform_device gpio_keys_device = {
  500. .name = "gpio-keys",
  501. .id = -1,
  502. .dev = {
  503. .platform_data = &gpio_key_info,
  504. },
  505. };
  506. /* Fixed 3.3V regulator to be used by SDHI0, SDHI1, MMCIF */
  507. static struct regulator_consumer_supply fixed3v3_power_consumers[] =
  508. {
  509. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
  510. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
  511. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
  512. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
  513. REGULATOR_SUPPLY("vmmc", "sh_mmcif"),
  514. REGULATOR_SUPPLY("vqmmc", "sh_mmcif"),
  515. };
  516. /* SDHI0 */
  517. /*
  518. * FIXME
  519. *
  520. * It use polling mode here, since
  521. * CD (= Card Detect) pin is not connected to SDHI0_CD.
  522. * We can use IRQ31 as card detect irq,
  523. * but it needs chattering removal operation
  524. */
  525. #define IRQ31 evt2irq(0x33E0)
  526. static struct sh_mobile_sdhi_info sdhi0_info = {
  527. .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
  528. .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
  529. .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |\
  530. MMC_CAP_NEEDS_POLL,
  531. .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
  532. .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
  533. };
  534. static struct resource sdhi0_resources[] = {
  535. {
  536. .name = "SDHI0",
  537. .start = 0xe6850000,
  538. .end = 0xe6850100 - 1,
  539. .flags = IORESOURCE_MEM,
  540. },
  541. /*
  542. * no SH_MOBILE_SDHI_IRQ_CARD_DETECT here
  543. */
  544. {
  545. .name = SH_MOBILE_SDHI_IRQ_SDCARD,
  546. .start = evt2irq(0x0E20),
  547. .flags = IORESOURCE_IRQ,
  548. },
  549. {
  550. .name = SH_MOBILE_SDHI_IRQ_SDIO,
  551. .start = evt2irq(0x0E40),
  552. .flags = IORESOURCE_IRQ,
  553. },
  554. };
  555. static struct platform_device sdhi0_device = {
  556. .name = "sh_mobile_sdhi",
  557. .id = 0,
  558. .dev = {
  559. .platform_data = &sdhi0_info,
  560. },
  561. .num_resources = ARRAY_SIZE(sdhi0_resources),
  562. .resource = sdhi0_resources,
  563. };
  564. /* SDHI1 */
  565. static struct sh_mobile_sdhi_info sdhi1_info = {
  566. .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
  567. .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
  568. .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
  569. .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
  570. .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
  571. };
  572. static struct resource sdhi1_resources[] = {
  573. [0] = {
  574. .name = "SDHI1",
  575. .start = 0xe6860000,
  576. .end = 0xe6860100 - 1,
  577. .flags = IORESOURCE_MEM,
  578. },
  579. [1] = {
  580. .start = evt2irq(0x0E80),
  581. .flags = IORESOURCE_IRQ,
  582. },
  583. [2] = {
  584. .start = evt2irq(0x0EA0),
  585. .flags = IORESOURCE_IRQ,
  586. },
  587. [3] = {
  588. .start = evt2irq(0x0EC0),
  589. .flags = IORESOURCE_IRQ,
  590. },
  591. };
  592. static struct platform_device sdhi1_device = {
  593. .name = "sh_mobile_sdhi",
  594. .id = 1,
  595. .dev = {
  596. .platform_data = &sdhi1_info,
  597. },
  598. .num_resources = ARRAY_SIZE(sdhi1_resources),
  599. .resource = sdhi1_resources,
  600. };
  601. /* MMCIF */
  602. static struct sh_mmcif_plat_data sh_mmcif_plat = {
  603. .sup_pclk = 0,
  604. .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
  605. .caps = MMC_CAP_4_BIT_DATA |
  606. MMC_CAP_8_BIT_DATA |
  607. MMC_CAP_NONREMOVABLE,
  608. };
  609. static struct resource sh_mmcif_resources[] = {
  610. [0] = {
  611. .name = "MMCIF",
  612. .start = 0xe6bd0000,
  613. .end = 0xe6bd0100 - 1,
  614. .flags = IORESOURCE_MEM,
  615. },
  616. [1] = {
  617. /* MMC ERR */
  618. .start = evt2irq(0x1AC0),
  619. .flags = IORESOURCE_IRQ,
  620. },
  621. [2] = {
  622. /* MMC NOR */
  623. .start = evt2irq(0x1AE0),
  624. .flags = IORESOURCE_IRQ,
  625. },
  626. };
  627. static struct platform_device sh_mmcif_device = {
  628. .name = "sh_mmcif",
  629. .id = -1,
  630. .dev = {
  631. .platform_data = &sh_mmcif_plat,
  632. },
  633. .num_resources = ARRAY_SIZE(sh_mmcif_resources),
  634. .resource = sh_mmcif_resources,
  635. };
  636. /* Camera */
  637. static int mt9t111_power(struct device *dev, int mode)
  638. {
  639. struct clk *mclk = clk_get(NULL, "video1");
  640. if (IS_ERR(mclk)) {
  641. dev_err(dev, "can't get video1 clock\n");
  642. return -EINVAL;
  643. }
  644. if (mode) {
  645. /* video1 (= CON1 camera) expect 24MHz */
  646. clk_set_rate(mclk, clk_round_rate(mclk, 24000000));
  647. clk_enable(mclk);
  648. gpio_set_value(158, 1);
  649. } else {
  650. gpio_set_value(158, 0);
  651. clk_disable(mclk);
  652. }
  653. clk_put(mclk);
  654. return 0;
  655. }
  656. static struct i2c_board_info i2c_camera_mt9t111 = {
  657. I2C_BOARD_INFO("mt9t112", 0x3d),
  658. };
  659. static struct mt9t112_camera_info mt9t111_info = {
  660. .divider = { 16, 0, 0, 7, 0, 10, 14, 7, 7 },
  661. };
  662. static struct soc_camera_link mt9t111_link = {
  663. .i2c_adapter_id = 0,
  664. .bus_id = 0,
  665. .board_info = &i2c_camera_mt9t111,
  666. .power = mt9t111_power,
  667. .priv = &mt9t111_info,
  668. };
  669. static struct platform_device camera_device = {
  670. .name = "soc-camera-pdrv",
  671. .id = 0,
  672. .dev = {
  673. .platform_data = &mt9t111_link,
  674. },
  675. };
  676. /* CEU0 */
  677. static struct sh_mobile_ceu_info sh_mobile_ceu0_info = {
  678. .flags = SH_CEU_FLAG_LOWER_8BIT,
  679. };
  680. static struct resource ceu0_resources[] = {
  681. [0] = {
  682. .name = "CEU",
  683. .start = 0xfe910000,
  684. .end = 0xfe91009f,
  685. .flags = IORESOURCE_MEM,
  686. },
  687. [1] = {
  688. .start = intcs_evt2irq(0x0500),
  689. .flags = IORESOURCE_IRQ,
  690. },
  691. [2] = {
  692. /* place holder for contiguous memory */
  693. },
  694. };
  695. static struct platform_device ceu0_device = {
  696. .name = "sh_mobile_ceu",
  697. .id = 0,
  698. .num_resources = ARRAY_SIZE(ceu0_resources),
  699. .resource = ceu0_resources,
  700. .dev = {
  701. .platform_data = &sh_mobile_ceu0_info,
  702. .coherent_dma_mask = 0xffffffff,
  703. },
  704. };
  705. /* FSI */
  706. static struct sh_fsi_platform_info fsi_info = {
  707. /* FSI-WM8978 */
  708. .port_a = {
  709. .tx_id = SHDMA_SLAVE_FSIA_TX,
  710. },
  711. /* FSI-HDMI */
  712. .port_b = {
  713. .flags = SH_FSI_FMT_SPDIF |
  714. SH_FSI_ENABLE_STREAM_MODE |
  715. SH_FSI_CLK_CPG,
  716. .tx_id = SHDMA_SLAVE_FSIB_TX,
  717. }
  718. };
  719. static struct resource fsi_resources[] = {
  720. [0] = {
  721. .name = "FSI",
  722. .start = 0xfe1f0000,
  723. .end = 0xfe1f8400 - 1,
  724. .flags = IORESOURCE_MEM,
  725. },
  726. [1] = {
  727. .start = evt2irq(0x1840),
  728. .flags = IORESOURCE_IRQ,
  729. },
  730. };
  731. static struct platform_device fsi_device = {
  732. .name = "sh_fsi2",
  733. .id = -1,
  734. .num_resources = ARRAY_SIZE(fsi_resources),
  735. .resource = fsi_resources,
  736. .dev = {
  737. .platform_data = &fsi_info,
  738. },
  739. };
  740. /* FSI-WM8978 */
  741. static struct asoc_simple_card_info fsi_wm8978_info = {
  742. .name = "wm8978",
  743. .card = "FSI2A-WM8978",
  744. .codec = "wm8978.0-001a",
  745. .platform = "sh_fsi2",
  746. .daifmt = SND_SOC_DAIFMT_I2S,
  747. .cpu_dai = {
  748. .name = "fsia-dai",
  749. .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
  750. },
  751. .codec_dai = {
  752. .name = "wm8978-hifi",
  753. .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
  754. .sysclk = 12288000,
  755. },
  756. };
  757. static struct platform_device fsi_wm8978_device = {
  758. .name = "asoc-simple-card",
  759. .id = 0,
  760. .dev = {
  761. .platform_data = &fsi_wm8978_info,
  762. },
  763. };
  764. /* FSI-HDMI */
  765. static struct asoc_simple_card_info fsi2_hdmi_info = {
  766. .name = "HDMI",
  767. .card = "FSI2B-HDMI",
  768. .codec = "sh-mobile-hdmi",
  769. .platform = "sh_fsi2",
  770. .cpu_dai = {
  771. .name = "fsib-dai",
  772. .fmt = SND_SOC_DAIFMT_CBM_CFM,
  773. },
  774. .codec_dai = {
  775. .name = "sh_mobile_hdmi-hifi",
  776. },
  777. };
  778. static struct platform_device fsi_hdmi_device = {
  779. .name = "asoc-simple-card",
  780. .id = 1,
  781. .dev = {
  782. .platform_data = &fsi2_hdmi_info,
  783. },
  784. };
  785. /* RTC: RTC connects i2c-gpio. */
  786. static struct i2c_gpio_platform_data i2c_gpio_data = {
  787. .sda_pin = 208,
  788. .scl_pin = 91,
  789. .udelay = 5, /* 100 kHz */
  790. };
  791. static struct platform_device i2c_gpio_device = {
  792. .name = "i2c-gpio",
  793. .id = 2,
  794. .dev = {
  795. .platform_data = &i2c_gpio_data,
  796. },
  797. };
  798. /* I2C */
  799. static struct i2c_board_info i2c0_devices[] = {
  800. {
  801. I2C_BOARD_INFO("st1232-ts", 0x55),
  802. .irq = evt2irq(0x0340),
  803. },
  804. {
  805. I2C_BOARD_INFO("wm8978", 0x1a),
  806. },
  807. };
  808. static struct i2c_board_info i2c2_devices[] = {
  809. {
  810. I2C_BOARD_INFO("s35390a", 0x30),
  811. .type = "s35390a",
  812. },
  813. };
  814. /*
  815. * board devices
  816. */
  817. static struct platform_device *eva_devices[] __initdata = {
  818. &lcdc0_device,
  819. &gpio_keys_device,
  820. &sh_eth_device,
  821. &sdhi0_device,
  822. &sh_mmcif_device,
  823. &hdmi_device,
  824. &hdmi_lcdc_device,
  825. &camera_device,
  826. &ceu0_device,
  827. &fsi_device,
  828. &fsi_wm8978_device,
  829. &fsi_hdmi_device,
  830. &i2c_gpio_device,
  831. };
  832. static const struct pinctrl_map eva_pinctrl_map[] = {
  833. /* LCD0 */
  834. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
  835. "lcd0_data24_0", "lcd0"),
  836. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
  837. "lcd0_lclk_1", "lcd0"),
  838. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
  839. "lcd0_sync", "lcd0"),
  840. };
  841. static void __init eva_clock_init(void)
  842. {
  843. struct clk *system = clk_get(NULL, "system_clk");
  844. struct clk *xtal1 = clk_get(NULL, "extal1");
  845. struct clk *usb24s = clk_get(NULL, "usb24s");
  846. struct clk *fsibck = clk_get(NULL, "fsibck");
  847. if (IS_ERR(system) ||
  848. IS_ERR(xtal1) ||
  849. IS_ERR(usb24s) ||
  850. IS_ERR(fsibck)) {
  851. pr_err("armadillo800eva board clock init failed\n");
  852. goto clock_error;
  853. }
  854. /* armadillo 800 eva extal1 is 24MHz */
  855. clk_set_rate(xtal1, 24000000);
  856. /* usb24s use extal1 (= system) clock (= 24MHz) */
  857. clk_set_parent(usb24s, system);
  858. /* FSIBCK is 12.288MHz, and it is parent of FSI-B */
  859. clk_set_rate(fsibck, 12288000);
  860. clock_error:
  861. if (!IS_ERR(system))
  862. clk_put(system);
  863. if (!IS_ERR(xtal1))
  864. clk_put(xtal1);
  865. if (!IS_ERR(usb24s))
  866. clk_put(usb24s);
  867. if (!IS_ERR(fsibck))
  868. clk_put(fsibck);
  869. }
  870. /*
  871. * board init
  872. */
  873. #define GPIO_PORT7CR IOMEM(0xe6050007)
  874. #define GPIO_PORT8CR IOMEM(0xe6050008)
  875. static void __init eva_init(void)
  876. {
  877. struct platform_device *usb = NULL;
  878. regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
  879. ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
  880. pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map));
  881. r8a7740_pinmux_init();
  882. r8a7740_meram_workaround();
  883. /* SCIFA1 */
  884. gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
  885. gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
  886. /* LCDC0 */
  887. gpio_request(GPIO_FN_LCDC0_SELECT, NULL);
  888. gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
  889. gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
  890. /* Touchscreen */
  891. gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */
  892. gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
  893. /* GETHER */
  894. gpio_request(GPIO_FN_ET_CRS, NULL);
  895. gpio_request(GPIO_FN_ET_MDC, NULL);
  896. gpio_request(GPIO_FN_ET_MDIO, NULL);
  897. gpio_request(GPIO_FN_ET_TX_ER, NULL);
  898. gpio_request(GPIO_FN_ET_RX_ER, NULL);
  899. gpio_request(GPIO_FN_ET_ERXD0, NULL);
  900. gpio_request(GPIO_FN_ET_ERXD1, NULL);
  901. gpio_request(GPIO_FN_ET_ERXD2, NULL);
  902. gpio_request(GPIO_FN_ET_ERXD3, NULL);
  903. gpio_request(GPIO_FN_ET_TX_CLK, NULL);
  904. gpio_request(GPIO_FN_ET_TX_EN, NULL);
  905. gpio_request(GPIO_FN_ET_ETXD0, NULL);
  906. gpio_request(GPIO_FN_ET_ETXD1, NULL);
  907. gpio_request(GPIO_FN_ET_ETXD2, NULL);
  908. gpio_request(GPIO_FN_ET_ETXD3, NULL);
  909. gpio_request(GPIO_FN_ET_PHY_INT, NULL);
  910. gpio_request(GPIO_FN_ET_COL, NULL);
  911. gpio_request(GPIO_FN_ET_RX_DV, NULL);
  912. gpio_request(GPIO_FN_ET_RX_CLK, NULL);
  913. gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
  914. /* USB */
  915. gpio_request_one(159, GPIOF_IN, NULL); /* USB_DEVICE_MODE */
  916. if (gpio_get_value(159)) {
  917. /* USB Host */
  918. } else {
  919. /* USB Func */
  920. /*
  921. * A1 chip has 2 IRQ7 pin and it was controled by MSEL register.
  922. * OTOH, usbhs interrupt needs its value (HI/LOW) to decide
  923. * USB connection/disconnection (usbhsf_get_vbus()).
  924. * This means we needs to select GPIO_FN_IRQ7_PORT209 first,
  925. * and select GPIO 209 here
  926. */
  927. gpio_request(GPIO_FN_IRQ7_PORT209, NULL);
  928. gpio_request_one(209, GPIOF_IN, NULL);
  929. platform_device_register(&usbhsf_device);
  930. usb = &usbhsf_device;
  931. }
  932. /* SDHI0 */
  933. gpio_request(GPIO_FN_SDHI0_CMD, NULL);
  934. gpio_request(GPIO_FN_SDHI0_CLK, NULL);
  935. gpio_request(GPIO_FN_SDHI0_D0, NULL);
  936. gpio_request(GPIO_FN_SDHI0_D1, NULL);
  937. gpio_request(GPIO_FN_SDHI0_D2, NULL);
  938. gpio_request(GPIO_FN_SDHI0_D3, NULL);
  939. gpio_request(GPIO_FN_SDHI0_WP, NULL);
  940. gpio_request_one(17, GPIOF_OUT_INIT_LOW, NULL); /* SDHI0_18/33_B */
  941. gpio_request_one(74, GPIOF_OUT_INIT_HIGH, NULL); /* SDHI0_PON */
  942. gpio_request_one(75, GPIOF_OUT_INIT_HIGH, NULL); /* SDSLOT1_PON */
  943. /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */
  944. /*
  945. * MMCIF
  946. *
  947. * Here doesn't care SW1.4 status,
  948. * since CON2 is not mounted.
  949. */
  950. gpio_request(GPIO_FN_MMC1_CLK_PORT103, NULL);
  951. gpio_request(GPIO_FN_MMC1_CMD_PORT104, NULL);
  952. gpio_request(GPIO_FN_MMC1_D0_PORT149, NULL);
  953. gpio_request(GPIO_FN_MMC1_D1_PORT148, NULL);
  954. gpio_request(GPIO_FN_MMC1_D2_PORT147, NULL);
  955. gpio_request(GPIO_FN_MMC1_D3_PORT146, NULL);
  956. gpio_request(GPIO_FN_MMC1_D4_PORT145, NULL);
  957. gpio_request(GPIO_FN_MMC1_D5_PORT144, NULL);
  958. gpio_request(GPIO_FN_MMC1_D6_PORT143, NULL);
  959. gpio_request(GPIO_FN_MMC1_D7_PORT142, NULL);
  960. /* CEU0 */
  961. gpio_request(GPIO_FN_VIO0_D7, NULL);
  962. gpio_request(GPIO_FN_VIO0_D6, NULL);
  963. gpio_request(GPIO_FN_VIO0_D5, NULL);
  964. gpio_request(GPIO_FN_VIO0_D4, NULL);
  965. gpio_request(GPIO_FN_VIO0_D3, NULL);
  966. gpio_request(GPIO_FN_VIO0_D2, NULL);
  967. gpio_request(GPIO_FN_VIO0_D1, NULL);
  968. gpio_request(GPIO_FN_VIO0_D0, NULL);
  969. gpio_request(GPIO_FN_VIO0_CLK, NULL);
  970. gpio_request(GPIO_FN_VIO0_HD, NULL);
  971. gpio_request(GPIO_FN_VIO0_VD, NULL);
  972. gpio_request(GPIO_FN_VIO0_FIELD, NULL);
  973. gpio_request(GPIO_FN_VIO_CKO, NULL);
  974. /* CON1/CON15 Camera */
  975. gpio_request_one(173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */
  976. gpio_request_one(172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */
  977. /* see mt9t111_power() */
  978. gpio_request_one(158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */
  979. /* FSI-WM8978 */
  980. gpio_request(GPIO_FN_FSIAIBT, NULL);
  981. gpio_request(GPIO_FN_FSIAILR, NULL);
  982. gpio_request(GPIO_FN_FSIAOMC, NULL);
  983. gpio_request(GPIO_FN_FSIAOSLD, NULL);
  984. gpio_request(GPIO_FN_FSIAISLD_PORT5, NULL);
  985. gpio_request(7, NULL);
  986. gpio_request(8, NULL);
  987. gpio_direction_none(GPIO_PORT7CR); /* FSIAOBT needs no direction */
  988. gpio_direction_none(GPIO_PORT8CR); /* FSIAOLR needs no direction */
  989. /* FSI-HDMI */
  990. gpio_request(GPIO_FN_FSIBCK, NULL);
  991. /* HDMI */
  992. gpio_request(GPIO_FN_HDMI_HPD, NULL);
  993. gpio_request(GPIO_FN_HDMI_CEC, NULL);
  994. /*
  995. * CAUTION
  996. *
  997. * DBGMD/LCDC0/FSIA MUX
  998. * DBGMD_SELECT_B should be set after setting PFC Function.
  999. */
  1000. gpio_request_one(176, GPIOF_OUT_INIT_HIGH, NULL);
  1001. /*
  1002. * We can switch CON8/CON14 by SW1.5,
  1003. * but it needs after DBGMD_SELECT_B
  1004. */
  1005. gpio_request_one(6, GPIOF_IN, NULL);
  1006. if (gpio_get_value(6)) {
  1007. /* CON14 enable */
  1008. } else {
  1009. /* CON8 (SDHI1) enable */
  1010. gpio_request(GPIO_FN_SDHI1_CLK, NULL);
  1011. gpio_request(GPIO_FN_SDHI1_CMD, NULL);
  1012. gpio_request(GPIO_FN_SDHI1_D0, NULL);
  1013. gpio_request(GPIO_FN_SDHI1_D1, NULL);
  1014. gpio_request(GPIO_FN_SDHI1_D2, NULL);
  1015. gpio_request(GPIO_FN_SDHI1_D3, NULL);
  1016. gpio_request(GPIO_FN_SDHI1_CD, NULL);
  1017. gpio_request(GPIO_FN_SDHI1_WP, NULL);
  1018. /* SDSLOT2_PON */
  1019. gpio_request_one(16, GPIOF_OUT_INIT_HIGH, NULL);
  1020. platform_device_register(&sdhi1_device);
  1021. }
  1022. #ifdef CONFIG_CACHE_L2X0
  1023. /* Early BRESP enable, Shared attribute override enable, 32K*8way */
  1024. l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
  1025. #endif
  1026. i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
  1027. i2c_register_board_info(2, i2c2_devices, ARRAY_SIZE(i2c2_devices));
  1028. r8a7740_add_standard_devices();
  1029. platform_add_devices(eva_devices,
  1030. ARRAY_SIZE(eva_devices));
  1031. rmobile_add_device_to_domain("A4LC", &lcdc0_device);
  1032. rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
  1033. if (usb)
  1034. rmobile_add_device_to_domain("A3SP", usb);
  1035. r8a7740_pm_init();
  1036. }
  1037. static void __init eva_earlytimer_init(void)
  1038. {
  1039. r8a7740_clock_init(MD_CK0 | MD_CK2);
  1040. shmobile_earlytimer_init();
  1041. /* the rate of extal1 clock must be set before late_time_init */
  1042. eva_clock_init();
  1043. }
  1044. static void __init eva_add_early_devices(void)
  1045. {
  1046. r8a7740_add_early_devices();
  1047. }
  1048. #define RESCNT2 IOMEM(0xe6188020)
  1049. static void eva_restart(char mode, const char *cmd)
  1050. {
  1051. /* Do soft power on reset */
  1052. writel((1 << 31), RESCNT2);
  1053. }
  1054. static const char *eva_boards_compat_dt[] __initdata = {
  1055. "renesas,armadillo800eva",
  1056. NULL,
  1057. };
  1058. DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva")
  1059. .map_io = r8a7740_map_io,
  1060. .init_early = eva_add_early_devices,
  1061. .init_irq = r8a7740_init_irq,
  1062. .handle_irq = shmobile_handle_irq_intc,
  1063. .init_machine = eva_init,
  1064. .init_late = shmobile_init_late,
  1065. .init_time = eva_earlytimer_init,
  1066. .dt_compat = eva_boards_compat_dt,
  1067. .restart = eva_restart,
  1068. MACHINE_END