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.

(cherry picked from commit 01aa800)

Original-Signed-off-by: Mike J. Chen <mjchen@google.com>
GitOrigin-RevId: 01aa800
Change-Id: I938be443feb10e81b3dd51c3b564613a6c51310c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4971828
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
Tested-by: Al Semjonovs <asemjonovs@google.com>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
  • Loading branch information
mjchen0 authored and Chromeos LUCI committed Oct 24, 2023
1 parent 8a86ab9 commit 33ee25a
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 33ee25a

Please sign in to comment.