blob: 8fb9ef5333f17648d8a28aaa0385badc9c0ed65a [file] [log] [blame]
Ludovic Desroches8f4b4792013-03-22 13:24:12 +00001/*
2 * Setup code for SAMA5 Evaluation Kits with Device Tree support
3 *
4 * Copyright (C) 2013 Atmel,
5 * 2013 Ludovic Desroches <ludovic.desroches@atmel.com>
6 *
7 * Licensed under GPLv2 or later.
8 */
9
10#include <linux/types.h>
11#include <linux/init.h>
12#include <linux/module.h>
13#include <linux/gpio.h>
14#include <linux/micrel_phy.h>
15#include <linux/of.h>
16#include <linux/of_irq.h>
17#include <linux/of_platform.h>
18#include <linux/phy.h>
Boris BREZILLONd4d24c12013-10-11 14:43:31 +020019#include <linux/clk-provider.h>
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000020
21#include <asm/setup.h>
22#include <asm/irq.h>
23#include <asm/mach/arch.h>
24#include <asm/mach/map.h>
25#include <asm/mach/irq.h>
26
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000027#include "generic.h"
28
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000029static void __init sama5_dt_device_init(void)
30{
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000031 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
32}
33
Nicolas Ferre726d32b2014-09-15 18:15:55 +020034static const char *sama5_dt_board_compat[] __initconst = {
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000035 "atmel,sama5",
36 NULL
37};
38
39DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
40 /* Maintainer: Atmel */
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000041 .map_io = at91_map_io,
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000042 .init_early = at91_dt_initialize,
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000043 .init_machine = sama5_dt_device_init,
44 .dt_compat = sama5_dt_board_compat,
45MACHINE_END
Nicolas Ferre726d32b2014-09-15 18:15:55 +020046
47static const char *sama5_alt_dt_board_compat[] __initconst = {
48 "atmel,sama5d4",
49 NULL
50};
51
52DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5 (Device Tree)")
53 /* Maintainer: Atmel */
54 .map_io = at91_alt_map_io,
55 .init_early = at91_dt_initialize,
56 .init_machine = sama5_dt_device_init,
57 .dt_compat = sama5_alt_dt_board_compat,
58 .l2c_aux_mask = ~0UL,
59MACHINE_END