linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] ARM i.MX51: setup MIPI during startup
Date: Mon, 12 Nov 2012 16:23:23 +0100	[thread overview]
Message-ID: <1352733809-27230-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1352733809-27230-1-git-send-email-s.hauer@pengutronix.de>

The MIPI interface has to be initialized for proper IPU support.
The MIPI officially is not supported, but still needs initialization.
This patch adds this to the SoC startup as all it does is poking
some magic values into registers for which we do not have documentation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/mm-imx5.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index acb0aad..f01e74f 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -81,8 +81,28 @@ void __init imx50_init_early(void)
 	mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
 }
 
+/*
+ * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by
+ * the Freescale marketing division. However this did not remove the
+ * hardware from the chip which still needs to be configured for proper
+ * IPU support.
+ */
+static void __init imx51_ipu_mipi_setup(void)
+{
+	void __iomem *hsc_addr;
+	hsc_addr = MX51_IO_ADDRESS(MX51_MIPI_HSC_BASE_ADDR);
+
+	/* setup MIPI module to legacy mode */
+	__raw_writel(0xf00, hsc_addr);
+
+	/* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */
+	__raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff,
+		hsc_addr + 0x800);
+}
+
 void __init imx51_init_early(void)
 {
+	imx51_ipu_mipi_setup();
 	mxc_set_cpu_type(MXC_CPU_MX51);
 	mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
 	mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
-- 
1.7.10.4

  reply	other threads:[~2012-11-12 15:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 15:23 [PATCH] i.MX IPU SoC support Sascha Hauer
2012-11-12 15:23 ` Sascha Hauer [this message]
2012-11-12 15:23 ` [PATCH 2/7] ARM i.MX6: fix ldb_di_sel mux Sascha Hauer
2012-11-12 15:23 ` [PATCH 3/7] ARM i.MX5: switch IPU clk support to devicetree bindings Sascha Hauer
2012-12-11  5:57   ` Shawn Guo
2012-12-11  9:14     ` Sascha Hauer
2012-12-11 13:13       ` Shawn Guo
2012-11-12 15:23 ` [PATCH 4/7] ARM i.MX53: Add IPU support Sascha Hauer
2012-11-12 15:23 ` [PATCH 5/7] ARM i.MX51: " Sascha Hauer
2012-11-12 15:23 ` [PATCH 6/7] ARM i.MX6: " Sascha Hauer
2012-11-12 15:23 ` [PATCH 7/7] ARM i.MX51 babbage: Add display support Sascha Hauer
2012-11-12 21:40   ` Martin Fuzzey
2012-11-12 21:53     ` Fabio Estevam
2013-01-08 16:41   ` Fabio Estevam
2013-01-08 17:04     ` Fabio Estevam
2013-01-08 17:09       ` Marek Vasut
2013-01-08 17:23         ` Philipp Zabel
2013-01-08 17:29           ` Marek Vasut
2013-01-09  9:04             ` Philipp Zabel
2013-01-09  9:26               ` Marek Vasut
2013-01-09  9:46                 ` Philipp Zabel
2013-01-09 10:25                   ` Marek Vasut
2013-01-08 17:31           ` Fabio Estevam
2012-11-13  2:52 ` [PATCH] i.MX IPU SoC support Shawn Guo

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=1352733809-27230-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).