ARM: sunxi: Introduce Allwinner H3 support
[deliverable/linux.git] / arch / arm / mach-sunxi / sunxi.c
CommitLineData
3b52634f
MR
1/*
2 * Device Tree support for Allwinner A1X SoCs
3 *
4 * Copyright (C) 2012 Maxime Ripard
5 *
6 * Maxime Ripard <maxime.ripard@free-electrons.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
751b2ac4
MR
13#include <linux/clk-provider.h>
14#include <linux/clocksource.h>
d767af5e 15#include <linux/init.h>
f91b7c62 16#include <linux/platform_device.h>
3b52634f 17
3b52634f 18#include <asm/mach/arch.h>
bc34b5f2 19
f91b7c62
CYT
20static void __init sunxi_dt_cpufreq_init(void)
21{
22 platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
23}
24
3b52634f 25static const char * const sunxi_board_dt_compat[] = {
43880f70 26 "allwinner,sun4i-a10",
81265dfb 27 "allwinner,sun5i-a10s",
43880f70 28 "allwinner,sun5i-a13",
3b52634f
MR
29 NULL,
30};
31
32DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
3b52634f 33 .dt_compat = sunxi_board_dt_compat,
f91b7c62 34 .init_late = sunxi_dt_cpufreq_init,
3b52634f 35MACHINE_END
91a31977
MR
36
37static const char * const sun6i_board_dt_compat[] = {
38 "allwinner,sun6i-a31",
b0f2faa5 39 "allwinner,sun6i-a31s",
91a31977
MR
40 NULL,
41};
42
751b2ac4
MR
43extern void __init sun6i_reset_init(void);
44static void __init sun6i_timer_init(void)
45{
46 of_clk_init(NULL);
e58cf019
AB
47 if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
48 sun6i_reset_init();
751b2ac4
MR
49 clocksource_of_init();
50}
51
91a31977 52DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
751b2ac4 53 .init_time = sun6i_timer_init,
91a31977 54 .dt_compat = sun6i_board_dt_compat,
f91b7c62 55 .init_late = sunxi_dt_cpufreq_init,
91a31977
MR
56MACHINE_END
57
58static const char * const sun7i_board_dt_compat[] = {
59 "allwinner,sun7i-a20",
60 NULL,
61};
62
63DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
91a31977 64 .dt_compat = sun7i_board_dt_compat,
f91b7c62 65 .init_late = sunxi_dt_cpufreq_init,
3b52634f 66MACHINE_END
ac84b79f
CYT
67
68static const char * const sun8i_board_dt_compat[] = {
69 "allwinner,sun8i-a23",
14a882df 70 "allwinner,sun8i-h3",
ac84b79f
CYT
71 NULL,
72};
73
14a882df
JK
74DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family")
75 .init_time = sun6i_timer_init,
ac84b79f 76 .dt_compat = sun8i_board_dt_compat,
f91b7c62 77 .init_late = sunxi_dt_cpufreq_init,
ac84b79f 78MACHINE_END
3d4c2f1c
CYT
79
80static const char * const sun9i_board_dt_compat[] = {
81 "allwinner,sun9i-a80",
82 NULL,
83};
84
85DT_MACHINE_START(SUN9I_DT, "Allwinner sun9i Family")
86 .dt_compat = sun9i_board_dt_compat,
87MACHINE_END
This page took 0.1072 seconds and 5 git commands to generate.