Skip to content

Commit

Permalink
drivers: mipi_dsi: dsi_mcux_2l add property to enable non-continuous …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
mjchen0 authored and carlescufi committed Oct 24, 2023
1 parent 4844d01 commit 01aa800
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mipi_dsi/dsi_mcux_2l.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct mcux_mipi_dsi_config {
MIPI_DSI_HOST_Type *base;
dsi_dpi_config_t dpi_config;
bool auto_insert_eotp;
bool noncontinuous_hs_clk;
const struct device *bit_clk_dev;
clock_control_subsys_t bit_clk_subsys;
const struct device *esc_clk_dev;
Expand Down Expand Up @@ -224,6 +225,7 @@ static int dsi_mcux_attach(const struct device *dev,
DSI_GetDefaultConfig(&dsi_config);
dsi_config.numLanes = mdev->data_lanes;
dsi_config.autoInsertEoTp = config->auto_insert_eotp;
dsi_config.enableNonContinuousHsClk = config->noncontinuous_hs_clk;

/* Init the DSI module. */
DSI_Init(config->base, &dsi_config);
Expand Down Expand Up @@ -502,6 +504,7 @@ static int mcux_mipi_dsi_init(const struct device *dev)
(.irq_config_func = mipi_dsi_##n##_irq_config_func,)) \
.base = (MIPI_DSI_HOST_Type *)DT_INST_REG_ADDR(id), \
.auto_insert_eotp = DT_INST_PROP(id, autoinsert_eotp), \
.noncontinuous_hs_clk = DT_INST_PROP(id, noncontinuous_hs_clk), \
.dphy_ref_freq = DT_INST_PROP_OR(id, dphy_ref_frequency, 0), \
.bit_clk_dev = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR_BY_NAME(id, dphy)), \
.bit_clk_subsys = \
Expand Down
6 changes: 6 additions & 0 deletions dts/bindings/mipi-dsi/nxp,mipi-dsi-2l.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ properties:
description:
Maximum clock speed supported by the device, in Hz. Leave at default
if no DPHY PLL is present

noncontinuous-hs-clk:
type: boolean
description:
Enable non-contiuous high speed clock. Saves power but introduces latency
when transitioning to high speed mode.

0 comments on commit 01aa800

Please sign in to comment.