Commit graph

402 commits

Author SHA1 Message Date
Ioannis Karachalios 75a3c5b848 drivers: display: smartbond: Add support for PM
This commit should add all the functionality needed for the DISPLAY
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-14 18:22:54 -04:00
Daniel DeGrasse 558c2916b9 drivers: display: mcux_elcdif: add additional documentation around PXP
Add additional documentation and warnings around PXP usage. PXP rotation
is only intended to be used when framebuffers passed to the eLCDIF
display driver are equal in size to the screen.

Moreover, PXP rotation is flipped versus LVGL rotation. So a LVGL
rotation of 90 degrees requires the PXP to be set to rotate 270 degrees
to function as expected.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:22:28 -04:00
Daniel DeGrasse 6290d18c13 drivers: display: display_hx8394: use MIPI LPM during init commands
Although not documented in the HX8394 datasheet, it seems that the
display fails to initialize if MIPI HS mode is used to send
configuration commands. Therefore, we must make sure all initialization
commands are sent with the MIPI_DSI_MSG_USE_LPM flag set.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-02 21:26:32 +03:00
Nathan Collins acc2b51959 drivers: display: sdl: Fix asserts in sdl_display_write
The asserts and validation code were incorrectly mixing pitch and
width.  These incorrect checks were preventing rendering code from
re-using a smaller section of a buffer allocated to fit the full
screen. We expect to be able to update a portion of the display from a
portion of the buffer, in which case pitch must remain the screen
width. Expecting x + pitch to be smaller than the screen width is
incorrect.

Signed-off-by: Nathan Collins <nathan.collins@kdab.com>
2024-04-30 18:23:30 +02:00
Chen Xingyu 979cd1dfe8 drivers: display: st7789v: Add support to disable inversion mode
For historical reasons, inversion mode is enabled by default in the
current implementation. This commit introduces an `inversion-off`
boolean DTS property, allowing it to be disabled if necessary.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-04-29 11:02:20 +02:00
Daniel DeGrasse 8ffd1e2f53 drivers: display: add driver for ST7796s display
Add driver for ST7796s display. This is a MIPI DBI display controller,
with a frame memory of 320x480x18 pixels. Support for 4 wire SPI mode is
implemented using the MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-08 09:04:06 +02:00
Erik Andersson 72503ab386 drivers: display: add driver for frida,nt35510
For now DSI settings are hard-coded for the specific
LCD module used on the STM32H747I Discovery board

Signed-off-by: Erik Andersson <erian747@gmail.com>
2024-04-02 21:03:10 -04:00
Ioannis Karachalios 96677e402e drivers: display: smartbond: Add support for the display driver class.
Exhibit Renesas LCD controller's driver implementation. The driver
is intended to employ the controller in the continuous mode so
it can drive display panels in the parallel RGB mode.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-03-08 10:21:06 +00:00
Phi Bang Nguyen 080f26f4d4 drivers: display: elcdif: Implement set_format API
Implement the set_format API so that applications can change format
at runtime instead of using the predefined one in the device tree.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-07 10:57:57 +00:00
Phi Bang Nguyen f5e970de3f drivers: display: elcdif: Add support for ARGB8888 format
Add support for ARGB8888 pixel format as the camera pipeline on i.MX
RT11xx could output images in this format

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-07 10:57:57 +00:00
Phi Bang Nguyen ebf963590f drivers: display: elcdif: Run clang-format
Run clang-format before making changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-07 10:57:57 +00:00
TOKITA Hiroshi ca520f8493 drivers: display: Add LED-Strip matrix display driver
Adds a driver for a display of LED strips arranged in a grid.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2024-03-05 09:44:24 -05:00
Greter Raffael 1109027c55 drivers: display: ssd1306: Cleanup
- Removed unused variables from the data struct
- Set all members of capability struct in `ssd1306_get_capabilities`
  instead of zeroing it. This has the same effect but saves some bytes.
- Removed empty log

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-03-01 09:02:22 +01:00
Greter Raffael cbec4753e1 drivers: display: ssd1306: Invert colors at runtime
This allows to invert the display at runtime using the function
`ssd1306_set_pixel_format`. The current format is stored in the data
struct.

