blob: eaf58f88ef5dcd262a862e96b0656b03a31cf8b3 [file] [log] [blame]
Joachim Eastwood397f8c32012-10-28 18:31:09 +00001/*
Nicolas Ferrecac01722015-01-27 16:41:55 +01002 * Setup code for AT91RM9200
Joachim Eastwood397f8c32012-10-28 18:31:09 +00003 *
4 * Copyright (C) 2011 Atmel,
5 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
6 * 2012 Joachim Eastwood <manabian@gmail.com>
7 *
8 * Licensed under GPLv2 or later.
9 */
10
Alexandre Belloni04ffc962014-09-05 16:15:33 +020011#include <linux/clk-provider.h>
Alexandre Belloni7735f032015-03-12 15:54:28 +010012#include <linux/of.h>
13#include <linux/of_platform.h>
Joachim Eastwood397f8c32012-10-28 18:31:09 +000014
Joachim Eastwood397f8c32012-10-28 18:31:09 +000015#include <asm/mach/arch.h>
Alexandre Belloni7d7ffd72015-01-26 19:02:54 +010016#include <asm/system_misc.h>
17
Joachim Eastwood397f8c32012-10-28 18:31:09 +000018#include "generic.h"
Alexandre Belloni7735f032015-03-12 15:54:28 +010019#include "soc.h"
20
21static const struct at91_soc rm9200_socs[] = {
22 AT91_SOC(AT91RM9200_CIDR_MATCH, 0, "at91rm9200 BGA", "at91rm9200"),
23 { /* sentinel */ },
24};
Joachim Eastwood397f8c32012-10-28 18:31:09 +000025
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010026static void __init at91rm9200_dt_device_init(void)
Alexandre Belloni4db0ba22015-01-15 15:59:27 +010027{
Alexandre Belloni7735f032015-03-12 15:54:28 +010028 struct soc_device *soc;
29 struct device *soc_dev = NULL;
30
31 soc = at91_soc_init(rm9200_socs);
32 if (soc != NULL)
33 soc_dev = soc_device_to_device(soc);
34
35 of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
Nicolas Ferreea69f992015-01-23 11:47:37 +010036
Alexandre Belloni7d7ffd72015-01-26 19:02:54 +010037 arm_pm_idle = at91rm9200_idle;
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010038 at91rm9200_pm_init();
Alexandre Belloni4db0ba22015-01-15 15:59:27 +010039}
40
Alexandre Belloni37e9c4d2015-01-22 17:19:04 +010041static const char *at91rm9200_dt_board_compat[] __initconst = {
Joachim Eastwood397f8c32012-10-28 18:31:09 +000042 "atmel,at91rm9200",
43 NULL
44};
45
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010046DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010047 .init_machine = at91rm9200_dt_device_init,
Joachim Eastwood397f8c32012-10-28 18:31:09 +000048 .dt_compat = at91rm9200_dt_board_compat,
49MACHINE_END