board-armadillo800eva.c 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192
  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. static const struct pinctrl_map eva_sdhi1_pinctrl_map[] = {
  602. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
  603. "sdhi1_data4", "sdhi1"),
  604. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
  605. "sdhi1_ctrl", "sdhi1"),
  606. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
  607. "sdhi1_cd", "sdhi1"),
  608. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
  609. "sdhi1_wp", "sdhi1"),
  610. };
  611. /* MMCIF */
  612. static struct sh_mmcif_plat_data sh_mmcif_plat = {
  613. .sup_pclk = 0,
  614. .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
  615. .caps = MMC_CAP_4_BIT_DATA |
  616. MMC_CAP_8_BIT_DATA |
  617. MMC_CAP_NONREMOVABLE,
  618. };
  619. static struct resource sh_mmcif_resources[] = {
  620. [0] = {
  621. .name = "MMCIF",
  622. .start = 0xe6bd0000,
  623. .end = 0xe6bd0100 - 1,
  624. .flags = IORESOURCE_MEM,
  625. },
  626. [1] = {
  627. /* MMC ERR */
  628. .start = evt2irq(0x1AC0),
  629. .flags = IORESOURCE_IRQ,
  630. },
  631. [2] = {
  632. /* MMC NOR */
  633. .start = evt2irq(0x1AE0),
  634. .flags = IORESOURCE_IRQ,
  635. },
  636. };
  637. static struct platform_device sh_mmcif_device = {
  638. .name = "sh_mmcif",
  639. .id = -1,
  640. .dev = {
  641. .platform_data = &sh_mmcif_plat,
  642. },
  643. .num_resources = ARRAY_SIZE(sh_mmcif_resources),
  644. .resource = sh_mmcif_resources,
  645. };
  646. /* Camera */
  647. static int mt9t111_power(struct device *dev, int mode)
  648. {
  649. struct clk *mclk = clk_get(NULL, "video1");
  650. if (IS_ERR(mclk)) {
  651. dev_err(dev, "can't get video1 clock\n");
  652. return -EINVAL;
  653. }
  654. if (mode) {
  655. /* video1 (= CON1 camera) expect 24MHz */
  656. clk_set_rate(mclk, clk_round_rate(mclk, 24000000));
  657. clk_enable(mclk);
  658. gpio_set_value(158, 1);
  659. } else {
  660. gpio_set_value(158, 0);
  661. clk_disable(mclk);
  662. }
  663. clk_put(mclk);
  664. return 0;
  665. }
  666. static struct i2c_board_info i2c_camera_mt9t111 = {
  667. I2C_BOARD_INFO("mt9t112", 0x3d),
  668. };
  669. static struct mt9t112_camera_info mt9t111_info = {
  670. .divider = { 16, 0, 0, 7, 0, 10, 14, 7, 7 },
  671. };
  672. static struct soc_camera_link mt9t111_link = {
  673. .i2c_adapter_id = 0,
  674. .bus_id = 0,
  675. .board_info = &i2c_camera_mt9t111,
  676. .power = mt9t111_power,
  677. .priv = &mt9t111_info,
  678. };
  679. static struct platform_device camera_device = {
  680. .name = "soc-camera-pdrv",
  681. .id = 0,
  682. .dev = {
  683. .platform_data = &mt9t111_link,
  684. },
  685. };
  686. /* CEU0 */
  687. static struct sh_mobile_ceu_info sh_mobile_ceu0_info = {
  688. .flags = SH_CEU_FLAG_LOWER_8BIT,
  689. };
  690. static struct resource ceu0_resources[] = {
  691. [0] = {
  692. .name = "CEU",
  693. .start = 0xfe910000,
  694. .end = 0xfe91009f,
  695. .flags = IORESOURCE_MEM,
  696. },
  697. [1] = {
  698. .start = intcs_evt2irq(0x0500),
  699. .flags = IORESOURCE_IRQ,
  700. },
  701. [2] = {
  702. /* place holder for contiguous memory */
  703. },
  704. };
  705. static struct platform_device ceu0_device = {
  706. .name = "sh_mobile_ceu",
  707. .id = 0,
  708. .num_resources = ARRAY_SIZE(ceu0_resources),
  709. .resource = ceu0_resources,
  710. .dev = {
  711. .platform_data = &sh_mobile_ceu0_info,
  712. .coherent_dma_mask = 0xffffffff,
  713. },
  714. };
  715. /* FSI */
  716. static struct sh_fsi_platform_info fsi_info = {
  717. /* FSI-WM8978 */
  718. .port_a = {
  719. .tx_id = SHDMA_SLAVE_FSIA_TX,
  720. },
  721. /* FSI-HDMI */
  722. .port_b = {
  723. .flags = SH_FSI_FMT_SPDIF |
  724. SH_FSI_ENABLE_STREAM_MODE |
  725. SH_FSI_CLK_CPG,
  726. .tx_id = SHDMA_SLAVE_FSIB_TX,
  727. }
  728. };
  729. static struct resource fsi_resources[] = {
  730. [0] = {
  731. .name = "FSI",
  732. .start = 0xfe1f0000,
  733. .end = 0xfe1f8400 - 1,
  734. .flags = IORESOURCE_MEM,
  735. },
  736. [1] = {
  737. .start = evt2irq(0x1840),
  738. .flags = IORESOURCE_IRQ,
  739. },
  740. };
  741. static struct platform_device fsi_device = {
  742. .name = "sh_fsi2",
  743. .id = -1,
  744. .num_resources = ARRAY_SIZE(fsi_resources),
  745. .resource = fsi_resources,
  746. .dev = {
  747. .platform_data = &fsi_info,
  748. },
  749. };
  750. /* FSI-WM8978 */
  751. static struct asoc_simple_card_info fsi_wm8978_info = {
  752. .name = "wm8978",
  753. .card = "FSI2A-WM8978",
  754. .codec = "wm8978.0-001a",
  755. .platform = "sh_fsi2",
  756. .daifmt = SND_SOC_DAIFMT_I2S,
  757. .cpu_dai = {
  758. .name = "fsia-dai",
  759. .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
  760. },
  761. .codec_dai = {
  762. .name = "wm8978-hifi",
  763. .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
  764. .sysclk = 12288000,
  765. },
  766. };
  767. static struct platform_device fsi_wm8978_device = {
  768. .name = "asoc-simple-card",
  769. .id = 0,
  770. .dev = {
  771. .platform_data = &fsi_wm8978_info,
  772. },
  773. };
  774. /* FSI-HDMI */
  775. static struct asoc_simple_card_info fsi2_hdmi_info = {
  776. .name = "HDMI",
  777. .card = "FSI2B-HDMI",
  778. .codec = "sh-mobile-hdmi",
  779. .platform = "sh_fsi2",
  780. .cpu_dai = {
  781. .name = "fsib-dai",
  782. .fmt = SND_SOC_DAIFMT_CBM_CFM,
  783. },
  784. .codec_dai = {
  785. .name = "sh_mobile_hdmi-hifi",
  786. },
  787. };
  788. static struct platform_device fsi_hdmi_device = {
  789. .name = "asoc-simple-card",
  790. .id = 1,
  791. .dev = {
  792. .platform_data = &fsi2_hdmi_info,
  793. },
  794. };
  795. /* RTC: RTC connects i2c-gpio. */
  796. static struct i2c_gpio_platform_data i2c_gpio_data = {
  797. .sda_pin = 208,
  798. .scl_pin = 91,
  799. .udelay = 5, /* 100 kHz */
  800. };
  801. static struct platform_device i2c_gpio_device = {
  802. .name = "i2c-gpio",
  803. .id = 2,
  804. .dev = {
  805. .platform_data = &i2c_gpio_data,
  806. },
  807. };
  808. /* I2C */
  809. static struct i2c_board_info i2c0_devices[] = {
  810. {
  811. I2C_BOARD_INFO("st1232-ts", 0x55),
  812. .irq = evt2irq(0x0340),
  813. },
  814. {
  815. I2C_BOARD_INFO("wm8978", 0x1a),
  816. },
  817. };
  818. static struct i2c_board_info i2c2_devices[] = {
  819. {
  820. I2C_BOARD_INFO("s35390a", 0x30),
  821. .type = "s35390a",
  822. },
  823. };
  824. /*
  825. * board devices
  826. */
  827. static struct platform_device *eva_devices[] __initdata = {
  828. &lcdc0_device,
  829. &gpio_keys_device,
  830. &sh_eth_device,
  831. &sdhi0_device,
  832. &sh_mmcif_device,
  833. &hdmi_device,
  834. &hdmi_lcdc_device,
  835. &camera_device,
  836. &ceu0_device,
  837. &fsi_device,
  838. &fsi_wm8978_device,
  839. &fsi_hdmi_device,
  840. &i2c_gpio_device,
  841. };
  842. static const struct pinctrl_map eva_pinctrl_map[] = {
  843. /* LCD0 */
  844. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
  845. "lcd0_data24_0", "lcd0"),
  846. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
  847. "lcd0_lclk_1", "lcd0"),
  848. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
  849. "lcd0_sync", "lcd0"),
  850. /* MMCIF */
  851. PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a7740",
  852. "mmc0_data8_1", "mmc0"),
  853. PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a7740",
  854. "mmc0_ctrl_1", "mmc0"),
  855. /* SDHI0 */
  856. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740",
  857. "sdhi0_data4", "sdhi0"),
  858. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740",
  859. "sdhi0_ctrl", "sdhi0"),
  860. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740",
  861. "sdhi0_wp", "sdhi0"),
  862. };
  863. static void __init eva_clock_init(void)
  864. {
  865. struct clk *system = clk_get(NULL, "system_clk");
  866. struct clk *xtal1 = clk_get(NULL, "extal1");
  867. struct clk *usb24s = clk_get(NULL, "usb24s");
  868. struct clk *fsibck = clk_get(NULL, "fsibck");
  869. if (IS_ERR(system) ||
  870. IS_ERR(xtal1) ||
  871. IS_ERR(usb24s) ||
  872. IS_ERR(fsibck)) {
  873. pr_err("armadillo800eva board clock init failed\n");
  874. goto clock_error;
  875. }
  876. /* armadillo 800 eva extal1 is 24MHz */
  877. clk_set_rate(xtal1, 24000000);
  878. /* usb24s use extal1 (= system) clock (= 24MHz) */
  879. clk_set_parent(usb24s, system);
  880. /* FSIBCK is 12.288MHz, and it is parent of FSI-B */
  881. clk_set_rate(fsibck, 12288000);
  882. clock_error:
  883. if (!IS_ERR(system))
  884. clk_put(system);
  885. if (!IS_ERR(xtal1))
  886. clk_put(xtal1);
  887. if (!IS_ERR(usb24s))
  888. clk_put(usb24s);
  889. if (!IS_ERR(fsibck))
  890. clk_put(fsibck);
  891. }
  892. /*
  893. * board init
  894. */
  895. #define GPIO_PORT7CR IOMEM(0xe6050007)
  896. #define GPIO_PORT8CR IOMEM(0xe6050008)
  897. static void __init eva_init(void)
  898. {
  899. struct platform_device *usb = NULL;
  900. regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
  901. ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
  902. pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map));
  903. r8a7740_pinmux_init();
  904. r8a7740_meram_workaround();
  905. /* SCIFA1 */
  906. gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
  907. gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
  908. /* LCDC0 */
  909. gpio_request(GPIO_FN_LCDC0_SELECT, NULL);
  910. gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
  911. gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
  912. /* Touchscreen */
  913. gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */
  914. gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
  915. /* GETHER */
  916. gpio_request(GPIO_FN_ET_CRS, NULL);
  917. gpio_request(GPIO_FN_ET_MDC, NULL);
  918. gpio_request(GPIO_FN_ET_MDIO, NULL);
  919. gpio_request(GPIO_FN_ET_TX_ER, NULL);
  920. gpio_request(GPIO_FN_ET_RX_ER, NULL);
  921. gpio_request(GPIO_FN_ET_ERXD0, NULL);
  922. gpio_request(GPIO_FN_ET_ERXD1, NULL);
  923. gpio_request(GPIO_FN_ET_ERXD2, NULL);
  924. gpio_request(GPIO_FN_ET_ERXD3, NULL);
  925. gpio_request(GPIO_FN_ET_TX_CLK, NULL);
  926. gpio_request(GPIO_FN_ET_TX_EN, NULL);
  927. gpio_request(GPIO_FN_ET_ETXD0, NULL);
  928. gpio_request(GPIO_FN_ET_ETXD1, NULL);
  929. gpio_request(GPIO_FN_ET_ETXD2, NULL);
  930. gpio_request(GPIO_FN_ET_ETXD3, NULL);
  931. gpio_request(GPIO_FN_ET_PHY_INT, NULL);
  932. gpio_request(GPIO_FN_ET_COL, NULL);
  933. gpio_request(GPIO_FN_ET_RX_DV, NULL);
  934. gpio_request(GPIO_FN_ET_RX_CLK, NULL);
  935. gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
  936. /* USB */
  937. gpio_request_one(159, GPIOF_IN, NULL); /* USB_DEVICE_MODE */
  938. if (gpio_get_value(159)) {
  939. /* USB Host */
  940. } else {
  941. /* USB Func */
  942. /*
  943. * A1 chip has 2 IRQ7 pin and it was controled by MSEL register.
  944. * OTOH, usbhs interrupt needs its value (HI/LOW) to decide
  945. * USB connection/disconnection (usbhsf_get_vbus()).
  946. * This means we needs to select GPIO_FN_IRQ7_PORT209 first,
  947. * and select GPIO 209 here
  948. */
  949. gpio_request(GPIO_FN_IRQ7_PORT209, NULL);
  950. gpio_request_one(209, GPIOF_IN, NULL);
  951. platform_device_register(&usbhsf_device);
  952. usb = &usbhsf_device;
  953. }
  954. /* SDHI0 */
  955. gpio_request_one(17, GPIOF_OUT_INIT_LOW, NULL); /* SDHI0_18/33_B */
  956. gpio_request_one(74, GPIOF_OUT_INIT_HIGH, NULL); /* SDHI0_PON */
  957. gpio_request_one(75, GPIOF_OUT_INIT_HIGH, NULL); /* SDSLOT1_PON */
  958. /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */
  959. /* CEU0 */
  960. gpio_request(GPIO_FN_VIO0_D7, NULL);
  961. gpio_request(GPIO_FN_VIO0_D6, NULL);
  962. gpio_request(GPIO_FN_VIO0_D5, NULL);
  963. gpio_request(GPIO_FN_VIO0_D4, NULL);
  964. gpio_request(GPIO_FN_VIO0_D3, NULL);
  965. gpio_request(GPIO_FN_VIO0_D2, NULL);
  966. gpio_request(GPIO_FN_VIO0_D1, NULL);
  967. gpio_request(GPIO_FN_VIO0_D0, NULL);
  968. gpio_request(GPIO_FN_VIO0_CLK, NULL);
  969. gpio_request(GPIO_FN_VIO0_HD, NULL);
  970. gpio_request(GPIO_FN_VIO0_VD, NULL);
  971. gpio_request(GPIO_FN_VIO0_FIELD, NULL);
  972. gpio_request(GPIO_FN_VIO_CKO, NULL);
  973. /* CON1/CON15 Camera */
  974. gpio_request_one(173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */
  975. gpio_request_one(172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */
  976. /* see mt9t111_power() */
  977. gpio_request_one(158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */
  978. /* FSI-WM8978 */
  979. gpio_request(GPIO_FN_FSIAIBT, NULL);
  980. gpio_request(GPIO_FN_FSIAILR, NULL);
  981. gpio_request(GPIO_FN_FSIAOMC, NULL);
  982. gpio_request(GPIO_FN_FSIAOSLD, NULL);
  983. gpio_request(GPIO_FN_FSIAISLD_PORT5, NULL);
  984. gpio_request(7, NULL);
  985. gpio_request(8, NULL);
  986. gpio_direction_none(GPIO_PORT7CR); /* FSIAOBT needs no direction */
  987. gpio_direction_none(GPIO_PORT8CR); /* FSIAOLR needs no direction */
  988. /* FSI-HDMI */
  989. gpio_request(GPIO_FN_FSIBCK, NULL);
  990. /* HDMI */
  991. gpio_request(GPIO_FN_HDMI_HPD, NULL);
  992. gpio_request(GPIO_FN_HDMI_CEC, NULL);
  993. /*
  994. * CAUTION
  995. *
  996. * DBGMD/LCDC0/FSIA MUX
  997. * DBGMD_SELECT_B should be set after setting PFC Function.
  998. */
  999. gpio_request_one(176, GPIOF_OUT_INIT_HIGH, NULL);
  1000. /*
  1001. * We can switch CON8/CON14 by SW1.5,
  1002. * but it needs after DBGMD_SELECT_B
  1003. */
  1004. gpio_request_one(6, GPIOF_IN, NULL);
  1005. if (gpio_get_value(6)) {
  1006. /* CON14 enable */
  1007. } else {
  1008. /* CON8 (SDHI1) enable */
  1009. pinctrl_register_mappings(eva_sdhi1_pinctrl_map,
  1010. ARRAY_SIZE(eva_sdhi1_pinctrl_map));
  1011. /* SDSLOT2_PON */
  1012. gpio_request_one(16, GPIOF_OUT_INIT_HIGH, NULL);
  1013. platform_device_register(&sdhi1_device);
  1014. }
  1015. #ifdef CONFIG_CACHE_L2X0
  1016. /* Early BRESP enable, Shared attribute override enable, 32K*8way */
  1017. l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
  1018. #endif
  1019. i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
  1020. i2c_register_board_info(2, i2c2_devices, ARRAY_SIZE(i2c2_devices));
  1021. r8a7740_add_standard_devices();
  1022. platform_add_devices(eva_devices,
  1023. ARRAY_SIZE(eva_devices));
  1024. rmobile_add_device_to_domain("A4LC", &lcdc0_device);
  1025. rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
  1026. if (usb)
  1027. rmobile_add_device_to_domain("A3SP", usb);
  1028. r8a7740_pm_init();
  1029. }
  1030. static void __init eva_earlytimer_init(void)
  1031. {
  1032. r8a7740_clock_init(MD_CK0 | MD_CK2);
  1033. shmobile_earlytimer_init();
  1034. /* the rate of extal1 clock must be set before late_time_init */
  1035. eva_clock_init();
  1036. }
  1037. static void __init eva_add_early_devices(void)
  1038. {
  1039. r8a7740_add_early_devices();
  1040. }
  1041. #define RESCNT2 IOMEM(0xe6188020)
  1042. static void eva_restart(char mode, const char *cmd)
  1043. {
  1044. /* Do soft power on reset */
  1045. writel((1 << 31), RESCNT2);
  1046. }
  1047. static const char *eva_boards_compat_dt[] __initdata = {
  1048. "renesas,armadillo800eva",
  1049. NULL,
  1050. };
  1051. DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva")
  1052. .map_io = r8a7740_map_io,
  1053. .init_early = eva_add_early_devices,
  1054. .init_irq = r8a7740_init_irq,
  1055. .handle_irq = shmobile_handle_irq_intc,
  1056. .init_machine = eva_init,
  1057. .init_late = shmobile_init_late,
  1058. .init_time = eva_earlytimer_init,
  1059. .dt_compat = eva_boards_compat_dt,
  1060. .restart = eva_restart,
  1061. MACHINE_END