Context |
Check |
Description |
bjorn/pre-ci_am |
success
|
Success
|
bjorn/build-rv32-defconfig |
success
|
build-rv32-defconfig
|
bjorn/build-rv64-clang-allmodconfig |
success
|
build-rv64-clang-allmodconfig
|
bjorn/build-rv64-gcc-allmodconfig |
success
|
build-rv64-gcc-allmodconfig
|
bjorn/build-rv64-nommu-k210-defconfig |
success
|
build-rv64-nommu-k210-defconfig
|
bjorn/build-rv64-nommu-k210-virt |
success
|
build-rv64-nommu-k210-virt
|
bjorn/checkpatch |
success
|
checkpatch
|
bjorn/dtb-warn-rv64 |
success
|
dtb-warn-rv64
|
bjorn/header-inline |
success
|
header-inline
|
bjorn/kdoc |
success
|
kdoc
|
bjorn/module-param |
success
|
module-param
|
bjorn/verify-fixes |
success
|
verify-fixes
|
bjorn/verify-signedoff |
success
|
verify-signedoff
|
@@ -171,6 +171,30 @@ static void sun6i_tcon_setup_lvds_phy(struct sun4i_tcon *tcon,
SUN6I_TCON0_LVDS_ANA0_EN_DRVD(val));
}
+static void sun20i_tcon_setup_lvds_dphy(struct sun4i_tcon *tcon,
+ const struct drm_encoder *encoder)
+{
+ union phy_configure_opts opts = { };
+
+ if (!tcon->quirks->has_combo_dphy || !tcon->dphy)
+ return;
+
+ phy_init(tcon->dphy);
+ phy_set_mode(tcon->dphy, PHY_MODE_LVDS);
+ phy_configure(tcon->dphy, &opts);
+ phy_power_on(tcon->dphy);
+}
+
+static void sun20i_tcon_disable_lvds_dphy(struct sun4i_tcon *tcon,
+ const struct drm_encoder *encoder)
+{
+ if (!tcon->quirks->has_combo_dphy || !tcon->dphy)
+ return;
+
+ phy_power_off(tcon->dphy);
+ phy_exit(tcon->dphy);
+}
+
static void sun4i_tcon_lvds_set_status(struct sun4i_tcon *tcon,
const struct drm_encoder *encoder,
bool enabled)
@@ -1550,8 +1574,12 @@ static const struct sun4i_tcon_quirks sun9i_a80_tcon_tv_quirks = {
static const struct sun4i_tcon_quirks sun20i_d1_lcd_quirks = {
.has_channel_0 = true,
+ .has_combo_dphy = true,
+ .supports_lvds = true,
.dclk_min_div = 1,
.set_mux = sun8i_r40_tcon_tv_set_mux,
+ .setup_lvds_phy = sun20i_tcon_setup_lvds_dphy,
+ .disable_lvds_phy = sun20i_tcon_disable_lvds_dphy,
};
/* sun4i_drv uses this list to check if a device node is a TCON */
The Allwinner D1s/T113 needs to use the combo D-PHY to enable LVDS output. Enable LVDS support in the TCON and configure it using the PHY. Signed-off-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl> --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)