xref: /linux/arch/arm/mach-davinci/da8xx-dt.c (revision 8439a1d77d07514fadc616a2691b5d130ce0b678)
1689e331fSSekhar Nori /*
2689e331fSSekhar Nori  * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
3689e331fSSekhar Nori  *
4689e331fSSekhar Nori  * Modified from mach-omap/omap2/board-generic.c
5689e331fSSekhar Nori  *
6689e331fSSekhar Nori  * This program is free software; you can redistribute it and/or modify
7689e331fSSekhar Nori  * it under the terms of the GNU General Public License version 2 as
8689e331fSSekhar Nori  * published by the Free Software Foundation.
9689e331fSSekhar Nori  */
10689e331fSSekhar Nori #include <linux/io.h>
11689e331fSSekhar Nori #include <linux/of_irq.h>
12689e331fSSekhar Nori #include <linux/of_platform.h>
13689e331fSSekhar Nori #include <linux/irqdomain.h>
14689e331fSSekhar Nori 
15689e331fSSekhar Nori #include <asm/mach/arch.h>
16689e331fSSekhar Nori 
17689e331fSSekhar Nori #include <mach/common.h>
183acf731cSArnd Bergmann #include "cp_intc.h"
19689e331fSSekhar Nori #include <mach/da8xx.h>
20689e331fSSekhar Nori 
21267f3c07SSekhar Nori static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
2201729ccfSVishwanathrao Badarkhe, Manish 	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
236c8f7359SPetr Kulhavy 	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01e28000, "i2c_davinci.2", NULL),
2484374812SIvan Khoronzhuk 	OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "davinci-wdt", NULL),
25db4c8fa7SManjunathappa, Prakash 	OF_DEV_AUXDATA("ti,da830-mmc", 0x01c40000, "da830-mmc.0", NULL),
2664fa59c4SPhilip Avinash 	OF_DEV_AUXDATA("ti,da850-ehrpwm", 0x01f00000, "ehrpwm", NULL),
2764fa59c4SPhilip Avinash 	OF_DEV_AUXDATA("ti,da850-ehrpwm", 0x01f02000, "ehrpwm", NULL),
2864fa59c4SPhilip Avinash 	OF_DEV_AUXDATA("ti,da850-ecap", 0x01f06000, "ecap", NULL),
2964fa59c4SPhilip Avinash 	OF_DEV_AUXDATA("ti,da850-ecap", 0x01f07000, "ecap", NULL),
3064fa59c4SPhilip Avinash 	OF_DEV_AUXDATA("ti,da850-ecap", 0x01f08000, "ecap", NULL),
31801a6aa9SDavid Lechner 	OF_DEV_AUXDATA("ti,da830-spi", 0x01c41000, "spi_davinci.0", NULL),
32414d6e5eSManjunathappa, Prakash 	OF_DEV_AUXDATA("ti,da830-spi", 0x01f0e000, "spi_davinci.1", NULL),
3319955c3dSManjunathappa, Prakash 	OF_DEV_AUXDATA("ns16550a", 0x01c42000, "serial8250.0", NULL),
3419955c3dSManjunathappa, Prakash 	OF_DEV_AUXDATA("ns16550a", 0x01d0c000, "serial8250.1", NULL),
3519955c3dSManjunathappa, Prakash 	OF_DEV_AUXDATA("ns16550a", 0x01d0d000, "serial8250.2", NULL),
3673db5951SLad, Prabhakar 	OF_DEV_AUXDATA("ti,davinci_mdio", 0x01e24000, "davinci_mdio.0", NULL),
37235d8cd9SLad, Prabhakar 	OF_DEV_AUXDATA("ti,davinci-dm6467-emac", 0x01e20000, "davinci_emac.1",
38235d8cd9SLad, Prabhakar 		       NULL),
3906b57f1dSPeter Ujfalusi 	OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL),
408f899b4eSKarl Beldan 	OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL),
41ec7cc27eSKarl Beldan 	OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL),
42*8439a1d7SAxel Haslam 	OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL),
43b08157a1SDavid Lechner 	OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),
443b996e5fSDavid Lechner 	OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL),
4501729ccfSVishwanathrao Badarkhe, Manish 	{}
4601729ccfSVishwanathrao Badarkhe, Manish };
4701729ccfSVishwanathrao Badarkhe, Manish 
48689e331fSSekhar Nori #ifdef CONFIG_ARCH_DAVINCI_DA850
49689e331fSSekhar Nori 
50689e331fSSekhar Nori static void __init da850_init_machine(void)
51689e331fSSekhar Nori {
52ced95ac0SAxel Haslam 	int ret;
53ced95ac0SAxel Haslam 
54ced95ac0SAxel Haslam 	ret = da8xx_register_usb20_phy_clk(false);
55ced95ac0SAxel Haslam 	if (ret)
56ced95ac0SAxel Haslam 		pr_warn("%s: registering USB 2.0 PHY clock failed: %d",
57ced95ac0SAxel Haslam 			__func__, ret);
58ced95ac0SAxel Haslam 	ret = da8xx_register_usb11_phy_clk(false);
59ced95ac0SAxel Haslam 	if (ret)
60ced95ac0SAxel Haslam 		pr_warn("%s: registering USB 1.1 PHY clock failed: %d",
61ced95ac0SAxel Haslam 			__func__, ret);
62ced95ac0SAxel Haslam 
632f44a8d1SDavid Lechner 	of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
647e431af8SKevin Hilman 	davinci_pm_init();
65689e331fSSekhar Nori }
66689e331fSSekhar Nori 
6719c233b7SNicolas Pitre static const char *const da850_boards_compat[] __initconst = {
683015fb33SHeiko Schocher 	"enbw,cmc",
6944524a01SKarl Beldan 	"ti,da850-lcdk",
7027e6e0d3SSekhar Nori 	"ti,da850-evm",
71689e331fSSekhar Nori 	"ti,da850",
72689e331fSSekhar Nori 	NULL,
73689e331fSSekhar Nori };
74689e331fSSekhar Nori 
75689e331fSSekhar Nori DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x")
76689e331fSSekhar Nori 	.map_io		= da850_init,
776bb27d73SStephen Warren 	.init_time	= davinci_timer_init,
78689e331fSSekhar Nori 	.init_machine	= da850_init_machine,
79689e331fSSekhar Nori 	.dt_compat	= da850_boards_compat,
80689e331fSSekhar Nori 	.init_late	= davinci_init_late,
81689e331fSSekhar Nori 	.restart	= da8xx_restart,
82689e331fSSekhar Nori MACHINE_END
83689e331fSSekhar Nori 
84689e331fSSekhar Nori #endif
85