1 // SPDX-License-Identifier: GPL-2.0
3 * Device Tree support for Allwinner A1X SoCs
5 * Copyright (C) 2012 Maxime Ripard
7 * Maxime Ripard <maxime.ripard@free-electrons.com>
11 #include <linux/clocksource.h>
12 #include <linux/init.h>
13 #include <linux/of_clk.h>
14 #include <linux/platform_device.h>
15 #include <linux/reset/sunxi.h>
17 #include <asm/mach/arch.h>
18 #include <asm/secure_cntvoff.h>
20 static const char * const sunxi_board_dt_compat
[] = {
21 "allwinner,sun4i-a10",
22 "allwinner,sun5i-a10s",
23 "allwinner,sun5i-a13",
29 DT_MACHINE_START(SUNXI_DT
, "Allwinner sun4i/sun5i Families")
30 .dt_compat
= sunxi_board_dt_compat
,
33 static const char * const sun6i_board_dt_compat
[] = {
34 "allwinner,sun6i-a31",
35 "allwinner,sun6i-a31s",
39 static void __init
sun6i_timer_init(void)
42 if (IS_ENABLED(CONFIG_RESET_CONTROLLER
))
47 DT_MACHINE_START(SUN6I_DT
, "Allwinner sun6i (A31) Family")
48 .init_time
= sun6i_timer_init
,
49 .dt_compat
= sun6i_board_dt_compat
,
52 static const char * const sun7i_board_dt_compat
[] = {
53 "allwinner,sun7i-a20",
57 DT_MACHINE_START(SUN7I_DT
, "Allwinner sun7i (A20) Family")
58 .dt_compat
= sun7i_board_dt_compat
,
61 static const char * const sun8i_board_dt_compat
[] = {
62 "allwinner,sun8i-a23",
63 "allwinner,sun8i-a33",
64 "allwinner,sun8i-h2-plus",
66 "allwinner,sun8i-r40",
68 "allwinner,sun8i-v3s",
72 DT_MACHINE_START(SUN8I_DT
, "Allwinner sun8i Family")
73 .init_time
= sun6i_timer_init
,
74 .dt_compat
= sun8i_board_dt_compat
,
77 static void __init
sun8i_a83t_cntvoff_init(void)
80 secure_cntvoff_init();
84 static const char * const sun8i_a83t_cntvoff_board_dt_compat
[] = {
85 "allwinner,sun8i-a83t",
89 DT_MACHINE_START(SUN8I_A83T_CNTVOFF_DT
, "Allwinner A83t board")
90 .init_early
= sun8i_a83t_cntvoff_init
,
91 .init_time
= sun6i_timer_init
,
92 .dt_compat
= sun8i_a83t_cntvoff_board_dt_compat
,
95 static const char * const sun9i_board_dt_compat
[] = {
96 "allwinner,sun9i-a80",
100 DT_MACHINE_START(SUN9I_DT
, "Allwinner sun9i Family")
101 .dt_compat
= sun9i_board_dt_compat
,
104 static const char * const suniv_board_dt_compat
[] = {
105 "allwinner,suniv-f1c100s",
109 DT_MACHINE_START(SUNIV_DT
, "Allwinner suniv Family")
110 .dt_compat
= suniv_board_dt_compat
,