Commit graph

28 commits

Author SHA1 Message Date
Erik Andersson 36e2b40e38 drivers: dsi: stm32: add additional dt options
To support the NT35510 display, some additional
options needs to be configurable in the STM32
DSI peripheral

Signed-off-by: Erik Andersson <erian747@gmail.com>
2024-04-02 21:03:10 -04:00
Susan Su a56c8cfa69 drivers: mipi_dsi: dsi_mcux: Remove DSI_DPHY_PLL_VCO definition
- The DSI_DPHY_PLL_VCO_MAX and DSI_DPHY_PLL_VCO_MIN macro value is
   different when changing to different SoC, so the definition is moved
   to soc level driver header.
 - Remove the definition in this c file to fix the duplicate definition
   issue.

Signed-off-by: Susan Su <susan.su@nxp.com>
2024-03-06 10:16:37 +00:00
Daniel DeGrasse 5854821b65 drivers: mipi_dsi: add support for mipi_dsi_detach to dsi_mcux_2l
Add support for mipi_dsi_detach API to dsi_mcux_2l driver, and
update RT5xx SOC interface to enable halting clocks for the MIPI DPHY.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-14 09:22:59 +01:00
Mike J. Chen 01aa800464 drivers: mipi_dsi: dsi_mcux_2l add property to enable non-continuous hs clk
Allows device tree to enable usage of the controller feature
where HS clock is disabled when not in use, which is good
for reducing power consumption if MIPI DSI is mostly idle.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-10-24 11:37:41 +02:00
Mike J. Chen 4844d015a4 drivers: mipi_dsi: dsi_mcux_2l add msg flag for low power mode
Previous version of dsi_mcux_2l hardcoded some MIPI DSI
transfers to use high speed mode but others used low power mode.

Now dsi_mcux_2l will use high speed mode by default for all
transfers unless a new msg flag is set to indicate the
transfer must use low power mode. Note that the new flag
is different than the existing MIPI_DSI_MODE_LPM flag, which
so far only applied to cmd messages sent in video mode,
or could be interpreted as for all messages, but would not
allow per message mode control.

This new message flag allows client to control transfer
mode per message transfer.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-10-24 11:37:41 +02:00
Mike J. Chen 1e6866ed0b drivers: mipi_dsi: dsi_mcux_2l set SMARDMA slot from dev pixfmt
Previous version hardcoded the SMARTDMA slot to either
RGB565 or RGB565_SWAP, but that would be incorrect
if the pixfmt was RGB888. Use the mipi device
pixfmt to set the slot.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-10-24 11:37:41 +02:00
Daniel DeGrasse 61515cf31f drivers: mipi_dsi: dsi_mcux_2l add support for SMARTDMA, and byte swapping
Add support for SMARTDMA transfers, and byte swapping of RGB565 data.
Additionally, the limits on TX data size have been impelemented in the
MIPI DSI driver, as opposed to the RM67162 display where they were
previously added.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-25 09:46:55 +02:00
Daniel DeGrasse 9bcd8e9b3e drivers: mipi_dsi: dsi_mcux: limit DSI TX to max payload size
Limit DSI data TX to the max payload size possible with this peripheral,
rather than relying on display drivers to respect this limitation.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-25 09:46:55 +02:00
Daniel DeGrasse 918c79706d drivers: mipi_dsi: dsi_mcux_2l: add support for MIPI generic long write CMD
Add support for MIPI generic long write commands to DSI MCUX 2L driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-28 09:06:17 +00:00
Daniel DeGrasse d620511c22 drivers: mipi_dsi: dsi_mcux: add support for MIPI generic long write CMD
Add support for MIPI generic long write commands to DSI MCUX driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-28 09:06:17 +00:00
Daniel DeGrasse 35a210be48 drivers: mipi_dsi: dsi_mcux: fix support for DCS_LONG_WRITE command
Fix support for DCS long write command in DSI mcux driver, to enable use
with displays that require this command for full support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Daniel DeGrasse d1ef34440e drivers: mipi_dsi: dsi_mcux: make DPI mode optional
Only setup DPI input from LCDIF if MODE_VIDEO is set, as this
is the the only case where input from the LCDIF would be required to
drive the display. Do not populate the dpi_config structure unless a
reference the the NXP LCDIF device is provided, since this is the output
device providing DPI data.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Daniel DeGrasse 21469a30d2 drivers: mipi_dsi: dsi_mcux_2l: enable DCS_LONG_WRITE using interrupts
Fixup support for DCS_LONG_WRITE command in DSI MCUX 2L driver. Since long
DCS commands may benefit from nonblocking I/O, add support for non blocking
transfers to the DSI driver.

This commit also corrects the interrupt number for the RT595, which uses
the DSI_MCUX_2L IP block.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Daniel DeGrasse 867acef070 drivers: mipi_dsi: make DPI mode optional for dsi_mcux_2l driver
Make DPI mode an optional configuration for the DSI MCUX 2L driver.
DPI mode will only be enabled when the MIPI is attached in video mode,
since this is when DPI formatted packets are expected.

