ARM: vf610: Add DCU framebuffer driver for Vybrid VF610 platform
Subsystems (7)
cover ARM: vf610: Add DCU framebuffer driver for Vybrid VF610 platform
This series contain DCU framebuffer driver for Freescale Vybrid VF610 platform.
The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention.
The features:
(1) Full RGB888 output to TFT LCD panel.
(2) For the current LCD panel, WQVGA "480x272" is supported.
(3) Blending of each pixel using up to 4 source layers dependent on size of panel.
(4) Each graphic layer can be placed with one pixel resolution in either axis.
(5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA8888 direct colors with an alpha channel.
(6) Each graphic layer support alpha blending with 8-bit resolution.
----------------------------------------------------------------
Alison Wang (4):
ARM: dts: vf610: Add DCU and TCON nodes
ARM: dts: vf610-twr: Enable DCU and TCON devices
ARM: clk: vf610: Add DCU and TCON clock support
fb: Add DCU framebuffer driver for Vybrid VF610 platform
arch/arm/boot/dts/vf610-twr.dts | 10 + arch/arm/boot/dts/vf610.dtsi | 18 ++ arch/arm/mach-imx/clk-vf610.c | 5 + drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/fsl-dcu-fb.c | 1091 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ include/dt-bindings/clock/vf610-clock.h | 3 +- 7 files changed, 1136 insertions(+), 1 deletion(-) create mode 100644 drivers/video/fsl-dcu-fb.c
PATCH 1/4 ARM: dts: vf610: Add DCU and TCON nodes
This patch adds DCU and TCON nodes in SoC level DTS for Freescale Vybrid VF610. It also removes useless pin for DCU0 pinctrl.
--- arch/arm/boot/dts/vf610.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
arch/arm/boot/dts/vf610.dtsi +18 -1
@@ -140,6 +140,14 @@ clock-names = "pit"; }; + tcon0: tcon at 4003d000 { + compatible = "fsl,vf610-tcon"; + reg = <0x4003d000 0x1000>; + clocks = <&clks VF610_CLK_TCON0>; + clock-names = "tcon"; + status = "disabled"; + }; + wdog at 4003e000 { compatible = "fsl,vf610-wdt", "fsl,imx21-wdt"; reg = <0x4003e000 0x1000>;
@@ -169,7 +177,6 @@ dcu0 { pinctrl_dcu0_1: dcu0grp_1 { fsl,pins = < - VF610_PAD_PTB8__GPIO_30 0x42 VF610_PAD_PTE0__DCU0_HSYNC 0x42 VF610_PAD_PTE1__DCU0_VSYNC 0x42 VF610_PAD_PTE2__DCU0_PCLK 0x42
@@ -395,6 +402,16 @@ reg = <0x40050000 0x1000>; }; + dcu0: dcu at 40058000 { + compatible = "fsl,vf610-dcu"; + reg = <0x40058000 0x1200>; + interrupts = <0 30 0x04>; + clocks = <&clks VF610_CLK_DCU0>; + clock-names = "dcu"; + tcon-controller = <&tcon0>; + status = "disabled"; + }; + i2c0: i2c at 40066000 { #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
1.8.0
PATCH 2/4 ARM: dts: vf610-twr: Enable DCU and TCON devices
In reply to Alison WangThis patch enables DCU and TCON devices for Vybrid VF610 TOWER board.
--- arch/arm/boot/dts/vf610-twr.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/vf610-twr.dts +10 -0
@@ -36,6 +36,12 @@ }; +&dcu0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dcu0_1>; + status = "okay"; +}; + &fec0 { phy-mode = "rmii"; pinctrl-names = "default";
@@ -50,6 +56,10 @@ status = "okay"; }; +&tcon0 { + status = "okay"; +}; + &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1_1>;
Signature · 1 line
1.8.0
PATCH 3/4 ARM: clk: vf610: Add DCU and TCON clock support
In reply to Alison WangThis patch adds DCU and TCON clock support for Vybrid VF610 platform.
--- arch/arm/mach-imx/clk-vf610.c | 5 +++++ include/dt-bindings/clock/vf610-clock.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-imx/clk-vf610.c +5 -0
@@ -245,6 +245,8 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) clk[VF610_CLK_DCU1_DIV ] =imx_clk_divider ("dcu1_div" ,"dcu1_en" ,CCM_CSCDR3 ,20 ,3 ); clk[VF610_CLK_DCU1 ] =imx_clk_gate2 ("dcu1" ,"dcu1_div" ,CCM_CCGR9 ,CCM_CCGRx_CGn (8 )); + clk[VF610_CLK_TCON0 ] =imx_clk_gate2 ("tcon0" ,"platform_bus" ,CCM_CCGR1 ,CCM_CCGRx_CGn (13 )); + clk[VF610_CLK_ESAI_SEL ] =imx_clk_mux ("esai_sel" ,CCM_CSCMR1 ,20 ,2 , esai_sels,4 ); clk[VF610_CLK_ESAI_EN ] =imx_clk_gate ("esai_en" ,"esai_sel" ,CCM_CSCDR2 ,30 ); clk[VF610_CLK_ESAI_DIV ] =imx_clk_divider ("esai_div" ,"esai_en" ,CCM_CSCDR2 ,24 ,4 );
@@ -311,6 +313,9 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)clk_set_parent (clk[VF610_CLK_SAI2_SEL ], clk[VF610_CLK_AUDIO_EXT ]);clk_set_parent (clk[VF610_CLK_SAI3_SEL ], clk[VF610_CLK_AUDIO_EXT ]); +clk_set_parent (clk[VF610_CLK_DCU0_SEL ], clk[VF610_CLK_PLL1_PFD2 ]); +clk_set_rate (clk[VF610_CLK_DCU0_DIV ],113200000 ); +/* Add the clocks to provider list */ clk_data.clks = clk; clk_data.clk_num =ARRAY_SIZE (clk);
include/dt-bindings/clock/vf610-clock.h +2 -1
@@ -158,6 +158,7 @@#define VF610_CLK_GPU_SEL 145#define VF610_CLK_GPU_EN 146#define VF610_CLK_GPU2D 147 -#define VF610_CLK_END 148 +#define VF610_CLK_TCON0 148 +#define VF610_CLK_END 149#endif /* __DT_BINDINGS_CLOCK_VF610_H */
Signature · 1 line
1.8.0
PATCH 4/4 fb: Add DCU framebuffer driver for Vybrid VF610 platform
In reply to Alison WangThe Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention.
The features:
(1) Full RGB888 output to TFT LCD panel.
(2) For the current LCD panel, WQVGA "480x272" is supported.
(3) Blending of each pixel using up to 4 source layers dependent on size of panel.
(4) Each graphic layer can be placed with one pixel resolution in either axis.
(5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA8888 direct colors with an alpha channel.
(6) Each graphic layer support alpha blending with 8-bit resolution.
This driver has been tested on Vybrid VF610 TOWER board.
--- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/fsl-dcu-fb.c | 1091 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1101 insertions(+) create mode 100644 drivers/video/fsl-dcu-fb.c
drivers/video/Kconfig +9 -0
@@ -1974,6 +1974,15 @@ config FB_FSL_DIU ---help--- Framebuffer driver for the Freescale SoC DIU +config FB_FSL_DCU + tristate "Freescale DCU framebuffer support" + depends on FB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Framebuffer driver for the Freescale SoC DCU + config FB_W100 tristate "W100 frame buffer support" depends on FB && ARCH_PXA
drivers/video/Makefile +1 -0
@@ -129,6 +129,7 @@ obj-$(CONFIG_FB_IMX) += imxfb.o obj-$(CONFIG_FB_S3C) += s3c-fb.o obj-$(CONFIG_FB_S3C2410) += s3c2410fb.o obj-$(CONFIG_FB_FSL_DIU) += fsl-diu-fb.o +obj-$(CONFIG_FB_FSL_DCU) += fsl-dcu-fb.o obj-$(CONFIG_FB_COBALT) += cobalt_lcdfb.o obj-$(CONFIG_FB_IBM_GXT4500) += gxt4500.o obj-$(CONFIG_FB_PS3) += ps3fb.o
drivers/video/fsl-dcu-fb.c new file +1091 -0
1,091 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 4/4 fb: Add DCU framebuffer driver for Vybrid VF610 platform
Quoted 19 lines · Alison Wang
The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention.
The features:
(1) Full RGB888 output to TFT LCD panel.
(2) For the current LCD panel, WQVGA "480x272" is supported.
(3) Blending of each pixel using up to 4 source layers dependent on size of panel.
(4) Each graphic layer can be placed with one pixel resolution in either axis.
(5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA8888 direct colors with an alpha channel.
(6) Each graphic layer support alpha blending with 8-bit resolution.This driver has been tested on Vybrid VF610 TOWER board.
Quoted 7 lines
Signed-off-by Alison Wang <[email protected]>--- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/fsl-dcu-fb.c | 1091 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1101 insertions(+) create mode 100644 drivers/video/fsl-dcu-fb.c
You should have a document under Documentation/devicetree/bindings/fb/.
Shawn
PATCH 4/4 fb: Add DCU framebuffer driver for Vybrid VF610 platform
Hi, Shawn,
Quoted 33 lines · Alison Wang
Quoted 6 lines
The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU
intervention.
Quoted 6 lines
The features:
(1) Full RGB888 output to TFT LCD panel.
(2) For the current LCD panel, WQVGA "480x272" is supported.
(3) Blending of each pixel using up to 4 source layers dependent onsize of panel.
Quoted 1 line
(4) Each graphic layer can be placed with one pixel resolution in
either axis.
Quoted 1 line
(5) Each graphic layer support RGB565 and RGB888 direct colors
without
Quoted 5 lines
alpha channel and BGRA8888 direct colors with an alpha channel.
(6) Each graphic layer support alpha blending with 8-bit resolution.This driver has been tested on Vybrid VF610 TOWER board.
Quoted 8 lines
Signed-off-by Alison Wang <[email protected]>--- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/fsl-dcu-fb.c | 1091 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1101 insertions(+) create mode 100644 drivers/video/fsl-dcu-fb.c
Quoted 2 lines
You should have a document under
Documentation/devicetree/bindings/fb/.
[Alison Wang] Ok, I will add a document in the next version. Thanks!
Best Regards,
Alison Wang