* [PATCH v9][ 5/8] staging: imx-drm: Use de-active and pixelclk-active display-timings.
2014-03-06 16:04 ` [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description Denis Carikli
@ 2014-03-06 16:04 ` Denis Carikli
2014-03-07 16:50 ` Russell King - ARM Linux
2014-03-06 16:04 ` [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support Denis Carikli
` (3 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Denis Carikli @ 2014-03-06 16:04 UTC (permalink / raw)
To: linux-arm-kernel
If de-active and/or pixelclk-active properties were set in the
display-timings DT node, they were not used.
Instead the data-enable and the pixel data clock polarity
were hardcoded.
The dts were updated to keep the former behaviour.
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v8->v9:
- Removed the Cc. They are now set in git-send-email directly.
- Rebased on top of the following patch:
"imx-drm: Match ipu_di_signal_cfg's clk_pol with its description."
- Updated the current dts that were using the ipuv3 accordingly,
to keep the same hardware settings.
- In the display-timing.txt documentation, the pixelclk-active
and de-active optional properties have an "ignored" state
when the property is not set.
In this new version, the respective bits in the
display interface's general register are not touched if the
dt properties are not set.
ChangeLog v7->v8:
- Changed one Cc
ChangeLog v6->v7:
- Shrinked even more the Cc list.
- Rebased the patch
- val is now initialized in imx_pd_connector_get_modes
ChangeLog v5->v6:
- Remove people not concerned by this patch from the Cc list.
- Removed wrong coments from the code.
- Corrected the code style of the "if (!!val)"
ChangeLog v3->v4:
- The old patch was named "staging: imx-drm: ipuv3-crtc: don't harcode some mode".
- Reworked the patch entierly: we now takes the mode flags from the device tree.
ChangeLog v2->v3:
- Added some interested people in the Cc list.
- Ajusted the flags to match the changes in "drm: Add the lacking
DRM_MODE_FLAG_* for matching the DISPLAY_FLAGS_*"
---
arch/arm/boot/dts/imx51-babbage.dts | 2 ++
arch/arm/boot/dts/imx53-m53evk.dts | 2 ++
arch/arm/boot/dts/imx53-tx53-x03x.dts | 2 +-
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 2 ++
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 2 ++
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 2 ++
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 2 ++
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 2 ++
arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 ++
drivers/staging/imx-drm/imx-drm.h | 5 ++++
drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h | 4 ++++
drivers/staging/imx-drm/ipu-v3/ipu-di.c | 17 ++++++++++----
drivers/staging/imx-drm/ipuv3-crtc.c | 18 ++++++++++++--
drivers/staging/imx-drm/parallel-display.c | 34 +++++++++++++++++++++++++++
14 files changed, 89 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index ebe6c1d..fc6032e 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -39,6 +39,8 @@
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts
index 4250e74..32a6667 100644
--- a/arch/arm/boot/dts/imx53-m53evk.dts
+++ b/arch/arm/boot/dts/imx53-m53evk.dts
@@ -41,6 +41,8 @@
vfront-porch = <9>;
vsync-len = <3>;
vsync-active = <1>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts b/arch/arm/boot/dts/imx53-tx53-x03x.dts
index 0217dde3..4092a81 100644
--- a/arch/arm/boot/dts/imx53-tx53-x03x.dts
+++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts
@@ -93,7 +93,7 @@
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
- pixelclk-active = <1>;
+ pixelclk-active = <0>;
};
ET0500 {
diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
index c8e5ae0..43f48f2 100644
--- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
@@ -494,6 +494,8 @@
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
index 2795dfc..59ecfd1 100644
--- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
@@ -516,6 +516,8 @@
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
index 99be301..e9419a2 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
@@ -349,6 +349,8 @@
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 009abd6..230bbc6 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -405,6 +405,8 @@
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
index 3bec128..ed4c72f 100644
--- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
@@ -349,6 +349,8 @@
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 04487cb..c89d64b 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -450,6 +450,8 @@
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
+ de-active = <1>;
+ pixelclk-active = <0>;
};
};
};
diff --git a/drivers/staging/imx-drm/imx-drm.h b/drivers/staging/imx-drm/imx-drm.h
index 035ab62..a479738 100644
--- a/drivers/staging/imx-drm/imx-drm.h
+++ b/drivers/staging/imx-drm/imx-drm.h
@@ -1,6 +1,11 @@
#ifndef _IMX_DRM_H_
#define _IMX_DRM_H_
+#define IMXDRM_MODE_FLAG_DE_HIGH (1 << 0)
+#define IMXDRM_MODE_FLAG_DE_LOW (1 << 1)
+#define IMXDRM_MODE_FLAG_PIXDATA_POSEDGE (1 << 2)
+#define IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE (1 << 3)
+
struct device_node;
struct drm_crtc;
struct drm_connector;
diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h
index c4d14ea..fc863e4 100644
--- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h
+++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h
@@ -27,6 +27,9 @@ enum ipuv3_type {
#define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3')
+#define SET_CLK_POL (1 << 0)
+#define SET_DE_POL (1 << 1)
+
/*
* Bitfield of Display Interface signal polarities.
*/
@@ -41,6 +44,7 @@ struct ipu_di_signal_cfg {
unsigned enable_pol:1;
unsigned Hsync_pol:1; /* true = active high */
unsigned Vsync_pol:1;
+ unsigned set_mask:2;
u16 width;
u16 height;
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c
index 849b3e1..5d273c1 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c
@@ -595,8 +595,12 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig)
}
}
- if (sig->clk_pol)
- di_gen |= DI_GEN_POLARITY_DISP_CLK;
+ if (sig->set_mask & SET_CLK_POL) {
+ if (sig->clk_pol)
+ di_gen |= DI_GEN_POLARITY_DISP_CLK;
+ else
+ di_gen &= ~DI_GEN_POLARITY_DISP_CLK;
+ }
ipu_di_write(di, di_gen, DI_GENERAL);
@@ -606,8 +610,13 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig)
reg = ipu_di_read(di, DI_POL);
reg &= ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15);
- if (sig->enable_pol)
- reg |= DI_POL_DRDY_POLARITY_15;
+ if (sig->set_mask & SET_DE_POL) {
+ if (sig->enable_pol)
+ reg |= DI_POL_DRDY_POLARITY_15;
+ else
+ reg &= ~DI_POL_DRDY_POLARITY_15;
+ }
+
if (sig->data_pol)
reg |= DI_POL_DRDY_DATA_POLARITY;
diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c
index f506075..71f757f 100644
--- a/drivers/staging/imx-drm/ipuv3-crtc.c
+++ b/drivers/staging/imx-drm/ipuv3-crtc.c
@@ -157,8 +157,22 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc,
if (mode->flags & DRM_MODE_FLAG_PVSYNC)
sig_cfg.Vsync_pol = 1;
- sig_cfg.enable_pol = 1;
- sig_cfg.clk_pol = 0;
+ if (mode->private_flags & IMXDRM_MODE_FLAG_DE_HIGH) {
+ sig_cfg.enable_pol = 1;
+ sig_cfg.set_mask |= SET_DE_POL;
+ } else if (mode->private_flags & IMXDRM_MODE_FLAG_DE_LOW) {
+ sig_cfg.enable_pol = 0;
+ sig_cfg.set_mask |= SET_DE_POL;
+ }
+
+ if (mode->private_flags & IMXDRM_MODE_FLAG_PIXDATA_POSEDGE) {
+ sig_cfg.clk_pol = 1;
+ sig_cfg.set_mask |= SET_CLK_POL;
+ } else if (mode->private_flags & IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE) {
+ sig_cfg.clk_pol = 0;
+ sig_cfg.set_mask |= SET_CLK_POL;
+ }
+
sig_cfg.width = mode->hdisplay;
sig_cfg.height = mode->vdisplay;
sig_cfg.pixel_fmt = out_pixel_fmt;
diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index 01b7ce5..084500b 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -80,9 +80,43 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
if (np) {
struct drm_display_mode *mode = drm_mode_create(connector->dev);
+ struct device_node *timings_np;
+ struct device_node *mode_np;
+ u32 val;
+
if (!mode)
return -EINVAL;
of_get_drm_display_mode(np, &imxpd->mode, OF_USE_NATIVE_MODE);
+
+ timings_np = of_get_child_by_name(np, "display-timings");
+ if (timings_np) {
+ /* get the display mode node */
+ mode_np = of_parse_phandle(timings_np,
+ "native-mode", 0);
+ if (!mode_np)
+ mode_np = of_get_next_child(timings_np, NULL);
+
+ if (!of_property_read_u32(mode_np, "de-active", &val)) {
+ if (val) {
+ imxpd->mode.private_flags |=
+ IMXDRM_MODE_FLAG_DE_HIGH;
+ } else {
+ imxpd->mode.private_flags |=
+ IMXDRM_MODE_FLAG_DE_LOW;
+ }
+ }
+
+ if (!of_property_read_u32(mode_np, "pixelclk-active",
+ &val)) {
+ if (val) {
+ imxpd->mode.private_flags |=
+ IMXDRM_MODE_FLAG_PIXDATA_POSEDGE;
+ } else {
+ imxpd->mode.private_flags |=
+ IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE;
+ }
+ }
+ }
drm_mode_copy(mode, &imxpd->mode);
mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
drm_mode_probed_add(connector, mode);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v9][ 5/8] staging: imx-drm: Use de-active and pixelclk-active display-timings.
2014-03-06 16:04 ` [PATCH v9][ 5/8] staging: imx-drm: Use de-active and pixelclk-active display-timings Denis Carikli
@ 2014-03-07 16:50 ` Russell King - ARM Linux
0 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2014-03-07 16:50 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Mar 06, 2014 at 05:04:26PM +0100, Denis Carikli wrote:
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c
> index 849b3e1..5d273c1 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c
> @@ -595,8 +595,12 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig)
> }
> }
>
> - if (sig->clk_pol)
> - di_gen |= DI_GEN_POLARITY_DISP_CLK;
> + if (sig->set_mask & SET_CLK_POL) {
> + if (sig->clk_pol)
> + di_gen |= DI_GEN_POLARITY_DISP_CLK;
> + else
> + di_gen &= ~DI_GEN_POLARITY_DISP_CLK;
> + }
>
> ipu_di_write(di, di_gen, DI_GENERAL);
>
> @@ -606,8 +610,13 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig)
> reg = ipu_di_read(di, DI_POL);
> reg &= ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15);
>
> - if (sig->enable_pol)
> - reg |= DI_POL_DRDY_POLARITY_15;
> + if (sig->set_mask & SET_DE_POL) {
> + if (sig->enable_pol)
> + reg |= DI_POL_DRDY_POLARITY_15;
> + else
> + reg &= ~DI_POL_DRDY_POLARITY_15;
> + }
> +
> if (sig->data_pol)
> reg |= DI_POL_DRDY_DATA_POLARITY;
>
> diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c
> index f506075..71f757f 100644
> --- a/drivers/staging/imx-drm/ipuv3-crtc.c
> +++ b/drivers/staging/imx-drm/ipuv3-crtc.c
> @@ -157,8 +157,22 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc,
> if (mode->flags & DRM_MODE_FLAG_PVSYNC)
> sig_cfg.Vsync_pol = 1;
>
> - sig_cfg.enable_pol = 1;
> - sig_cfg.clk_pol = 0;
> + if (mode->private_flags & IMXDRM_MODE_FLAG_DE_HIGH) {
> + sig_cfg.enable_pol = 1;
> + sig_cfg.set_mask |= SET_DE_POL;
> + } else if (mode->private_flags & IMXDRM_MODE_FLAG_DE_LOW) {
> + sig_cfg.enable_pol = 0;
> + sig_cfg.set_mask |= SET_DE_POL;
> + }
> +
> + if (mode->private_flags & IMXDRM_MODE_FLAG_PIXDATA_POSEDGE) {
> + sig_cfg.clk_pol = 1;
> + sig_cfg.set_mask |= SET_CLK_POL;
> + } else if (mode->private_flags & IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE) {
> + sig_cfg.clk_pol = 0;
> + sig_cfg.set_mask |= SET_CLK_POL;
> + }
So how does this work for other displays, for example, HDMI, where we need
enable_pol=1 and clk_pol=0 ?
>From what I can see, we end up with sig_cfg.enable_pol=0, sig_cfg.clk_pol=0,
sig_cfg.set_mask=0.
What we end up with for enable_pol is this:
reg = ipu_di_read(di, DI_POL);
reg &= ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15);
- if (sig->enable_pol)
- reg |= DI_POL_DRDY_POLARITY_15;
+ if (sig->set_mask & SET_DE_POL) {
+ if (sig->enable_pol)
+ reg |= DI_POL_DRDY_POLARITY_15;
+ else
+ reg &= ~DI_POL_DRDY_POLARITY_15;
+ }
which is no different from:
reg = ipu_di_read(di, DI_POL);
reg &= ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15);
if (sig->set_mask & SET_DE_POL && sig->enable_pol)
reg |= DI_POL_DRDY_POLARITY_15;
because even with SET_DE_POL unset, we still end up clearing the bit.
Similar seems to happen with the clock polarity as well - in order for
that bit to be set, buth the set_mask and the clk_pol but must be set.
Dovetailing in to my previous reply, if we want to do this, maybe we
should convert clk_pol and enable_pol to be a tristate (can be an
u8 or enum). Essentially, it has three values: preserve, active high,
active low.
However, one of the things that really worries me here is the "preserve"
action - what if it's not correctly set initially, and we don't have
anything specifying either polarity, which will happen if the only
encoder/connector you have is imx-hdmi.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support.
2014-03-06 16:04 ` [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description Denis Carikli
2014-03-06 16:04 ` [PATCH v9][ 5/8] staging: imx-drm: Use de-active and pixelclk-active display-timings Denis Carikli
@ 2014-03-06 16:04 ` Denis Carikli
2014-03-06 16:29 ` Philipp Zabel
2014-03-07 14:27 ` Lothar Waßmann
2014-03-06 16:04 ` [PATCH v9][ 7/8] ARM: dts: mbimx51sd: Add display support Denis Carikli
` (2 subsequent siblings)
4 siblings, 2 replies; 17+ messages in thread
From: Denis Carikli @ 2014-03-06 16:04 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v8->v9:
- Removed the Cc. They are now set in git-send-email directly.
- Rebased.
ChangeLog v7->v8:
- Shrinked even more the Cc list.
- Rebased.
ChangeLog v6->v7:
- Shrinked even more the Cc list.
- Rebased the patch and included video/of_display_timing.h
---
.../bindings/staging/imx-drm/fsl-imx-drm.txt | 1 +
drivers/staging/imx-drm/parallel-display.c | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
index 2d24425..4dd7ce5 100644
--- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
+++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
@@ -28,6 +28,7 @@ Required properties:
- compatible: Should be "fsl,imx-parallel-display"
- crtc: the crtc this display is connected to, see below
Optional properties:
+- display-supply : phandle to the regulator device tree node if needed.
- interface_pix_fmt: How this display is connected to the
crtc. Currently supported types: "rgb24", "rgb565", "bgr666", "rgb666"
- edid: verbatim EDID data block describing attached display.
diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index 084500b..0e0c5ac 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -24,6 +24,7 @@
#include <drm/drm_fb_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_panel.h>
+#include <linux/regulator/consumer.h>
#include <linux/videodev2.h>
#include <video/of_display_timing.h>
@@ -36,6 +37,7 @@ struct imx_parallel_display {
struct drm_connector connector;
struct drm_encoder encoder;
struct device *dev;
+ struct regulator *disp_reg;
void *edid;
int edid_len;
u32 interface_pix_fmt;
@@ -155,6 +157,9 @@ static void imx_pd_encoder_prepare(struct drm_encoder *encoder)
{
struct imx_parallel_display *imxpd = enc_to_imxpd(encoder);
+ if (regulator_enable(imxpd->disp_reg))
+ dev_err(imxpd->dev, "Failed to enable regulator.\n");
+
imx_drm_panel_format(encoder, imxpd->interface_pix_fmt);
}
@@ -170,6 +175,10 @@ static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
static void imx_pd_encoder_disable(struct drm_encoder *encoder)
{
+ struct imx_parallel_display *imxpd = enc_to_imxpd(encoder);
+
+ if (regulator_disable(imxpd->disp_reg))
+ dev_err(imxpd->dev, "Failed to disable regulator.\n");
}
static struct drm_connector_funcs imx_pd_connector_funcs = {
@@ -267,6 +276,10 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
if (ret)
return ret;
+ imxpd->disp_reg = devm_regulator_get(dev, "display");
+ if (IS_ERR(imxpd->disp_reg))
+ return PTR_ERR(imxpd->disp_reg);
+
dev_set_drvdata(dev, imxpd);
return 0;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support.
2014-03-06 16:04 ` [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support Denis Carikli
@ 2014-03-06 16:29 ` Philipp Zabel
2014-03-06 16:33 ` Alexander Shiyan
2014-03-07 14:27 ` Lothar Waßmann
1 sibling, 1 reply; 17+ messages in thread
From: Philipp Zabel @ 2014-03-06 16:29 UTC (permalink / raw)
To: linux-arm-kernel
Hi Denis,
Am Donnerstag, den 06.03.2014, 17:04 +0100 schrieb Denis Carikli:
> diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> index 2d24425..4dd7ce5 100644
> --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> @@ -28,6 +28,7 @@ Required properties:
> - compatible: Should be "fsl,imx-parallel-display"
> - crtc: the crtc this display is connected to, see below
> Optional properties:
> +- display-supply : phandle to the regulator device tree node if needed.
I'd very much prefer to not do this here. I have submitted a patch to
add drm_display support to this driver, so you can connect a drm_panel
compatible driver as output. The simple-panel driver already supports
supply regulator and backlight control.
regards
Philipp
> - interface_pix_fmt: How this display is connected to the
> crtc. Currently supported types: "rgb24", "rgb565", "bgr666", "rgb666"
> - edid: verbatim EDID data block describing attached display.
> diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
> index 084500b..0e0c5ac 100644
> --- a/drivers/staging/imx-drm/parallel-display.c
> +++ b/drivers/staging/imx-drm/parallel-display.c
> @@ -24,6 +24,7 @@
> #include <drm/drm_fb_helper.h>
> #include <drm/drm_crtc_helper.h>
> #include <drm/drm_panel.h>
> +#include <linux/regulator/consumer.h>
> #include <linux/videodev2.h>
> #include <video/of_display_timing.h>
>
> @@ -36,6 +37,7 @@ struct imx_parallel_display {
> struct drm_connector connector;
> struct drm_encoder encoder;
> struct device *dev;
> + struct regulator *disp_reg;
> void *edid;
> int edid_len;
> u32 interface_pix_fmt;
> @@ -155,6 +157,9 @@ static void imx_pd_encoder_prepare(struct drm_encoder *encoder)
> {
> struct imx_parallel_display *imxpd = enc_to_imxpd(encoder);
>
> + if (regulator_enable(imxpd->disp_reg))
> + dev_err(imxpd->dev, "Failed to enable regulator.\n");
> +
> imx_drm_panel_format(encoder, imxpd->interface_pix_fmt);
> }
>
> @@ -170,6 +175,10 @@ static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
>
> static void imx_pd_encoder_disable(struct drm_encoder *encoder)
> {
> + struct imx_parallel_display *imxpd = enc_to_imxpd(encoder);
> +
> + if (regulator_disable(imxpd->disp_reg))
> + dev_err(imxpd->dev, "Failed to disable regulator.\n");
> }
>
> static struct drm_connector_funcs imx_pd_connector_funcs = {
> @@ -267,6 +276,10 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
> if (ret)
> return ret;
>
> + imxpd->disp_reg = devm_regulator_get(dev, "display");
> + if (IS_ERR(imxpd->disp_reg))
> + return PTR_ERR(imxpd->disp_reg);
> +
> dev_set_drvdata(dev, imxpd);
>
> return 0;
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support.
2014-03-06 16:29 ` Philipp Zabel
@ 2014-03-06 16:33 ` Alexander Shiyan
0 siblings, 0 replies; 17+ messages in thread
From: Alexander Shiyan @ 2014-03-06 16:33 UTC (permalink / raw)
To: linux-arm-kernel
???????, 6 ????? 2014, 17:29 +01:00 ?? Philipp Zabel <p.zabel@pengutronix.de>:
> Hi Denis,
>
> Am Donnerstag, den 06.03.2014, 17:04 +0100 schrieb Denis Carikli:
> > diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> > index 2d24425..4dd7ce5 100644
> > --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> > +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> > @@ -28,6 +28,7 @@ Required properties:
> > - compatible: Should be "fsl,imx-parallel-display"
> > - crtc: the crtc this display is connected to, see below
> > Optional properties:
> > +- display-supply : phandle to the regulator device tree node if needed.
>
> I'd very much prefer to not do this here. I have submitted a patch to
> add drm_display support to this driver, so you can connect a drm_panel
> compatible driver as output. The simple-panel driver already supports
> supply regulator and backlight control.
...
> > + imxpd->disp_reg = devm_regulator_get(dev, "display");
> > + if (IS_ERR(imxpd->disp_reg))
> > + return PTR_ERR(imxpd->disp_reg);
And here we can see that this regulator is not optional.
---
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support.
2014-03-06 16:04 ` [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support Denis Carikli
2014-03-06 16:29 ` Philipp Zabel
@ 2014-03-07 14:27 ` Lothar Waßmann
1 sibling, 0 replies; 17+ messages in thread
From: Lothar Waßmann @ 2014-03-07 14:27 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Denis Carikli wrote:
> Signed-off-by: Denis Carikli <denis@eukrea.com>
> ---
> ChangeLog v8->v9:
> - Removed the Cc. They are now set in git-send-email directly.
> - Rebased.
>
> ChangeLog v7->v8:
> - Shrinked even more the Cc list.
> - Rebased.
>
> ChangeLog v6->v7:
> - Shrinked even more the Cc list.
> - Rebased the patch and included video/of_display_timing.h
> ---
> .../bindings/staging/imx-drm/fsl-imx-drm.txt | 1 +
> drivers/staging/imx-drm/parallel-display.c | 13 +++++++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> index 2d24425..4dd7ce5 100644
> --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
> @@ -28,6 +28,7 @@ Required properties:
> - compatible: Should be "fsl,imx-parallel-display"
> - crtc: the crtc this display is connected to, see below
> Optional properties:
> +- display-supply : phandle to the regulator device tree node if needed.
>
Any reason why this is named 'display-supply' rather than 'lcd-supply'
like for imxfb?
Lothar Wa?mann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v9][ 7/8] ARM: dts: mbimx51sd: Add display support.
2014-03-06 16:04 ` [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description Denis Carikli
2014-03-06 16:04 ` [PATCH v9][ 5/8] staging: imx-drm: Use de-active and pixelclk-active display-timings Denis Carikli
2014-03-06 16:04 ` [PATCH v9][ 6/8] staging: imx-drm: parallel display: add regulator support Denis Carikli
@ 2014-03-06 16:04 ` Denis Carikli
2014-03-06 16:26 ` Philipp Zabel
2014-03-06 16:04 ` [PATCH v9][ 8/8] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support Denis Carikli
2014-03-07 16:35 ` [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description Russell King - ARM Linux
4 siblings, 1 reply; 17+ messages in thread
From: Denis Carikli @ 2014-03-06 16:04 UTC (permalink / raw)
To: linux-arm-kernel
The CMO-QVGA, DVI-SVGA and DVI-VGA are added.
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v8->v9:
- Removed the Cc. They are now set in git-send-email directly.
- updated pixelclk-active after the following patch:
"imx-drm: Match ipu_di_signal_cfg's clk_pol with its description."
ChangeLog v7->v8:
- Rebased the patch: added the now required imx-drm node.
- Adapted the svga clock-frequency value in order to still
be able to display an image after the following commit:
"imx-drm: ipu-v3: more inteligent DI clock selection"
ChangeLog v6->v7:
- Shrinked even more the Cc list.
- Since the pingrp headers were removed, the references
to it where replaced by the actual pins.
- Added the targets to arch/arm/boot/dts/Makefile
ChangeLog v5->v6:
- Reordered the Cc list.
ChangeLog v3->v5:
- Updated to new GPIO defines.
- Updated to new licenses checkpatch requirements.
- one whitespace cleanup.
ChangeLog v2->v3:
- Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards.
- This patch now only adds display support.
- Added some interested people in the Cc list, and removed some people that
might be annoyed by the receiving of that patch which is unrelated to their
subsystem.
- rebased and reworked the dts displays addition.
- Also rebased and reworked the fsl,pins usage.
---
arch/arm/boot/dts/Makefile | 3 +
.../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 59 ++++++++++++++++++++
.../imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts | 46 +++++++++++++++
.../imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts | 46 +++++++++++++++
.../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | 47 ++++++++++++++++
5 files changed, 201 insertions(+)
create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts
create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts
create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7407ee8..6979028 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -177,6 +177,9 @@ dtb-$(CONFIG_ARCH_MXC) += \
imx51-apf51dev.dtb \
imx51-babbage.dtb \
imx51-eukrea-mbimxsd51-baseboard.dtb \
+ imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dtb \
+ imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dtb \
+ imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dtb \
imx53-ard.dtb \
imx53-m53evk.dtb \
imx53-mba53.dtb \
diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts
new file mode 100644
index 0000000..dbf1083
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts
@@ -0,0 +1,59 @@
+/*
+ * 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 "imx51-eukrea-mbimxsd51-baseboard.dts"
+
+/ {
+ model = "Eukrea MBIMXSD51 with the CMO-QVGA Display";
+ compatible = "eukrea,mbimxsd51-baseboard-cmo-qvga", "eukrea,mbimxsd51-baseboard", "eukrea,cpuimx51", "fsl,imx51";
+
+ reg_lcd_3v3: lcd-en {
+ 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 = <&gpio3 13 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&display {
+ display-supply = <®_lcd_3v3>;
+ status = "okay";
+ display-timings {
+ model = "CMO-QVGA";
+ bits-per-pixel = <16>;
+ cmoqvga {
+ native-mode;
+ clock-frequency = <6500000>;
+ hactive = <320>;
+ vactive = <240>;
+ hfront-porch = <20>;
+ hback-porch = <38>;
+ vfront-porch = <4>;
+ vback-porch = <15>;
+ hsync-len = <30>;
+ vsync-len = <3>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <0>;
+ pixelclk-active = <0>;
+ };
+ };
+};
+
+&imx_drm {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts
new file mode 100644
index 0000000..ba824e7
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts
@@ -0,0 +1,46 @@
+/*
+ * 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 "imx51-eukrea-mbimxsd51-baseboard.dts"
+
+/ {
+ model = "Eukrea MBIMXSD51 with the DVI-SVGA Display";
+ compatible = "eukrea,mbimxsd51-baseboard-dvi-svga", "eukrea,mbimxsd51-baseboard", "eukrea,cpuimx51", "fsl,imx51";
+};
+
+&display {
+ status = "okay";
+ display-timings {
+ model = "DVI-SVGA";
+ bits-per-pixel = <16>;
+ svga {
+ clock-frequency = <44333333>;
+ hactive = <800>;
+ vactive = <600>;
+ hback-porch = <112>;
+ hfront-porch = <32>;
+ vback-porch = <3>;
+ vfront-porch = <17>;
+ hsync-len = <80>;
+ vsync-len = <4>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ de-active = <1>;
+ pixelclk-active = <1>;
+ };
+ };
+};
+
+&imx_drm {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts
new file mode 100644
index 0000000..fc5b733
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts
@@ -0,0 +1,46 @@
+/*
+ * 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 "imx51-eukrea-mbimxsd51-baseboard.dts"
+
+/ {
+ model = "Eukrea MBIMXSD51 with the DVI-VGA Display";
+ compatible = "eukrea,mbimxsd51-baseboard-dvi-vga", "eukrea,mbimxsd51-baseboard", "eukrea,cpuimx51", "fsl,imx51";
+};
+
+&display {
+ status = "okay";
+ display-timings {
+ model = "DVI-VGA";
+ bits-per-pixel = <16>;
+ vga {
+ clock-frequency = <23750000>;
+ hactive = <640>;
+ vactive = <480>;
+ hback-porch = <80>;
+ hfront-porch = <16>;
+ vback-porch = <3>;
+ vfront-porch = <13>;
+ hsync-len = <64>;
+ vsync-len = <4>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ de-active = <1>;
+ pixelclk-active = <1>;
+ };
+ };
+};
+
+&imx_drm {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
index 5cec4f3..789ec8e 100644
--- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
+++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
@@ -24,6 +24,15 @@
model = "Eukrea CPUIMX51";
compatible = "eukrea,mbimxsd51","eukrea,cpuimx51", "fsl,imx51";
+ display: display at di0 {
+ compatible = "fsl,imx-parallel-display";
+ crtcs = <&ipu 0>;
+ interface-pix-fmt = "rgb666";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ipu_disp1>;
+ status = "disabled";
+ };
+
gpio_keys {
compatible = "gpio-keys";
pinctrl-names = "default";
@@ -38,6 +47,13 @@
};
};
+ imx_drm: imx-drm {
+ compatible = "fsl,imx-drm";
+ crtcs = <&ipu 0>;
+ connectors = <&display>;
+ status = "disabled";
+ };
+
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -146,6 +162,37 @@
>;
};
+ pinctrl_ipu_disp1: ipudisp1grp {
+ fsl,pins = <
+ MX51_PAD_DISP1_DAT0__DISP1_DAT0 0x5
+ MX51_PAD_DISP1_DAT1__DISP1_DAT1 0x5
+ MX51_PAD_DISP1_DAT2__DISP1_DAT2 0x5
+ MX51_PAD_DISP1_DAT3__DISP1_DAT3 0x5
+ MX51_PAD_DISP1_DAT4__DISP1_DAT4 0x5
+ MX51_PAD_DISP1_DAT5__DISP1_DAT5 0x5
+ MX51_PAD_DISP1_DAT6__DISP1_DAT6 0x5
+ MX51_PAD_DISP1_DAT7__DISP1_DAT7 0x5
+ MX51_PAD_DISP1_DAT8__DISP1_DAT8 0x5
+ MX51_PAD_DISP1_DAT9__DISP1_DAT9 0x5
+ MX51_PAD_DISP1_DAT10__DISP1_DAT10 0x5
+ MX51_PAD_DISP1_DAT11__DISP1_DAT11 0x5
+ MX51_PAD_DISP1_DAT12__DISP1_DAT12 0x5
+ MX51_PAD_DISP1_DAT13__DISP1_DAT13 0x5
+ MX51_PAD_DISP1_DAT14__DISP1_DAT14 0x5
+ MX51_PAD_DISP1_DAT15__DISP1_DAT15 0x5
+ MX51_PAD_DISP1_DAT16__DISP1_DAT16 0x5
+ MX51_PAD_DISP1_DAT17__DISP1_DAT17 0x5
+ MX51_PAD_DISP1_DAT18__DISP1_DAT18 0x5
+ MX51_PAD_DISP1_DAT19__DISP1_DAT19 0x5
+ MX51_PAD_DISP1_DAT20__DISP1_DAT20 0x5
+ MX51_PAD_DISP1_DAT21__DISP1_DAT21 0x5
+ MX51_PAD_DISP1_DAT22__DISP1_DAT22 0x5
+ MX51_PAD_DISP1_DAT23__DISP1_DAT23 0x5
+ MX51_PAD_DI1_PIN2__DI1_PIN2 0x5
+ MX51_PAD_DI1_PIN3__DI1_PIN3 0x5
+ >;
+ };
+
pinctrl_reg_lcd_3v3: reg_lcd_3v3 {
fsl,pins = <
MX51_PAD_CSI1_D9__GPIO3_13 0x1f5
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v9][ 7/8] ARM: dts: mbimx51sd: Add display support.
2014-03-06 16:04 ` [PATCH v9][ 7/8] ARM: dts: mbimx51sd: Add display support Denis Carikli
@ 2014-03-06 16:26 ` Philipp Zabel
2014-03-12 16:40 ` Denis Carikli
0 siblings, 1 reply; 17+ messages in thread
From: Philipp Zabel @ 2014-03-06 16:26 UTC (permalink / raw)
To: linux-arm-kernel
Hi Denis,
Am Donnerstag, den 06.03.2014, 17:04 +0100 schrieb Denis Carikli:
[...]
> +&display {
> + status = "okay";
> + display-timings {
> + model = "DVI-SVGA";
Does this board really have a DVI connector and no I2C bus routed to the
DDC pins?
> + bits-per-pixel = <16>;
> + svga {
> + clock-frequency = <44333333>;
> + hactive = <800>;
> + vactive = <600>;
> + hback-porch = <112>;
> + hfront-porch = <32>;
> + vback-porch = <3>;
> + vfront-porch = <17>;
> + hsync-len = <80>;
> + vsync-len = <4>;
> + hsync-active = <1>;
> + vsync-active = <1>;
> + de-active = <1>;
> + pixelclk-active = <1>;
> + };
> + };
> +};
[...]
> + imx_drm: imx-drm {
> + compatible = "fsl,imx-drm";
> + crtcs = <&ipu 0>;
> + connectors = <&display>;
> + status = "disabled";
> + };
Please let's postpone this until the imx-drm-dt patch series is
accepted. I've changed the device tree bindings so this node
is not necessary to be included in every board dts.
regards
Philipp
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v9][ 8/8] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support.
2014-03-06 16:04 ` [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description Denis Carikli
` (2 preceding siblings ...)
2014-03-06 16:04 ` [PATCH v9][ 7/8] ARM: dts: mbimx51sd: Add display support Denis Carikli
@ 2014-03-06 16:04 ` Denis Carikli
2014-03-07 16:35 ` [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description Russell King - ARM Linux
4 siblings, 0 replies; 17+ messages in thread
From: Denis Carikli @ 2014-03-06 16:04 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v8->v9:
- Removed the Cc. They are now set in git-send-email directly.
- The backlight is now on at boot.
ChangeLog v6->v7:
- Shrinked even more the Cc list.
ChangeLog v5->v6:
- Reordered the Cc list.
ChangeLog v3->v5:
- Updated to the new GPIO defines.
ChangeLog v2->v3:
- Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards.
- This patch now only adds backlight support.
- Added some interested people in the Cc list, and removed some people that
might be annoyed by the receiving of that patch which is unrelated to their
subsystem.
---
.../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts
index dbf1083..59c6038 100644
--- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts
+++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts
@@ -17,6 +17,15 @@
model = "Eukrea MBIMXSD51 with the CMO-QVGA Display";
compatible = "eukrea,mbimxsd51-baseboard-cmo-qvga", "eukrea,mbimxsd51-baseboard", "eukrea,cpuimx51", "fsl,imx51";
+ backlight {
+ compatible = "gpio-backlight";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_backlight_1>;
+ gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
+ default-brightness-level = <1>;
+ default-on;
+ };
+
reg_lcd_3v3: lcd-en {
compatible = "regulator-fixed";
pinctrl-names = "default";
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description.
2014-03-06 16:04 ` [PATCH v9][ 4/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description Denis Carikli
` (3 preceding siblings ...)
2014-03-06 16:04 ` [PATCH v9][ 8/8] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support Denis Carikli
@ 2014-03-07 16:35 ` Russell King - ARM Linux
4 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2014-03-07 16:35 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Mar 06, 2014 at 05:04:25PM +0100, Denis Carikli wrote:
> According to the datasheet, setting the di0_polarity_disp_clk
> field in the GENERAL di register sets the output clock polarity
> to active high.
>
> Signed-off-by: Denis Carikli <denis@eukrea.com>
> ---
> ChangeLog v8->v9:
> - New patch that is now needed by the
> "staging: imx-drm: Use de-active and pixelclk-active" patch.
> ---
> drivers/staging/imx-drm/ipu-v3/ipu-di.c | 2 +-
> drivers/staging/imx-drm/ipuv3-crtc.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c
> index 82a9eba..849b3e1 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c
> @@ -595,7 +595,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig)
> }
> }
>
> - if (!sig->clk_pol)
> + if (sig->clk_pol)
> di_gen |= DI_GEN_POLARITY_DISP_CLK;
>
> ipu_di_write(di, di_gen, DI_GENERAL);
> diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c
> index e646017..f506075 100644
> --- a/drivers/staging/imx-drm/ipuv3-crtc.c
> +++ b/drivers/staging/imx-drm/ipuv3-crtc.c
> @@ -158,7 +158,7 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc,
> sig_cfg.Vsync_pol = 1;
>
> sig_cfg.enable_pol = 1;
> - sig_cfg.clk_pol = 1;
> + sig_cfg.clk_pol = 0;
> sig_cfg.width = mode->hdisplay;
> sig_cfg.height = mode->vdisplay;
> sig_cfg.pixel_fmt = out_pixel_fmt;
I brought this up a while back:
http://archive.arm.linux.org.uk/lurker/message/20131015.103500.0c058eb9.en.html
it looks like it was never properly addressed, so yes, I think this is
the right solution, and brings the kernel inline with the code which
was in uboot back in October, and the value of sig_cfg.clk_pol now
matches the register bit.
However, I think an even better solution would be to have the clk_pol
values to be defined: CLK_POL_ACTIVE_HIGH and CLK_POL_ACTIVE_LOW.
This makes the actual value used irrelevant, and helps readability.
Maybe something to consider for a future patch?
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 17+ messages in thread