phy: dphy: Add configuration helpers

The MIPI D-PHY spec defines default values and boundaries for most of the
parameters it defines. Introduce helpers to help drivers get meaningful
values based on their current parameters, and validate the boundaries of
these parameters if needed.

These helpers and header are taken from Linux commit 9123e3a74ec7 ("Linux 5.9-rc1").

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong
2020-12-29 14:58:58 +01:00
parent e14d5762de
commit afef20585a
4 changed files with 451 additions and 0 deletions

View File

@@ -59,6 +59,11 @@ config SPL_NOP_PHY
This is useful when a driver uses the PHY framework but no real PHY
hardware exists.
config MIPI_DPHY_HELPERS
bool "MIPI D-PHY support helpers"
help
Provides a number of helpers a core functions for MIPI D-PHY drivers.
config BCM6318_USBH_PHY
bool "BCM6318 USBH PHY support"
depends on PHY && ARCH_BMIPS