All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv14][ 1/4] video: imxfb: Introduce regulator support.
@ 2014-01-22 17:09 ` Denis Carikli
  0 siblings, 0 replies; 18+ messages in thread
From: Denis Carikli @ 2014-01-22 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

This commit is based on the following commit by Fabio Estevam:
  4344429 video: mxsfb: Introduce regulator support

Cc: Eric Bénard <eric@eukrea.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v13->v14:
- Remove people not concerned by this patch from the Cc list.
- Simplified the regulator handling: The regulator-core now supplies
  a dummy regulator if one hasn't been hooked up explicitely.
  So we don't need to handle that case in the driver.
  The code has been updated to do that, and the error messages
  were updated accordingly.

ChangeLog v9->v10:
- Added a return 0; at the end of imxfb_disable_controller.

ChangeLog v8->v9:
- return an error if regulator_{enable,disable} fails in
  imxfb_{enable,disable}_controller, and use it.
---
 drivers/video/imxfb.c |   38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 44ee678..dd8a35d 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -28,6 +28,7 @@
 #include <linux/cpufreq.h>
 #include <linux/clk.h>
 #include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
 #include <linux/math64.h>
@@ -145,6 +146,7 @@ struct imxfb_info {
 	struct clk		*clk_ipg;
 	struct clk		*clk_ahb;
 	struct clk		*clk_per;
+	struct regulator	*reg_lcd;
 	enum imxfb_type		devtype;
 	bool			enabled;
 
@@ -561,14 +563,16 @@ static void imxfb_exit_backlight(struct imxfb_info *fbi)
 }
 #endif
 
-static void imxfb_enable_controller(struct imxfb_info *fbi)
+static int imxfb_enable_controller(struct imxfb_info *fbi)
 {
-
 	if (fbi->enabled)
-		return;
+		return 0;
 
 	pr_debug("Enabling LCD controller\n");
 
+	if (regulator_enable(fbi->reg_lcd))
+		dev_err(&fbi->pdev->dev, "Failed to enable regulator.\n");
+
 	writel(fbi->screen_dma, fbi->regs + LCDC_SSA);
 
 	/* panning offset 0 (0 pixel offset)        */
@@ -593,12 +597,14 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
 		fbi->backlight_power(1);
 	if (fbi->lcd_power)
 		fbi->lcd_power(1);
+
+	return 0;
 }
 
-static void imxfb_disable_controller(struct imxfb_info *fbi)
+static int imxfb_disable_controller(struct imxfb_info *fbi)
 {
 	if (!fbi->enabled)
-		return;
+		return 0;
 
 	pr_debug("Disabling LCD controller\n");
 
@@ -613,6 +619,11 @@ static void imxfb_disable_controller(struct imxfb_info *fbi)
 	fbi->enabled = false;
 
 	writel(0, fbi->regs + LCDC_RMCR);
+
+	if(regulator_disable(fbi->reg_lcd))
+		dev_err(&fbi->pdev->dev, "Failed to disable regulator.\n");
+
+	return 0;
 }
 
 static int imxfb_blank(int blank, struct fb_info *info)
@@ -626,13 +637,12 @@ static int imxfb_blank(int blank, struct fb_info *info)
 	case FB_BLANK_VSYNC_SUSPEND:
 	case FB_BLANK_HSYNC_SUSPEND:
 	case FB_BLANK_NORMAL:
-		imxfb_disable_controller(fbi);
-		break;
+		return imxfb_disable_controller(fbi);
 
 	case FB_BLANK_UNBLANK:
-		imxfb_enable_controller(fbi);
-		break;
+		return imxfb_enable_controller(fbi);
 	}
+
 	return 0;
 }
 
@@ -734,8 +744,7 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
 
 	pr_debug("%s\n", __func__);
 
-	imxfb_disable_controller(fbi);
-	return 0;
+	return imxfb_disable_controller(fbi);
 }
 
 static int imxfb_resume(struct platform_device *dev)
@@ -745,8 +754,7 @@ static int imxfb_resume(struct platform_device *dev)
 
 	pr_debug("%s\n", __func__);
 
-	imxfb_enable_controller(fbi);
-	return 0;
+	return imxfb_enable_controller(fbi);
 }
 #else
 #define imxfb_suspend	NULL
@@ -1020,6 +1028,10 @@ static int imxfb_probe(struct platform_device *pdev)
 		goto failed_register;
 	}
 
+	fbi->reg_lcd = devm_regulator_get(&pdev->dev, "lcd");
+	if (IS_ERR(fbi->reg_lcd))
+		return PTR_ERR(fbi->reg_lcd);
+
 	imxfb_enable_controller(fbi);
 	fbi->pdev = pdev;
 #ifdef PWMR_BACKLIGHT_AVAILABLE
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCHv14][ 1/4] video: imxfb: Introduce regulator support.
@ 2014-01-22 17:09 ` Denis Carikli
  0 siblings, 0 replies; 18+ messages in thread
