Skip to content

Commit 0441610

Browse files
committed
drm/i915/cnl: Add registers related to voltage swing sequences.
This are the registers and bits needed for the voltage swing sequence on Cannonlake. v2: Remove CL_DW5 that was wrongly defined. v3: Use (1 << 1) instead of (1<<1) as Paulo suggested Change DW2 swing sel upper and lower macros to do the bit selection instead of definint a table that doesn't match the spec. It is based on a Manasi version of it. Credits-to: Manasi. v4: Let SCALING_MODE_SEL flexible. (Manasi) Cc: Paulo Zanoni <[email protected]> Cc: Manasi Navare <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> Reviewed-by: Manasi Navare <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 4557c60 commit 0441610

File tree

1 file changed

+140
-0
lines changed

1 file changed

+140
-0
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,6 +1693,146 @@ enum skl_disp_power_wells {
16931693
#define OCL2_LDOFUSE_PWR_DIS (1 << 6)
16941694
#define BXT_PORT_CL1CM_DW30(phy) _BXT_PHY((phy), _PORT_CL1CM_DW30_BC)
16951695

1696+
#define _CNL_PORT_PCS_DW1_GRP_AE 0x162304
1697+
#define _CNL_PORT_PCS_DW1_GRP_B 0x162384
1698+
#define _CNL_PORT_PCS_DW1_GRP_C 0x162B04
1699+
#define _CNL_PORT_PCS_DW1_GRP_D 0x162B84
1700+
#define _CNL_PORT_PCS_DW1_GRP_F 0x162A04
1701+
#define _CNL_PORT_PCS_DW1_LN0_AE 0x162404
1702+
#define _CNL_PORT_PCS_DW1_LN0_B 0x162604
1703+
#define _CNL_PORT_PCS_DW1_LN0_C 0x162C04
1704+
#define _CNL_PORT_PCS_DW1_LN0_D 0x162E04
1705+
#define _CNL_PORT_PCS_DW1_LN0_F 0x162804
1706+
#define CNL_PORT_PCS_DW1_GRP(port) _MMIO_PORT6(port, \
1707+
_CNL_PORT_PCS_DW1_GRP_AE, \
1708+
_CNL_PORT_PCS_DW1_GRP_B, \
1709+
_CNL_PORT_PCS_DW1_GRP_C, \
1710+
_CNL_PORT_PCS_DW1_GRP_D, \
1711+
_CNL_PORT_PCS_DW1_GRP_AE, \
1712+
_CNL_PORT_PCS_DW1_GRP_F)
1713+
#define CNL_PORT_PCS_DW1_LN0(port) _MMIO_PORT6(port, \
1714+
_CNL_PORT_PCS_DW1_LN0_AE, \
1715+
_CNL_PORT_PCS_DW1_LN0_B, \
1716+
_CNL_PORT_PCS_DW1_LN0_C, \
1717+
_CNL_PORT_PCS_DW1_LN0_D, \
1718+
_CNL_PORT_PCS_DW1_LN0_AE, \
1719+
_CNL_PORT_PCS_DW1_LN0_F)
1720+
#define COMMON_KEEPER_EN (1 << 26)
1721+
1722+
#define _CNL_PORT_TX_DW2_GRP_AE 0x162348
1723+
#define _CNL_PORT_TX_DW2_GRP_B 0x1623C8
1724+
#define _CNL_PORT_TX_DW2_GRP_C 0x162B48
1725+
#define _CNL_PORT_TX_DW2_GRP_D 0x162BC8
1726+
#define _CNL_PORT_TX_DW2_GRP_F 0x162A48
1727+
#define _CNL_PORT_TX_DW2_LN0_AE 0x162448
1728+
#define _CNL_PORT_TX_DW2_LN0_B 0x162648
1729+
#define _CNL_PORT_TX_DW2_LN0_C 0x162C48
1730+
#define _CNL_PORT_TX_DW2_LN0_D 0x162E48
1731+
#define _CNL_PORT_TX_DW2_LN0_F 0x162A48
1732+
#define CNL_PORT_TX_DW2_GRP(port) _MMIO_PORT6(port, \
1733+
_CNL_PORT_TX_DW2_GRP_AE, \
1734+
_CNL_PORT_TX_DW2_GRP_B, \
1735+
_CNL_PORT_TX_DW2_GRP_C, \
1736+
_CNL_PORT_TX_DW2_GRP_D, \
1737+
_CNL_PORT_TX_DW2_GRP_AE, \
1738+
_CNL_PORT_TX_DW2_GRP_F)
1739+
#define CNL_PORT_TX_DW2_LN0(port) _MMIO_PORT6(port, \
1740+
_CNL_PORT_TX_DW2_LN0_AE, \
1741+
_CNL_PORT_TX_DW2_LN0_B, \
1742+
_CNL_PORT_TX_DW2_LN0_C, \
1743+
_CNL_PORT_TX_DW2_LN0_D, \
1744+
_CNL_PORT_TX_DW2_LN0_AE, \
1745+
_CNL_PORT_TX_DW2_LN0_F)
1746+
#define SWING_SEL_UPPER(x) ((x >> 3) << 15)
1747+
#define SWING_SEL_LOWER(x) ((x & 0x7) << 11)
1748+
#define RCOMP_SCALAR(x) ((x) << 0)
1749+
1750+
#define _CNL_PORT_TX_DW4_GRP_AE 0x162350
1751+
#define _CNL_PORT_TX_DW4_GRP_B 0x1623D0
1752+
#define _CNL_PORT_TX_DW4_GRP_C 0x162B50
1753+
#define _CNL_PORT_TX_DW4_GRP_D 0x162BD0
1754+
#define _CNL_PORT_TX_DW4_GRP_F 0x162A50
1755+
#define _CNL_PORT_TX_DW4_LN0_AE 0x162450
1756+
#define _CNL_PORT_TX_DW4_LN1_AE 0x1624D0
1757+
#define _CNL_PORT_TX_DW4_LN0_B 0x162650
1758+
#define _CNL_PORT_TX_DW4_LN0_C 0x162C50
1759+
#define _CNL_PORT_TX_DW4_LN0_D 0x162E50
1760+
#define _CNL_PORT_TX_DW4_LN0_F 0x162850
1761+
#define CNL_PORT_TX_DW4_GRP(port) _MMIO_PORT6(port, \
1762+
_CNL_PORT_TX_DW4_GRP_AE, \
1763+
_CNL_PORT_TX_DW4_GRP_B, \
1764+
_CNL_PORT_TX_DW4_GRP_C, \
1765+
_CNL_PORT_TX_DW4_GRP_D, \
1766+
_CNL_PORT_TX_DW4_GRP_AE, \
1767+
_CNL_PORT_TX_DW4_GRP_F)
1768+
#define CNL_PORT_TX_DW4_LN(port, ln) _MMIO_PORT6_LN(port, ln, \
1769+
_CNL_PORT_TX_DW4_LN0_AE, \
1770+
_CNL_PORT_TX_DW4_LN1_AE, \
1771+
_CNL_PORT_TX_DW4_LN0_B, \
1772+
_CNL_PORT_TX_DW4_LN0_C, \
1773+
_CNL_PORT_TX_DW4_LN0_D, \
1774+
_CNL_PORT_TX_DW4_LN0_AE, \
1775+
_CNL_PORT_TX_DW4_LN0_F)
1776+
#define LOADGEN_SELECT (1 << 31)
1777+
#define POST_CURSOR_1(x) ((x) << 12)
1778+
#define POST_CURSOR_2(x) ((x) << 6)
1779+
#define CURSOR_COEFF(x) ((x) << 0)
1780+
1781+
#define _CNL_PORT_TX_DW5_GRP_AE 0x162354
1782+
#define _CNL_PORT_TX_DW5_GRP_B 0x1623D4
1783+
#define _CNL_PORT_TX_DW5_GRP_C 0x162B54
1784+
#define _CNL_PORT_TX_DW5_GRP_D 0x162BD4
1785+
#define _CNL_PORT_TX_DW5_GRP_F 0x162A54
1786+
#define _CNL_PORT_TX_DW5_LN0_AE 0x162454
1787+
#define _CNL_PORT_TX_DW5_LN0_B 0x162654
1788+
#define _CNL_PORT_TX_DW5_LN0_C 0x162C54
1789+
#define _CNL_PORT_TX_DW5_LN0_D 0x162ED4
1790+
#define _CNL_PORT_TX_DW5_LN0_F 0x162854
1791+
#define CNL_PORT_TX_DW5_GRP(port) _MMIO_PORT6(port, \
1792+
_CNL_PORT_TX_DW5_GRP_AE, \
1793+
_CNL_PORT_TX_DW5_GRP_B, \
1794+
_CNL_PORT_TX_DW5_GRP_C, \
1795+
_CNL_PORT_TX_DW5_GRP_D, \
1796+
_CNL_PORT_TX_DW5_GRP_AE, \
1797+
_CNL_PORT_TX_DW5_GRP_F)
1798+
#define CNL_PORT_TX_DW5_LN0(port) _MMIO_PORT6(port, \
1799+
_CNL_PORT_TX_DW5_LN0_AE, \
1800+
_CNL_PORT_TX_DW5_LN0_B, \
1801+
_CNL_PORT_TX_DW5_LN0_C, \
1802+
_CNL_PORT_TX_DW5_LN0_D, \
1803+
_CNL_PORT_TX_DW5_LN0_AE, \
1804+
_CNL_PORT_TX_DW5_LN0_F)
1805+
#define TX_TRAINING_EN (1 << 31)
1806+
#define TAP3_DISABLE (1 << 29)
1807+
#define SCALING_MODE_SEL(x) ((x) << 18)
1808+
#define RTERM_SELECT(x) ((x) << 3)
1809+
1810+
#define _CNL_PORT_TX_DW7_GRP_AE 0x16235C
1811+
#define _CNL_PORT_TX_DW7_GRP_B 0x1623DC
1812+
#define _CNL_PORT_TX_DW7_GRP_C 0x162B5C
1813+
#define _CNL_PORT_TX_DW7_GRP_D 0x162BDC
1814+
#define _CNL_PORT_TX_DW7_GRP_F 0x162A5C
1815+
#define _CNL_PORT_TX_DW7_LN0_AE 0x16245C
1816+
#define _CNL_PORT_TX_DW7_LN0_B 0x16265C
1817+
#define _CNL_PORT_TX_DW7_LN0_C 0x162C5C
1818+
#define _CNL_PORT_TX_DW7_LN0_D 0x162EDC
1819+
#define _CNL_PORT_TX_DW7_LN0_F 0x16285C
1820+
#define CNL_PORT_TX_DW7_GRP(port) _MMIO_PORT6(port, \
1821+
_CNL_PORT_TX_DW7_GRP_AE, \
1822+
_CNL_PORT_TX_DW7_GRP_B, \
1823+
_CNL_PORT_TX_DW7_GRP_C, \
1824+
_CNL_PORT_TX_DW7_GRP_D, \
1825+
_CNL_PORT_TX_DW7_GRP_AE, \
1826+
_CNL_PORT_TX_DW7_GRP_F)
1827+
#define CNL_PORT_TX_DW7_LN0(port) _MMIO_PORT6(port, \
1828+
_CNL_PORT_TX_DW7_LN0_AE, \
1829+
_CNL_PORT_TX_DW7_LN0_B, \
1830+
_CNL_PORT_TX_DW7_LN0_C, \
1831+
_CNL_PORT_TX_DW7_LN0_D, \
1832+
_CNL_PORT_TX_DW7_LN0_AE, \
1833+
_CNL_PORT_TX_DW7_LN0_F)
1834+
#define N_SCALAR(x) ((x) << 24)
1835+
16961836
/* The spec defines this only for BXT PHY0, but lets assume that this
16971837
* would exist for PHY1 too if it had a second channel.
16981838
*/

0 commit comments

Comments
 (0)