Lines Matching +full:imx6ul +full:- +full:ccm
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright 2011-2014 Freescale Semiconductor, Inc.
13 #include <linux/irqchip/arm-gic.h>
15 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
24 #include <asm/proc-fns.h>
147 0x27c, 0x498, 0x4a4, 0x490, /* SDCLK0, GPR_B0DS-B1DS, GPR_ADDS */
153 .mmdc_compat = "fsl,imx6q-mmdc",
154 .src_compat = "fsl,imx6q-src",
155 .iomuxc_compat = "fsl,imx6q-iomuxc",
156 .gpc_compat = "fsl,imx6q-gpc",
157 .pl310_compat = "arm,pl310-cache",
163 .mmdc_compat = "fsl,imx6q-mmdc",
164 .src_compat = "fsl,imx6q-src",
165 .iomuxc_compat = "fsl,imx6dl-iomuxc",
166 .gpc_compat = "fsl,imx6q-gpc",
167 .pl310_compat = "arm,pl310-cache",
173 .mmdc_compat = "fsl,imx6sl-mmdc",
174 .src_compat = "fsl,imx6sl-src",
175 .iomuxc_compat = "fsl,imx6sl-iomuxc",
176 .gpc_compat = "fsl,imx6sl-gpc",
177 .pl310_compat = "arm,pl310-cache",
183 .mmdc_compat = "fsl,imx6sll-mmdc",
184 .src_compat = "fsl,imx6sll-src",
185 .iomuxc_compat = "fsl,imx6sll-iomuxc",
186 .gpc_compat = "fsl,imx6sll-gpc",
187 .pl310_compat = "arm,pl310-cache",
193 .mmdc_compat = "fsl,imx6sx-mmdc",
194 .src_compat = "fsl,imx6sx-src",
195 .iomuxc_compat = "fsl,imx6sx-iomuxc",
196 .gpc_compat = "fsl,imx6sx-gpc",
197 .pl310_compat = "arm,pl310-cache",
203 .mmdc_compat = "fsl,imx6ul-mmdc",
204 .src_compat = "fsl,imx6ul-src",
205 .iomuxc_compat = "fsl,imx6ul-iomuxc",
206 .gpc_compat = "fsl,imx6ul-gpc",
214 * suspend code(arch/arm/mach-imx/suspend-imx6.S), if this struct
216 * arch/arm/mach-imx/suspend-imx6.S must be also changed accordingly,
337 return -EINVAL; in imx6_set_lpm()
341 * ERR007265: CCM: When improper low-power sequence is used, in imx6_set_lpm()
347 * 2) Software should then unmask IRQ #32 in GPC before setting CCM in imx6_set_lpm()
348 * Low-Power mode. in imx6_set_lpm()
349 * 3) Software should mask IRQ #32 right after CCM Low-Power mode in imx6_set_lpm()
350 * is set (set bits 0-1 of CCM_CLPCR). in imx6_set_lpm()
375 suspend_ocram_base)->l2_base.vbase) in imx6q_suspend_finish()
423 return -EINVAL; in imx6q_pm_enter()
448 return -ENODEV; in imx6_pm_get_base()
454 base->pbase = res.start; in imx6_pm_get_base()
455 base->vbase = ioremap(res.start, resource_size(&res)); in imx6_pm_get_base()
456 if (!base->vbase) in imx6_pm_get_base()
457 ret = -ENOMEM; in imx6_pm_get_base()
479 return -EINVAL; in imx6q_suspend_init()
482 node = of_find_compatible_node(NULL, NULL, "mmio-sram"); in imx6q_suspend_init()
485 return -ENODEV; in imx6q_suspend_init()
491 ret = -ENODEV; in imx6q_suspend_init()
495 ocram_pool = gen_pool_get(&pdev->dev, NULL); in imx6q_suspend_init()
498 ret = -ENODEV; in imx6q_suspend_init()
505 ret = -ENOMEM; in imx6q_suspend_init()
516 pm_info->pbase = ocram_pbase; in imx6q_suspend_init()
517 pm_info->resume_addr = __pa_symbol(v7_cpu_resume); in imx6q_suspend_init()
518 pm_info->pm_info_size = sizeof(*pm_info); in imx6q_suspend_init()
521 * ccm physical address is not used by asm code currently, in imx6q_suspend_init()
522 * so get ccm virtual address directly. in imx6q_suspend_init()
524 pm_info->ccm_base.vbase = ccm_base; in imx6q_suspend_init()
526 ret = imx6_pm_get_base(&pm_info->mmdc_base, socdata->mmdc_compat); in imx6q_suspend_init()
532 ret = imx6_pm_get_base(&pm_info->src_base, socdata->src_compat); in imx6q_suspend_init()
538 ret = imx6_pm_get_base(&pm_info->iomuxc_base, socdata->iomuxc_compat); in imx6q_suspend_init()
544 ret = imx6_pm_get_base(&pm_info->gpc_base, socdata->gpc_compat); in imx6q_suspend_init()
550 if (socdata->pl310_compat) { in imx6q_suspend_init()
551 ret = imx6_pm_get_base(&pm_info->l2_base, socdata->pl310_compat); in imx6q_suspend_init()
553 pr_warn("%s: failed to get pl310-cache base %d!\n", in imx6q_suspend_init()
559 pm_info->ddr_type = imx_mmdc_get_ddr_type(); in imx6q_suspend_init()
560 pm_info->mmdc_io_num = socdata->mmdc_io_num; in imx6q_suspend_init()
561 mmdc_offset_array = socdata->mmdc_io_offset; in imx6q_suspend_init()
563 for (i = 0; i < pm_info->mmdc_io_num; i++) { in imx6q_suspend_init()
564 pm_info->mmdc_io_val[i][0] = in imx6q_suspend_init()
566 pm_info->mmdc_io_val[i][1] = in imx6q_suspend_init()
567 readl_relaxed(pm_info->iomuxc_base.vbase + in imx6q_suspend_init()
574 MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info)); in imx6q_suspend_init()
581 iounmap(pm_info->gpc_base.vbase); in imx6q_suspend_init()
583 iounmap(pm_info->iomuxc_base.vbase); in imx6q_suspend_init()
585 iounmap(pm_info->src_base.vbase); in imx6q_suspend_init()
587 iounmap(pm_info->mmdc_base.vbase); in imx6q_suspend_init()
589 put_device(&pdev->dev); in imx6q_suspend_init()
618 gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); in imx6_pm_common_init()
640 return -EBUSY; in imx6_pm_stby_poweroff_probe()
664 if (of_property_read_bool(np, "fsl,pmic-stby-poweroff")) in imx6_pm_ccm_init()
688 gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); in imx6sl_pm_init()