11 #include <linux/kernel.h>
17 #include <linux/i2c.h>
26 #include <mach/common.h>
33 #define MITYOMAPL138_PHY_ID ""
35 #define FACTORY_CONFIG_MAGIC 0x012C0138
36 #define FACTORY_CONFIG_VERSION 0x00010001
87 #ifdef CONFIG_CPU_FREQ
88 static void mityomapl138_cpufreq_init(
const char *partnum)
92 for (i = 0; partnum && i <
ARRAY_SIZE(mityomapl138_pn_info); i++) {
101 strlen(mityomapl138_pn_info[i].part_no))) {
109 pr_warning(
"cpufreq registration failed: %d\n", ret);
112 static void mityomapl138_cpufreq_init(
const char *partnum) { }
118 const char *partnum =
NULL;
123 pr_warning(
"MityOMAPL138: Read Factory Config Failed: %d\n",
129 pr_warning(
"MityOMAPL138: Factory Config Magic Wrong (%X)\n",
135 pr_warning(
"MityOMAPL138: Factory Config Version Wrong (%X)\n",
146 "in factory config block\n");
149 pr_info(
"MityOMAPL138: Part Number = %s\n", partnum);
153 mityomapl138_cpufreq_init(partnum);
160 .setup = read_factory_config,
180 .supply =
"usb0_vdda18",
183 .supply =
"usb1_vdda18",
186 .supply =
"ddr_dvdd18",
189 .supply =
"sata_vddr",
196 .supply =
"sata_vdd",
199 .supply =
"usb_cvdd",
202 .supply =
"pll0_vdda",
205 .supply =
"pll1_vdda",
212 .supply =
"1.8v_aux",
233 .num_consumer_supplies =
ARRAY_SIZE(tps65023_dcdc1_consumers),
234 .consumer_supplies = tps65023_dcdc1_consumers,
244 .num_consumer_supplies =
ARRAY_SIZE(tps65023_dcdc2_consumers),
245 .consumer_supplies = tps65023_dcdc2_consumers,
255 .num_consumer_supplies =
ARRAY_SIZE(tps65023_dcdc3_consumers),
256 .consumer_supplies = tps65023_dcdc3_consumers,
266 .num_consumer_supplies =
ARRAY_SIZE(tps65023_ldo1_consumers),
267 .consumer_supplies = tps65023_ldo1_consumers,
278 .num_consumer_supplies =
ARRAY_SIZE(tps65023_ldo2_consumers),
279 .consumer_supplies = tps65023_ldo2_consumers,
286 .platform_data = &tps65023_regulator_data[0],
290 .platform_data = &mityomapl138_fd_chip,
294 static int __init pmic_tps65023_init(
void)
318 .name =
"u-boot-env",
324 .name =
"periph-config",
353 .parts = spi_flash_partitions,
366 .modalias =
"m25p80",
367 .platform_data = &mityomapl138_spi_flash_data,
368 .controller_data = &spi_eprom_config,
370 .max_speed_hz = 30000000,
380 static struct mtd_partition mityomapl138_nandflash_partition[] = {
396 .parts = mityomapl138_nandflash_partition,
397 .nr_parts =
ARRAY_SIZE(mityomapl138_nandflash_partition),
404 static struct resource mityomapl138_nandflash_resource[] = {
418 .name =
"davinci_nand",
421 .platform_data = &mityomapl138_nandflash_data,
423 .num_resources =
ARRAY_SIZE(mityomapl138_nandflash_resource),
424 .resource = mityomapl138_nandflash_resource,
428 &mityomapl138_nandflash_device,
431 static void __init mityomapl138_setup_nand(
void)
441 static const short mityomap_mii_pins[] = {
450 static const short mityomap_rmii_pins[] = {
458 static void __init mityomapl138_config_emac(
void)
473 pr_info(
"RMII PHY configured\n");
477 pr_info(
"MII PHY configured\n");
481 pr_warning(
"mii/rmii mux setup failed: %d\n", ret);
492 pr_warning(
"emac registration failed: %d\n", ret);
500 .name =
"pm-davinci",
502 .platform_data = &da850_pm_pdata,
507 static void __init mityomapl138_init(
void)
514 pr_warning(
"edma registration failed: %d\n", ret);
518 pr_warning(
"watchdog registration failed: %d\n", ret);
524 pr_warning(
"i2c0 registration failed: %d\n", ret);
526 ret = pmic_tps65023_init();
528 pr_warning(
"TPS65023 PMIC init failed: %d\n", ret);
530 mityomapl138_setup_nand();
535 pr_warning(
"spi 1 registration failed: %d\n", ret);
537 mityomapl138_config_emac();
545 pr_warning(
"cpuidle registration failed: %d\n", ret);
549 pr_warning(
"da850_evm_init: suspend registration failed: %d\n",
553 #ifdef CONFIG_SERIAL_8250_CONSOLE
554 static int __init mityomapl138_console_init(
void)
556 if (!machine_is_mityomapl138())
564 static void __init mityomapl138_map_io(
void)
570 .atag_offset = 0x100,
571 .map_io = mityomapl138_map_io,
574 .init_machine = mityomapl138_init,