From: Denis Carikli @ 2014-01-22 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

This commit is based on the following commit by Fabio Estevam:
  4344429 video: mxsfb: Introduce regulator support

Cc: Eric B?nard <eric@eukrea.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-fbdev at vger.kernel.org
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v13->v14:
- Remove people not concerned by this patch from the Cc list.
- Simplified the regulator handling: The regulator-core now supplies
  a dummy regulator if one hasn't been hooked up explicitely.
  So we don't need to handle that case in the driver.
  The code has been updated to do that, and the error messages
  were updated accordingly.

ChangeLog v9->v10:
- Added a return 0; at the end of imxfb_disable_controller.

ChangeLog v8->v9:
- return an error if regulator_{enable,disable} fails in
  imxfb_{enable,disable}_controller, and use it.
---
 drivers/video/imxfb.c |   38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 44ee678..dd8a35d 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -28,6 +28,7 @@
 #include <linux/cpufreq.h>
 #include <linux/clk.h>
 #include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
 #include <linux/math64.h>
@@ -145,6 +146,7 @@ struct imxfb_info {
 	struct clk		*clk_ipg;
 	struct clk		*clk_ahb;
 	struct clk		*clk_per;
+	struct regulator	*reg_lcd;
 	enum imxfb_type		devtype;
 	bool			enabled;
 
@@ -561,14 +563,16 @@ static void imxfb_exit_backlight(struct imxfb_info *fbi)
 }
 #endif
 
-static void imxfb_enable_controller(struct imxfb_info *fbi)
+static int imxfb_enable_controller(struct imxfb_info *fbi)
 {
-
 	if (fbi->enabled)
-		return;
+		return 0;
 
 	pr_debug("Enabling LCD controller\n");
 
+	if (regulator_enable(fbi->reg_lcd))
+		dev_err(&fbi->pdev->dev, "Failed to enable regulator.\n");
+
 	writel(fbi->screen_dma, fbi->regs + LCDC_SSA);
 
 	/* panning offset 0 (0 pixel offset)        */
@@ -593,12 +597,14 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
 		fbi->backlight_power(1);
 	if (fbi->lcd_power)
 		fbi->lcd_power(1);
+
+	return 0;
 }
 
-static void imxfb_disable_controller(struct imxfb_info *fbi)
+static int imxfb_disable_controller(struct imxfb_info *fbi)
 {
 	if (!fbi->enabled)
-		return;
+		return 0;
 
 	pr_debug("Disabling LCD controller\n");
 
@@ -613,6 +619,11 @@ static void imxfb_disable_controller(struct imxfb_info *fbi)
 	fbi->enabled = false;
 
 	writel(0, fbi->regs + LCDC_RMCR);
+
+	if(regulator_disable(fbi->reg_lcd))
+		dev_err(&fbi->pdev->dev, "Failed to disable regulator.\n");
+
+	return 0;
 }
 
 static int imxfb_blank(int blank, struct fb_info *info)
@@ -626,13 +637,12 @@ static int imxfb_blank(int blank, struct fb_info *info)
 	case FB_BLANK_VSYNC_SUSPEND:
 	case FB_BLANK_HSYNC_SUSPEND:
 	case FB_BLANK_NORMAL:
-		imxfb_disable_controller(fbi);
-		break;
+		return imxfb_disable_controller(fbi);
 
 	case FB_BLANK_UNBLANK:
-		imxfb_enable_controller(fbi);
-		break;
+		return imxfb_enable_controller(fbi);
 	}
+
 	return 0;
 }
 
@@ -734,8 +744,7 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
 
 	pr_debug("%s\n", __func__);
 
-	imxfb_disable_controller(fbi);
-	return 0;
+	return imxfb_disable_controller(fbi);
 }
 
 static int imxfb_resume(struct platform_device *dev)
