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:
parent
293cf9150c
commit
36e2b40e38
|
@ -245,7 +245,6 @@ static int mipi_dsi_stm32_attach(const struct device *dev, uint8_t channel,
|
||||||
|
|
||||||
vcfg->VirtualChannelID = channel;
|
vcfg->VirtualChannelID = channel;
|
||||||
vcfg->ColorCoding = STM32_DSI_INIT_PIXEL_FORMAT;
|
vcfg->ColorCoding = STM32_DSI_INIT_PIXEL_FORMAT;
|
||||||
vcfg->LooselyPacked = DSI_LOOSELY_PACKED_DISABLE;
|
|
||||||
|
|
||||||
if (mdev->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
|
if (mdev->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
|
||||||
vcfg->Mode = DSI_VID_MODE_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->LPCommandEnable = DSI_LP_COMMAND_DISABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
vcfg->LPLargestPacketSize = 4;
|
|
||||||
vcfg->LPVACTLargestPacketSize = 4;
|
|
||||||
|
|
||||||
vcfg->LPHorizontalFrontPorchEnable = DSI_LP_HFP_ENABLE;
|
vcfg->LPHorizontalFrontPorchEnable = DSI_LP_HFP_ENABLE;
|
||||||
vcfg->LPHorizontalBackPorchEnable = DSI_LP_HBP_ENABLE;
|
vcfg->LPHorizontalBackPorchEnable = DSI_LP_HBP_ENABLE;
|
||||||
vcfg->LPVerticalActiveEnable = DSI_LP_VACT_ENABLE;
|
vcfg->LPVerticalActiveEnable = DSI_LP_VACT_ENABLE;
|
||||||
vcfg->LPVerticalFrontPorchEnable = DSI_LP_VFP_ENABLE;
|
vcfg->LPVerticalFrontPorchEnable = DSI_LP_VFP_ENABLE;
|
||||||
vcfg->LPVerticalBackPorchEnable = DSI_LP_VBP_ENABLE;
|
vcfg->LPVerticalBackPorchEnable = DSI_LP_VBP_ENABLE;
|
||||||
vcfg->LPVerticalSyncActiveEnable = DSI_LP_VSYNC_ENABLE;
|
vcfg->LPVerticalSyncActiveEnable = DSI_LP_VSYNC_ENABLE;
|
||||||
vcfg->FrameBTAAcknowledgeEnable = DSI_FBTAA_ENABLE;
|
|
||||||
|
|
||||||
ret = HAL_DSI_ConfigVideoMode(&data->hdsi, vcfg);
|
ret = HAL_DSI_ConfigVideoMode(&data->hdsi, vcfg);
|
||||||
if (ret != HAL_OK) {
|
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) ? \
|
.VSPolarity = DT_INST_PROP(inst, vs_active_high) ? \
|
||||||
DSI_VSYNC_ACTIVE_HIGH : DSI_VSYNC_ACTIVE_LOW, \
|
DSI_VSYNC_ACTIVE_HIGH : DSI_VSYNC_ACTIVE_LOW, \
|
||||||
.DEPolarity = DT_INST_PROP(inst, de_active_high) ? \
|
.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 = { \
|
.pll_init = { \
|
||||||
.PLLNDIV = DT_INST_PROP(inst, pll_ndiv), \
|
.PLLNDIV = DT_INST_PROP(inst, pll_ndiv), \
|
||||||
|
|
|
@ -40,6 +40,23 @@ properties:
|
||||||
description: |
|
description: |
|
||||||
DSI host data enable is active high.
|
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:
|
non-continuous:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
|
Loading…
Reference in a new issue