9 #include <linux/device.h>
10 #include <linux/export.h>
18 #include <linux/i2c.h>
23 #include <asm/reboot.h>
39 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
42 .
name =
"bootloader(nor)",
46 .name =
"linux kernel(nor)",
50 .name =
"file system(nor)",
58 .parts = ezbrd_partitions,
62 static struct resource ezbrd_flash_resource = {
64 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
73 .
name =
"physmap-flash",
76 .platform_data = &ezbrd_flash_data,
79 .resource = &ezbrd_flash_resource,
83 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
90 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
92 static const unsigned short bfin_mac_peripherals[] = {
108 #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
119 .phydev_data = bfin_phydev_data,
121 .mac_peripherals = bfin_mac_peripherals,
122 #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
130 .
name =
"bfin_mii_bus",
132 .platform_data = &bfin_mii_bus_data,
139 .platform_data = &bfin_mii_bus,
143 #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
155 .netdev = &bfin_mac_device.
dev,
156 .chip = &ksz8893m_switch_chip_data,
163 .dev.platform_data = &ksz8893m_switch_data,
168 #if defined(CONFIG_MTD_M25P80) \
169 || defined(CONFIG_MTD_M25P80_MODULE)
172 .
name =
"bootloader(spi)",
177 .name =
"linux kernel(spi)",
185 .parts = bfin_spi_flash_partitions,
186 .nr_parts =
ARRAY_SIZE(bfin_spi_flash_partitions),
196 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
202 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
205 .vref_delay_usecs = 50,
208 .pressure_max = 1000,
210 .stopacq_polarity = 1,
211 .first_conversion_delay = 3,
212 .acquisition_time = 1,
214 .pen_down_acc_interval = 1,
219 #if defined(CONFIG_MTD_M25P80) \
220 || defined(CONFIG_MTD_M25P80_MODULE)
223 .modalias =
"m25p80",
224 .max_speed_hz = 25000000,
227 .platform_data = &bfin_spi_flash_data,
228 .controller_data = &spi_flash_chip_info,
233 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
234 #if defined(CONFIG_NET_DSA_KSZ8893M) \
235 || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
237 .modalias =
"ksz8893m",
238 .max_speed_hz = 5000000,
241 .platform_data =
NULL,
247 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
249 .modalias =
"mmc_spi",
250 .max_speed_hz = 25000000,
253 .controller_data = &mmc_spi_chip_info,
257 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
259 .modalias =
"ad7877",
260 .platform_data = &bfin_ad7877_ts_info,
262 .max_speed_hz = 12500000,
267 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
268 && defined(CONFIG_SND_SOC_WM8731_SPI)
270 .modalias =
"wm8731",
271 .max_speed_hz = 3125000,
277 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
279 .modalias =
"spidev",
280 .max_speed_hz = 3125000,
285 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
287 .modalias =
"bfin-lq035q1-spi",
288 .max_speed_hz = 20000000,
297 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
305 static struct resource bfin_spi0_resource[] = {
326 .num_resources =
ARRAY_SIZE(bfin_spi0_resource),
327 .resource = bfin_spi0_resource,
329 .platform_data = &bfin_spi0_info,
340 static struct resource bfin_spi1_resource[] = {
361 .num_resources =
ARRAY_SIZE(bfin_spi1_resource),
362 .resource = bfin_spi1_resource,
364 .platform_data = &bfin_spi1_info,
369 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
370 #ifdef CONFIG_SERIAL_BFIN_UART0
371 static struct resource bfin_uart0_resources[] = {
404 static unsigned short bfin_uart0_peripherals[] = {
411 .num_resources =
ARRAY_SIZE(bfin_uart0_resources),
412 .resource = bfin_uart0_resources,
414 .platform_data = &bfin_uart0_peripherals,
418 #ifdef CONFIG_SERIAL_BFIN_UART1
419 static struct resource bfin_uart1_resources[] = {
452 static unsigned short bfin_uart1_peripherals[] = {
459 .num_resources =
ARRAY_SIZE(bfin_uart1_resources),
460 .resource = bfin_uart1_resources,
462 .platform_data = &bfin_uart1_peripherals,
468 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
469 #ifdef CONFIG_BFIN_SIR0
470 static struct resource bfin_sir0_resources[] = {
491 .num_resources =
ARRAY_SIZE(bfin_sir0_resources),
492 .resource = bfin_sir0_resources,
495 #ifdef CONFIG_BFIN_SIR1
496 static struct resource bfin_sir1_resources[] = {
517 .num_resources =
ARRAY_SIZE(bfin_sir1_resources),
518 .resource = bfin_sir1_resources,
523 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
526 .id = CONFIG_SND_BF5XX_SPORT_NUM,
531 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
534 static struct resource bfin_twi0_resource[] = {
548 .
name =
"i2c-bfin-twi",
550 .num_resources =
ARRAY_SIZE(bfin_twi0_resource),
551 .resource = bfin_twi0_resource,
553 .platform_data = &bfin_twi0_pins,
559 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
564 #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
570 #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE)
577 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
578 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
579 static struct resource bfin_sport0_uart_resources[] = {
597 static unsigned short bfin_sport0_peripherals[] = {
603 .
name =
"bfin-sport-uart",
605 .num_resources =
ARRAY_SIZE(bfin_sport0_uart_resources),
606 .resource = bfin_sport0_uart_resources,
608 .platform_data = &bfin_sport0_peripherals,
612 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
613 static struct resource bfin_sport1_uart_resources[] = {
631 static unsigned short bfin_sport1_peripherals[] = {
637 .
name =
"bfin-sport-uart",
639 .num_resources =
ARRAY_SIZE(bfin_sport1_uart_resources),
640 .resource = bfin_sport1_uart_resources,
642 .platform_data = &bfin_sport1_peripherals,
648 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
649 #include <linux/input.h>
658 .
buttons = bfin_gpio_keys_table,
665 .platform_data = &bfin_gpio_keys_data,
670 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
682 .platform_data = &bfin_sdh_data,
687 static const unsigned int cclk_vlev_datasheet[] =
697 .tuple_tab = cclk_vlev_datasheet,
699 .vr_settling_time = 25 ,
705 .platform_data = &bfin_dmpc_vreg_data,
713 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
717 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
720 #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
721 &ksz8893m_switch_device,
725 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
730 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
731 #ifdef CONFIG_SERIAL_BFIN_UART0
734 #ifdef CONFIG_SERIAL_BFIN_UART1
739 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
740 #ifdef CONFIG_BFIN_SIR0
743 #ifdef CONFIG_BFIN_SIR1
748 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
749 &i2c_bfin_twi_device,
752 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
756 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
757 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
758 &bfin_sport0_uart_device,
760 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
761 &bfin_sport1_uart_device,
765 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
766 &bfin_device_gpiokeys,
769 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
773 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
778 static int __init ezbrd_init(
void)
787 #if !defined(CONFIG_SPI_BFIN5XX) && !defined(CONFIG_SPI_BFIN5XX_MODULE)
796 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
797 #ifdef CONFIG_SERIAL_BFIN_UART0
800 #ifdef CONFIG_SERIAL_BFIN_UART1
805 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
806 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
807 &bfin_sport0_uart_device,
809 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
810 &bfin_sport1_uart_device,
836 ret = otp_read(0xDF, 0x00, &otp_mac);
838 char *otp_mac_p = (
char *)&otp_mac;
839 for (ret = 0; ret < 6; ++
ret)
840 addr[ret] = otp_mac_p[5 - ret];