aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-03 06:59:49 -0500
committerAndrzej Hajda <a.hajda@samsung.com>2019-01-09 04:49:28 -0500
commitadf4109896bbee27fd2ac3b48d22d6a0062fe517 (patch)
tree6b590070b2ca113d88d47459a6577dffcc0c9006 /drivers/gpu/drm/bridge
parent4842379cbe6e851de914a7132f76f4e200b9a98b (diff)
drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE
DP1_SRCCTRL register and PHY_2LANE field did not have matching defines. Add these. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-3-tomi.valkeinen@ti.com
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r--drivers/gpu/drm/bridge/tc358767.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 29a7e33e8ae0..5f0a666db2fd 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -142,6 +142,8 @@
142#define DP0_LTLOOPCTRL 0x06d8 142#define DP0_LTLOOPCTRL 0x06d8
143#define DP0_SNKLTCTRL 0x06e4 143#define DP0_SNKLTCTRL 0x06e4
144 144
145#define DP1_SRCCTRL 0x07a0
146
145/* PHY */ 147/* PHY */
146#define DP_PHY_CTRL 0x0800 148#define DP_PHY_CTRL 0x0800
147#define DP_PHY_RST BIT(28) /* DP PHY Global Soft Reset */ 149#define DP_PHY_RST BIT(28) /* DP PHY Global Soft Reset */
@@ -150,6 +152,7 @@
150#define PHY_M1_RST BIT(12) /* Reset PHY1 Main Channel */ 152#define PHY_M1_RST BIT(12) /* Reset PHY1 Main Channel */
151#define PHY_RDY BIT(16) /* PHY Main Channels Ready */ 153#define PHY_RDY BIT(16) /* PHY Main Channels Ready */
152#define PHY_M0_RST BIT(8) /* Reset PHY0 Main Channel */ 154#define PHY_M0_RST BIT(8) /* Reset PHY0 Main Channel */
155#define PHY_2LANE BIT(2) /* PHY Enable 2 lanes */
153#define PHY_A0_EN BIT(1) /* PHY Aux Channel0 Enable */ 156#define PHY_A0_EN BIT(1) /* PHY Aux Channel0 Enable */
154#define PHY_M0_EN BIT(0) /* PHY Main Channel0 Enable */ 157#define PHY_M0_EN BIT(0) /* PHY Main Channel0 Enable */
155 158
@@ -564,7 +567,7 @@ static int tc_aux_link_setup(struct tc_data *tc)
564 value |= SYSCLK_SEL_LSCLK | LSCLK_DIV_2; 567 value |= SYSCLK_SEL_LSCLK | LSCLK_DIV_2;
565 tc_write(SYS_PLLPARAM, value); 568 tc_write(SYS_PLLPARAM, value);
566 569
567 tc_write(DP_PHY_CTRL, BGREN | PWR_SW_EN | BIT(2) | PHY_A0_EN); 570 tc_write(DP_PHY_CTRL, BGREN | PWR_SW_EN | PHY_2LANE | PHY_A0_EN);
568 571
569 /* 572 /*
570 * Initially PLLs are in bypass. Force PLL parameter update, 573 * Initially PLLs are in bypass. Force PLL parameter update,
@@ -834,7 +837,7 @@ static int tc_main_link_setup(struct tc_data *tc)
834 DP0_SRCCTRL_LANESKEW | DP0_SRCCTRL_LANES_2 | 837 DP0_SRCCTRL_LANESKEW | DP0_SRCCTRL_LANES_2 |
835 DP0_SRCCTRL_BW27 | DP0_SRCCTRL_AUTOCORRECT); 838 DP0_SRCCTRL_BW27 | DP0_SRCCTRL_AUTOCORRECT);
836 /* from excel file - DP1_SrcCtrl */ 839 /* from excel file - DP1_SrcCtrl */
837 tc_write(0x07a0, 0x00003083); 840 tc_write(DP1_SRCCTRL, 0x00003083);
838 841
839 rate = clk_get_rate(tc->refclk); 842 rate = clk_get_rate(tc->refclk);
840 switch (rate) { 843 switch (rate) {
@@ -855,8 +858,9 @@ static int tc_main_link_setup(struct tc_data *tc)
855 } 858 }
856 value |= SYSCLK_SEL_LSCLK | LSCLK_DIV_2; 859 value |= SYSCLK_SEL_LSCLK | LSCLK_DIV_2;
857 tc_write(SYS_PLLPARAM, value); 860 tc_write(SYS_PLLPARAM, value);
861
858 /* Setup Main Link */ 862 /* Setup Main Link */
859 dp_phy_ctrl = BGREN | PWR_SW_EN | BIT(2) | PHY_A0_EN | PHY_M0_EN; 863 dp_phy_ctrl = BGREN | PWR_SW_EN | PHY_2LANE | PHY_A0_EN | PHY_M0_EN;
860 tc_write(DP_PHY_CTRL, dp_phy_ctrl); 864 tc_write(DP_PHY_CTRL, dp_phy_ctrl);
861 msleep(100); 865 msleep(100);
862 866