@@ -745,8 +754,7 @@ static int imxfb_resume(struct platform_device *dev)
 
 	pr_debug("%s\n", __func__);
 
-	imxfb_enable_controller(fbi);
-	return 0;
+	return imxfb_enable_controller(fbi);
 }
 #else
 #define imxfb_suspend	NULL
@@ -1020,6 +1028,10 @@ static int imxfb_probe(struct platform_device *pdev)
 		goto failed_register;
 	}
 
+	fbi->reg_lcd = devm_regulator_get(&pdev->dev, "lcd");
+	if (IS_ERR(fbi->reg_lcd))
+		return PTR_ERR(fbi->reg_lcd);
+
 	imxfb_enable_controller(fbi);
 	fbi->pdev = pdev;
 #ifdef PWMR_BACKLIGHT_AVAILABLE
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCHv14][ 3/4] video: Kconfig: Allow more broad selection of the imxfb framebuffer driver.
  2014-01-22 17:09 ` Denis Carikli
@ 2014-01-22 17:09   ` Denis Carikli
  -1 siblings, 0 replies; 18+ messages in thread
From: Denis Carikli @ 2014-01-22 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

Without that patch, a user can't select the imxfb driver when the i.MX25 and/or
  the i.MX27 device tree board are selected and that no boards that selects
  IMX_HAVE_PLATFORM_IMX_FB are compiled in.

Cc: Eric Bénard <eric@eukrea.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Denis Carikli <denis@eukrea.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
---
ChangeLog v11->v14:
- Remove people not concerned by this patch from the Cc list.

ChangeLog v10->v11:
- moved my signed-off-by.

ChangeLog v8->v9:
- Added Jean-Christophe PLAGNIOL-VILLARD's ACK.
---
 drivers/video/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 22262a3..dade5b7 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -364,7 +364,7 @@ config FB_SA1100
 
 config FB_IMX
 	tristate "Freescale i.MX1/21/25/27 LCD support"
-	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
+	depends on FB && ARCH_MXC
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCHv14][ 3/4] video: Kconfig: Allow more broad selection of the imxfb framebuffer driver.
@ 2014-01-22 17:09   ` Denis Carikli
  0 siblings, 0 replies; 18+ messages in thread
From: Denis Carikli @ 2014-01-22 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

Without that patch, a user can't select the imxfb driver when the i.MX25 and/or
  the i.MX27 device tree board are selected and that no boards that selects
  IMX_HAVE_PLATFORM_IMX_FB are compiled in.

Cc: Eric B?nard <eric@eukrea.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-fbdev at vger.kernel.org
Signed-off-by: Denis Carikli <denis@eukrea.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
---
ChangeLog v11->v14:
- Remove people not concerned by this patch from the Cc list.

ChangeLog v10->v11:
- moved my signed-off-by.

ChangeLog v8->v9:
- Added Jean-Christophe PLAGNIOL-VILLARD's ACK.
---
 drivers/video/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 22262a3..dade5b7 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -364,7 +364,7 @@ config FB_SA1100
 
 config FB_IMX
 	tristate "Freescale i.MX1/21/25/27 LCD support"
-	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
+	depends on FB && ARCH_MXC
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-01-22 17:09 ` Denis Carikli
  (?)
  (?)
@ 2014-01-22 17:09 ` Denis Carikli
  2014-03-12 17:27   ` Fabio Estevam
  -1 siblings, 1 reply; 18+ messages in thread
From: Denis Carikli @ 2014-01-22 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

The CMO-QVGA(With backlight), DVI-VGA and DVI-SVGA displays
were added.

Cc: Eric B?nard <eric@eukrea.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v13->v14:
- Remove people not concerned by this patch from the Cc list.
- changed the fsl,pwmr lcdc property to fsl,lpccr,
  to match the previous patches in that serie.

ChangeLog v10->v13:
- This patch is the display part splitted out from the patch adding
  support for the cpuimx25(and its baseboard).
- Shawn Guo was added to the Cc list.
- The regulator part was updated to match the current style.
- The new GPIO defines are now used in the dts(i).
---
 .../imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts  |   72 ++++++++++++++++++++
 .../imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts  |   45 ++++++++++++
 .../imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts   |   45 ++++++++++++
 3 files changed, 162 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts

diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
new file mode 100644
index 0000000..9de68de
--- /dev/null
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2013 Eukr?a Electromatique <denis@eukrea.com>
+ *
+ * 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.
+ */
+
+#include "imx25-eukrea-mbimxsd25-baseboard.dts"
+
+/ {
+	model = "Eukrea MBIMXSD25 with the CMO-QVGA Display";
+	compatible = "eukrea,mbimxsd25-baseboard-cmo-qvga", "eukrea,mbimxsd25-baseboard", "eukrea,cpuimx25", "fsl,imx25";
+
+	cmo_qvga: display {
+		model = "CMO-QVGA";
+		bits-per-pixel = <16>;
+		fsl,pcr = <0xcad08b80>;
+		bus-width = <18>;
+		native-mode = <&qvga_timings>;
+		display-timings {
+			qvga_timings: 320x240 {
+				clock-frequency = <6500000>;
+				hactive = <320>;
+				vactive = <240>;
+				hback-porch = <30>;
+				hfront-porch = <38>;
+				vback-porch = <20>;
+				vfront-porch = <3>;
+				hsync-len = <15>;
+				vsync-len = <4>;
+			};
+		};
+	};
+
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg_lcd_3v3: regulator at 0 {
+			compatible = "regulator-fixed";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_reg_lcd_3v3>;
+			regulator-name = "lcd-3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+			gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+			enable-active-high;
+		};
+	};
+};
+
+&iomuxc {
+	imx25-eukrea-mbimxsd25-baseboard-cmo-qvga {
+		pinctrl_reg_lcd_3v3: reg_lcd_3v3 {
+			fsl,pins = <MX25_PAD_PWM__GPIO_1_26 0x80000000>;
+		};
+	};
+};
+
+&lcdc {
+	display = <&cmo_qvga>;
+	fsl,lpccr = <0x00a903ff>;
+	lcd-supply = <&reg_lcd_3v3>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
new file mode 100644
index 0000000..8eee2f6
--- /dev/null
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2013 Eukr?a Electromatique <denis@eukrea.com>
+ *
+ * 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.
+ */
+
+#include "imx25-eukrea-mbimxsd25-baseboard.dts"
+
+/ {
+	model = "Eukrea MBIMXSD25 with the DVI-SVGA Display";
+	compatible = "eukrea,mbimxsd25-baseboard-dvi-svga", "eukrea,mbimxsd25-baseboard", "eukrea,cpuimx25", "fsl,imx25";
+
+	dvi_svga: display {
+		model = "DVI-SVGA";
+		bits-per-pixel = <16>;
+		fsl,pcr = <0xfa208b80>;
+		bus-width = <18>;
+		native-mode = <&dvi_svga_timings>;
+		display-timings {
+			dvi_svga_timings: 800x600 {
+				clock-frequency = <40000000>;
+				hactive = <800>;
+				vactive = <600>;
+				hback-porch = <75>;
+				hfront-porch = <75>;
+				vback-porch = <7>;
+				vfront-porch = <75>;
+				hsync-len = <7>;
+				vsync-len = <7>;
+			};
+		};
+	};
+};
+
+&lcdc {
+	display = <&dvi_svga>;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts
new file mode 100644
index 0000000..447da62
--- /dev/null
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2013 Eukr?a Electromatique <denis@eukrea.com>
+ *
+ * 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.
+ */
+
+#include "imx25-eukrea-mbimxsd25-baseboard.dts"
+
+/ {
+	model = "Eukrea MBIMXSD25 with the DVI-VGA Display";
+	compatible = "eukrea,mbimxsd25-baseboard-dvi-vga", "eukrea,mbimxsd25-baseboard", "eukrea,cpuimx25", "fsl,imx25";
+
+	dvi_vga: display {
+		model = "DVI-VGA";
+		bits-per-pixel = <16>;
+		fsl,pcr = <0xfa208b80>;
+		bus-width = <18>;
+		native-mode = <&dvi_vga_timings>;
+		display-timings {
+			dvi_vga_timings: 640x480 {
+				clock-frequency = <31250000>;
+				hactive = <640>;
+				vactive = <480>;
+				hback-porch = <100>;
+				hfront-porch = <100>;
+				vback-porch = <7>;
+				vfront-porch = <100>;
+				hsync-len = <7>;
+				vsync-len = <7>;
+			};
+		};
+	};
+};
+
+&lcdc {
+	display = <&dvi_vga>;
+	status = "okay";
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCHv14][ 3/4] video: Kconfig: Allow more broad selection of the imxfb framebuffer driver.
  2014-01-22 17:09   ` Denis Carikli
@ 2014-02-14  8:43     ` Tomi Valkeinen
  -1 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2014-02-14  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

Hi,

On 22/01/14 19:09, Denis Carikli wrote:
> Without that patch, a user can't select the imxfb driver when the i.MX25 and/or
>   the i.MX27 device tree board are selected and that no boards that selects
>   IMX_HAVE_PLATFORM_IMX_FB are compiled in.
> 
> Cc: Eric Bénard <eric@eukrea.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-fbdev@vger.kernel.org
> Signed-off-by: Denis Carikli <denis@eukrea.com>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Applied for 3.14 fbdev fixes.

As a generic comment, I'd appreciate if you'd use normal formatting in
the patch descriptions (no double spaces in the beginning of the lines).

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 3/4] video: Kconfig: Allow more broad selection of the imxfb framebuffer driver.
@ 2014-02-14  8:43     ` Tomi Valkeinen
  0 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2014-02-14  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 22/01/14 19:09, Denis Carikli wrote:
> Without that patch, a user can't select the imxfb driver when the i.MX25 and/or
>   the i.MX27 device tree board are selected and that no boards that selects
>   IMX_HAVE_PLATFORM_IMX_FB are compiled in.
> 
> Cc: Eric B?nard <eric@eukrea.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-fbdev at vger.kernel.org
> Signed-off-by: Denis Carikli <denis@eukrea.com>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Applied for 3.14 fbdev fixes.

As a generic comment, I'd appreciate if you'd use normal formatting in
the patch descriptions (no double spaces in the beginning of the lines).

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140214/b4a85b49/attachment.sig>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-01-22 17:09 ` [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support Denis Carikli
@ 2014-03-12 17:27   ` Fabio Estevam
  2014-03-12 17:40     ` Eric Bénard
  2014-03-13  9:28     ` Denis Carikli
  0 siblings, 2 replies; 18+ messages in thread
From: Fabio Estevam @ 2014-03-12 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Denis,

On Wed, Jan 22, 2014 at 3:09 PM, Denis Carikli <denis@eukrea.com> wrote:
> The CMO-QVGA(With backlight), DVI-VGA and DVI-SVGA displays
> were added.

I am trying the same on a mx25pdk and these are my changes:

arch/arm/boot/dts/imx25-pdk.dts | 60 +++++++++++++++++++++++++++++++++++++++++
 drivers/video/fbdev/imxfb.c     |  2 +-
 2 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx25-pdk.dts b/arch/arm/boot/dts/imx25-pdk.dts
index cccd8fe..700ae1c 100644
--- a/arch/arm/boot/dts/imx25-pdk.dts
+++ b/arch/arm/boot/dts/imx25-pdk.dts
@@ -21,6 +21,26 @@
         reg = <0x80000000 0x4000000>;
     };

+    display: display {
+        model = "CLAA057VC01CW";
+        native-mode = <&timing0>;
+        bits-per-pixel = <16>;
+        fsl,pcr = <0xfa208b80>;
+        display-timings {
+            timing0: 640x480 {
+                hactive = <640>;
+                vactive = <480>;
+                hback-porch = <114>;
+                hfront-porch = <45>;
+                hsync-len = <1>;
+                vback-porch = <11>;
+                vfront-porch = <33>;
+                vsync-len = <1>;
+                clock-frequency = <25000000>;
+            };
+        };
+    };
+
     regulators {
         compatible = "simple-bus";
         #address-cells = <1>;
@@ -98,6 +118,16 @@
     status = "okay";
 };

+&lcdc {
+    display = <&display>;
+    fsl,lpccr = <0x00a903ff>;
+    fsl,lscr1 = <0x00120300>;
+    fsl,dmacr = <0x00020010>;
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinctrl_lcd>;
+    status = "okay";
+};
+
 &fec {
     phy-mode = "rmii";
     pinctrl-names = "default";
@@ -170,6 +200,36 @@
             >;
         };

+        pinctrl_lcd: lcdgrp {
+            fsl,pins = <
+                MX25_PAD_LD0__LD0        0x80000000
+                MX25_PAD_LD1__LD1        0x80000000
+                MX25_PAD_LD2__LD2        0x80000000
+                MX25_PAD_LD3__LD3        0x80000000
+                MX25_PAD_LD4__LD4        0x80000000
+                MX25_PAD_LD5__LD5        0x80000000
+                MX25_PAD_LD6__LD6        0x80000000
+                MX25_PAD_LD7__LD7        0x80000000
+                MX25_PAD_LD8__LD8        0x80000000
+                MX25_PAD_LD9__LD9        0x80000000
+                MX25_PAD_LD10__LD10        0x80000000
+                MX25_PAD_LD11__LD11        0x80000000
+                MX25_PAD_LD12__LD12        0x80000000
+                MX25_PAD_LD13__LD13        0x80000000
+                MX25_PAD_LD14__LD14        0x80000000
+                MX25_PAD_LD15__LD15        0x80000000
+                MX25_PAD_GPIO_E__LD16        0x80000000
+                MX25_PAD_GPIO_F__LD17        0x80000000
+                MX25_PAD_HSYNC__HSYNC        0x80000000
+                MX25_PAD_VSYNC__VSYNC        0x80000000
+                MX25_PAD_LSCLK__LSCLK        0x80000000
+                MX25_PAD_OE_ACD__OE_ACD        0x80000000
+                MX25_PAD_CONTRAST__CONTRAST    0x80000000
+            >;
+        };
+
+
+
         pinctrl_i2c1: i2c1grp {
             fsl,pins = <
                 MX25_PAD_I2C1_CLK__I2C1_CLK        0x80000000
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index 086e024..45cc30b 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -671,8 +671,8 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)

         fbi->lscr1 = IMXFB_LSCR1_DEFAULT;
         of_property_read_u32(np, "fsl,lscr1", &fbi->lscr1);
-
         of_property_read_u32(np, "fsl,dmacr", &fbi->dmacr);
+        of_property_read_u32(np, "fsl,lpccr", &fbi->pwmr);
     }

     return 0;

This last hunk if from an earlier patch from you. (I suggest you to
resend it since the location of imxfb.c has changed in linux-next).

Is there any other imxfb patch I am missing?

I turned on the backlight supply via bootloader (kernel still does not
support MC34704 PMIC yet), but the LCD screen is white and I cannot
see the Linux logo. The /dev/fb0 does exist though.

Any ideas?

Regards,

Fabio Estevam

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-12 17:27   ` Fabio Estevam
@ 2014-03-12 17:40     ` Eric Bénard
  2014-03-12 18:24       ` Fabio Estevam
  2014-03-13  9:28     ` Denis Carikli
  1 sibling, 1 reply; 18+ messages in thread
From: Eric Bénard @ 2014-03-12 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabio,

Le Wed, 12 Mar 2014 14:27:25 -0300,
Fabio Estevam <festevam@gmail.com> a ?crit :
> Any ideas?
> 
do you drive the signal LCD_EN GPIO3_17 ?

Eric

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-12 17:40     ` Eric Bénard
@ 2014-03-12 18:24       ` Fabio Estevam
  2014-03-12 20:30         ` Fabio Estevam
  2014-03-12 21:07         ` Eric Bénard
  0 siblings, 2 replies; 18+ messages in thread
From: Fabio Estevam @ 2014-03-12 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Eric,

On Wed, Mar 12, 2014 at 2:40 PM, Eric B?nard <eric@eukrea.com> wrote:
> Hi Fabio,
>
> Le Wed, 12 Mar 2014 14:27:25 -0300,
> Fabio Estevam <festevam@gmail.com> a ?crit :
>> Any ideas?
>>
> do you drive the signal LCD_EN GPIO3_17 ?

Good point. Even though I am not touching LCD_EN it is at the correct
level of 0.

I get 3.3V at LCD_VCC and VDD_LCDIO. 5V is present at LCD_5V that
drives the backlight.

So the LCD supplies seem to be good.

The problem should be in some other area.

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-12 18:24       ` Fabio Estevam
@ 2014-03-12 20:30         ` Fabio Estevam
  2014-03-12 21:07         ` Eric Bénard
  1 sibling, 0 replies; 18+ messages in thread
From: Fabio Estevam @ 2014-03-12 20:30 UTC (permalink / raw)
  To: linux-arm-kernel

Denis/Eric,

On Wed, Mar 12, 2014 at 3:24 PM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Eric,
>
> On Wed, Mar 12, 2014 at 2:40 PM, Eric B?nard <eric@eukrea.com> wrote:
>> Hi Fabio,
>>
>> Le Wed, 12 Mar 2014 14:27:25 -0300,
>> Fabio Estevam <festevam@gmail.com> a ?crit :
>>> Any ideas?
>>>
>> do you drive the signal LCD_EN GPIO3_17 ?
>
> Good point. Even though I am not touching LCD_EN it is at the correct
> level of 0.
>
> I get 3.3V at LCD_VCC and VDD_LCDIO. 5V is present at LCD_5V that
> drives the backlight.
>
> So the LCD supplies seem to be good.
>
> The problem should be in some other area.

Do you know of a kernel version where imxfb is functional?

I have tried latest linus tree and booted a non-dt kernel on mx25pdk
and I get the same white display.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-12 18:24       ` Fabio Estevam
  2014-03-12 20:30         ` Fabio Estevam
@ 2014-03-12 21:07         ` Eric Bénard
  2014-03-12 21:16           ` Fabio Estevam
  1 sibling, 1 reply; 18+ messages in thread
From: Eric Bénard @ 2014-03-12 21:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabio,

Le Wed, 12 Mar 2014 15:24:57 -0300,
Fabio Estevam <festevam@gmail.com> a ?crit :
> The problem should be in some other area.
> 
if you have an oscilloscope, can you probe PIXCLK, HSYNC, VSYNC and DE
to check the signals are properly configured vs the datasheet of your
display.

Eric

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-12 21:07         ` Eric Bénard
@ 2014-03-12 21:16           ` Fabio Estevam
  2014-03-13  4:25             ` Alexander Shiyan
  0 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2014-03-12 21:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Eric,

On Wed, Mar 12, 2014 at 6:07 PM, Eric B?nard <eric@eukrea.com> wrote:

> if you have an oscilloscope, can you probe PIXCLK, HSYNC, VSYNC and DE
> to check the signals are properly configured vs the datasheet of your
> display.

Yes, I have measured VSYNC and there is no activity on this line.

Also tried 3.13 with a non-dt kernel and the same issue is seen.

Running FSL 2.6.31 I can see VSYNC at 57Hz and Tux on the display, so
the hardware is good.

At least for me imxfb seems to be broken even for the non-dt case.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-12 21:16           ` Fabio Estevam
@ 2014-03-13  4:25             ` Alexander Shiyan
  2014-03-15  5:14               ` Alexander Shiyan
  0 siblings, 1 reply; 18+ messages in thread
From: Alexander Shiyan @ 2014-03-13  4:25 UTC (permalink / raw)
  To: linux-arm-kernel

?????, 12 ????? 2014, 18:16 -03:00 ?? Fabio Estevam <festevam@gmail.com>:
> Hi Eric,
> 
> On Wed, Mar 12, 2014 at 6:07 PM, Eric B?nard <eric@eukrea.com> wrote:
> 
> > if you have an oscilloscope, can you probe PIXCLK, HSYNC, VSYNC and DE
> > to check the signals are properly configured vs the datasheet of your
> > display.
> 
> Yes, I have measured VSYNC and there is no activity on this line.
> 
> Also tried 3.13 with a non-dt kernel and the same issue is seen.
> 
> Running FSL 2.6.31 I can see VSYNC at 57Hz and Tux on the display, so
> the hardware is good.
> 
> At least for me imxfb seems to be broken even for the non-dt case.

I will check the latest changes on the weekends for i.MX27.

---

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-12 17:27   ` Fabio Estevam
  2014-03-12 17:40     ` Eric Bénard
@ 2014-03-13  9:28     ` Denis Carikli
  1 sibling, 0 replies; 18+ messages in thread
From: Denis Carikli @ 2014-03-13  9:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/12/2014 06:27 PM, Fabio Estevam wrote:
> Hi Denis,
Hi,

> I turned on the backlight supply via bootloader (kernel still does not
> support MC34704 PMIC yet),

Maybe this patchset[1] could help, but it still requires some work, and 
I don't have the hardware to test anymore right now.
So feel free to improve it and resubmit it.

References:
-----------
[1]http://lists.infradead.org/pipermail/linux-arm-kernel/2013-November/thread.html#214619

Denis.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-13  4:25             ` Alexander Shiyan
@ 2014-03-15  5:14               ` Alexander Shiyan
  2014-03-15 14:17                 ` Fabio Estevam
  0 siblings, 1 reply; 18+ messages in thread
From: Alexander Shiyan @ 2014-03-15  5:14 UTC (permalink / raw)
  To: linux-arm-kernel

+CC: Tomi Valkeinen

???????, 13 ????? 2014, 8:25 +04:00 ?? Alexander Shiyan <shc_work@mail.ru>:
> ?????, 12 ????? 2014, 18:16 -03:00 ?? Fabio Estevam <festevam@gmail.com>:
> > Hi Eric,
> > 
> > On Wed, Mar 12, 2014 at 6:07 PM, Eric B?nard <eric@eukrea.com> wrote:
> > 
> > > if you have an oscilloscope, can you probe PIXCLK, HSYNC, VSYNC and DE
> > > to check the signals are properly configured vs the datasheet of your
> > > display.
> > 
> > Yes, I have measured VSYNC and there is no activity on this line.
> > 
> > Also tried 3.13 with a non-dt kernel and the same issue is seen.
> > 
> > Running FSL 2.6.31 I can see VSYNC at 57Hz and Tux on the display, so
> > the hardware is good.
> > 
> > At least for me imxfb seems to be broken even for the non-dt case.
> 
> I will check the latest changes on the weekends for i.MX27.

I acknowledge that the (linux-next-20140314) framebuffer driver works fine.
Today I checked it on Phytec-PCM970 board with i.MX27 (DT).

Nevertheless, I ask Tomi to apply at least two patches for this driver:
http://www.spinics.net/lists/arm-kernel/msg315522.html
http://www.spinics.net/lists/arm-kernel/msg315523.html

---

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-15  5:14               ` Alexander Shiyan
@ 2014-03-15 14:17                 ` Fabio Estevam
  2014-03-15 14:27                   ` Alexander Shiyan
  0 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2014-03-15 14:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 15, 2014 at 2:14 AM, Alexander Shiyan <shc_work@mail.ru> wrote:

> I acknowledge that the (linux-next-20140314) framebuffer driver works fine.
> Today I checked it on Phytec-PCM970 board with i.MX27 (DT).

Thanks for confirming imxfb is functional, Alexander.

Just tried linux-next-20140314 and still do not get LCD functional, so
it looks like a mx25pdk specific issue then.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support.
  2014-03-15 14:17                 ` Fabio Estevam
@ 2014-03-15 14:27                   ` Alexander Shiyan
  0 siblings, 0 replies; 18+ messages in thread
From: Alexander Shiyan @ 2014-03-15 14:27 UTC (permalink / raw)
  To: linux-arm-kernel


???????, 15 ????? 2014, 11:17 -03:00 ?? Fabio Estevam <festevam@gmail.com>:
> On Sat, Mar 15, 2014 at 2:14 AM, Alexander Shiyan <shc_work@mail.ru> wrote:
> 
> > I acknowledge that the (linux-next-20140314) framebuffer driver works fine.
> > Today I checked it on Phytec-PCM970 board with i.MX27 (DT).
> 
> Thanks for confirming imxfb is functional, Alexander.
> 
> Just tried linux-next-20140314 and still do not get LCD functional, so
> it looks like a mx25pdk specific issue then.

Fabio, I use settings, which sent in the patch. Look, maybe it will help ...
http://www.spinics.net/lists/arm-kernel/msg315707.html

---

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-03-15 14:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22 17:09 [PATCHv14][ 1/4] video: imxfb: Introduce regulator support Denis Carikli
2014-01-22 17:09 ` Denis Carikli
2014-01-22 17:09 ` [PATCHv14][ 3/4] video: Kconfig: Allow more broad selection of the imxfb framebuffer driver Denis Carikli
2014-01-22 17:09   ` Denis Carikli
2014-02-14  8:43   ` Tomi Valkeinen
2014-02-14  8:43     ` Tomi Valkeinen
2014-01-22 17:09 ` [PATCHv14][ 4/4] ARM: dts: imx25: mbimxsd25: Add displays support Denis Carikli
2014-03-12 17:27   ` Fabio Estevam
2014-03-12 17:40     ` Eric Bénard
2014-03-12 18:24       ` Fabio Estevam
2014-03-12 20:30         ` Fabio Estevam
2014-03-12 21:07         ` Eric Bénard
2014-03-12 21:16           ` Fabio Estevam
2014-03-13  4:25             ` Alexander Shiyan
2014-03-15  5:14               ` Alexander Shiyan
2014-03-15 14:17                 ` Fabio Estevam
2014-03-15 14:27                   ` Alexander Shiyan
2014-03-13  9:28     ` Denis Carikli

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.