From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from comal.ext.ti.com ([198.47.26.152]:54478 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966451Ab3HHUTC (ORCPT ); Thu, 8 Aug 2013 16:19:02 -0400 From: Darren Etheridge Subject: [RFC 1/1] video: da8xx-fb: adding dt support Date: Thu, 8 Aug 2013 15:15:36 -0500 Message-ID: <1375992936-16755-2-git-send-email-detheridge@ti.com> In-Reply-To: <1375992936-16755-1-git-send-email-detheridge@ti.com> References: <1375992936-16755-1-git-send-email-detheridge@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: devicetree-owner@vger.kernel.org To: devicetree@vger.kernel.org, tomi.valkeinen@ti.com, plagnioj@jcrosoft.com, linux-fbdev@vger.kernel.org, detheridge@ti.com Cc: afzal@ti.com List-ID: Enhancing driver to enable probe triggered by a corresponding dt entry. Add da8xx-fb.txt documentation to devicetree section. Obtain fb_videomode details for the connected lcd panel using the display timing details present in DT. Ensure that platform data is present before checking whether platform callback is present (the one used to control backlight). So far this was not an issue as driver was purely non-DT triggered, but now DT support has been added this check must be performed. v2: squashing multiple commits from Afzal Mohammed (afzal@ti.com) v3: remove superfluous cast v4: expose both ti,am3352-lcdc and ti,da830-lcdc for .compatible as driver can use enhanced features of all version of the silicon block. Signed-off-by: Darren Etheridge --- .../devicetree/bindings/video/fb-da8xx.txt | 37 +++++++++++ drivers/video/da8xx-fb.c | 67 +++++++++++++++++++- 2 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/fb-da8xx.txt diff --git a/Documentation/devicetree/bindings/video/fb-da8xx.txt b/Documentation/devicetree/bindings/video/fb-da8xx.txt new file mode 100644 index 0000000..a6cfe3c --- /dev/null +++ b/Documentation/devicetree/bindings/video/fb-da8xx.txt @@ -0,0 +1,37 @@ +TI LCD Controller on DA830/DA850/AM335x SoC's + +Required properties: +- compatible: + DA830 - "ti,da830-lcdc" + AM335x SoC's - "ti,am3352-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: + +lcdc@4830e000 { + compatible = "ti,am3352-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>; + }; + }; +}; diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index ea9771f..64fd8af 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -36,6 +36,7 @@ #include #include #include +#include