This will enable the DSI driver to also support DBI/command mode, for
displays that use this format.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Sean Nyekjaer 09f4b6f3bd drivers: mipi_dsi: dsi_stm32: void return value from reset_line_toggle_dt
Suggested-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2023-07-20 10:57:12 +00:00
Daniel DeGrasse fa94dcd277 drivers: mipi_dsi: implement clock selection algorithm
With the phy-clock being specified in devicetree (and thus under user
control), there is no need to artificially enlarge the DPHY clock to
insure it is fast enough. Instead, we can calculate the DPHY clock
directly, selecting the closest realizable value that is at least as
fast as the value requested by the user.

Fixes #59215

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-18 16:20:28 +02:00
Fabio Baltieri fed377f622 drivers: mipi: delay initialization after display drivers
Currently MIPI devices are set to initialize before display drivers,
which is incoherent with how the mcux mipi-dsi device is declared in the
device tree.

This is detected with build time priority checking:

west build -p -b mimxrt595_evk_cm33 samples/drivers/display \
	     -DCONFIG_CHECK_INIT_PRIORITIES=y

ERROR: /soc/peripheral@50000000/mipi_dsi@31000 POST_KERNEL 40 <
		/soc/peripheral@50000000/lcdif@210000 POST_KERNEL 85

Note that this also changes the priority of dsi_stm32, though that
should be ok since does not appear to have other dependencies in
devicetree.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-08 12:39:53 -04:00
Daniel DeGrasse 746758d1f6 drivers: display: update MCUX ELCDIF driver to use new lcdif binding
Update MCUX ELCDIF driver to use new LCDIF bindings. This
update also adds support for configuring the root clock of
the ELCDIF module based on the pixel-clock property to the
RT11xx SOC clock init, as this SOC series has this IP block

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse a4afa7d164 drivers: update DCNANO LCDIF IP to use shared LCDIF binding
Update DCNANO LCDIF IP to use shared lcd interface binding. This
requires changes to the RT5xx SOC and RT595 EVK, as this SOC
uses the LCDIF IP, and configures the clock for it based off
the new pixel-clock property.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse 98408b1733 dts: mipi_dsi: introduce phy-clock property
Introduce phy-clock property, which is used by MIPI devices to determine
the target clock frequency for the MIPI PHY. This property can vary
depending on the attached display and target framerate.

Update the MIPI DSI MCUX driver to utilize this property to configure
the MIPI host, and update the RT500 clock initialization to configure
the MIPI root clock based on this property.

Remove dphy-clk-div property from the MIPI DSI 2L binding, as it
is redundant with this change.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Rico Ganahl 06c58fdcc2 drivers: mipi_dsi: Introduce STM32H7 DSI host driver
Initial STM32 MIPI DSI host driver.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Henrik Brix Andersen c41dd36de2 drivers: kconfig: unify menuconfig title strings
Unify the drivers/*/Kconfig menuconfig title strings to the format
"<class> [(acronym)] [bus] drivers".

Including both the full name of the driver class and an acronym makes
menuconfig more user friendly as some of the acronyms are less well-known
than others. It also improves Kconfig search, both via menuconfig and via
the generated Kconfig documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-28 15:06:06 +02:00
Daniel DeGrasse 5cc33d2a3c drivers: mipi: introduce MCUX MIPI DSI 2L driver
Introduce driver for MCUX MIPI DSI 2L. This IP block differs slightly from
the existing MCUX MIPI peripheral, and uses a different hardware
abstraction layer. For these reasons, a new driver was introduced rather
than extending the existing mcux_dsi implementation.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Gerard Marull-Paretas c022dd7756 drivers: mipi_dsi: mcux: add missing soc.h
It looks like this platform is using soc.h to declare some display APIs,
imxrt_pre/post_init_display_interface(). This likely deserves a better
design, but for now let's fix compiler warnings.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-24 12:44:57 +02:00
Gerard Marull-Paretas 64ea7f61ba include: add missing errno.h
Some files were using errno codes without including errno.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-20 22:52:09 +09:00
Kumar Gala 45a80d3442 drivers: mipi_dsi: Update Kconfig
* Utilize DT_HAS_<COMPAT>_ENABLED for devicetree based drivers

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 10:23:31 -05:00
Mahesh Mahadevan 27800c2fd7 drivers: mipi: Add MIPI DSI driver for MXRT devices
Add a MIPI DSI driver for the MIPI controller on
NXP MXRT SoC'sUpdate MIPI_DSI

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-12 09:26:50 -05:00
Gerard Marull-Paretas 83cfd295b9 drivers: mipi_dsi: initial support for MIPI-DSI drivers
Add initial support for MIPI-DSI drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-05-12 09:26:50 -05:00