diff mbox

[2/2] pcm038 lcdc support

Message ID 1337344032-25431-3-git-send-email-s.hauer@pengutronix.de
State New
Headers show

Commit Message

Sascha Hauer May 18, 2012, 12:27 p.m. UTC
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boot/dts/imx27-phytec-phycore.dts |   39 ++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx27.dtsi               |    7 +++++
 arch/arm/mach-imx/clock-imx27.c            |    1 +
 3 files changed, 47 insertions(+)

Comments

Adam Jackson May 18, 2012, 2:03 p.m. UTC | #1
On Fri, 2012-05-18 at 14:27 +0200, Sascha Hauer wrote:

> +			edid = [00 ff ff ff ff ff ff 00 4c 2d 6c 03 36 32 49 4b
> +				0f 13 01 03 80 37 22 a0 2a fe 21 a8 53 37 ae 24
> +				11 50 54
> +
> +				/* est timings */
> +				00 00 00
> +
> +				/* std timings */
> +				00 00
> +				00 00
> +				00 00
> +				00 00
> +				00 00
> +				00 00
> +				00 00
> +				00 00
> +
> +				/* detailed timings */
> +				05 0D 20 A0 30 58 1C 20 28 20 14 00 26 57 21 00 00 1E
> +				00 00 00 fd 00 32 4b 1b	51 11 00 0a 20 20 20 20 20 20
> +				00 00 00 fc 00 53 79 6e 63 4d 61 73 74 65 72 0a 20 20
> +				00 00 00 ff 00 48 39 58 53 34 30 30 34 34 32 0a 20 20
> +				00 20];

This EDID block claims to be a Samsung SyncMaster, which isn't really
the right thing to do.  The question is what to call it instead.  Red
Hat has a PNP ID we can use for virtual EDID blocks like this if we
want, I'd want to set up a little database to keep track of them but
that's pretty trivial.

Also, empty standard timing fields are 01 01, not 00 00.

- ajax
Sascha Hauer May 18, 2012, 3:13 p.m. UTC | #2
On Fri, May 18, 2012 at 10:03:54AM -0400, Adam Jackson wrote:
> On Fri, 2012-05-18 at 14:27 +0200, Sascha Hauer wrote:
> 
> > +			edid = [00 ff ff ff ff ff ff 00 4c 2d 6c 03 36 32 49 4b
> > +				0f 13 01 03 80 37 22 a0 2a fe 21 a8 53 37 ae 24
> > +				11 50 54
> > +
> > +				/* est timings */
> > +				00 00 00
> > +
> > +				/* std timings */
> > +				00 00
> > +				00 00
> > +				00 00
> > +				00 00
> > +				00 00
> > +				00 00
> > +				00 00
> > +				00 00
> > +
> > +				/* detailed timings */
> > +				05 0D 20 A0 30 58 1C 20 28 20 14 00 26 57 21 00 00 1E
> > +				00 00 00 fd 00 32 4b 1b	51 11 00 0a 20 20 20 20 20 20
> > +				00 00 00 fc 00 53 79 6e 63 4d 61 73 74 65 72 0a 20 20
> > +				00 00 00 ff 00 48 39 58 53 34 30 30 34 34 32 0a 20 20
> > +				00 20];
> 
> This EDID block claims to be a Samsung SyncMaster, which isn't really
> the right thing to do.  The question is what to call it instead.  Red
> Hat has a PNP ID we can use for virtual EDID blocks like this if we
> want, I'd want to set up a little database to keep track of them but
> that's pretty trivial.

Sorry, should have mentioned this in the commit log. This in fact is a
hacked version of my office monitor. This patch is more meant as a usage
example and not for upstream. I don't know yet if it's even acceptable
to put edid data into the devicetree. I saw some discussion about it,
but also about some generic display description, which I would prefer.

BTW is there a more convenient tool than a hex editor around to generate
edid data? I only found some windows tools

> 
> Also, empty standard timing fields are 01 01, not 00 00.

Good to know

Thanks
 Sascha
