xref: /openbmc/linux/arch/arm/mach-imx/mach-imx6ul.c (revision 18da174d)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (C) 2015 Freescale Semiconductor, Inc.
4  */
5 #include <linux/irqchip.h>
6 #include <linux/mfd/syscon.h>
7 #include <linux/of_platform.h>
8 #include <linux/phy.h>
9 #include <linux/regmap.h>
10 #include <asm/mach/arch.h>
11 #include <asm/mach/map.h>
12 
13 #include "common.h"
14 #include "cpuidle.h"
15 #include "hardware.h"
16 
17 static void __init imx6ul_init_machine(void)
18 {
19 	imx_print_silicon_rev(cpu_is_imx6ull() ? "i.MX6ULL" : "i.MX6UL",
20 		imx_get_soc_revision());
21 
22 	of_platform_default_populate(NULL, NULL, NULL);
23 	imx_anatop_init();
24 	imx6ul_pm_init();
25 }
26 
27 static void __init imx6ul_init_irq(void)
28 {
29 	imx_init_revision_from_anatop();
30 	imx_src_init();
31 	irqchip_init();
32 	imx6_pm_ccm_init("fsl,imx6ul-ccm");
33 }
34 
35 static void __init imx6ul_init_late(void)
36 {
37 	imx6sx_cpuidle_init();
38 
39 	if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ))
40 		platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
41 }
42 
43 static const char * const imx6ul_dt_compat[] __initconst = {
44 	"fsl,imx6ul",
45 	"fsl,imx6ull",
46 	"fsl,imx6ulz",
47 	NULL,
48 };
49 
50 DT_MACHINE_START(IMX6UL, "Freescale i.MX6 Ultralite (Device Tree)")
51 	.init_irq	= imx6ul_init_irq,
52 	.init_machine	= imx6ul_init_machine,
53 	.init_late	= imx6ul_init_late,
54 	.dt_compat	= imx6ul_dt_compat,
55 MACHINE_END
56