From mboxrd@z Thu Jan 1 00:00:00 1970 From: Denis Carikli Subject: [Patch v2][ 08/37] video: mx3fb: Add device tree suport. Date: Thu, 17 Oct 2013 17:02:06 +0200 Message-ID: <1382022155-21954-9-git-send-email-denis@eukrea.com> References: <1382022155-21954-1-git-send-email-denis@eukrea.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1382022155-21954-1-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sascha Hauer Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, =?UTF-8?q?Eric=20B=C3=A9nard?= , Denis Carikli , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Stephen Warren Cc: Ian Campbell Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Sascha Hauer Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Sascha Hauer Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Eric B=C3=A9nard Signed-off-by: Denis Carikli --- .../devicetree/bindings/video/fsl,mx3-fb.txt | 52 ++++++++ drivers/video/Kconfig | 2 + drivers/video/mx3fb.c | 133 ++++++++++++= +++++--- 3 files changed, 171 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/fsl,mx3-fb.= txt diff --git a/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt b/D= ocumentation/devicetree/bindings/video/fsl,mx3-fb.txt new file mode 100644 index 0000000..ae0b343 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt @@ -0,0 +1,52 @@ +Freescale mx3 Framebuffer + +This framebuffer driver supports the imx31 and imx35 devices. + +Required properties: +- compatible : Must be "fsl,mx3-fb". +- reg : Should contain 1 register ranges(address and length). +- dmas : Phandle to the ipu dma node as described in + Documentation/devicetree/bindings/dma/dma.txt +- dma-names : Must be "tx". +- clocks : Phandle to the ipu source clock. +- display: Phandle to a display node as described in + Documentation/devicetree/bindings/video/display-timing.txt + Additional, the display node has to define properties: + - bits-per-pixel: lcd panel bit-depth. + +Optional properties: +- ipu-disp-format: could be "rgb666", "rgb565", or "rgb888". + If not specified defaults to "rgb666". + +Example: + + lcdc: mx3fb@53fc00b4 { + compatible =3D "fsl,mx3-fb"; + reg =3D <0x53fc00b4 0x0b>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_lcdc_1>; + clocks =3D <&clks 55>; + dmas =3D <&ipu 14>; + dma-names =3D "tx"; + }; + + ... + + cmo_qvga: display { + model =3D "CMO-QVGA"; + bits-per-pixel =3D <16>; + native-mode =3D <&qvga_timings>; + display-timings { + qvga_timings: 320x240 { + clock-frequency =3D <6500000>; + hactive =3D <320>; + vactive =3D <240>; + hback-porch =3D <30>; + hfront-porch =3D <38>; + vback-porch =3D <20>; + vfront-porch =3D <3>; + hsync-len =3D <15>; + vsync-len =3D <4>; + }; + }; + }; diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 14317b7..2a638df 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -2359,6 +2359,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 37704da..8683dda 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c @@ -32,6 +32,8 @@ #include #include =20 +#include