Dave Airlie May 22, 2012, 10:02 a.m. UTC | #3
On Fri, May 18, 2012 at 4:13 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Fri, May 18, 2012 at 10:03:54AM -0400, Adam Jackson wrote:
>> On Fri, 2012-05-18 at 14:27 +0200, Sascha Hauer wrote:
>>
>> > +                   edid = [00 ff ff ff ff ff ff 00 4c 2d 6c 03 36 32 49 4b
>> > +                           0f 13 01 03 80 37 22 a0 2a fe 21 a8 53 37 ae 24
>> > +                           11 50 54
>> > +
>> > +                           /* est timings */
>> > +                           00 00 00
>> > +
>> > +                           /* std timings */
>> > +                           00 00
>> > +                           00 00
>> > +                           00 00
>> > +                           00 00
>> > +                           00 00
>> > +                           00 00
>> > +                           00 00
>> > +                           00 00
>> > +
>> > +                           /* detailed timings */
>> > +                           05 0D 20 A0 30 58 1C 20 28 20 14 00 26 57 21 00 00 1E
>> > +                           00 00 00 fd 00 32 4b 1b 51 11 00 0a 20 20 20 20 20 20
>> > +                           00 00 00 fc 00 53 79 6e 63 4d 61 73 74 65 72 0a 20 20
>> > +                           00 00 00 ff 00 48 39 58 53 34 30 30 34 34 32 0a 20 20
>> > +                           00 20];
>>
>> This EDID block claims to be a Samsung SyncMaster, which isn't really
>> the right thing to do.  The question is what to call it instead.  Red
>> Hat has a PNP ID we can use for virtual EDID blocks like this if we
>> want, I'd want to set up a little database to keep track of them but
>> that's pretty trivial.
>
> Sorry, should have mentioned this in the commit log. This in fact is a
> hacked version of my office monitor. This patch is more meant as a usage
> example and not for upstream. I don't know yet if it's even acceptable
> to put edid data into the devicetree. I saw some discussion about it,
> but also about some generic display description, which I would prefer.
>
> BTW is there a more convenient tool than a hex editor around to generate
> edid data? I only found some windows tools

Some basic stuff in Documentation/EDID/ but yeah don't know of
anything graphical for Linux.

Dave.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx27-phytec-phycore.dts b/arch/arm/boot/dts/imx27-phytec-phycore.dts
index a51a08f..bdb7547 100644
--- a/arch/arm/boot/dts/imx27-phytec-phycore.dts
+++ b/arch/arm/boot/dts/imx27-phytec-phycore.dts
@@ -20,6 +20,41 @@ 
 		reg = <0x0 0x0>;
 	};
 
+	baseboard {
+		compatible = "simple-bus";
+		#address-cells = <2>;
+                #size-cells = <1>;
+
+		display {
+			compatible = "fsl,imx-parallel-display";
+			edid = [00 ff ff ff ff ff ff 00 4c 2d 6c 03 36 32 49 4b
+				0f 13 01 03 80 37 22 a0 2a fe 21 a8 53 37 ae 24
+				11 50 54
+
+				/* est timings */
+				00 00 00
+
+				/* std timings */
+				00 00
+				00 00
+				00 00
+				00 00
+				00 00
+				00 00
+				00 00
+				00 00
+
+				/* detailed timings */
+				05 0D 20 A0 30 58 1C 20 28 20 14 00 26 57 21 00 00 1E
+				00 00 00 fd 00 32 4b 1b	51 11 00 0a 20 20 20 20 20 20
+				00 00 00 fc 00 53 79 6e 63 4d 61 73 74 65 72 0a 20 20
+				00 00 00 ff 00 48 39 58 53 34 30 30 34 34 32 0a 20 20
+				00 20];
+
+			crtc = <&lcdc 0>;
+		};
+	};
+
 	soc {
 		aipi@10000000 { /* aipi */
 
@@ -46,6 +81,10 @@ 
 				status = "okay";
 			};
 
+			lcdc@10021000 {
+				status = "okay";
+			};
+
 			i2c@1001d000 {
 				clock-frequency = <400000>;
 				status = "okay";
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index bc5e7d5..eab9095 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -206,6 +206,13 @@ 
 				status = "disabled";
 			};
 
+			lcdc: lcdc@10021000 {
+				compatible = "fsl,imx27-lcdc", "fsl,imx21-lcdc";
+				reg = <0x10021000 0x4000>;
+				interrupts = <61>;
+				status = "enabled";
+			};
+
 			fec: fec@1002b000 {
 				compatible = "fsl,imx27-fec";
 				reg = <0x1002b000 0x4000>;
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
index 98e04f5..a393483 100644
--- a/arch/arm/mach-imx/clock-imx27.c
+++ b/arch/arm/mach-imx/clock-imx27.c
@@ -646,6 +646,7 @@  static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK("imx27-cspi.1", NULL, cspi2_clk)
 	_REGISTER_CLOCK("imx27-cspi.2", NULL, cspi3_clk)
 	_REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
+	_REGISTER_CLOCK("10021000.lcdc", NULL, lcdc_clk)
 	_REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk)
 	_REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk)
 	_REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk1)