2 * arch/arm/mach-dove/board-dt.c
4 * Marvell Dove 88AP510 System On Chip FDT Board
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
11 #include <linux/init.h>
12 #include <linux/clk-provider.h>
13 #include <linux/clk/mvebu.h>
15 #include <linux/of_platform.h>
16 #include <linux/platform_data/usb-ehci-orion.h>
17 #include <asm/hardware/cache-tauros2.h>
18 #include <asm/mach/arch.h>
20 #include <plat/common.h>
25 * There are still devices that doesn't even know about DT,
26 * get clock gates here and add a clock lookup.
28 static void __init dove_legacy_clk_init(void)
30 struct device_node *np = of_find_compatible_node(NULL, NULL,
31 "marvell,dove-gating-clock");
32 struct of_phandle_args clkspec;
35 clkspec.args_count = 1;
37 clkspec.args[0] = CLOCK_GATING_BIT_GBE;
38 orion_clkdev_add(NULL, "mv643xx_eth_port.0",
39 of_clk_get_from_provider(&clkspec));
41 clkspec.args[0] = CLOCK_GATING_BIT_PCIE0;
42 orion_clkdev_add("0", "pcie",
43 of_clk_get_from_provider(&clkspec));
45 clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
46 orion_clkdev_add("1", "pcie",
47 of_clk_get_from_provider(&clkspec));
50 static void __init dove_of_clk_init(void)
53 dove_legacy_clk_init();
56 static struct mv643xx_eth_platform_data dove_dt_ge00_data = {
57 .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
60 static void __init dove_dt_init(void)
62 pr_info("Dove 88AP510 SoC\n");
64 #ifdef CONFIG_CACHE_TAUROS2
67 dove_setup_cpu_wins();
69 /* Setup root of clk tree */
72 /* Internal devices not ported to DT yet */
73 dove_ge00_init(&dove_dt_ge00_data);
76 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
79 static const char * const dove_dt_board_compat[] = {
84 DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
85 .map_io = dove_map_io,
86 .init_early = dove_init_early,
87 .init_irq = orion_dt_init_irq,
88 .init_time = dove_timer_init,
89 .init_machine = dove_dt_init,
90 .restart = dove_restart,
91 .dt_compat = dove_dt_board_compat,