Lines Matching +full:ras +full:- +full:to +full:- +full:cas

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>
101 0x56c, 0x578, 0x588, 0x594, /* CAS, RAS, SDCLK_0, SDCLK_1 */
113 0x464, 0x490, 0x4ac, 0x4b0, /* CAS, RAS, SDCLK_0, SDCLK_1 */
125 0x300, 0x31c, 0x338, 0x5ac, /* CAS, RAS, SDCLK_0, GPR_ADDS */
140 0x300, 0x2fc, 0x32c, 0x5f4, /* CAS, RAS, SDCLK_0, GPR_ADDS */
146 0x244, 0x248, 0x24c, 0x250, /* DQM0, DQM1, RAS, CAS */
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,
217 * otherwise, the suspend to ocram function will be broken!
231 u32 mmdc_io_val[MX6_MAX_MMDC_IO_NUM][2]; /* To save offset and value */
249 * need to mask all interrupts in GPC before in imx6_enable_rbc()
267 * need to delay at least 2 cycles of CKIL(32K) in imx6_enable_rbc()
268 * due to hardware design requirement, which is in imx6_enable_rbc()
337 return -EINVAL; in imx6_set_lpm()
341 * ERR007265: CCM: When improper low-power sequence is used, in imx6_set_lpm()
345 * 1) Software should trigger IRQ #32 (IOMUX) to be always pending 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()
370 * as we need to float DDR IO. in imx6q_suspend_finish()
373 /* check if need to flush internal L2 cache */ in imx6q_suspend_finish()
375 suspend_ocram_base)->l2_base.vbase) in imx6q_suspend_finish()
405 * RBC setting, so we do NOT need to do that here. in imx6q_pm_enter()
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()
484 pr_warn("%s: failed to find ocram node!\n", __func__); in imx6q_suspend_init()
485 return -ENODEV; in imx6q_suspend_init()
490 pr_warn("%s: failed to find ocram device!\n", __func__); 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()
504 pr_warn("%s: unable to alloc ocram!\n", __func__); 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()
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()
528 pr_warn("%s: failed to get mmdc base %d!\n", __func__, ret); in imx6q_suspend_init()
532 ret = imx6_pm_get_base(&pm_info->src_base, socdata->src_compat); in imx6q_suspend_init()
534 pr_warn("%s: failed to get src base %d!\n", __func__, ret); in imx6q_suspend_init()
538 ret = imx6_pm_get_base(&pm_info->iomuxc_base, socdata->iomuxc_compat); in imx6q_suspend_init()
540 pr_warn("%s: failed to get iomuxc base %d!\n", __func__, ret); in imx6q_suspend_init()
544 ret = imx6_pm_get_base(&pm_info->gpc_base, socdata->gpc_compat); in imx6q_suspend_init()
546 pr_warn("%s: failed to get gpc base %d!\n", __func__, ret); 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()
614 * Force IOMUXC irq pending, so that the interrupt to GPC can be in imx6_pm_common_init()
615 * used to deassert dsm_request signal when the signal gets in imx6_pm_common_init()
618 gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); in imx6_pm_common_init()
632 pr_emerg("Unable to poweroff system\n"); in imx6_pm_stby_poweroff()
640 return -EBUSY; in imx6_pm_stby_poweroff_probe()
657 * Initialize CCM_CLPCR_LPM into RUN mode to avoid ARM core in imx6_pm_ccm_init()
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()