video: atmel/lcd: add LCD driver for Atmel new SoC
Subsystems (2)
PATCH v2 1/1 video: atmel/lcd: add LCD driver for Atmel new SoC
The Atmel new SoC (at91sam9x5 series and at91sam9n12) add a totally different LCD controller. Add this new driver is used to support it.
Using CONFIG_ATMEL_HLCD (distinguish with CONFIG_ATMEL_LCD) to enable this in board configuration file.
---
Change since v1
Change the sequence in Makefile according to the suggestion from Mike Frysinger.
Remove unnecessary funtions.
drivers/video/Makefile | 1 + drivers/video/atmel_hlcdfb.c | 223 +++++++++++++++++++++++++++++++++++++++++ include/atmel_hlcdc.h | 225 ++++++++++++++++++++++++++++++++++++++++++ include/lcd.h | 3 +- 4 files changed, 451 insertions(+), 1 deletion(-) create mode 100644 drivers/video/atmel_hlcdfb.c create mode 100644 include/atmel_hlcdc.h
drivers/video/Makefile +1 -0
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB := $(obj)libvideo.o COBJS-$(CONFIG_ATI_RADEON_FB) += ati_radeon_fb.o videomodes.o +COBJS-$(CONFIG_ATMEL_HLCD) += atmel_hlcdfb.o COBJS-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o COBJS-$(CONFIG_CFB_CONSOLE) += cfb_console.o COBJS-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o
drivers/video/atmel_hlcdfb.c new file +223 -0
223 lines not on this page · raw message
include/atmel_hlcdc.h new file +225 -0
225 lines not on this page · raw message
include/lcd.h +2 -1
@@ -157,7 +157,7 @@ typedef struct vidinfo { struct pxafb_info pxa; } vidinfo_t; -#elif defined(CONFIG_ATMEL_LCD) +#elif defined(CONFIG_ATMEL_LCD) || defined(CONFIG_ATMEL_HLCD) typedef struct vidinfo { ushort vl_col; /* Number of columns (i.e. 640) */
@@ -169,6 +169,7 @@ typedef struct vidinfo {u_long vl_bpix;/* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */ u_long vl_tft;/* 0 = passive, 1 = TFT */ u_long vl_cont_pol_low;/* contrast polarity is low */ +u_long vl_clk_pol;/* clock polarity */ /* Horizontal control register. */ u_long vl_hsync_len;/* Length of horizontal sync */
Signature · 1 line
1.7.10
PATCH v3 1/1 video: atmel/lcd: add LCD driver for new Atmel SoC
From: Bo Shen <[email protected]>
The new Atmel SoC (at91sam9x5 series and at91sam9n12) add a totally different LCD controller. Add this new driver to support it.
Using CONFIG_ATMEL_HLCD (distinguish with CONFIG_ATMEL_LCD) to enable this in board configuration file.
---
Changes since v2:
- rebase on current tree
- convert to use struct for register offsets
- fix indentation in header file
- slightly revise commit log
drivers/video/Makefile | 1 + drivers/video/atmel_hlcdfb.c | 211 ++++++++++++++++++++++++++++++++++++++ include/atmel_hlcdc.h | 231 ++++++++++++++++++++++++++++++++++++++++++ include/lcd.h | 3 +- 4 files changed, 445 insertions(+), 1 deletions(-) create mode 100644 drivers/video/atmel_hlcdfb.c create mode 100644 include/atmel_hlcdc.h
drivers/video/Makefile +1 -0
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB := $(obj)libvideo.o COBJS-$(CONFIG_ATI_RADEON_FB) += ati_radeon_fb.o videomodes.o +COBJS-$(CONFIG_ATMEL_HLCD) += atmel_hlcdfb.o COBJS-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o COBJS-$(CONFIG_CFB_CONSOLE) += cfb_console.o COBJS-$(CONFIG_EXYNOS_FB) += exynos_fb.o exynos_fimd.o
drivers/video/atmel_hlcdfb.c new file +211 -0
211 lines not on this page · raw message
include/atmel_hlcdc.h new file +231 -0
231 lines not on this page · raw message
include/lcd.h +2 -1
@@ -158,7 +158,7 @@ typedef struct vidinfo { struct pxafb_info pxa; } vidinfo_t; -#elif defined(CONFIG_ATMEL_LCD) +#elif defined(CONFIG_ATMEL_LCD) || defined(CONFIG_ATMEL_HLCD) typedef struct vidinfo { ushort vl_col; /* Number of columns (i.e. 640) */
@@ -170,6 +170,7 @@ typedef struct vidinfo {u_long vl_bpix;/* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */ u_long vl_tft;/* 0 = passive, 1 = TFT */ u_long vl_cont_pol_low;/* contrast polarity is low */ +u_long vl_clk_pol;/* clock polarity */ /* Horizontal control register. */ u_long vl_hsync_len;/* Length of horizontal sync */
Signature · 1 line
1.7.1
PATCH v3 1/1 video: atmel/lcd: add LCD driver for new Atmel SoC
Hi Anatolij,
Quoted 17 lines · Anatolij Gustschin
From: Bo Shen<[email protected]>
The new Atmel SoC (at91sam9x5 series and at91sam9n12) add a totally different LCD controller. Add this new driver to support it.
Using
CONFIG_ATMEL_HLCD(distinguish withCONFIG_ATMEL_LCD) to enable this in board configuration file.Signed-off-by Bo Shen<[email protected]>Signed-off-by Anatolij Gustschin<[email protected]>---
Changes since v2:
- rebase on current tree
- convert to use struct for register offsets
- fix indentation in header file
- slightly revise commit log
Quoted 7 lines
drivers/video/Makefile | 1 + drivers/video/atmel_hlcdfb.c | 211 ++++++++++++++++++++++++++++++++++++++ include/atmel_hlcdc.h | 231 ++++++++++++++++++++++++++++++++++++++++++ include/lcd.h | 3 +- 4 files changed, 445 insertions(+), 1 deletions(-)create mode 100644
drivers/video/atmel_hlcdfb.c
create mode 100644include/atmel_hlcdc.h
Verified on Atmel SoC. It works well.
Thanks
Best Regards,
Bo Shen
PATCH v3 1/1 video: atmel/lcd: add LCD driver for new Atmel SoC
In reply to Anatolij GustschinQuoted 17 lines · On Fri, 25 May 2012 12:59:58 +0200 Anatolij Gustschin <[email protected]> wrote:
From: Bo Shen <[email protected]>
The new Atmel SoC (at91sam9x5 series and at91sam9n12) add a totally different LCD controller. Add this new driver to support it.
Using
CONFIG_ATMEL_HLCD(distinguish withCONFIG_ATMEL_LCD) to enable this in board configuration file.Signed-off-by Bo Shen <[email protected]>Signed-off-by Anatolij Gustschin <[email protected]>---
Changes since v2:
- rebase on current tree
- convert to use struct for register offsets
- fix indentation in header file
- slightly revise commit log
Quoted 7 lines
drivers/video/Makefile | 1 + drivers/video/atmel_hlcdfb.c | 211 ++++++++++++++++++++++++++++++++++++++ include/atmel_hlcdc.h | 231 ++++++++++++++++++++++++++++++++++++++++++ include/lcd.h | 3 +- 4 files changed, 445 insertions(+), 1 deletions(-) create mode 100644 drivers/video/atmel_hlcdfb.c create mode 100644 include/atmel_hlcdc.h
Applied to u-boot-video/master. Thanks!
Anatolij
PATCH v2 1/1 video: atmel/lcd: add LCD driver for Atmel new SoC
In reply to Bo ShenHi,
On Tue, 22 May 2012 16:47:29 +0800
Bo Shen <[email protected]> wrote:
...
Quoted 5 lines
drivers/video/atmel_hlcdfb.c new file +0
-0
...
drivers/video/atmel_hlcdfb.c line 52
Quoted 2 lines
drivers/video/atmel_hlcdfb.c new file +2
-0+#define lcdc_readl (mmio, reg) __raw_readl((mmio)+(reg)) +#define lcdc_writel (mmio, reg, val) __raw_writel((val), (mmio)+(reg))
Wolfgang won't accept base + offset for register access, we should use struct instead. Converted patch is on the way, please review/test.
Thanks,
Anatolij
PATCH v2 1/1 video: atmel/lcd: add LCD driver for Atmel new SoC
Hi Anatolig,
Quoted 11 lines · Anatolij Gustschin
Hi,
On Tue, 22 May 2012 16:47:29 +0800
Bo Shen<[email protected]> wrote:
...Quoted 5 lines
drivers/video/atmel_hlcdfb.c new file +0
-0...
Quoted 5 lines
drivers/video/atmel_hlcdfb.c line 52
Quoted 2 lines
drivers/video/atmel_hlcdfb.c new file +2
-0+#define lcdc_readl (mmio, reg) __raw_readl((mmio)+(reg)) +#define lcdc_writel (mmio, reg, val) __raw_writel((val), (mmio)+(reg))Wolfgang won't accept base + offset for register access, we should use struct instead. Converted patch is on the way, please review/test.
This converted patch has been verified. It works well on Atmel SoC (at91sam9x5ek, and etc).
Quoted 3 lines
Thanks,
Anatolij