Commit Graph

11 Commits

Author SHA1 Message Date
Simon Glass
336d4615f8 dm: core: Create a new header file for 'compat' features
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Patrick Delaunay
754815b854 video: stm32: remove the compatible "synopsys, dw-mipi-dsi" support
Remove the compatible "synopsys,dw-mipi-dsi" added in U-Boot
(it don't exist in Linux kernel binding); it is only used
to bind the generic synopsys UCLASS_DSI_HOST "dw_mipi_dsi" to
the driver "stm32-display-dsi" UCLASS_VIDEO_BRIDGE

This binding is done in Linux kernel drivers without compatible
(dw_mipi_dsi_bind() is called in bind of driver, for example in
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c).

This patch does the same in U-Boot driver, the STM32 driver
calls during its bind the function device_bind_driver_to_node
to bind the generic driver "dw_mipi_dsi" at the same address.

This patch reduces the device tree differences
between Linux kernel and U-Boot for stm32mp1 platform.

Tested with v2020.01-rc1 on STM32MP157C-EV1 and STM32MP157C-DK2.

The dependency of driver is clearer and the probe order is guaranteed.

STM32MP> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 sysreset      0  [   ]   syscon_reboot         |-- reboot
 simple_bus    0  [ + ]   generic_simple_bus    |-- soc
 serial        0  [ + ]   serial_stm32          |   |-- serial@40010000
...
 video_brid    0  [ + ]   stm32-display-dsi     |   |-- dsi@5a000000
 dsi_host      0  [ + ]   dw_mipi_dsi           |   |   |-- dsihost
 panel         0  [ + ]   rm68200_panel         |   |   `-- panel-dsi@0
...

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-11-12 16:15:53 +01:00
Yannick Fertré
18b6ca5c5a video: add support of STM32 MIPI DSI controller driver
Add the STM32 DSI controller driver that uses the Synopsys DesignWare
MIPI DSI host controller bridge.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13 23:38:12 +02:00
Yannick Fertré
aeaf330649 video: stm32: stm32_ltdc: add bridge to display controller
Manage a bridge insert between the display controller & a panel.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13 21:24:47 +02:00
Tom Rini
83d290c56f SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-07 09:34:12 -04:00
yannick fertre
e6194ce612 video: stm32: stm32_ltdc: set the blending factor
Set the blending factor regarding the pixel format

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:52:30 +01:00
yannick fertre
75fa711ac8 video: stm32: stm32_ltdc: missing set of line interrupt position
Set LIPCR (line interrupt position conf) register with line length.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:52:09 +01:00
yannick fertre
2a0e878460 video: stm32: stm32_ltdc: set rate of the pixel clock
pxclk is useless to set pixel clock.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:51:58 +01:00
yannick fertre
c4c33e9d8b video: stm32: stm32_ltdc: update file header & footer
Modified copyright & driver name.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:51:38 +01:00
yannick fertre
c0fb2fc045 video: stm32: stm32_ltdc: add reset
Add reset of LTDC display controller.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:50:25 +01:00
Philippe CORNU
72719d2f8a video: add STM32 LTDC display controller
The 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.

Signed-off-by: Philippe CORNU <philippe.cornu@st.com>
2017-09-12 13:40:47 +02:00