board-armadillo800eva.c 28 KB

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