Skip to content

Conversation

@danieldegrasse
Copy link
Contributor

The NXP LCDIC peripheral contains two internal timers, with configurable
periods. These times are used to determine delays within the peripheral,
such as the reset and tearing enable signal delays. Allow these periods
to be set within the devicetree for the peripheral.

Raise the period where required for display drivers that need a value
other than the reset setting

The NXP LCDIC peripheral contains two internal timers, with configurable
periods. These times are used to determine delays within the peripheral,
such as the reset and tearing enable signal delays. Allow these periods
to be set within the devicetree for the peripheral.

Raise the period where required for display drivers that need a value
other than the reset setting

Signed-off-by: Daniel DeGrasse <[email protected]>
Reset pulse count can be up to 512 before we would be unable to support
it using the peripheral. Use a uint32_t for the count, so that even long
reset pulses will still be calculated correctly. Add code to warn about
reset pulse requests that are too long.

Signed-off-by: Daniel DeGrasse <[email protected]>
@danieldegrasse danieldegrasse force-pushed the feature/lcdic-timer-ratio branch from 3e88f69 to 92061a7 Compare November 18, 2024 22:15
@kartben kartben assigned danieldegrasse and unassigned kartben Nov 19, 2024
status = "okay";
nxp,swap-bytes;
/* Raise the timer0 ratio to enable longer reset delay */
nxp,timer0-ratio = <15>;
Copy link
Member

@dleach02 dleach02 Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but what dictates using a value of 15? Is that just because what it was before in the hardcoding?

Copy link
Contributor Author

@danieldegrasse danieldegrasse Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes- also this display driver uses a long reset pulse (100 ms) which requires us to increase the timer0 base value. The reset pulse is set in units of the "Timer 0 base", the period of which is calculated as 2^(timer0-ratio)/lcdic_freq. So raising this value lets us generate longer reset pulses.

@danieldegrasse
Copy link
Contributor Author

Can't approve my own PR, reassigning to @dleach02 since this affects NXP driver only

@fabiobaltieri fabiobaltieri merged commit c6cf9b9 into zephyrproject-rtos:main Nov 22, 2024
25 checks passed
@danieldegrasse danieldegrasse deleted the feature/lcdic-timer-ratio branch November 23, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Display Controller area: Shields Shields (add-on boards) platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants