]>
Commit | Line | Data |
---|---|---|
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 | |
3b52634f | 20 | static const char * const sunxi_board_dt_compat[] = { |
43880f70 | 21 | "allwinner,sun4i-a10", |
81265dfb | 22 | "allwinner,sun5i-a10s", |
43880f70 | 23 | "allwinner,sun5i-a13", |
bef6229f | 24 | "allwinner,sun5i-r8", |
c1efda12 | 25 | "nextthing,gr8", |
3b52634f MR |
26 | NULL, |
27 | }; | |
28 | ||
bef6229f | 29 | DT_MACHINE_START(SUNXI_DT, "Allwinner sun4i/sun5i Families") |
3b52634f MR |
30 | .dt_compat = sunxi_board_dt_compat, |
31 | MACHINE_END | |
91a31977 MR |
32 | |
33 | static const char * const sun6i_board_dt_compat[] = { | |
34 | "allwinner,sun6i-a31", | |
b0f2faa5 | 35 | "allwinner,sun6i-a31s", |
91a31977 MR |
36 | NULL, |
37 | }; | |
38 | ||
751b2ac4 MR |
39 | extern void __init sun6i_reset_init(void); |
40 | static void __init sun6i_timer_init(void) | |
41 | { | |
42 | of_clk_init(NULL); | |
e58cf019 AB |
43 | if (IS_ENABLED(CONFIG_RESET_CONTROLLER)) |
44 | sun6i_reset_init(); | |
ba5d08c0 | 45 | timer_probe(); |
751b2ac4 MR |
46 | } |
47 | ||
91a31977 | 48 | DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family") |
751b2ac4 | 49 | .init_time = sun6i_timer_init, |
91a31977 MR |
50 | .dt_compat = sun6i_board_dt_compat, |
51 | MACHINE_END | |
52 | ||
53 | static const char * const sun7i_board_dt_compat[] = { | |
54 | "allwinner,sun7i-a20", | |
55 | NULL, | |
56 | }; | |
57 | ||
58 | DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family") | |
91a31977 | 59 | .dt_compat = sun7i_board_dt_compat, |
3b52634f | 60 | MACHINE_END |
ac84b79f CYT |
61 | |
62 | static const char * const sun8i_board_dt_compat[] = { | |
63 | "allwinner,sun8i-a23", | |
159870d2 | 64 | "allwinner,sun8i-a33", |
1425ec0f | 65 | "allwinner,sun8i-a83t", |
16fa9629 | 66 | "allwinner,sun8i-h2-plus", |
14a882df | 67 | "allwinner,sun8i-h3", |
b074fede | 68 | "allwinner,sun8i-v3s", |
ac84b79f CYT |
69 | NULL, |
70 | }; | |
71 | ||
14a882df JK |
72 | DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family") |
73 | .init_time = sun6i_timer_init, | |
ac84b79f CYT |
74 | .dt_compat = sun8i_board_dt_compat, |
75 | MACHINE_END | |
3d4c2f1c CYT |
76 | |
77 | static const char * const sun9i_board_dt_compat[] = { | |
78 | "allwinner,sun9i-a80", | |
79 | NULL, | |
80 | }; | |
81 | ||
82 | DT_MACHINE_START(SUN9I_DT, "Allwinner sun9i Family") | |
83 | .dt_compat = sun9i_board_dt_compat, | |
84 | MACHINE_END |