Also adjusted `ssd1306_get_capabilities` to return both supported
formats and the current one.

From the ssd1306 doc: 'In normal display a RAM data of 1 indicates an
"ON" pixel while in inverse display a RAM data of 0 indicates an "ON"
pixel.' Thus `PIXEL_FORMAT_MONO01 == SSD1306_SET_NORMAL_DISPLAY`.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-03-01 09:02:22 +01:00
Fabio Baltieri cbad8eff46 drivers: display: drop a bunch of redundant placeholder API functions
Drop a bunch of display functions that only return "not supported", the
display API already handles these by checking for NULL API function
pointer.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-02-26 11:41:11 +00:00
Joel Guittet e90613efb2 drivers: display: gc9x01x: fix bindings include
The GC9X01X driver relies on panel.h instead of gc9x01x.h (doesn't
exist).

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-02-05 09:38:57 +00:00
Abderrahmane Jarmouni 32fd2f57b1 drivers: display: stm32_ltdc: fix for stm32f429i_disc1
Display is not working on STM32F429i-DISC1 board because
display_blanking_off() needs to be sent to ILI9341 device, but it's sent
to LTDC instead which does not implement it.
This patch adds a LTDC DT property that provides the pHandle of the
display's own controller so that display_blanking_off/on are forwarded to
it when they are called by an application.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-02-02 19:54:45 +01:00
Daniel DeGrasse b6feb567d1 drivers: display: ili9xxx: do not delay for reset unless supported
Check the return code of mipi_dbi_reset, and do not delay for the reset
wait time unless the mipi controller has issued a hardware reset to the
display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Daniel DeGrasse 5b767a0dd2 drvers: display: ili9xxx: fix usage of MIPI buffer descriptor
Fix usage of MIPI buffer descriptor in ili9xxx driver. Previously, the
buffer descriptor size was being set to display buffer size. For cases
where the write height/width  was not equal to the size of the buffer, this
resulted in additional data being written that was not needed. To
resolve this, calculate the mipi descriptor buffer size in the driver

Also, remove the unconditional setting of mipi_desc.height, as this
would override the previous (correct) setting.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Daniel DeGrasse 3dbbb73319 drivers: display: ili9xxx: convert to MIPI DBI API
Convert ili9xxx display drivers to use MIPI DBI API. Due to the fact
this change requires a new devicetree structure for the display driver
to build, required devicetree changes are also included in this commit
for all boards and shields defining an instance of an ili9xxx display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-31 16:01:45 +00:00
Emil Lindqvist 548fb97142 cache: stm32: add new cache API to display and i2s
Use sys_cache API to handle cache flush/invalidate.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-01-30 14:12:57 +00:00
Marcin Niestroj 499edcdbc9 drivers: display: uc81xx: fix 16-bit 'tres'
Use 'struct uc81xx_tres16' for 16-bit 'tres' setup, instead of 'struct
uc81xx_tres8'. This fixes a regression when support for 'uc8175' was added
and 'struct uc81xx_tres' was replaced with 'struct uc81xx_tres16'.

Fixes: 7c46b0b898 ("drivers: display: uc81xx: add support for uc8175")

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-01-26 11:03:48 +01:00
Martin Kiepfer 5a3f53551f drivers: display: gc9a01a: Add support for SPI display controller gc9a01a
Adding driver for GC9A01A 240x240 based LCD displays.
Should be working with GC9C01 as well (untested).

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-01-20 12:40:15 +01:00
TOKITA Hiroshi 6489255648 drivers: display: sdl: add SDL_DISPLAY_MONO_MSB_FIRST option
Added config for specifying bit order when using monochrome format.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-19 15:13:25 +00:00
TOKITA Hiroshi 321389df92 drivers: display: sdl: Correcting display_read()
Fixed an issue where `display_read()` in the SDL driver was not working.

