linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: denis@eukrea.com (Denis Carikli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/22] ARM: i.MX25 DT: use auxdata to attach imxfb_platform_data
Date: Mon, 15 Jul 2013 16:56:50 +0200	[thread overview]
Message-ID: <1373900227-341-6-git-send-email-denis@eukrea.com> (raw)
In-Reply-To: <1373900227-341-1-git-send-email-denis@eukrea.com>

This commit is based on the following commit:
  ab2815c3997b179f043a747264d155ab0bc181ad ARM: mxs: use auxdata to attach mxsfb_platform_data

Signed-off-by: Denis Carikli <denis@eukrea.com>
---
 arch/arm/mach-imx/Kconfig    |    1 +
 arch/arm/mach-imx/imx25-dt.c |   75 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 8f7109e..ed09a63 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -255,6 +255,7 @@ endchoice
 config MACH_IMX25_DT
 	bool "Support i.MX25 platforms from device tree"
 	select SOC_IMX25
+	select IMX_HAVE_PLATFORM_IMX_FB
 	help
 	  Include support for Freescale i.MX25 based platforms
 	  using the device tree for discovery
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c
index 3e1ec5f..dbfac49 100644
--- a/arch/arm/mach-imx/imx25-dt.c
+++ b/arch/arm/mach-imx/imx25-dt.c
@@ -12,16 +12,89 @@
 #include <linux/irq.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
+#include <linux/platform_data/video-imxfb.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include "common.h"
 #include "mx25.h"
 
