]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/arm/include/asm/arch-mx5/crm_regs.h
karo: merge with Ka-Ro specific tree for secure boot support
[karo-tx-uboot.git] / arch / arm / include / asm / arch-mx5 / crm_regs.h
index 3b0ed64fc09a53ae80c95760b9835a7f7300555e..fee81e490089fda5d9770d5f5dbb798bf144a62c 100644 (file)
@@ -1,23 +1,7 @@
 /*
  * (C) Copyright 2009 Freescale Semiconductor, Inc.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __ARCH_ARM_MACH_MX51_CRM_REGS_H__
@@ -56,7 +40,7 @@ struct mxc_ccm_reg {
        u32 cs1cdr;
        u32 cs2cdr;
        u32 cdcdr;      /* 0x0030 */
-       u32 chscdr;
+       u32 chsccdr;
        u32 cscdr2;
        u32 cscdr3;
        u32 cscdr4;     /* 0x0040 */
@@ -82,6 +66,44 @@ struct mxc_ccm_reg {
        u32 cmeor;
 };
 
+/* Define the bits in register CCR */
+#define MXC_CCM_CCR_COSC_EN                    (0x1 << 12)
+#if defined(CONFIG_MX51)
+#define MXC_CCM_CCR_FPM_MULT                   (0x1 << 11)
+#endif
+#define MXC_CCM_CCR_CAMP2_EN                   (0x1 << 10)
+#define MXC_CCM_CCR_CAMP1_EN                   (0x1 << 9)
+#if defined(CONFIG_MX51)
+#define MXC_CCM_CCR_FPM_EN                     (0x1 << 8)
+#endif
+#define MXC_CCM_CCR_OSCNT_OFFSET               0
+#define MXC_CCM_CCR_OSCNT_MASK                 0xFF
+#define MXC_CCM_CCR_OSCNT(v)                   ((v) & 0xFF)
+#define MXC_CCM_CCR_OSCNT_RD(r)                        ((r) & 0xFF)
+
+/* Define the bits in register CCSR */
+#if defined(CONFIG_MX51)
+#define MXC_CCM_CCSR_LP_APM                    (0x1 << 9)
+#elif defined(CONFIG_MX53)
+#define MXC_CCM_CCSR_LP_APM                    (0x1 << 10)
+#define MXC_CCM_CCSR_PLL4_SW_CLK_SEL           (0x1 << 9)
+#endif
+#define MXC_CCM_CCSR_STEP_SEL_OFFSET           7
+#define MXC_CCM_CCSR_STEP_SEL_MASK             (0x3 << 7)
+#define MXC_CCM_CCSR_STEP_SEL(v)               (((v) & 0x3) << 7)
+#define MXC_CCM_CCSR_STEP_SEL_RD(r)            (((r) >> 7) & 0x3)
+#define MXC_CCM_CCSR_PLL2_DIV_PODF_OFFSET      5
+#define MXC_CCM_CCSR_PLL2_DIV_PODF_MASK                (0x3 << 5)
+#define MXC_CCM_CCSR_PLL2_DIV_PODF(v)          (((v) & 0x3) << 5)
+#define MXC_CCM_CCSR_PLL2_DIV_PODF_RD(r)       (((r) >> 5) & 0x3)
+#define MXC_CCM_CCSR_PLL3_DIV_PODF_OFFSET      3
+#define MXC_CCM_CCSR_PLL3_DIV_PODF_MASK                (0x3 << 3)
+#define MXC_CCM_CCSR_PLL3_DIV_PODF(v)          (((v) & 0x3) << 3)
+#define MXC_CCM_CCSR_PLL3_DIV_PODF_RD(r)       (((r) >> 3) & 0x3)
+#define MXC_CCM_CCSR_PLL1_SW_CLK_SEL           (0x1 << 2)
+#define MXC_CCM_CCSR_PLL2_SW_CLK_SEL           (0x1 << 1)
+#define MXC_CCM_CCSR_PLL3_SW_CLK_SEL           0x1
+
 /* Define the bits in register CACRR */
 #define MXC_CCM_CACRR_ARM_PODF_OFFSET          0
 #define MXC_CCM_CACRR_ARM_PODF_MASK            0x7
@@ -281,7 +303,10 @@ struct mxc_ccm_reg {
 #define MXC_CCM_CSCDR1_UART_CLK_PODF_RD(r)             ((r) & 0x7)
 
 /* Define the bits in register CCDR */
-#define MXC_CCM_CCDR_IPU_HS_MASK                       (0x1 << 17)
+#define MXC_CCM_CCDR_IPU_HS_MASK                       (0x1 << 21)
+
+/* Define the bits in register CGPR */
+#define MXC_CCM_CGPR_EFUSE_PROG_SUPPLY_GATE            (1 << 4)
 
 /* Define the bits in register CCGRx */
 #define MXC_CCM_CCGR_CG_MASK                           0x3
@@ -566,7 +591,7 @@ struct mxc_ccm_reg {
 #endif
 
 /* Define the bits in register CLPCR */
-#define MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS                 (0x1 << 18)
+#define MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS                        (0x1 << 18)
 
 #define        MXC_DPLLC_CTL_HFSM                              (1 << 7)
 #define        MXC_DPLLC_CTL_DPDCK0_2_EN                       (1 << 12)