In the current implementation, use texture to represent screen images.
To read this, draw it once on another surface and then read it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-19 15:13:25 +00:00
TOKITA Hiroshi a4de15ba1c drivers: display: sdl: Add config for switch hardware accelerator
Add SDL_DISPLAY_USE_HARDWARE_ACCELEREATOR to be able to switch
enable/disable hardware accelerator.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-19 15:13:25 +00:00
HaiLong Yang 39d74f1fd4 drivers: display: stm32 ltdc frame buffer number config
This add frame number config to stm32 ltdc. Line interrupt is enabled
to load new frambe buffer.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-01-17 14:43:20 +01:00
HaiLong Yang 08cd5eb91d drivers: display: update otm8009a config
OTM8009A_MCS_NO_DOC2(0xCFD0U) only write buf[0], but write length
set to 3.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-01-17 14:43:20 +01:00
Jakub Zymelka ade49f081d modules: hal_nordic: nrfx: update API version to 3.2.0
Updated API version enables multi-instance GPIOTE driver.
Additionally obsolete symbol that was used to specify
API version in the past was removed.
Affected drivers have been adjusted and appropriate changes
in affected files have been made.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-01-08 11:19:37 +01:00
Jakob Krantz ccd843ecbd driver: display: sdl: Fix input together with SDL_DISPLAY_ZOOM_PCT
Using SDL_DISPLAY_ZOOM_PCT would cause mouse pointer/touch input
to not click at the correct position.

Signed-off-by: Jakob Krantz <mail@jakobkrantz.se>
2024-01-07 20:08:13 -05:00
Xiao Qin 7c46b0b898 drivers: display: uc81xx: add support for uc8175
Add support for uc8175 display driver. uc8175 has a slightly
different command/data length requirements for certain registers,
namely TRES and PTL, compared to uc8176/uc8179

This commit refactors the driver code and such that setting TRES and PTL
registers are now done by function pointers provided by config->quirks,
by the same token as how it is done for setting CDI register

Signed-off-by: Xiao Qin <xiaoq@google.com>
2023-12-11 15:57:21 +01:00
Marcus Folkesson cbae54c7f7 drivers: display: remove dummy functions for unsupported API
As the display API now check against valid callback functions and
returns -ENOSYS (or equalent), there is no need to provide
such functions in the driver code

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
2023-12-11 09:56:42 +01:00
Marcus Folkesson 7c9205bc41 display: display_max7219: remove dummy functions for unsupported API
As the display API now check against valid callback functions and
returns -ENOSYS (or equalent), there is no need to provide
such functions in the driver code.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
2023-12-07 10:36:52 +00:00
Arnaud MAZIN d3ffe6f404 driver: display: sdl: Introduce de CLI option display_zoom_pct
This option let specify at startup the zoom factor to apply on the
SDL window. See CONFIG_SDL_DISPLAY_ZOOM_PCT.

Signed-off-by: Arnaud MAZIN <arnaud.mazin@gmail.com>
2023-11-27 19:59:38 +01:00
Arnaud MAZIN 1378c90a93 driver: display: sdl: Introduce SDL_DISPLAY_ZOOM_PCT
This option modifies SDL window size and help with readability of very
small screens

Signed-off-by: Arnaud MAZIN <arnaud.mazin@gmail.com>
2023-11-24 09:25:22 +01:00
Fabio Baltieri 939b90be4c drivers: drop few redundant guard around pm_policy_state_lock_*
The pm_policy_state_lock_put and pm_policy_state_lock_put functions
already become a no-op if CONFIG_PM is not enabled. Drop the guards
around it in few different drivers.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-22 18:34:36 +00:00
Daniel DeGrasse 5997f3d00d drivers: display: rm67162: add device level power management
Add device level power management to rm67162 display. Device level power
management for this controller calls the MIPI DSI detach API, in order
to power down the MIPI DPHY when the display is not active.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-14 09:22:59 +01:00
Daniel DeGrasse 9b9a74e70c drivers: display: hx8394: fix TEAR and DPHYCMD0 settings
Fix settings for TEAR and DPHYCMD0 to match initialization data
provided by MCUX SDK driver. The following fixes were needed:
- Tear effect signal should only be sent at the VBLANK interval, so TEON
  should be set to 0x0
- DPHYCMD0 LP-RX VHYS trimming was incorrectly being set to 37mV, when
  it should be set to 66mV (the default value)

