blob: 023cb453f157ff621110d6c17b6f0cc185b8d8ba [file] [log] [blame]
Haojian Zhuanga56f9162012-04-19 17:46:53 +08001/*
2 * linux/arch/arm/mach-mmp/mmp2-dt.c
3 *
4 * Copyright (C) 2012 Marvell Technology Group Ltd.
5 * Author: Haojian Zhuang <haojian.zhuang@marvell.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * publishhed by the Free Software Foundation.
10 */
11
12#include <linux/io.h>
Haojian Zhuang0f374562013-04-21 16:53:02 +080013#include <linux/irqchip.h>
Haojian Zhuanga56f9162012-04-19 17:46:53 +080014#include <linux/of_platform.h>
15#include <asm/mach/arch.h>
16#include <asm/mach/time.h>
Haojian Zhuanga56f9162012-04-19 17:46:53 +080017
18#include "common.h"
19
Haojian Zhuanga56f9162012-04-19 17:46:53 +080020extern void __init mmp_dt_init_timer(void);
21
Haojian Zhuanga56f9162012-04-19 17:46:53 +080022static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = {
23 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL),
24 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL),
25 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.2", NULL),
26 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4016000, "pxa2xx-uart.3", NULL),
27 OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL),
28 OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL),
Haojian Zhuangf8731172013-04-09 22:27:50 +080029 OF_DEV_AUXDATA("marvell,mmp-gpio", 0xd4019000, "mmp2-gpio", NULL),
Haojian Zhuanga56f9162012-04-19 17:46:53 +080030 OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL),
31 {}
32};
33
34static void __init mmp2_dt_init(void)
35{
36 of_platform_populate(NULL, of_default_bus_match_table,
37 mmp2_auxdata_lookup, NULL);
38}
39
40static const char *mmp2_dt_board_compat[] __initdata = {
41 "mrvl,mmp2-brownstone",
42 NULL,
43};
44
45DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)")
46 .map_io = mmp_map_io,
Stephen Warren6bb27d72012-11-08 12:40:59 -070047 .init_time = mmp_dt_init_timer,
Haojian Zhuanga56f9162012-04-19 17:46:53 +080048 .init_machine = mmp2_dt_init,
49 .dt_compat = mmp2_dt_board_compat,
50MACHINE_END