Loading arch/arm/mach-mx2/clock_imx27.c +4 −4 Original line number Diff line number Diff line Loading @@ -638,9 +638,9 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) _REGISTER_CLOCK(NULL, "cspi1", cspi1_clk) _REGISTER_CLOCK(NULL, "cspi2", cspi2_clk) _REGISTER_CLOCK(NULL, "cspi3", cspi3_clk) _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) _REGISTER_CLOCK(NULL, "csi", csi_clk) _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) Loading @@ -665,7 +665,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk) _REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK(NULL, "mstick", mstick_clk) _REGISTER_CLOCK(NULL, "wdog", wdog_clk) _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) _REGISTER_CLOCK(NULL, "gpio", gpio_clk) _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) Loading arch/arm/mach-mx2/pcm038.c +94 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ #include <linux/mtd/plat-ram.h> #include <linux/mtd/physmap.h> #include <linux/platform_device.h> #include <linux/regulator/machine.h> #include <linux/mfd/mc13783.h> #include <linux/spi/spi.h> #include <linux/irq.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> Loading @@ -35,6 +39,7 @@ #include <mach/iomux.h> #include <mach/imx-uart.h> #include <mach/mxc_nand.h> #include <mach/spi.h> #include "devices.h" Loading Loading @@ -78,8 +83,6 @@ static int pcm038_pins[] = { PC6_PF_I2C2_SCL, /* SPI1 */ PD25_PF_CSPI1_RDY, PD27_PF_CSPI1_SS1, PD28_PF_CSPI1_SS0, PD29_PF_CSPI1_SCLK, PD30_PF_CSPI1_MISO, PD31_PF_CSPI1_MOSI, Loading Loading @@ -196,6 +199,86 @@ static struct i2c_board_info pcm038_i2c_devices[] = { } }; static int pcm038_spi_cs[] = {GPIO_PORTD + 28}; static struct spi_imx_master pcm038_spi_0_data = { .chipselect = pcm038_spi_cs, .num_chipselect = ARRAY_SIZE(pcm038_spi_cs), }; static struct regulator_consumer_supply sdhc1_consumers[] = { { .dev = &mxc_sdhc_device1.dev, .supply = "sdhc_vcc", }, }; static struct regulator_init_data sdhc1_data = { .constraints = { .min_uV = 3000000, .max_uV = 3400000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_FAST, .always_on = 0, .boot_on = 0, }, .num_consumer_supplies = ARRAY_SIZE(sdhc1_consumers), .consumer_supplies = sdhc1_consumers, }; static struct regulator_consumer_supply cam_consumers[] = { { .dev = NULL, .supply = "imx_cam_vcc", }, }; static struct regulator_init_data cam_data = { .constraints = { .min_uV = 3000000, .max_uV = 3400000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_FAST, .always_on = 0, .boot_on = 0, }, .num_consumer_supplies = ARRAY_SIZE(cam_consumers), .consumer_supplies = cam_consumers, }; struct mc13783_regulator_init_data pcm038_regulators[] = { { .id = MC13783_REGU_VCAM, .init_data = &cam_data, }, { .id = MC13783_REGU_VMMC1, .init_data = &sdhc1_data, }, }; static struct mc13783_platform_data pcm038_pmic = { .regulators = pcm038_regulators, .num_regulators = ARRAY_SIZE(pcm038_regulators), .flags = MC13783_USE_ADC | MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN, }; static struct spi_board_info pcm038_spi_board_info[] __initdata = { { .modalias = "mc13783", .irq = IRQ_GPIOB(23), .max_speed_hz = 300000, .bus_num = 0, .chip_select = 0, .platform_data = &pcm038_pmic, .mode = SPI_CS_HIGH, } }; static void __init pcm038_init(void) { mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), Loading @@ -219,6 +302,15 @@ static void __init pcm038_init(void) /* PE18 for user-LED D40 */ mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); /* MC13783 IRQ */ mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); mxc_register_device(&mxc_spi_device0, &pcm038_spi_0_data); spi_register_board_info(pcm038_spi_board_info, ARRAY_SIZE(pcm038_spi_board_info)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); #ifdef CONFIG_MACH_PCM970_BASEBOARD Loading arch/arm/mach-mx2/pcm970-baseboard.c +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ static int pcm970_pins[] = { PB7_PF_SD2_D3, PB8_PF_SD2_CMD, PB9_PF_SD2_CLK, GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN, /* card detect */ /* display */ PA5_PF_LSCLK, PA6_PF_LD0, Loading Loading @@ -228,6 +227,7 @@ void __init pcm970_baseboard_init(void) "PCM970"); mxc_register_device(&mxc_fb_device, &pcm038_fb_data); mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); platform_device_register(&pcm970_sja1000); } arch/arm/mach-mx25/devices.c +19 −0 Original line number Diff line number Diff line /* * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <linux/gpio.h> #include <mach/mx25.h> #include <mach/irqs.h> Loading arch/arm/mach-mx25/mx25pdk.c +18 −7 Original line number Diff line number Diff line /* * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include <linux/types.h> #include <linux/init.h> #include <linux/clk.h> Loading @@ -23,19 +41,12 @@ static struct imxuart_platform_data uart_pdata = { .flags = IMXUART_HAVE_RTSCTS, }; static struct mxc_nand_platform_data nand_board_info = { .width = 1, .hw_ecc = 1, }; static void __init mx25pdk_init(void) { mxc_register_device(&mxc_uart_device0, &uart_pdata); mxc_register_device(&mxc_usbh2, NULL); mxc_register_device(&mxc_nand_device, &nand_board_info); } static void __init mx25pdk_timer_init(void) { mx25_clocks_init(26000000); Loading Loading
arch/arm/mach-mx2/clock_imx27.c +4 −4 Original line number Diff line number Diff line Loading @@ -638,9 +638,9 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) _REGISTER_CLOCK(NULL, "cspi1", cspi1_clk) _REGISTER_CLOCK(NULL, "cspi2", cspi2_clk) _REGISTER_CLOCK(NULL, "cspi3", cspi3_clk) _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) _REGISTER_CLOCK(NULL, "csi", csi_clk) _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) Loading @@ -665,7 +665,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk) _REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK(NULL, "mstick", mstick_clk) _REGISTER_CLOCK(NULL, "wdog", wdog_clk) _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) _REGISTER_CLOCK(NULL, "gpio", gpio_clk) _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) Loading
arch/arm/mach-mx2/pcm038.c +94 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ #include <linux/mtd/plat-ram.h> #include <linux/mtd/physmap.h> #include <linux/platform_device.h> #include <linux/regulator/machine.h> #include <linux/mfd/mc13783.h> #include <linux/spi/spi.h> #include <linux/irq.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> Loading @@ -35,6 +39,7 @@ #include <mach/iomux.h> #include <mach/imx-uart.h> #include <mach/mxc_nand.h> #include <mach/spi.h> #include "devices.h" Loading Loading @@ -78,8 +83,6 @@ static int pcm038_pins[] = { PC6_PF_I2C2_SCL, /* SPI1 */ PD25_PF_CSPI1_RDY, PD27_PF_CSPI1_SS1, PD28_PF_CSPI1_SS0, PD29_PF_CSPI1_SCLK, PD30_PF_CSPI1_MISO, PD31_PF_CSPI1_MOSI, Loading Loading @@ -196,6 +199,86 @@ static struct i2c_board_info pcm038_i2c_devices[] = { } }; static int pcm038_spi_cs[] = {GPIO_PORTD + 28}; static struct spi_imx_master pcm038_spi_0_data = { .chipselect = pcm038_spi_cs, .num_chipselect = ARRAY_SIZE(pcm038_spi_cs), }; static struct regulator_consumer_supply sdhc1_consumers[] = { { .dev = &mxc_sdhc_device1.dev, .supply = "sdhc_vcc", }, }; static struct regulator_init_data sdhc1_data = { .constraints = { .min_uV = 3000000, .max_uV = 3400000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_FAST, .always_on = 0, .boot_on = 0, }, .num_consumer_supplies = ARRAY_SIZE(sdhc1_consumers), .consumer_supplies = sdhc1_consumers, }; static struct regulator_consumer_supply cam_consumers[] = { { .dev = NULL, .supply = "imx_cam_vcc", }, }; static struct regulator_init_data cam_data = { .constraints = { .min_uV = 3000000, .max_uV = 3400000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_FAST, .always_on = 0, .boot_on = 0, }, .num_consumer_supplies = ARRAY_SIZE(cam_consumers), .consumer_supplies = cam_consumers, }; struct mc13783_regulator_init_data pcm038_regulators[] = { { .id = MC13783_REGU_VCAM, .init_data = &cam_data, }, { .id = MC13783_REGU_VMMC1, .init_data = &sdhc1_data, }, }; static struct mc13783_platform_data pcm038_pmic = { .regulators = pcm038_regulators, .num_regulators = ARRAY_SIZE(pcm038_regulators), .flags = MC13783_USE_ADC | MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN, }; static struct spi_board_info pcm038_spi_board_info[] __initdata = { { .modalias = "mc13783", .irq = IRQ_GPIOB(23), .max_speed_hz = 300000, .bus_num = 0, .chip_select = 0, .platform_data = &pcm038_pmic, .mode = SPI_CS_HIGH, } }; static void __init pcm038_init(void) { mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), Loading @@ -219,6 +302,15 @@ static void __init pcm038_init(void) /* PE18 for user-LED D40 */ mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); /* MC13783 IRQ */ mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); mxc_register_device(&mxc_spi_device0, &pcm038_spi_0_data); spi_register_board_info(pcm038_spi_board_info, ARRAY_SIZE(pcm038_spi_board_info)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); #ifdef CONFIG_MACH_PCM970_BASEBOARD Loading
arch/arm/mach-mx2/pcm970-baseboard.c +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ static int pcm970_pins[] = { PB7_PF_SD2_D3, PB8_PF_SD2_CMD, PB9_PF_SD2_CLK, GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN, /* card detect */ /* display */ PA5_PF_LSCLK, PA6_PF_LD0, Loading Loading @@ -228,6 +227,7 @@ void __init pcm970_baseboard_init(void) "PCM970"); mxc_register_device(&mxc_fb_device, &pcm038_fb_data); mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); platform_device_register(&pcm970_sja1000); }
arch/arm/mach-mx25/devices.c +19 −0 Original line number Diff line number Diff line /* * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <linux/gpio.h> #include <mach/mx25.h> #include <mach/irqs.h> Loading
arch/arm/mach-mx25/mx25pdk.c +18 −7 Original line number Diff line number Diff line /* * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include <linux/types.h> #include <linux/init.h> #include <linux/clk.h> Loading @@ -23,19 +41,12 @@ static struct imxuart_platform_data uart_pdata = { .flags = IMXUART_HAVE_RTSCTS, }; static struct mxc_nand_platform_data nand_board_info = { .width = 1, .hw_ecc = 1, }; static void __init mx25pdk_init(void) { mxc_register_device(&mxc_uart_device0, &uart_pdata); mxc_register_device(&mxc_usbh2, NULL); mxc_register_device(&mxc_nand_device, &nand_board_info); } static void __init mx25pdk_timer_init(void) { mx25_clocks_init(26000000); Loading