Skip to content

Commit d8b8566

Browse files
danieldegrassecarlescufi
authored andcommitted
drivers: clock_control: add clock rate definitions for MIPI and LCDIF
Add clock rate definitions for MIPI and LCDIF peripherals, to enable retrival of these peripheral clock rates at runtime. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 0105a85 commit d8b8566

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

drivers/clock_control/clock_control_mcux_syscon.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-22, NXP
2+
* Copyright (c) 2020-23, NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -154,6 +154,18 @@ static int mcux_lpc_syscon_clock_control_get_subsys_rate(
154154
*rate = CLOCK_GetI3cClkFreq();
155155
break;
156156
#endif
157+
158+
#if defined(CONFIG_MIPI_DSI_MCUX_2L)
159+
case MCUX_MIPI_DSI_DPHY_CLK:
160+
*rate = CLOCK_GetMipiDphyClkFreq();
161+
break;
162+
case MCUX_MIPI_DSI_ESC_CLK:
163+
*rate = CLOCK_GetMipiDphyEscTxClkFreq();
164+
break;
165+
case MCUX_LCDIF_PIXEL_CLK:
166+
*rate = CLOCK_GetDcPixelClkFreq();
167+
break;
168+
#endif
157169
}
158170

159171
return 0;

include/zephyr/dt-bindings/clock/mcux_lpc_syscon_clock.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022, NXP
2+
* Copyright 2020-2023, NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -44,4 +44,9 @@
4444

4545
#define MCUX_I3C_CLK 30
4646

47+
#define MCUX_MIPI_DSI_DPHY_CLK 31
48+
#define MCUX_MIPI_DSI_ESC_CLK 32
49+
50+
#define MCUX_LCDIF_PIXEL_CLK 33
51+
4752
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_ */

0 commit comments

Comments
 (0)