Exemple #1
0
static int tx25_init_fb(void)
{
	tx25_fb_enable(0);

	mxc_iomux_v3_setup_multiple_pads(tx25_lcdc_gpios,
			ARRAY_SIZE(tx25_lcdc_gpios));

	imx25_add_fb(&tx25_fb_data);

	return 0;
}
static int eukrea_cpuimx25_devices_init(void)
{
    mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads,
                                     ARRAY_SIZE(eukrea_cpuimx25_pads));

    led_gpio_register(&led0);

    imx25_iim_register_fec_ethaddr();
    imx25_add_fec(&fec_info);

    nand_info.width = 1;
    imx25_add_nand(&nand_info);

    devfs_add_partition("nand0", 0x00000, 0x40000,
                        DEVFS_PARTITION_FIXED, "self_raw");
    dev_add_bb_dev("self_raw", "self0");

    devfs_add_partition("nand0", 0x40000, 0x20000,
                        DEVFS_PARTITION_FIXED, "env_raw");
    dev_add_bb_dev("env_raw", "env0");

    /* enable LCD */
    gpio_direction_output(26, 1);
    gpio_set_value(26, 1);

    /* LED : default OFF */
    gpio_direction_output(2 * 32 + 19, 1);

    /* Switch : input */
    gpio_direction_input(2 * 32 + 18);

    imx25_add_fb(&eukrea_cpuimx25_fb_data);

    imx25_add_i2c0(NULL);
    imx25_add_mmc0(NULL);

#ifdef CONFIG_USB
    imx25_usb_init();
    add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, MX25_USB_OTG_BASE_ADDR + 0x400, NULL);
#endif
#ifdef CONFIG_USB_GADGET
    /* Workaround ENGcm09152 */
    writel(readl(MX25_USB_OTG_BASE_ADDR + 0x608) | (1 << 23), MX25_USB_OTG_BASE_ADDR + 0x608);
    add_generic_device("fsl-udc", DEVICE_ID_DYNAMIC, NULL, MX25_USB_OTG_BASE_ADDR, 0x200,
                       IORESOURCE_MEM, &usb_pdata);
#endif

    armlinux_set_bootparams((void *)0x80000100);
    armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX25SD);

    return 0;
}
Exemple #3
0
static int tx25_init_fb(void)
{
    if (!IS_ENABLED(CONFIG_DRIVER_VIDEO_IMX))
        return 0;

    if (!of_machine_is_compatible("karo,imx25-tx25"))
        return 0;

    tx25_fb_enable(0);

    mxc_iomux_v3_setup_multiple_pads(tx25_lcdc_gpios,
                                     ARRAY_SIZE(tx25_lcdc_gpios));

    imx25_add_fb(&tx25_fb_data);

    return 0;
}