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>
This commit is contained in:
Erik Andersson 2024-03-16 07:35:03 +01:00 committed by Anas Nashif
parent 293cf9150c
commit 36e2b40e38
2 changed files with 24 additions and 6 deletions

View file

@ -245,7 +245,6 @@ static int mipi_dsi_stm32_attach(const struct device *dev, uint8_t channel,
vcfg->VirtualChannelID = channel;
vcfg->ColorCoding = STM32_DSI_INIT_PIXEL_FORMAT;
vcfg->LooselyPacked = DSI_LOOSELY_PACKED_DISABLE;
if (mdev->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
vcfg->Mode = DSI_VID_MODE_BURST;
@ -277,16 +276,12 @@ static int mipi_dsi_stm32_attach(const struct device *dev, uint8_t channel,
vcfg->LPCommandEnable = DSI_LP_COMMAND_DISABLE;
}
vcfg->LPLargestPacketSize = 4;
vcfg->LPVACTLargestPacketSize = 4;
vcfg->LPHorizontalFrontPorchEnable = DSI_LP_HFP_ENABLE;
vcfg->LPHorizontalBackPorchEnable = DSI_LP_HBP_ENABLE;
vcfg->LPVerticalActiveEnable = DSI_LP_VACT_ENABLE;
vcfg->LPVerticalFrontPorchEnable = DSI_LP_VFP_ENABLE;
vcfg->LPVerticalBackPorchEnable = DSI_LP_VBP_ENABLE;
vcfg->LPVerticalSyncActiveEnable = DSI_LP_VSYNC_ENABLE;
vcfg->FrameBTAAcknowledgeEnable = DSI_FBTAA_ENABLE;
ret = HAL_DSI_ConfigVideoMode(&data->hdsi, vcfg);
if (ret != HAL_OK) {
@ -496,7 +491,13 @@ static int mipi_dsi_stm32_init(const struct device *dev)
.VSPolarity = DT_INST_PROP(inst, vs_active_high) ? \
DSI_VSYNC_ACTIVE_HIGH : DSI_VSYNC_ACTIVE_LOW, \
.DEPolarity = DT_INST_PROP(inst, de_active_high) ? \
DSI_DATA_ENABLE_ACTIVE_HIGH : DSI_DATA_ENABLE_ACTIVE_LOW, \
DSI_DATA_ENABLE_ACTIVE_HIGH : DSI_DATA_ENABLE_ACTIVE_LOW, \
.LooselyPacked = DT_INST_PROP(inst, loosely_packed) ? \
DSI_LOOSELY_PACKED_ENABLE : DSI_LOOSELY_PACKED_DISABLE, \
.LPLargestPacketSize = DT_INST_PROP_OR(inst, largest_packet_size, 4), \
.LPVACTLargestPacketSize = DT_INST_PROP_OR(inst, largest_packet_size, 4), \
.FrameBTAAcknowledgeEnable = DT_INST_PROP(inst, bta_ack_disable) ? \
DSI_FBTAA_DISABLE : DSI_FBTAA_ENABLE, \
}, \
.pll_init = { \
.PLLNDIV = DT_INST_PROP(inst, pll_ndiv), \

View file

@ -40,6 +40,23 @@ properties:
description: |
DSI host data enable is active high.
loosely-packed:
type: boolean
description: |
Enable or disable loosely packed stream
(needed only when using 18-bit configuration).
largest-packet-size:
type: int
description: |
The size, in bytes, of the low power largest packet that
can fit in a line during VSA, VBP, VFP and VACT regions
bta-ack-disable:
type: boolean
description: |
Disable frame bus-turn-around acknowledge enable
non-continuous:
type: boolean
description: |