+static struct imx_fb_videomode eukrea_mximxsd_modes[] = {
+	 {
+		.mode   = {
+			.name		= "CMO-QVGA",
+			.refresh	= 60,
+			.xres		= 320,
+			.yres		= 240,
+			.pixclock	= KHZ2PICOS(6500),
+			.left_margin	= 30,
+			.right_margin	= 38,
+			.upper_margin	= 20,
+			.lower_margin	= 3,
+			.hsync_len	= 15,
+			.vsync_len	= 4,
+		},
+		.bpp	= 16,
+		.pcr	= 0xCAD08B80,
+	 }, {
+		.mode = {
+			.name		= "DVI-VGA",
+			.refresh	= 60,
+			.xres		= 640,
+			.yres		= 480,
+			.pixclock	= 32000,
+			.hsync_len	= 7,
+			.left_margin	= 100,
+			.right_margin	= 100,
+			.vsync_len	= 7,
+			.upper_margin	= 7,
+			.lower_margin	= 100,
+		},
+		.pcr	= 0xFA208B80,
+		.bpp	= 16,
+	 }, {
+		.mode = {
+			.name		= "DVI-SVGA",
+			.refresh	= 60,
+			.xres		= 800,
+			.yres		= 600,
+			.pixclock	= 25000,
+			.hsync_len	= 7,
+			.left_margin	= 75,
+			.right_margin	= 75,
+			.vsync_len	= 7,
+			.upper_margin	= 7,
+			.lower_margin	= 75,
+		},
+		.pcr	= 0xFA208B80,
+		.bpp	= 16,
+	 },
+};
+
+static struct imx_fb_platform_data imxfb_pdata __initdata;
+
+static struct of_dev_auxdata imx_auxdata_lookup[] __initdata = {
+	OF_DEV_AUXDATA("fsl,imx21-lcdif", 0x53fbc000, "imx21-fb", &imxfb_pdata),
+	{ /* sentinel */ }
+};
+
+static void __init eukrea_mximxsd_init(void)
+{
+	imxfb_pdata.mode = eukrea_mximxsd_modes;
+	imxfb_pdata.num_modes = ARRAY_SIZE(eukrea_mximxsd_modes);
+	imxfb_pdata.pwmr	= 0x00A903FF;
+	imxfb_pdata.lscr1	= 0x00120300;
+	imxfb_pdata.dmacr	= 0x00040060;
+}
+
 static void __init imx25_dt_init(void)
 {
 	mxc_arch_reset_init_dt();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	if (of_machine_is_compatible("fsl,eukrea_cpuimx25"))
+		eukrea_mximxsd_init();
+
+	of_platform_populate(NULL, of_default_bus_match_table,
+				imx_auxdata_lookup, NULL);
 }
 
 static const char * const imx25_dt_board_compat[] __initconst = {
-- 
1.7.9.5

  parent reply	other threads:[~2013-07-15 14:56 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 14:56 Devicetree support for Eukrea cpuimx{25,35,51} Denis Carikli
2013-07-15 14:56 ` [PATCH 01/22] ARM i.MX25: devicetree: add compatible property for imxfb support Denis Carikli
2013-07-15 21:16   ` Sascha Hauer
2013-07-15 21:22     ` Fabio Estevam
2013-07-15 14:56 ` [PATCH 02/22] arm/dts: imx25.dtsi: Add an alias for the LCD controller Denis Carikli
2013-07-15 14:56 ` [PATCH 03/22] pinctrl: pinctrl-imx: add imx25 pinctrl driver Denis Carikli
2013-07-16  7:46   ` Shawn Guo
2013-09-05 13:04     ` Fabio Estevam
2013-09-05 13:10       ` Eric Bénard
2013-07-15 14:56 ` [PATCH 04/22] arm/dts: imx25.dtsi: Add some pinmux pins Denis Carikli
2013-07-16  7:49   ` Shawn Guo
2013-07-15 14:56 ` Denis Carikli [this message]
2013-07-15 21:19   ` [PATCH 05/22] ARM: i.MX25 DT: use auxdata to attach imxfb_platform_data Sascha Hauer
2013-07-15 14:56 ` [PATCH 06/22] arm/dts: i.MX25: Add ssi clocks and DMA events Denis Carikli
2013-07-15 21:20   ` Sascha Hauer
2013-07-16  8:17   ` Shawn Guo
2013-07-15 14:56 ` [PATCH 07/22] arm/dts: i.MX25: Add sdma script path Denis Carikli
2013-07-16  8:37   ` Shawn Guo
2013-07-15 14:56 ` [PATCH 08/22] ASoC: eukrea-tlv320: Add DT support Denis Carikli
2013-07-16  8:40   ` Shawn Guo
2013-07-15 14:56 ` [PATCH 09/22] arm/dts: imx25.dtsi: Add an alias for the Audio Multiplexer Denis Carikli
2013-07-15 14:56 ` [PATCH 10/22] arm/dts: Add support for the cpuimx25 board from Eukrea and its baseboard Denis Carikli
2013-07-15 21:26   ` Sascha Hauer
2013-07-16  8:47   ` Shawn Guo
2013-07-15 14:56 ` [PATCH 11/22] arm/dts: imx51.dtsi: i2c1 : Add pinctrl configuration Denis Carikli
2013-07-15 14:56 ` [PATCH 12/22] video: backlight: Add GPIO Backlight driver Denis Carikli
2013-07-16  8:49   ` Shawn Guo
2013-07-15 14:56 ` [PATCH 13/22] lcd: Add GPIO LCD driver Denis Carikli
2013-07-15 15:30   ` Alexander Shiyan
2013-07-15 16:14   ` Fabio Estevam
2013-07-15 14:56 ` [PATCH 14/22] staging: imx-drm: use of_get_display_timings Denis Carikli
2013-07-15 14:57 ` [PATCH 15/22] drm: Add the lacking DRM_MODE_FLAG_* for matching the DISPLAY_FLAGS_* Denis Carikli
2013-07-15 21:30   ` Sascha Hauer
2013-07-15 14:57 ` [PATCH 16/22] staging: drm/imx: ipuv3-crtc: don't harcode some mode flags Denis Carikli
2013-07-15 14:57 ` [PATCH 17/22] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format Denis Carikli
2013-07-15 14:57 ` [PATCH 18/22] staging: video: imx: Add RGB666 support for parallel display Denis Carikli
2013-07-15 18:27   ` Fabio Estevam
2013-07-15 14:57 ` [PATCH 19/22] Input: tsc2007: Add device tree support Denis Carikli
2013-07-15 16:08   ` Fabio Estevam
2013-07-15 21:43   ` Sascha Hauer
2013-07-15 14:57 ` [PATCH 20/22] arm/dts: Add support for the cpuimx51 board from Eukrea and its baseboard Denis Carikli
2013-07-15 18:10   ` Fabio Estevam
2013-07-15 14:57 ` [PATCH 21/22] DT: Add basic support for imx35-based devices Denis Carikli
2013-07-15 15:19   ` Alexander Shiyan
2013-07-15 21:50   ` Sascha Hauer
2013-07-15 14:57 ` [PATCH 22/22] arm/dts: Add support for the cpuimx35 board from Eukrea and its baseboard Denis Carikli

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=1373900227-341-6-git-send-email-denis@eukrea.com \
    --to=denis@eukrea.com \
    --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).