From mboxrd@z Thu Jan 1 00:00:00 1970 From: mpa@pengutronix.de (Markus Pargmann) Date: Sun, 14 Apr 2013 16:31:32 +0200 Subject: [PATCH v3 2/2] video: imxfb: Add DT support In-Reply-To: <20130408075742.GR20693@game.jcrosoft.org> References: <1365157876-1757-1-git-send-email-mpa@pengutronix.de> <1365157876-1757-3-git-send-email-mpa@pengutronix.de> <20130408075742.GR20693@game.jcrosoft.org> Message-ID: <20130414143132.GD27394@pengutronix.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Apr 08, 2013 at 09:57:42AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 12:31 Fri 05 Apr , Markus Pargmann wrote: > > Add devicetree support for imx framebuffer driver. It uses the generic > > display bindings and helper functions. > > > > Signed-off-by: Markus Pargmann > > Cc: Fabio Estevam > > Cc: Mark Rutland > > --- > > .../devicetree/bindings/video/fsl,imx-fb.txt | 49 ++++++ > > drivers/video/imxfb.c | 192 +++++++++++++++++---- > > 2 files changed, 207 insertions(+), 34 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/video/fsl,imx-fb.txt > > > > diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt > > new file mode 100644 > > index 0000000..bde9c77 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt > > @@ -0,0 +1,49 @@ > > +Freescale imx21 Framebuffer > > + > > +This framebuffer driver supports devices imx1, imx21, imx25, and imx27. > > + > > +Required properties: > > +- compatible : "fsl,-fb", chip should be imx1 or imx21 > > +- reg : Should contain 1 register ranges(address and length) > > +- interrupts : One interrupt of the fb dev > > + > > +Required nodes: > > +- display: Phandle to a display node as described in > > + Documentation/devicetree/bindings/video/display-timing.txt > > + Additional, the display node has to define properties: > > + - fsl,bpp: Bits per pixel > > + - fsl,pcr: LCDC PCR value > > + > > +Optional properties: > > +- dmacr-eukrea: Should be set for eukrea boards. > why ? Because eukrea boards have a different dmacr then all other boards using imxfb. The dmacr address is hardcoded as defaults in the code. I could also search for the board name in the DT, but there are no eukrea boards with DT at the moment, so I thought a bool property may be better for the moment. > > and This should be prefix by yhe Vendor here Eukrea Okay. Regards, Markus > > + > > +Example: > > + > > + imxfb: fb at 10021000 { > > + compatible = "fsl,imx27-fb", "fsl,imx21-fb"; > > + interrupts = <61>; > > + reg = <0x10021000 0x1000>; > > + display = <&display0>; > > + }; > > + > > + ... > > + > > + display0: display0 { > > + model = "Primeview-PD050VL1"; > > + native-mode = <&timing_disp0>; > > + fsl,bpp = <16>; /* non-standard but required */ > > + fsl,pcr = <0xf0c88080>; /* non-standard but required */ > > + display-timings { > > + timing_disp0: 640x480 { > > + hactive = <640>; > > + vactive = <480>; > > + hback-porch = <112>; > > + hfront-porch = <36>; > > + hsync-len = <32>; > > + vback-porch = <33>; > > + vfront-porch = <33>; > > + vsync-len = <2>; > > + clock-frequency = <25000000>; > > + }; > > + }; > > + }; > > diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c > > index ef2b587..5a9bc598 100644 > > --- a/drivers/video/imxfb.c > > +++ b/drivers/video/imxfb.c > > @@ -32,6 +32,12 @@ > > #include > > #include > > #include > > +#include > > +#include > > + > > +#include