Skip to content

Conversation

@danieldegrasse
Copy link
Contributor

This PR proposes a new mipi_dsi_detach API for the MIPI subsystem, very similar to the mipi_dsi_detach API currently present in Linux. The primary goal of this API is to provide power savings, by allowing the MIPI DPHY to power off when not in use. An implementation is provided for the DSI_MCUX_2L driver. Detaching the MIPI saves roughly 2mA of current consumption on the VDDCORE voltage rail in my tests.

The PR also includes the following changes:

  • device level power management for the RM67162 display, so that the MIPI can be detached whenever the display enters sleep mode. This could also be added to the blanking_on and blanking_off functions for the display.
  • additional overlay for the G1120B0MIPI to enable testing the display in low power modes

An alternative to this approach would be to use device level runtime power management for the MIPI DSI driver. The reason I did not take this approach was that the display controller driver itself will likely have the best awareness of when the MIPI DSI can be detached and the DPHY can be powered down, so exposing the functionality to the display controller made the most sense

Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

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

API lgtm, no objections, just a nitpick. I haven't checked the PM part, as I no longer review PM related code.

Copy link
Member

Choose a reason for hiding this comment

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

why is this weak?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is following the pattern established in ca19b40. Since our clock management on these SOCs is currently so inflexible, the idea is that a customer board can bypass the clock setup entirely in their custom board if needed. I've done some initial work to attempt to correct this with #62946, but this is currently the short-term solution we're using for this SOC.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, thanks for the attempt to fix this hack in #62946 :-)

Add MIPI DSI detach API. This API allows the DSI controller to detach
from the DSI device, and power down the DSI PHY. The primary goal of
this API is to provide power savings for DSI devices when the display
they are driving is not active.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add support for mipi_dsi_detach API to dsi_mcux_2l driver, and
update RT5xx SOC interface to enable halting clocks for the MIPI DPHY.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add device level power management to rm67162 display. Device level power
management for this controller calls the MIPI DSI detach API, in order
to power down the MIPI DPHY when the display is not active.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add support for low power mode on the G1120B0MIPI using the RT595. This
configuration is tested via a testcase in samples/drivers/display, which
should validate that the display can be driven by the RT595 when
CONFIG_PM and CONFIG_PM_DEVICE are set.

Signed-off-by: Daniel DeGrasse <[email protected]>
Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

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

+1 for the MIPI DSI API

@carlescufi carlescufi merged commit d6d3f9f into zephyrproject-rtos:main Nov 14, 2023
@danieldegrasse danieldegrasse deleted the feature/mipi-detach branch November 14, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants