Skip to contentSkip to conversation

at91: video: add driver for Atmel HLCD controller

PATCH Superseded Songjun Wu 2 participants 6 messages Aug 8, 2016 – Sep 23, 2016

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Songjun Wu

author
#0 lore raw

cover at91: video: add driver for Atmel HLCD controller

The i2c driver includes two parts.
1) Driver code to implement the HLCD function.
2) Device tree binding documentation, it describes how to add the HLCD in device tree.

Songjun Wu (2):
at91: video: Support driver-model for the HLCD driver
at91: video: DT binding for HLCDC driver

 doc/device-tree-bindings/video/atme-hlcdc.txt |  38 +++
 drivers/video/Kconfig                         |   7 +
 drivers/video/Makefile                        |   2 +-
 drivers/video/atmel_hlcdfb.c                  | 330 +++++++++++++++++++++++++-
 4 files changed, 373 insertions(+), 4 deletions(-)
 create mode 100644 doc/device-tree-bindings/video/atme-hlcdc.txt
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 at91: video: Support driver-model for the HLCD driver

Add driver-model support to this driver.

---

 drivers/video/Kconfig        |   7 +
 drivers/video/Makefile       |   2 +-
 drivers/video/atmel_hlcdfb.c | 330 ++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 335 insertions(+), 4 deletions(-)
drivers/video/Kconfig +7 -0
index 8361a71..c40b2cf 100644
@@ -362,6 +362,13 @@ config DISPLAY
 	   The devices provide a simple interface to start up the display,
 	   read display information and enable it.
 
+config VIDEO_ATMEL_HLCD
+	bool "Enable ATMEL video support using HLCDC"
+	depends on DM_VIDEO
+	help
+	   Only the LCD is supported in U-Boot. This option enables this support
+	   which can be used on devices which have an LCD display connected.
+
 config VIDEO_BROADWELL_IGD
 	bool "Enable Intel Broadwell integrated graphics device"
 	depends on X86
drivers/video/Makefile +1 -1
index 3f045fe..3d54cf9 100644
@@ -22,7 +22,6 @@ endif
 obj-$(CONFIG_VIDEO_BROADWELL_IGD) += broadwell_igd.o
 
 obj-$(CONFIG_ATI_RADEON_FB) += ati_radeon_fb.o videomodes.o
-obj-$(CONFIG_ATMEL_HLCD) += atmel_hlcdfb.o
 obj-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o
 obj-$(CONFIG_CFB_CONSOLE) += cfb_console.o
 obj-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o
@@ -35,6 +34,7 @@ obj-$(CONFIG_S6E8AX0) += s6e8ax0.o
 obj-$(CONFIG_S6E63D6) += s6e63d6.o
 obj-$(CONFIG_LD9040) += ld9040.o
 obj-$(CONFIG_SED156X) += sed156x.o
+obj-$(CONFIG_VIDEO_ATMEL_HLCD) += atmel_hlcdfb.o
 obj-$(CONFIG_VIDEO_BCM2835) += bcm2835.o
 obj-$(CONFIG_VIDEO_COREBOOT) += coreboot_fb.o
 obj-$(CONFIG_VIDEO_CT69000) += ct69000.o videomodes.o
drivers/video/atmel_hlcdfb.c +327 -3

352 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/2 at91: video: Support driver-model for the HLCD driver

Quoted 9 lines · On Mon, 8 Aug 2016 15:34:47 +0800 Songjun Wu songjun.wu at microchip.com wrote:

Add driver-model support to this driver.

---

 drivers/video/Kconfig        |   7 +
 drivers/video/Makefile       |   2 +-
 drivers/video/atmel_hlcdfb.c | 330 ++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 335 insertions(+), 4 deletions(-)

applied to u-boot-video/master, thanks!

--
Anatolij

#3 lore raw

PATCH 1/2 at91: video: Support driver-model for the HLCD driver

On Fri, 23 Sep 2016 23:05:00 +0200
Anatolij Gustschin agust at denx.de wrote:
...

Quoted 1 line

applied to u-boot-video/master, thanks!

this patch breaks building for at91 boards, so I drop it. Please fix and resubmit. Thanks.

--
Anatolij

author
#4 lore raw

PATCH 2/2 at91: video: DT binding for HLCDC driver

In reply to Songjun Wu

DT binding documentation for atmel HLCDC driver.

---

 doc/device-tree-bindings/video/atme-hlcdc.txt | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 doc/device-tree-bindings/video/atme-hlcdc.txt
doc/device-tree-bindings/video/atme-hlcdc.txt new file +38 -0
new file mode 100644
index 0000000..aac0b84
@@ -0,0 +1,38 @@
+Atmel HLCDC Framebuffer
+-----------------------------------------------------
+Required properties:
+- compatible :
+	"atmel,sama5d2-hlcdc".
+- reg: physical base address of the controller and length of memory mapped
+     region.
+- clocks: phandles to input clocks.
+- atmel,vl-bpix: Bits per pixel.
+- atmel,guard-time: lcd guard time (Delay in frame periods).
+- display-timings: please refer the displaymode.txt.
+
+Example:
+hlcdc: hlcdc at f0000000 {
+	u-boot,dm-pre-reloc;
+	compatible = "atmel,sama5d2-hlcdc";
+	reg = <0xf0000000 0x2000>;
+	clocks = <&lcdc_clk>;
+	atmel,vl-bpix = <4>;
+	atmel,guard-time = <1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_pwm &pinctrl_lcd_rgb666>;
+	status = "okay";
+
+	display-timings {
+		480x272 {
+			clock-frequency = <9000000>;
+			hactive = <480>;
+			vactive = <272>;
+			hsync-len = <41>;
+			hfront-porch = <2>;
+			hback-porch = <2>;
+			vfront-porch = <2>;
+			vback-porch = <2>;
+			vsync-len = <11>;
+		};
+	};
+};
\ No newline at end of file
Signature · 1 line
2.7.4
#5 lore raw

PATCH 2/2 at91: video: DT binding for HLCDC driver

Quoted 8 lines · On Mon, 8 Aug 2016 15:34:48 +0800 Songjun Wu songjun.wu at microchip.com wrote:

DT binding documentation for atmel HLCDC driver.

---

 doc/device-tree-bindings/video/atme-hlcdc.txt | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 doc/device-tree-bindings/video/atme-hlcdc.txt

applied to u-boot-video/master, thanks!

--
Anatolij