From mboxrd@z Thu Jan 1 00:00:00 1970 From: Denis Carikli Date: Wed, 26 Feb 2014 09:59:56 +0000 Subject: [PATCHv6][ 2/5] video: mx3fb: Add device tree suport. Message-Id: <1393408800-8946-2-git-send-email-denis@eukrea.com> List-Id: References: <1393408800-8946-1-git-send-email-denis@eukrea.com> In-Reply-To: <1393408800-8946-1-git-send-email-denis@eukrea.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-arm-kernel@lists.infradead.org This patch is based on: 838bdf7 video: mxsfb: fix broken videomode selection Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: Eric B=C3=A9nard Cc: linux-fbdev@vger.kernel.org Signed-off-by: Denis Carikli --- ChangeLog v5->v6: - Shrinked the Cc list. - de-active and pixelclk-active dt properties are now handled in this patch to get rid of the "fbdev: Add the lacking FB_SYNC_* for matching the DISPLAY_FLAGS_*" patch ChangeLog v4->v5: - Added some people in the Cc list. - The full ipu register range is now passed to the driver, the code and the documentation were adapted to it. - Updated the documentation not to mention the lcd controller, the ipu was mentioned instead. - The ipu patch was removed from this patchset, as a consequence the mx3fb = code has been adapted not to expect the dma ipu driver to be probed trough the= device tree. ChangeLog v3->v4: - Updated bindings. - Updated documentation accordinly. - Updated code accordinly. - Fixed the lack of "ret =3D" in of_property_read_string(display_np, "model", &name); - Supressed some compilation warnings. ChangeLog v2->v3: - The device tree bindings were reworked in order to make it look more like= the IPUv3 bindings. - The interface_pix_fmt property now looks like the IPUv3 one. --- .../devicetree/bindings/video/fsl,mx3-fb.txt | 44 +++++ drivers/video/Kconfig | 2 + drivers/video/mx3fb.c | 185 ++++++++++++++++= +--- 3 files changed, 208 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/fsl,mx3-fb.txt diff --git a/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt b/Docum= entation/devicetree/bindings/video/fsl,mx3-fb.txt new file mode 100644 index 0000000..c0409a4 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt @@ -0,0 +1,44 @@ +Freescale MX3 IPU. +=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Required properties: +- compatible: Should be "fsl,-ipu". compatible chips include the imx= 31 and the + imx35. +- reg: should be register base and length as documented in the datasheet. +- clocks: Handle to the ipu_gate clock. +- display: Phandle to a "fsl,mx3-parallel-display" compatible display node + which is described below. + +Example: + +ipu: ipu@53fc0000 { + compatible =3D "fsl,imx35-ipu"; + reg =3D <0x53fc0000 0x4000>; + clocks =3D <&clks 55>; +}; + +Parallel display support +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Required properties: +- compatible: Should be "fsl,mx3-parallel-display". +- model : The user-visible name of the display. + +Optional properties: +- interface_pix_fmt: How this display is connected to the + crtc. Currently supported types: "rgb24", "rgb565", "rgb666". + +It can also have an optional timing subnode as described in + Documentation/devicetree/bindings/video/display-timing.txt. + +Example: + +display0: display@di0 { + compatible =3D "fsl,mx3-parallel-display"; + interface-pix-fmt =3D "rgb666"; + model =3D "CMO-QVGA"; +}; + +&ipu { + display =3D <&display0>; +} diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index dade5b7..e98abf7 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -2376,6 +2376,8 @@ config FB_MX3 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEOMODE_HELPERS + select FB_MODE_HELPERS default y help This is a framebuffer device for the i.MX31 LCD Controller. So diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index ee95de8..952d2b5 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c @@ -31,6 +31,10 @@ #include #include =20 +#include