2 * KZM-A9-GT board support
4 * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <linux/delay.h>
21 #include <linux/gpio.h>
22 #include <linux/gpio_keys.h>
24 #include <linux/irq.h>
25 #include <linux/i2c.h>
26 #include <linux/i2c/pcf857x.h>
27 #include <linux/input.h>
28 #include <linux/irqchip/arm-gic.h>
29 #include <linux/mmc/host.h>
30 #include <linux/mmc/sh_mmcif.h>
31 #include <linux/mmc/sh_mobile_sdhi.h>
32 #include <linux/mfd/tmio.h>
33 #include <linux/platform_device.h>
34 #include <linux/regulator/fixed.h>
35 #include <linux/regulator/machine.h>
36 #include <linux/smsc911x.h>
37 #include <linux/usb/r8a66597.h>
38 #include <linux/usb/renesas_usbhs.h>
39 #include <linux/videodev2.h>
40 #include <sound/sh_fsi.h>
41 #include <sound/simple_card.h>
42 #include <mach/irqs.h>
43 #include <mach/sh73a0.h>
44 #include <mach/common.h>
45 #include <asm/hardware/cache-l2x0.h>
46 #include <asm/mach-types.h>
47 #include <asm/mach/arch.h>
48 #include <video/sh_mobile_lcdc.h>
53 #define GPIO_PCF8575_BASE (GPIO_NR)
54 #define GPIO_PCF8575_PORT10 (GPIO_NR + 8)
55 #define GPIO_PCF8575_PORT11 (GPIO_NR + 9)
56 #define GPIO_PCF8575_PORT12 (GPIO_NR + 10)
57 #define GPIO_PCF8575_PORT13 (GPIO_NR + 11)
58 #define GPIO_PCF8575_PORT14 (GPIO_NR + 12)
59 #define GPIO_PCF8575_PORT15 (GPIO_NR + 13)
60 #define GPIO_PCF8575_PORT16 (GPIO_NR + 14)
62 /* Dummy supplies, where voltage doesn't matter */
63 static struct regulator_consumer_supply dummy_supplies[] = {
64 REGULATOR_SUPPLY("vddvario", "smsc911x"),
65 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
71 * this command is required when playback.
73 * # amixer set "LINEOUT Mixer DACL" on
77 static struct resource smsc9221_resources[] = {
79 .start = 0x10000000, /* CS4 */
81 .flags = IORESOURCE_MEM,
84 .start = intcs_evt2irq(0x260), /* IRQ3 */
85 .flags = IORESOURCE_IRQ,
89 static struct smsc911x_platform_config smsc9221_platdata = {
90 .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
91 .phy_interface = PHY_INTERFACE_MODE_MII,
92 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
93 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
96 static struct platform_device smsc_device = {
99 .platform_data = &smsc9221_platdata,
101 .resource = smsc9221_resources,
102 .num_resources = ARRAY_SIZE(smsc9221_resources),
105 /* USB external chip */
106 static struct r8a66597_platdata usb_host_data = {
108 .xtal = R8A66597_PLATDATA_XTAL_48MHZ,
111 static struct resource usb_resources[] = {
114 .end = 0x1001ffff - 1,
115 .flags = IORESOURCE_MEM,
118 .start = intcs_evt2irq(0x220), /* IRQ1 */
119 .flags = IORESOURCE_IRQ,
123 static struct platform_device usb_host_device = {
124 .name = "r8a66597_hcd",
126 .platform_data = &usb_host_data,
128 .coherent_dma_mask = 0xffffffff,
130 .num_resources = ARRAY_SIZE(usb_resources),
131 .resource = usb_resources,
135 struct usbhs_private {
138 struct renesas_usbhs_platform_info info;
141 #define IRQ15 intcs_evt2irq(0x03e0)
142 #define USB_PHY_MODE (1 << 4)
143 #define USB_PHY_INT_EN ((1 << 3) | (1 << 2))
144 #define USB_PHY_ON (1 << 1)
145 #define USB_PHY_OFF (1 << 0)
146 #define USB_PHY_INT_CLR (USB_PHY_ON | USB_PHY_OFF)
148 #define usbhs_get_priv(pdev) \
149 container_of(renesas_usbhs_get_info(pdev), struct usbhs_private, info)
151 static int usbhs_get_vbus(struct platform_device *pdev)
153 struct usbhs_private *priv = usbhs_get_priv(pdev);
155 return !((1 << 7) & __raw_readw(priv->cr2));
158 static void usbhs_phy_reset(struct platform_device *pdev)
160 struct usbhs_private *priv = usbhs_get_priv(pdev);
163 __raw_writew(0x8a0a, priv->cr2);
166 static int usbhs_get_id(struct platform_device *pdev)
171 static irqreturn_t usbhs_interrupt(int irq, void *data)
173 struct platform_device *pdev = data;
174 struct usbhs_private *priv = usbhs_get_priv(pdev);
176 renesas_usbhs_call_notify_hotplug(pdev);
179 __raw_writew(__raw_readw(priv->phy) | USB_PHY_INT_CLR, priv->phy);
184 static int usbhs_hardware_init(struct platform_device *pdev)
186 struct usbhs_private *priv = usbhs_get_priv(pdev);
189 /* clear interrupt status */
190 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy);
192 ret = request_irq(IRQ15, usbhs_interrupt, IRQF_TRIGGER_HIGH,
193 dev_name(&pdev->dev), pdev);
195 dev_err(&pdev->dev, "request_irq err\n");
199 /* enable USB phy interrupt */
200 __raw_writew(USB_PHY_MODE | USB_PHY_INT_EN, priv->phy);
205 static void usbhs_hardware_exit(struct platform_device *pdev)
207 struct usbhs_private *priv = usbhs_get_priv(pdev);
209 /* clear interrupt status */
210 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy);
212 free_irq(IRQ15, pdev);
215 static u32 usbhs_pipe_cfg[] = {
216 USB_ENDPOINT_XFER_CONTROL,
217 USB_ENDPOINT_XFER_ISOC,
218 USB_ENDPOINT_XFER_ISOC,
219 USB_ENDPOINT_XFER_BULK,
220 USB_ENDPOINT_XFER_BULK,
221 USB_ENDPOINT_XFER_BULK,
222 USB_ENDPOINT_XFER_INT,
223 USB_ENDPOINT_XFER_INT,
224 USB_ENDPOINT_XFER_INT,
225 USB_ENDPOINT_XFER_BULK,
226 USB_ENDPOINT_XFER_BULK,
227 USB_ENDPOINT_XFER_BULK,
228 USB_ENDPOINT_XFER_BULK,
229 USB_ENDPOINT_XFER_BULK,
230 USB_ENDPOINT_XFER_BULK,
231 USB_ENDPOINT_XFER_BULK,
234 static struct usbhs_private usbhs_private = {
235 .phy = IOMEM(0xe60781e0), /* USBPHYINT */
236 .cr2 = IOMEM(0xe605810c), /* USBCR2 */
238 .platform_callback = {
239 .hardware_init = usbhs_hardware_init,
240 .hardware_exit = usbhs_hardware_exit,
241 .get_id = usbhs_get_id,
242 .phy_reset = usbhs_phy_reset,
243 .get_vbus = usbhs_get_vbus,
248 .pipe_type = usbhs_pipe_cfg,
249 .pipe_size = ARRAY_SIZE(usbhs_pipe_cfg),
254 static struct resource usbhs_resources[] = {
257 .end = 0xE68900e6 - 1,
258 .flags = IORESOURCE_MEM,
261 .start = gic_spi(62),
263 .flags = IORESOURCE_IRQ,
267 static struct platform_device usbhs_device = {
268 .name = "renesas_usbhs",
272 .coherent_dma_mask = 0xffffffff,
273 .platform_data = &usbhs_private.info,
275 .num_resources = ARRAY_SIZE(usbhs_resources),
276 .resource = usbhs_resources,
280 static struct fb_videomode kzm_lcdc_mode = {
281 .name = "WVGA Panel",
293 static struct sh_mobile_lcdc_info lcdc_info = {
294 .clock_source = LCDC_CLK_BUS,
296 .chan = LCDC_CHAN_MAINLCD,
297 .fourcc = V4L2_PIX_FMT_RGB565,
298 .interface_type = RGB24,
299 .lcd_modes = &kzm_lcdc_mode,
310 static struct resource lcdc_resources[] = {
315 .flags = IORESOURCE_MEM,
318 .start = intcs_evt2irq(0x580),
319 .flags = IORESOURCE_IRQ,
323 static struct platform_device lcdc_device = {
324 .name = "sh_mobile_lcdc_fb",
325 .num_resources = ARRAY_SIZE(lcdc_resources),
326 .resource = lcdc_resources,
328 .platform_data = &lcdc_info,
329 .coherent_dma_mask = ~0,
333 /* Fixed 1.8V regulator to be used by MMCIF */
334 static struct regulator_consumer_supply fixed1v8_power_consumers[] =
336 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
337 REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
341 static struct resource sh_mmcif_resources[] = {
346 .flags = IORESOURCE_MEM,
349 .start = gic_spi(140),
350 .flags = IORESOURCE_IRQ,
353 .start = gic_spi(141),
354 .flags = IORESOURCE_IRQ,
358 static struct sh_mmcif_plat_data sh_mmcif_platdata = {
359 .ocr = MMC_VDD_165_195,
360 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
361 .slave_id_tx = SHDMA_SLAVE_MMCIF_TX,
362 .slave_id_rx = SHDMA_SLAVE_MMCIF_RX,
365 static struct platform_device mmc_device = {
369 .coherent_dma_mask = 0xffffffff,
370 .platform_data = &sh_mmcif_platdata,
372 .num_resources = ARRAY_SIZE(sh_mmcif_resources),
373 .resource = sh_mmcif_resources,
376 /* Fixed 2.8V regulators to be used by SDHI0 and SDHI2 */
377 static struct regulator_consumer_supply fixed2v8_power_consumers[] =
379 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
380 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
381 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.2"),
382 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.2"),
386 static struct sh_mobile_sdhi_info sdhi0_info = {
387 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
388 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
389 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
390 .tmio_caps = MMC_CAP_SD_HIGHSPEED,
391 .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
394 static struct resource sdhi0_resources[] = {
399 .flags = IORESOURCE_MEM,
402 .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
403 .start = gic_spi(83),
404 .flags = IORESOURCE_IRQ,
407 .name = SH_MOBILE_SDHI_IRQ_SDCARD,
408 .start = gic_spi(84),
409 .flags = IORESOURCE_IRQ,
412 .name = SH_MOBILE_SDHI_IRQ_SDIO,
413 .start = gic_spi(85),
414 .flags = IORESOURCE_IRQ,
418 static struct platform_device sdhi0_device = {
419 .name = "sh_mobile_sdhi",
420 .num_resources = ARRAY_SIZE(sdhi0_resources),
421 .resource = sdhi0_resources,
423 .platform_data = &sdhi0_info,
428 static struct sh_mobile_sdhi_info sdhi2_info = {
429 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
430 .dma_slave_rx = SHDMA_SLAVE_SDHI2_RX,
431 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
432 TMIO_MMC_USE_GPIO_CD |
433 TMIO_MMC_WRPROTECT_DISABLE,
434 .tmio_caps = MMC_CAP_SD_HIGHSPEED,
435 .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
436 .cd_gpio = GPIO_PORT13,
439 static struct resource sdhi2_resources[] = {
444 .flags = IORESOURCE_MEM,
447 .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
448 .start = gic_spi(103),
449 .flags = IORESOURCE_IRQ,
452 .name = SH_MOBILE_SDHI_IRQ_SDCARD,
453 .start = gic_spi(104),
454 .flags = IORESOURCE_IRQ,
457 .name = SH_MOBILE_SDHI_IRQ_SDIO,
458 .start = gic_spi(105),
459 .flags = IORESOURCE_IRQ,
463 static struct platform_device sdhi2_device = {
464 .name = "sh_mobile_sdhi",
466 .num_resources = ARRAY_SIZE(sdhi2_resources),
467 .resource = sdhi2_resources,
469 .platform_data = &sdhi2_info,
474 #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 }
476 static struct gpio_keys_button gpio_buttons[] = {
477 GPIO_KEY(KEY_BACK, GPIO_PCF8575_PORT10, "SW3"),
478 GPIO_KEY(KEY_RIGHT, GPIO_PCF8575_PORT11, "SW2-R"),
479 GPIO_KEY(KEY_LEFT, GPIO_PCF8575_PORT12, "SW2-L"),
480 GPIO_KEY(KEY_ENTER, GPIO_PCF8575_PORT13, "SW2-P"),
481 GPIO_KEY(KEY_UP, GPIO_PCF8575_PORT14, "SW2-U"),
482 GPIO_KEY(KEY_DOWN, GPIO_PCF8575_PORT15, "SW2-D"),
483 GPIO_KEY(KEY_HOME, GPIO_PCF8575_PORT16, "SW1"),
486 static struct gpio_keys_platform_data gpio_key_info = {
487 .buttons = gpio_buttons,
488 .nbuttons = ARRAY_SIZE(gpio_buttons),
491 static struct platform_device gpio_keys_device = {
494 .platform_data = &gpio_key_info,
499 static struct sh_fsi_platform_info fsi_info = {
501 .tx_id = SHDMA_SLAVE_FSI2A_TX,
505 static struct resource fsi_resources[] = {
509 .end = 0xEC230400 - 1,
510 .flags = IORESOURCE_MEM,
513 .start = gic_spi(146),
514 .flags = IORESOURCE_IRQ,
518 static struct platform_device fsi_device = {
521 .num_resources = ARRAY_SIZE(fsi_resources),
522 .resource = fsi_resources,
524 .platform_data = &fsi_info,
528 static struct asoc_simple_card_info fsi2_ak4648_info = {
530 .card = "FSI2A-AK4648",
531 .codec = "ak4642-codec.0-0012",
532 .platform = "sh_fsi2",
533 .daifmt = SND_SOC_DAIFMT_LEFT_J,
536 .fmt = SND_SOC_DAIFMT_CBS_CFS,
539 .name = "ak4642-hifi",
540 .fmt = SND_SOC_DAIFMT_CBM_CFM,
545 static struct platform_device fsi_ak4648_device = {
546 .name = "asoc-simple-card",
548 .platform_data = &fsi2_ak4648_info,
553 static struct pcf857x_platform_data pcf8575_pdata = {
554 .gpio_base = GPIO_PCF8575_BASE,
557 static struct i2c_board_info i2c0_devices[] = {
559 I2C_BOARD_INFO("ak4648", 0x12),
562 I2C_BOARD_INFO("r2025sd", 0x32),
565 I2C_BOARD_INFO("ak8975", 0x0c),
566 .irq = intcs_evt2irq(0x3380), /* IRQ28 */
569 I2C_BOARD_INFO("adxl34x", 0x1d),
570 .irq = intcs_evt2irq(0x3340), /* IRQ26 */
574 static struct i2c_board_info i2c1_devices[] = {
576 I2C_BOARD_INFO("st1232-ts", 0x55),
577 .irq = intcs_evt2irq(0x300), /* IRQ8 */
581 static struct i2c_board_info i2c3_devices[] = {
583 I2C_BOARD_INFO("pcf8575", 0x20),
584 .irq = intcs_evt2irq(0x3260), /* IRQ19 */
585 .platform_data = &pcf8575_pdata,
589 static struct platform_device *kzm_devices[] __initdata = {
605 * This is quick hack for enabling LCDC backlight
607 static int __init as3711_enable_lcdc_backlight(void)
609 struct i2c_adapter *a = i2c_get_adapter(0);
620 0xff, 0x00, /* wait */
626 if (!of_machine_is_compatible("renesas,kzm9g"))
636 for (i = 0; i < ARRAY_SIZE(magic); i += 2) {
639 if (0xff == msg.buf[0]) {
644 ret = i2c_transfer(a, &msg, 1);
646 pr_err("i2c transfer fail\n");
653 device_initcall(as3711_enable_lcdc_backlight);
655 static void __init kzm_init(void)
657 regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
658 ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
659 regulator_register_always_on(1, "fixed-2.8V", fixed2v8_power_consumers,
660 ARRAY_SIZE(fixed2v8_power_consumers), 2800000);
661 regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
663 sh73a0_pinmux_init();
666 gpio_request(GPIO_FN_SCIFA4_TXD, NULL);
667 gpio_request(GPIO_FN_SCIFA4_RXD, NULL);
668 gpio_request(GPIO_FN_SCIFA4_RTS_, NULL);
669 gpio_request(GPIO_FN_SCIFA4_CTS_, NULL);
671 /* CS4 for SMSC/USB */
672 gpio_request(GPIO_FN_CS4_, NULL); /* CS4 */
675 gpio_request_one(GPIO_PORT224, GPIOF_IN, NULL); /* IRQ3 */
678 gpio_request(GPIO_FN_LCDD23, NULL);
679 gpio_request(GPIO_FN_LCDD22, NULL);
680 gpio_request(GPIO_FN_LCDD21, NULL);
681 gpio_request(GPIO_FN_LCDD20, NULL);
682 gpio_request(GPIO_FN_LCDD19, NULL);
683 gpio_request(GPIO_FN_LCDD18, NULL);
684 gpio_request(GPIO_FN_LCDD17, NULL);
685 gpio_request(GPIO_FN_LCDD16, NULL);
686 gpio_request(GPIO_FN_LCDD15, NULL);
687 gpio_request(GPIO_FN_LCDD14, NULL);
688 gpio_request(GPIO_FN_LCDD13, NULL);
689 gpio_request(GPIO_FN_LCDD12, NULL);
690 gpio_request(GPIO_FN_LCDD11, NULL);
691 gpio_request(GPIO_FN_LCDD10, NULL);
692 gpio_request(GPIO_FN_LCDD9, NULL);
693 gpio_request(GPIO_FN_LCDD8, NULL);
694 gpio_request(GPIO_FN_LCDD7, NULL);
695 gpio_request(GPIO_FN_LCDD6, NULL);
696 gpio_request(GPIO_FN_LCDD5, NULL);
697 gpio_request(GPIO_FN_LCDD4, NULL);
698 gpio_request(GPIO_FN_LCDD3, NULL);
699 gpio_request(GPIO_FN_LCDD2, NULL);
700 gpio_request(GPIO_FN_LCDD1, NULL);
701 gpio_request(GPIO_FN_LCDD0, NULL);
702 gpio_request(GPIO_FN_LCDDISP, NULL);
703 gpio_request(GPIO_FN_LCDDCK, NULL);
705 gpio_request_one(GPIO_PORT222, GPIOF_OUT_INIT_HIGH, NULL); /* LCDCDON */
706 gpio_request_one(GPIO_PORT226, GPIOF_OUT_INIT_HIGH, NULL); /* SC */
709 gpio_request_one(GPIO_PORT223, GPIOF_IN, NULL); /* IRQ8 */
712 gpio_request(GPIO_FN_MMCCLK0, NULL);
713 gpio_request(GPIO_FN_MMCCMD0_PU, NULL);
714 gpio_request(GPIO_FN_MMCD0_0_PU, NULL);
715 gpio_request(GPIO_FN_MMCD0_1_PU, NULL);
716 gpio_request(GPIO_FN_MMCD0_2_PU, NULL);
717 gpio_request(GPIO_FN_MMCD0_3_PU, NULL);
718 gpio_request(GPIO_FN_MMCD0_4_PU, NULL);
719 gpio_request(GPIO_FN_MMCD0_5_PU, NULL);
720 gpio_request(GPIO_FN_MMCD0_6_PU, NULL);
721 gpio_request(GPIO_FN_MMCD0_7_PU, NULL);
724 gpio_request(GPIO_FN_SDHIWP0, NULL);
725 gpio_request(GPIO_FN_SDHICD0, NULL);
726 gpio_request(GPIO_FN_SDHICMD0, NULL);
727 gpio_request(GPIO_FN_SDHICLK0, NULL);
728 gpio_request(GPIO_FN_SDHID0_3, NULL);
729 gpio_request(GPIO_FN_SDHID0_2, NULL);
730 gpio_request(GPIO_FN_SDHID0_1, NULL);
731 gpio_request(GPIO_FN_SDHID0_0, NULL);
732 gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
733 gpio_request_one(GPIO_PORT15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
735 /* enable Micro SD */
736 gpio_request(GPIO_FN_SDHID2_0, NULL);
737 gpio_request(GPIO_FN_SDHID2_1, NULL);
738 gpio_request(GPIO_FN_SDHID2_2, NULL);
739 gpio_request(GPIO_FN_SDHID2_3, NULL);
740 gpio_request(GPIO_FN_SDHICMD2, NULL);
741 gpio_request(GPIO_FN_SDHICLK2, NULL);
742 gpio_request_one(GPIO_PORT14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
745 gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL);
746 gpio_request(GPIO_FN_PORT28_I2C_SDA3, NULL);
748 /* enable FSI2 port A (ak4648) */
749 gpio_request(GPIO_FN_FSIACK, NULL);
750 gpio_request(GPIO_FN_FSIAILR, NULL);
751 gpio_request(GPIO_FN_FSIAIBT, NULL);
752 gpio_request(GPIO_FN_FSIAISLD, NULL);
753 gpio_request(GPIO_FN_FSIAOSLD, NULL);
756 gpio_request(GPIO_FN_VBUS_0, NULL);
758 #ifdef CONFIG_CACHE_L2X0
759 /* Early BRESP enable, Shared attribute override enable, 64K*8way */
760 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
763 i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
764 i2c_register_board_info(1, i2c1_devices, ARRAY_SIZE(i2c1_devices));
765 i2c_register_board_info(3, i2c3_devices, ARRAY_SIZE(i2c3_devices));
767 sh73a0_add_standard_devices();
768 platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
773 static void kzm9g_restart(char mode, const char *cmd)
775 #define RESCNT2 IOMEM(0xe6188020)
776 /* Do soft power on reset */
777 writel((1 << 31), RESCNT2);
780 static const char *kzm9g_boards_compat_dt[] __initdata = {
785 DT_MACHINE_START(KZM9G_DT, "kzm9g")
786 .smp = smp_ops(sh73a0_smp_ops),
787 .map_io = sh73a0_map_io,
788 .init_early = sh73a0_add_early_devices,
789 .nr_irqs = NR_IRQS_LEGACY,
790 .init_irq = sh73a0_init_irq,
791 .init_machine = kzm_init,
792 .init_late = shmobile_init_late,
793 .init_time = sh73a0_earlytimer_init,
794 .restart = kzm9g_restart,
795 .dt_compat = kzm9g_boards_compat_dt,