video: add STM32 LTDC display controller
Subsystems (2)
cover video: add STM32 LTDC display controller
Version 1:
- Initial commit
The purpose of this set of patches is to add the STM32 LTDC display controller support.
In preamble, a configuration switch is added for pwm-based backlights and a new gpio-based backlight driver is proposed.
Patrick Delaunay (2):
dm: backlight: Add CONFIG_BACKLIGHT_PWM
dm: backlight: Add a driver for GPIO backlight
Philippe CORNU (1):
video: add STM32 LTDC display controller
drivers/video/Kconfig | 23 +++ drivers/video/Makefile | 6 +- drivers/video/backlight_gpio.c | 74 +++++++ drivers/video/stm32/Kconfig | 44 +++++ drivers/video/stm32/Makefile | 10 + drivers/video/stm32/stm32_ltdc.c | 406 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 560 insertions(+), 3 deletions(-) create mode 100644 drivers/video/backlight_gpio.c create mode 100644 drivers/video/stm32/Kconfig create mode 100644 drivers/video/stm32/Makefile create mode 100644 drivers/video/stm32/stm32_ltdc.c
Signature · 1 line
1.9.1
PATCH 1/3 dm: backlight: Add CONFIG_BACKLIGHT_PWM
From: Patrick Delaunay <[email protected]>
Add a config to select individually the driver for PWM backlights. Manage "depends on" to be backyard compatible.
--- drivers/video/Kconfig | 11 +++++++++++ drivers/video/Makefile | 4 +--- 2 files changed, 12 insertions(+), 3 deletions(-)
drivers/video/Kconfig +11 -0
@@ -14,6 +14,17 @@ config DM_VIDEO option compiles in the video uclass and routes all LCD/video access through this. +config BACKLIGHT_PWM + bool "Generic PWM based Backlight Driver" + depends on DM_VIDEO && DM_PWM + default y + help + If you have a LCD backlight adjustable by PWM, say Y to enable + this driver. + This driver can be use with "simple-panel" and + it understands the standard device tree + (leds/backlight/pwm-backlight.txt) + config VIDEO_BPP8 bool "Support 8-bit-per-pixel displays" depends on DM_VIDEO
drivers/video/Makefile +1 -3
@@ -11,9 +11,7 @@ obj-$(CONFIG_DM_VIDEO) += backlight-uclass.o obj-$(CONFIG_DM_VIDEO) += panel-uclass.o simple_panel.o obj-$(CONFIG_DM_VIDEO) += video-uclass.o vidconsole-uclass.o obj-$(CONFIG_DM_VIDEO) += video_bmp.o -ifdef CONFIG_DM_VIDEO -obj-$(CONFIG_DM_PWM) += pwm_backlight.o -endif +obj-$(CONFIG_BACKLIGHT_PWM) += pwm_backlight.o obj-$(CONFIG_CONSOLE_NORMAL) += console_normal.o obj-$(CONFIG_CONSOLE_ROTATION) += console_rotate.o obj-$(CONFIG_CONSOLE_TRUETYPE) += console_truetype.o fonts/
Signature · 1 line
1.9.1
PATCH 2/3 dm: backlight: Add a driver for GPIO backlight
In reply to Philippe CORNUFrom: Patrick Delaunay <[email protected]>
Add a driver for GPIO backlights.
It understands the standard device tree binding. It can be used with simple-panel when PWM is not necessary.
--- drivers/video/Kconfig | 10 ++++++ drivers/video/Makefile | 1 + drivers/video/backlight_gpio.c | 74 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 drivers/video/backlight_gpio.c
drivers/video/Kconfig +10 -0
@@ -25,6 +25,16 @@ config BACKLIGHT_PWM it understands the standard device tree (leds/backlight/pwm-backlight.txt) +config BACKLIGHT_GPIO + bool "Generic GPIO based Backlight Driver" + depends on DM_VIDEO + help + If you have a LCD backlight adjustable by GPIO, say Y to enable + this driver. + This driver can be used with "simple-panel" and + it understands the standard device tree + (leds/backlight/gpio-backlight.txt) + config VIDEO_BPP8 bool "Support 8-bit-per-pixel displays" depends on DM_VIDEO
drivers/video/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_DM_VIDEO) += panel-uclass.o simple_panel.o obj-$(CONFIG_DM_VIDEO) += video-uclass.o vidconsole-uclass.o obj-$(CONFIG_DM_VIDEO) += video_bmp.o obj-$(CONFIG_BACKLIGHT_PWM) += pwm_backlight.o +obj-$(CONFIG_BACKLIGHT_GPIO) += backlight_gpio.o obj-$(CONFIG_CONSOLE_NORMAL) += console_normal.o obj-$(CONFIG_CONSOLE_ROTATION) += console_rotate.o obj-$(CONFIG_CONSOLE_TRUETYPE) += console_truetype.o fonts/
drivers/video/backlight_gpio.c new file +74 -0
74 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 3/3 video: add STM32 LTDC display controller
In reply to Philippe CORNUThe STM32 LTDC display controller provides a parallel digital RGB and signals for horizontal, vertical synchronization, Pixel Clock and Data Enable as output to interface directly to a variety of LCD and TFT panels.
The LTDC main features are:
- 24-bit RGB Parallel Pixel Output, Programmable timings & polarity for HSync, VSync and Data Enable.
- 2 layers with Blending, Color Keying, Window position & size, Dithering, Background color, Color Look-Up Table (CLUT).
- Supported layer color formats: ARGB8888, RGB888, RGB565, ARGB1555, ARGB4444, L8 CLUT, AL44 & AL88
This LTDC driver:
- supports: RGB parallel output with timings & polarity, 1 layer in RGB565.
- supports but with hard-coded configurations: blending, window position & size (crop), background color.
- does not support yet: rgb888, argb8888, 8-bit clut, dithering.
This LTDC driver is compatible with all stm32 platforms with the LTDC IP and has been tested on stm32 f746-disco board.
--- drivers/video/Kconfig | 2 + drivers/video/Makefile | 1 + drivers/video/stm32/Kconfig | 44 +++++ drivers/video/stm32/Makefile | 10 + drivers/video/stm32/stm32_ltdc.c | 406 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 463 insertions(+) create mode 100644 drivers/video/stm32/Kconfig create mode 100644 drivers/video/stm32/Makefile create mode 100644 drivers/video/stm32/stm32_ltdc.c
drivers/video/Kconfig +2 -0
@@ -457,6 +457,8 @@ config VIDEO_SANDBOX_SDL console device and can display stdout output. Within U-Boot is is a normal bitmap display and can display images as well as text. +source "drivers/video/stm32/Kconfig" + config VIDEO_TEGRA20 bool "Enable LCD support on Tegra20" depends on OF_CONTROL
drivers/video/Makefile +1 -0
@@ -60,6 +60,7 @@ obj-$(CONFIG_VIDEO_DW_HDMI) += dw_hdmi.o obj-${CONFIG_VIDEO_TEGRA124} += tegra124/ obj-${CONFIG_EXYNOS_FB} += exynos/ obj-${CONFIG_VIDEO_ROCKCHIP} += rockchip/ +obj-${CONFIG_VIDEO_STM32} += stm32/ obj-y += bridge/ obj-y += sunxi/
drivers/video/stm32/Kconfig new file +44 -0
44 lines not on this page · raw message
drivers/video/stm32/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# +# Copyright (C) STMicroelectronics SA 2017 +# +# Authors: Philippe Cornu <[email protected]> +# Yannick Fertre <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-${CONFIG_VIDEO_STM32} = stm32_ltdc.o
drivers/video/stm32/stm32_ltdc.c new file +406 -0
406 lines not on this page · raw message
Signature · 1 line
1.9.1
cover video: add STM32 LTDC display controller
In reply to Philippe CORNUHi Philippe,
Quoted 15 lines · On Thu, 3 Aug 2017 12:36:05 +0200 Philippe CORNU philippe.cornu at st.com wrote:
Version 1:
- Initial commitThe purpose of this set of patches is to add the STM32 LTDC display controller support.
In preamble, a configuration switch is added for pwm-based backlights and a new gpio-based backlight driver is proposed.Patrick Delaunay (2):
dm: backlight: AddCONFIG_BACKLIGHT_PWM
dm: backlight: Add a driver for GPIO backlightPhilippe CORNU (1):
video: add STM32 LTDC display controller
Quoted 12 lines
drivers/video/Kconfig | 23 +++ drivers/video/Makefile | 6 +- drivers/video/backlight_gpio.c | 74 +++++++ drivers/video/stm32/Kconfig | 44 +++++ drivers/video/stm32/Makefile | 10 + drivers/video/stm32/stm32_ltdc.c | 406 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 560 insertions(+), 3 deletions(-) create mode 100644 drivers/video/backlight_gpio.c create mode 100644 drivers/video/stm32/Kconfig create mode 100644 drivers/video/stm32/Makefile create mode 100644 drivers/video/stm32/stm32_ltdc.c
Series applied to u-boot-video/next. Thanks!
--
Anatolij