These changes resolve some flickering and blooming that occasionally
occurred during initialization

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-06 15:41:25 -06:00
Emil Lindqvist 97d608b98f display: stm32: fix bug where missing backlight pin causes crash
When backlight pin is not defined, a display suspend will cause
a crash since it looks at the wrong pin when deciding if
it exists.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2023-10-10 15:16:59 +03:00
Daniel DeGrasse 36ad0b10b3 drivers: display: rm67162: write full buffer to MIPI_DSI
With update to handle DSI transfer length in MIPI_DSI driver, the logic
can be removed from the RM67162 driver. The driver now will simply
continue writing data until the full buffer is sent.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-25 09:46:55 +02:00
Gerard Marull-Paretas 222409fa49 drivers: display: move to POST_KERNEL
There's no need to use APPLICATION level here.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
TOKITA Hiroshi 9fcfb31c82 drivers: display: ssd1306: Support connecting SPI and I2C at the same
Support connecting different display for each SPI and I2C
at the same time.

In a case like DTS below.

```
&spi1 {
        ssd1306_spi: ssd1306@0 {
		compatible = "solomon,ssd1306fb";
                ...
        };

};

&i2c0 {
        ssd1306_i2c: ssd1306@3c {
		compatible = "solomon,ssd1306fb";
		...
	};
};
```

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 2f7e822705 drivers: display: ssd1306: determin sh1106 by dts compatibility
Determine sh1106 from the `compatibility` value instead of
the SSD1306_CONTROLLER_TYPE setting.

Change the settings in `boards/shields/ssd1306/sh1106_128x64.overlay`
to follow this change.
Remove the SSD1306_CONTROLLER_TYPE from its Kconfig.defconfig,
and set the `compatibility` to `sinowealth,sh1106`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 91d750ea94 drivers: display: ssd1306: replace SSD1306_REVERSE_MODE by property
When multiple devices are connected, the SSD1306_REVERSE_MODE setting
cannot switch for each device.
Add an equivalent setting to the devicetree properties to replace it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 237c2aaa79 drivers: display: ssd1306: add dts properties to ssd1306_config
Store properties defined in dts in ssd1306_config's fields.
And replace code that uses DT_INST_PROP (0, ...) by config properties.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
David Lamparter a532dbab51 doc: list ST7735S alongside ST7735R
Throw ST7735S into a few places so people can find it.

Signed-off-by: David Lamparter <equinox@diac24.net>
2023-09-11 20:05:26 +02:00
David Lamparter ea717bba21 drivers: display: st7735r: support ST7735S
ST7735S requires the COLMOD command be repeated as part of writing
pixels, otherwise it goes back to some kind of default which is likely
wrong.

ST7735S works correctly after this plus the previous two commits; tested
on STM32L462 + KD0096FM.

Signed-off-by: David Lamparter <equinox@diac24.net>
2023-09-11 20:05:26 +02:00
David Lamparter 19113d6e8c drivers: display: st7735r: hold CS for pixels
Use a continuous transaction with CS kept low for the entire batch of
row address, column address and actual pixel data write.  This is
required by ST7735S and shouldn't hurt elsewhere.

Signed-off-by: David Lamparter <equinox@diac24.net>
2023-09-11 20:05:26 +02:00
David Lamparter 64c46ae56a drivers: display: st7735r: add hold-CS transmit()
ST7735S support (separate commits) needs this.

Signed-off-by: David Lamparter <equinox@diac24.net>
2023-09-11 20:05:26 +02:00
Fabio Baltieri 3d713a42e8 display: ssd1306: add some init delay
Seems like the SSD1306 controller needs a bit of time after power up
before it can take i2c commands. This causes problems with
microcontrollers that have no other delays in the startup sequence, like
rpi_pico.

There's currently no good way of modeling this in Zephyr right now, and
there's also no clear indication of how much time the device needs in
the datasheet that I could find, but it seems like 10ms is enough for
that to start reliably so add a delay in the ssd1306 init function to
ensure that at least that time has passed from system power up.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-08 14:44:03 +02:00