From e3b5e28f52c3e70ecfc72c6d4f805842cf6869c2 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 31 Dec 2012 00:31:14 +0530 Subject: [PATCH 13/51] video: da8xx-fb: obtain fb_videomode info from dt Obtain fb_videomode details for the connected lcd panel using the display timing details present in DT. Signed-off-by: Afzal Mohammed --- Documentation/devicetree/bindings/video/fb-da8xx.txt | 21 +++++++++++++++++++ drivers/video/da8xx-fb.c | 17 +++++++++++++++ 2 files changed, 38 insertions(+) Index: linux-3.12.36-rt50-r4s2/Documentation/devicetree/bindings/video/fb-da8xx.txt =================================================================== --- linux-3.12.36-rt50-r4s2.orig/Documentation/devicetree/bindings/video/fb-da8xx.txt +++ linux-3.12.36-rt50-r4s2/Documentation/devicetree/bindings/video/fb-da8xx.txt @@ -6,6 +6,12 @@ Required properties: AM335x SoC's - "ti,am3352-lcdc", "ti,da830-lcdc" - reg: Address range of lcdc register set - interrupts: lcdc interrupt +- display-timings: typical videomode of lcd panel, represented as child. + Refer Documentation/devicetree/bindings/video/display-timing.txt for + display timing binding details. If multiple videomodes are mentioned + in display timings node, typical videomode has to be mentioned as the + native mode or it has to be first child (driver cares only for native + videomode). Example: @@ -13,4 +19,19 @@ lcdc@4830e000 { compatible = "ti,am3352-lcdc", "ti,da830-lcdc"; reg = <0x4830e000 0x1000>; interrupts = <36>; + display-timings { + 800x480p62 { + clock-frequency = <30000000>; + hactive = <800>; + vactive = <480>; + hfront-porch = <39>; + hback-porch = <39>; + hsync-len = <47>; + vback-porch = <29>; + vfront-porch = <13>; + vsync-len = <2>; + hsync-active = <1>; + vsync-active = <1>; + }; + }; }; Index: linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c =================================================================== --- linux-3.12.36-rt50-r4s2.orig/drivers/video/da8xx-fb.c +++ linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c @@ -36,6 +36,7 @@ #include #include #include +#include