static void __init tavorevb_init_lcd(void) { pwm_add_table(tavorevb_pwm_lookup, ARRAY_SIZE(tavorevb_pwm_lookup)); platform_device_register(&tavorevb_backlight_devices[0]); platform_device_register(&tavorevb_backlight_devices[1]); pxa_set_fb_info(NULL, &tavorevb_lcd_info); }
static void __init smdkv310_machine_init(void) { s3c_i2c1_set_platdata(NULL); i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); smdkv310_smsc911x_init(); s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata); s3c_sdhci1_set_platdata(&smdkv310_hsmmc1_pdata); s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata); s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata); s5p_tv_setup(); s5p_i2c_hdmiphy_set_platdata(NULL); s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0); samsung_keypad_set_platdata(&smdkv310_keypad_data); samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup)); #ifdef CONFIG_DRM_EXYNOS_FIMD s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); #else s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata); #endif smdkv310_ehci_init(); smdkv310_ohci_init(); s3c_hsotg_set_platdata(&smdkv310_hsotg_pdata); platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); }
void __init palm27x_pwm_init(int bl, int lcd) { palm_bl_power = bl; palm_lcd_power = lcd; pwm_add_table(palm27x_pwm_lookup, ARRAY_SIZE(palm27x_pwm_lookup)); platform_device_register(&palm27x_backlight); }
static void __init raumfeld_lcd_init(void) { int ret; ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable"); if (ret < 0) pr_warn("Unable to request GPIO_TFT_VA_EN\n"); else gpio_direction_output(GPIO_TFT_VA_EN, 1); msleep(100); ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable"); if (ret < 0) pr_warn("Unable to request GPIO_DISPLAY_ENABLE\n"); else gpio_direction_output(GPIO_DISPLAY_ENABLE, 1); /* Hardware revision 2 has the backlight regulator controlled * by an LT3593, earlier and later devices use PWM for that. */ if ((system_rev & 0xff) == 2) { platform_device_register(&raumfeld_lt3593_device); } else { mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT; pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1); pwm_add_table(raumfeld_pwm_lookup, ARRAY_SIZE(raumfeld_pwm_lookup)); platform_device_register(&raumfeld_pwm_backlight_device); } pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info); platform_device_register(&pxa3xx_device_gcu); }
static void __init hx4700_init(void) { int ret; PCFR = PCFR_GPR_EN | PCFR_OPDE; pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1); ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); if (ret) pr_err ("hx4700: Failed to request GPIOs.\n"); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); pwm_add_table(hx4700_pwm_lookup, ARRAY_SIZE(hx4700_pwm_lookup)); pxa_set_ficp_info(&ficp_info); pxa27x_set_i2c_power_info(NULL); pxa_set_i2c_info(NULL); i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info)); i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 0); mdelay(10); gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1); mdelay(10); }
static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *i2c_id) { struct device *dev = &i2c->dev; const struct acpi_device_id *id; struct intel_soc_pmic_config *config; struct intel_soc_pmic *pmic; int ret; id = acpi_match_device(dev->driver->acpi_match_table, dev); if (!id || !id->driver_data) return -ENODEV; config = (struct intel_soc_pmic_config *)id->driver_data; pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); if (!pmic) return -ENOMEM; dev_set_drvdata(dev, pmic); pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config); if (IS_ERR(pmic->regmap)) return PTR_ERR(pmic->regmap); pmic->irq = i2c->irq; ret = regmap_add_irq_chip(pmic->regmap, pmic->irq, config->irq_flags | IRQF_ONESHOT, 0, config->irq_chip, &pmic->irq_chip_data); if (ret) return ret; ret = enable_irq_wake(pmic->irq); if (ret) dev_warn(dev, "Can't enable IRQ as wake source: %d\n", ret); /* Add lookup table binding for Panel Control to the GPIO Chip */ gpiod_add_lookup_table(&panel_gpio_table); /* Add lookup table for crc-pwm */ pwm_add_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup)); ret = mfd_add_devices(dev, -1, config->cell_dev, config->n_cell_devs, NULL, 0, regmap_irq_get_domain(pmic->irq_chip_data)); if (ret) goto err_del_irq_chip; return 0; err_del_irq_chip: regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data); return ret; }
static void __init smdk6410_machine_init(void) { u32 cs1; s3c_i2c0_set_platdata(NULL); s3c_i2c1_set_platdata(NULL); s3c_fb_set_platdata(&smdk6410_lcd_pdata); dwc2_hsotg_set_platdata(&smdk6410_hsotg_pdata); samsung_keypad_set_platdata(&smdk6410_keypad_data); s3c24xx_ts_set_platdata(NULL); /* configure nCS1 width to 16 bits */ cs1 = __raw_readl(S3C64XX_SROM_BW) & ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT); cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) | (1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) | (1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) << S3C64XX_SROM_BW__NCS1__SHIFT; __raw_writel(cs1, S3C64XX_SROM_BW); /* set timing for nCS1 suitable for ethernet chip */ __raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) | (6 << S3C64XX_SROM_BCX__TACP__SHIFT) | (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) | (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) | (0xe << S3C64XX_SROM_BCX__TACC__SHIFT) | (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) | (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1); gpio_request(S3C64XX_GPN(5), "LCD power"); gpio_request(S3C64XX_GPF(13), "LCD power"); i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); s3c_ide_set_platdata(&smdk6410_ide_pdata); platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); pwm_add_table(smdk6410_pwm_lookup, ARRAY_SIZE(smdk6410_pwm_lookup)); samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data); }
static void __init hmt_machine_init(void) { s3c_i2c0_set_platdata(NULL); s3c_fb_set_platdata(&hmt_lcd_pdata); s3c_nand_set_platdata(&hmt_nand_info); gpio_request(S3C64XX_GPC(7), "usb power"); gpio_direction_output(S3C64XX_GPC(7), 0); gpio_request(S3C64XX_GPM(0), "usb power"); gpio_direction_output(S3C64XX_GPM(0), 1); gpio_request(S3C64XX_GPK(7), "usb power"); gpio_direction_output(S3C64XX_GPK(7), 1); gpio_request(S3C64XX_GPF(13), "usb power"); gpio_direction_output(S3C64XX_GPF(13), 1); pwm_add_table(hmt_pwm_lookup, ARRAY_SIZE(hmt_pwm_lookup)); platform_add_devices(hmt_devices, ARRAY_SIZE(hmt_devices)); }
static void __init omap3_beagle_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_beagle_init_rev(); if (gpio_is_valid(beagle_config.mmc1_gpio_wp)) omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); mmc[0].caps = beagle_config.mmc_caps; omap_hsmmc_init(mmc); omap3_beagle_i2c_init(); gpio_buttons[0].gpio = beagle_config.usr_button_gpio; platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); if (gpio_is_valid(beagle_config.dvi_pd_gpio)) omap_mux_init_gpio(beagle_config.dvi_pd_gpio, OMAP_PIN_OUTPUT); omap_display_init(&beagle_dss_data); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, mt46h32m32lf6_sdrc_params); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); usbhs_init(&usbhs_bdata); board_nand_init(omap3beagle_nand_partitions, ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS, NAND_BUSWIDTH_16, NULL); omap_twl4030_audio_init("omap3beagle", NULL); /* Ensure msecure is mux'd to be able to set the RTC. */ omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); }
void __init zoom_peripherals_init(void) { int ret; omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO); ret = wl12xx_set_platform_data(&omap_zoom_wlan_data); if (ret) pr_err("error setting wl12xx data: %d\n", ret); omap_hsmmc_init(mmc); omap_i2c_init(); pwm_add_table(zoom_pwm_lookup, ARRAY_SIZE(zoom_pwm_lookup)); platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); enable_board_wakeup_source(); omap_serial_init(); }
static void __init crag6410_machine_init(void) { /* Open drain IRQs need pullups */ s3c_gpio_setpull(S3C64XX_GPM(0), S3C_GPIO_PULL_UP); s3c_gpio_setpull(S3C64XX_GPN(0), S3C_GPIO_PULL_UP); gpio_request(S3C64XX_GPB(0), "LCD power"); gpio_direction_output(S3C64XX_GPB(0), 0); gpio_request(S3C64XX_GPF(14), "LCD PWM"); gpio_direction_output(S3C64XX_GPF(14), 0); /* turn off */ gpio_request(S3C64XX_GPB(1), "SD power"); gpio_direction_output(S3C64XX_GPB(1), 0); gpio_request(S3C64XX_GPF(10), "nRESETSEL"); gpio_direction_output(S3C64XX_GPF(10), 1); s3c_sdhci0_set_platdata(&crag6410_hsmmc0_pdata); s3c_sdhci2_set_platdata(&crag6410_hsmmc2_pdata); s3c_i2c0_set_platdata(&i2c0_pdata); s3c_i2c1_set_platdata(&i2c1_pdata); s3c_fb_set_platdata(&crag6410_lcd_pdata); dwc2_hsotg_set_platdata(&crag6410_hsotg_pdata); i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); samsung_keypad_set_platdata(&crag6410_keypad_data); s3c64xx_spi0_set_platdata(NULL, 0, 2); pwm_add_table(crag6410_pwm_lookup, ARRAY_SIZE(crag6410_pwm_lookup)); platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); gpio_led_register_device(-1, &gpio_leds_pdata); regulator_has_full_constraints(); s3c64xx_pm_init(); }
static void __init armadillo4x0_lcd_init(void) { if (IS_ENABLED(CONFIG_MXC_PWM_SELECT1)) { imx25_add_mxc_pwm(0); pwm_add_table(armadillo4x0_pwm_lookup, ARRAY_SIZE(armadillo4x0_pwm_lookup)); regulator_register_always_on(4, "fixed-5.0V", fixed5v0_power_consumers, ARRAY_SIZE(fixed5v0_power_consumers), 5000000); imx_add_platform_device("pwm-backlight", -1, NULL, 0, &armadillo4x0_backlight_data, sizeof(armadillo4x0_backlight_data)); } if (IS_ENABLED(CONFIG_LCDC_MXC_SELECT)) imx25_add_imx_fb(&armadillo4x0_fb_pdata); }
void __init smartq_machine_init(void) { s3c_i2c0_set_platdata(NULL); dwc2_hsotg_set_platdata(&smartq_hsotg_pdata); s3c_hwmon_set_platdata(&smartq_hwmon_pdata); s3c_sdhci1_set_platdata(&smartq_internal_hsmmc_pdata); s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); s3c64xx_ts_set_platdata(&smartq_touchscreen_pdata); i2c_register_board_info(0, smartq_i2c_devs, ARRAY_SIZE(smartq_i2c_devs)); WARN_ON(smartq_lcd_setup_gpio()); WARN_ON(smartq_power_off_init()); WARN_ON(smartq_usb_host_init()); WARN_ON(smartq_wifi_init()); pwm_add_table(smartq_pwm_lookup, ARRAY_SIZE(smartq_pwm_lookup)); platform_add_devices(smartq_devices, ARRAY_SIZE(smartq_devices)); gpiod_add_lookup_table(&smartq_audio_gpios); platform_device_register_simple("smartq-audio", -1, NULL, 0); }
static void __init smdk4x12_machine_init(void) { s3c_i2c0_set_platdata(NULL); i2c_register_board_info(0, smdk4x12_i2c_devs0, ARRAY_SIZE(smdk4x12_i2c_devs0)); s3c_i2c1_set_platdata(NULL); i2c_register_board_info(1, smdk4x12_i2c_devs1, ARRAY_SIZE(smdk4x12_i2c_devs1)); s3c_i2c3_set_platdata(NULL); i2c_register_board_info(3, smdk4x12_i2c_devs3, ARRAY_SIZE(smdk4x12_i2c_devs3)); s3c_i2c7_set_platdata(NULL); i2c_register_board_info(7, smdk4x12_i2c_devs7, ARRAY_SIZE(smdk4x12_i2c_devs7)); samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data); pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup)); samsung_keypad_set_platdata(&smdk4x12_keypad_data); s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata); s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata); s3c_hsotg_set_platdata(&smdk4x12_hsotg_pdata); #ifdef CONFIG_DRM_EXYNOS_FIMD s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); #else s5p_fimd0_set_platdata(&smdk4x12_lcd_pdata); #endif platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices)); }
static void __init origen_machine_init(void) { origen_power_init(); s3c_i2c0_set_platdata(NULL); i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); /* * Since sdhci instance 2 can contain a bootable media, * sdhci instance 0 is registered after instance 2. */ s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata); s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata); origen_ehci_init(); origen_ohci_init(); s3c_hsotg_set_platdata(&origen_hsotg_pdata); s5p_tv_setup(); s5p_i2c_hdmiphy_set_platdata(NULL); s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0); #ifdef CONFIG_DRM_EXYNOS_FIMD s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); #else s5p_fimd0_set_platdata(&origen_lcd_pdata); #endif platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup)); samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); origen_bt_setup(); }
static void cm_x300_init_bl(void) { pwm_add_table(cm_x300_pwm_lookup, ARRAY_SIZE(cm_x300_pwm_lookup)); platform_device_register(&cm_x300_backlight_device); }
static void __init palmtc_pwm_init(void) { pwm_add_table(palmtc_pwm_lookup, ARRAY_SIZE(palmtc_pwm_lookup)); platform_device_register(&palmtc_backlight); }
static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *i2c_id) { struct device *dev = &i2c->dev; struct intel_soc_pmic_config *config; struct intel_soc_pmic *pmic; unsigned long long hrv; acpi_status status; int ret; /* * There are 2 different Crystal Cove PMICs a Bay Trail and Cherry * Trail version, use _HRV to differentiate between the 2. */ status = acpi_evaluate_integer(ACPI_HANDLE(dev), "_HRV", NULL, &hrv); if (ACPI_FAILURE(status)) { dev_err(dev, "Failed to get PMIC hardware revision\n"); return -ENODEV; } switch (hrv) { case BYT_CRC_HRV: config = &intel_soc_pmic_config_byt_crc; break; case CHT_CRC_HRV: config = &intel_soc_pmic_config_cht_crc; break; default: dev_warn(dev, "Unknown hardware rev %llu, assuming BYT\n", hrv); config = &intel_soc_pmic_config_byt_crc; } pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); if (!pmic) return -ENOMEM; dev_set_drvdata(dev, pmic); pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config); if (IS_ERR(pmic->regmap)) return PTR_ERR(pmic->regmap); pmic->irq = i2c->irq; ret = regmap_add_irq_chip(pmic->regmap, pmic->irq, config->irq_flags | IRQF_ONESHOT, 0, config->irq_chip, &pmic->irq_chip_data); if (ret) return ret; ret = enable_irq_wake(pmic->irq); if (ret) dev_warn(dev, "Can't enable IRQ as wake source: %d\n", ret); /* Add lookup table binding for Panel Control to the GPIO Chip */ gpiod_add_lookup_table(&panel_gpio_table); /* Add lookup table for crc-pwm */ pwm_add_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup)); ret = mfd_add_devices(dev, -1, config->cell_dev, config->n_cell_devs, NULL, 0, regmap_irq_get_domain(pmic->irq_chip_data)); if (ret) goto err_del_irq_chip; return 0; err_del_irq_chip: regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data); return ret; }
static void __init z2_pwm_init(void) { pwm_add_table(z2_pwm_lookup, ARRAY_SIZE(z2_pwm_lookup)); platform_device_register(&z2_backlight_devices[0]); platform_device_register(&z2_backlight_devices[1]); }
static void __init eva_init(void) { struct platform_device *usb = NULL; regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, ARRAY_SIZE(fixed3v3_power_consumers), 3300000); regulator_register_always_on(3, "fixed-5.0V", fixed5v0_power_consumers, ARRAY_SIZE(fixed5v0_power_consumers), 5000000); pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map)); pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); r8a7740_pinmux_init(); r8a7740_meram_workaround(); /* LCDC0 */ gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ /* GETHER */ gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */ /* USB */ gpio_request_one(159, GPIOF_IN, NULL); /* USB_DEVICE_MODE */ if (gpio_get_value(159)) { /* USB Host */ } else { /* USB Func */ /* * The USBHS interrupt handlers needs to read the IRQ pin value * (HI/LOW) to diffentiate USB connection and disconnection * events (usbhsf_get_vbus()). We thus need to select both the * intc_irq7_1 pin group and GPIO 209 here. */ gpio_request_one(209, GPIOF_IN, NULL); platform_device_register(&usbhsf_device); usb = &usbhsf_device; } /* CON1/CON15 Camera */ gpio_request_one(173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */ gpio_request_one(172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */ /* see mt9t111_power() */ gpio_request_one(158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */ /* FSI-WM8978 */ gpio_request(7, NULL); gpio_request(8, NULL); gpio_direction_none(GPIO_PORT7CR); /* FSIAOBT needs no direction */ gpio_direction_none(GPIO_PORT8CR); /* FSIAOLR needs no direction */ /* * CAUTION * * DBGMD/LCDC0/FSIA MUX * DBGMD_SELECT_B should be set after setting PFC Function. */ gpio_request_one(176, GPIOF_OUT_INIT_HIGH, NULL); /* * We can switch CON8/CON14 by SW1.5, * but it needs after DBGMD_SELECT_B */ gpio_request_one(6, GPIOF_IN, NULL); if (gpio_get_value(6)) { /* CON14 enable */ } else { /* CON8 (SDHI1) enable */ pinctrl_register_mappings(eva_sdhi1_pinctrl_map, ARRAY_SIZE(eva_sdhi1_pinctrl_map)); platform_device_register(&vcc_sdhi1); platform_device_register(&sdhi1_device); } #ifdef CONFIG_CACHE_L2X0 /* Early BRESP enable, Shared attribute override enable, 32K*8way */ l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff); #endif i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); i2c_register_board_info(2, i2c2_devices, ARRAY_SIZE(i2c2_devices)); r8a7740_add_standard_devices(); platform_add_devices(eva_devices, ARRAY_SIZE(eva_devices)); rmobile_add_device_to_domain("A4LC", &lcdc0_device); rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device); if (usb) rmobile_add_device_to_domain("A3SP", usb); r8a7740_pm_init(); }
static int __init mrmt1_init(void) { gpio_set_value( PIN_PWR_ON, 1 ); /* Ensure PWR_ON is enabled */ pm_power_off = mrmt_power_off; /* Setup USARTS (other than console) */ at32_map_usart(2, 1, 0); /* USART 2: /dev/ttyS1, RMT1:DB9M */ at32_map_usart(3, 2, ATMEL_USART_RTS | ATMEL_USART_CTS); /* USART 3: /dev/ttyS2, RMT1:Wireless, w/ RTS/CTS */ at32_add_device_usart(1); at32_add_device_usart(2); /* Select GPIO Key pins */ at32_select_gpio( PIN_PWR_SW_N, AT32_GPIOF_DEGLITCH); at32_select_gpio( PIN_PB_LEFT, AT32_GPIOF_DEGLITCH); at32_select_gpio( PIN_PB_RIGHT, AT32_GPIOF_DEGLITCH); platform_device_register(&rmt_gpio_keys); #ifdef CONFIG_BOARD_MRMT_RTC_I2C i2c_register_board_info(0, &mrmt1_i2c_rtc, 1); #endif #ifndef CONFIG_BOARD_MRMT_LCD_DISABLE /* User "alternate" LCDC inferface on Port E & D */ /* NB: exclude LCDC_CC pin, as NGW100 reserves it for other use */ at32_add_device_lcdc(0, &rmt_lcdc_data, fbmem_start, fbmem_size, (ATMEL_LCDC_ALT_24BIT | ATMEL_LCDC_PE_DVAL ) ); #endif #ifdef CONFIG_BOARD_MRMT_AC97 at32_add_device_ac97c(0, &ac97c0_data, AC97C_BOTH); #endif #ifdef CONFIG_BOARD_MRMT_ADS7846_TS /* Select the Touchscreen interrupt pin mode */ at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ), GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH); irq_set_irq_type(AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING); at32_spi_setup_slaves(0,spi01_board_info,ARRAY_SIZE(spi01_board_info)); spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info)); #endif #ifdef CONFIG_BOARD_MRMT_UCB1400_TS /* Select the Touchscreen interrupt pin mode */ at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ), GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH); platform_device_register(&rmt_ts_device); #endif at32_select_gpio( PIN_LCD_DISP, AT32_GPIOF_OUTPUT ); gpio_request( PIN_LCD_DISP, "LCD_DISP" ); gpio_direction_output( PIN_LCD_DISP, 0 ); /* LCD DISP */ #ifdef CONFIG_BOARD_MRMT_LCD_DISABLE /* Keep Backlight and DISP off */ at32_select_gpio( PIN_LCD_BL, AT32_GPIOF_OUTPUT ); gpio_request( PIN_LCD_BL, "LCD_BL" ); gpio_direction_output( PIN_LCD_BL, 0 ); /* Backlight */ #else gpio_set_value( PIN_LCD_DISP, 1 ); /* DISP asserted first */ #ifdef CONFIG_BOARD_MRMT_BL_PWM /* Use PWM for Backlight controls */ at32_add_device_pwm(1 << PWM_CH_BL); pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); platform_device_register(&leds_pwm); #else /* Backlight always on */ udelay( 1 ); at32_select_gpio( PIN_LCD_BL, AT32_GPIOF_OUTPUT ); gpio_request( PIN_LCD_BL, "LCD_BL" ); gpio_direction_output( PIN_LCD_BL, 1 ); #endif #endif /* Make sure BT and Zigbee modules in reset */ at32_select_gpio( PIN_BT_RST, AT32_GPIOF_OUTPUT ); gpio_request( PIN_BT_RST, "BT_RST" ); gpio_direction_output( PIN_BT_RST, 1 ); /* BT Module in Reset */ at32_select_gpio( PIN_ZB_RST_N, AT32_GPIOF_OUTPUT ); gpio_request( PIN_ZB_RST_N, "ZB_RST_N" ); gpio_direction_output( PIN_ZB_RST_N, 0 ); /* XBee Module in Reset */ #ifdef CONFIG_BOARD_MRMT_WIRELESS_ZB udelay( 1000 ); /* Unreset the XBee Module */ gpio_set_value( PIN_ZB_RST_N, 1 ); #endif #ifdef CONFIG_BOARD_MRMT_WIRELESS_BT udelay( 1000 ); /* Unreset the BT Module */ gpio_set_value( PIN_BT_RST, 0 ); #endif return 0; }