All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] arm: vf610: add NFC clock support
Date: Wed,  6 Aug 2014 10:59:36 +0200	[thread overview]
Message-ID: <f0f7cb3f4ae82f32220b13e95aa09b4e2df56897.1407312577.git.stefan@agner.ch> (raw)
In-Reply-To: <cover.1407312577.git.stefan@agner.ch>

Add NFC (NAND Flash Controller) clock support and enable them
at board initialization time.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 arch/arm/include/asm/arch-vf610/crm_regs.h | 14 ++++++++++++++
 arch/arm/include/asm/arch-vf610/imx-regs.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/arch/arm/include/asm/arch-vf610/crm_regs.h b/arch/arm/include/asm/arch-vf610/crm_regs.h
index 5256624..724682c 100644
--- a/arch/arm/include/asm/arch-vf610/crm_regs.h
+++ b/arch/arm/include/asm/arch-vf610/crm_regs.h
@@ -156,14 +156,27 @@ struct anadig_reg {
 #define CCM_CSCMR1_ESDHC1_CLK_SEL_OFFSET	18
 #define CCM_CSCMR1_ESDHC1_CLK_SEL_MASK		(0x3 << 18)
 #define CCM_CSCMR1_ESDHC1_CLK_SEL(v)		(((v) & 0x3) << 18)
+#define CCM_CSCMR1_NFC_CLK_SEL_OFFSET		12
+#define CCM_CSCMR1_NFC_CLK_SEL_MASK		(0x3 << 12)
+#define CCM_CSCMR1_NFC_CLK_SEL(v)		(((v) & 0x3) << 12)
 
 #define CCM_CSCDR1_RMII_CLK_EN			(1 << 24)
 
+#define CCM_CSCDR2_NFC_EN			(1 << 9)
+#define CCM_CSCDR2_NFC_FRAC_DIV_EN		(1 << 13)
+#define CCM_CSCDR2_NFC_CLK_INV			(1 << 14)
+#define CCM_CSCDR2_NFC_FRAC_DIV_OFFSET		4
+#define CCM_CSCDR2_NFC_FRAC_DIV_MASK		(0xf << 4)
+#define CCM_CSCDR2_NFC_FRAC_DIV(v)		(((v) & 0xf) << 4)
+
 #define CCM_CSCDR2_ESDHC1_EN			(1 << 29)
 #define CCM_CSCDR2_ESDHC1_CLK_DIV_OFFSET	20
 #define CCM_CSCDR2_ESDHC1_CLK_DIV_MASK		(0xf << 20)
 #define CCM_CSCDR2_ESDHC1_CLK_DIV(v)		(((v) & 0xf) << 20)
 
+#define CCM_CSCDR3_NFC_PRE_DIV_OFFSET		13
+#define CCM_CSCDR3_NFC_PRE_DIV_MASK		(0x7 << 13)
+#define CCM_CSCDR3_NFC_PRE_DIV(v)		(((v) & 0x7) << 13)
 #define CCM_CSCDR3_QSPI0_EN			(1 << 4)
 #define CCM_CSCDR3_QSPI0_DIV(v)			((v) << 3)
 #define CCM_CSCDR3_QSPI0_X2_DIV(v)		((v) << 2)
@@ -195,6 +208,7 @@ struct anadig_reg {
 #define CCM_CCGR7_SDHC1_CTRL_MASK		(0x3 << 4)
 #define CCM_CCGR9_FEC0_CTRL_MASK		0x3
 #define CCM_CCGR9_FEC1_CTRL_MASK		(0x3 << 2)
+#define CCM_CCGR10_NFC_CTRL_MASK		0x3
 
 #define ANADIG_PLL5_CTRL_BYPASS                 (1 << 16)
 #define ANADIG_PLL5_CTRL_ENABLE                 (1 << 13)
diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h
index bd6f680..bb00217 100644
--- a/arch/arm/include/asm/arch-vf610/imx-regs.h
+++ b/arch/arm/include/asm/arch-vf610/imx-regs.h
@@ -86,6 +86,7 @@
 #define ESDHC1_BASE_ADDR	(AIPS1_BASE_ADDR + 0x00032000)
 #define ENET_BASE_ADDR		(AIPS1_BASE_ADDR + 0x00050000)
 #define ENET1_BASE_ADDR		(AIPS1_BASE_ADDR + 0x00051000)
+#define NFC_BASE_ADDR		(AIPS1_BASE_ADDR + 0x00060000)
 
 #define QSPI0_AMBA_BASE		0x20000000
 
-- 
2.0.4

  parent reply	other threads:[~2014-08-06  8:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  8:59 [U-Boot] [PATCH 0/4] arm: vf610: add NAND flash support Stefan Agner
2014-08-06  8:59 ` [U-Boot] [PATCH 1/4] arm: vf610: add NFC pin mux Stefan Agner
2014-08-30 15:14   ` [U-Boot] [U-Boot,1/4] " Tom Rini
2014-08-06  8:59 ` Stefan Agner [this message]
2014-08-30 15:14   ` [U-Boot] [U-Boot,2/4] arm: vf610: add NFC clock support Tom Rini
2014-08-06  8:59 ` [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver Stefan Agner
2014-08-06 23:01   ` Bill Pringlemeir
2014-08-11 22:33   ` Scott Wood
2014-08-12 21:13     ` Stefan Agner
2014-08-12 22:17       ` Scott Wood
2014-08-12 22:58         ` Bill Pringlemeir
2014-08-13  8:13           ` Stefan Agner
2014-08-13 11:20           ` Stefan Agner
2014-08-13 15:14             ` Bill Pringlemeir
2014-08-13 16:27               ` Stefan Agner
2014-08-13 17:11                 ` Bill Pringlemeir
2014-08-13 20:32             ` Scott Wood
2014-08-13 20:41           ` Scott Wood
2014-08-13 21:44             ` Bill Pringlemeir
2014-08-13 22:54               ` Scott Wood
2014-08-14 14:26                 ` Bill Pringlemeir
2014-08-06  8:59 ` [U-Boot] [PATCH 4/4] arm: vf610: add NAND support for vf610twr Stefan Agner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0f7cb3f4ae82f32220b13e95aa09b4e2df56897.1407312577.git.stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.