Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/icl: Combine all port/combophy macros at one place

This patch combines CNL/ICL specific port/combophy macros together
at one location. This is prework for patches later in series where
new macros to find port/combophy register will be introduced.

v2: remove wrong empty line

Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181012234717.8284-1-lucas.demarchi@intel.com

authored by

Mahesh Kumar and committed by
Rodrigo Vivi
d72e84cc a54270d3

+72 -65
+72 -65
drivers/gpu/drm/i915/i915_reg.h
··· 1631 1631 #define PHY_RESERVED (1 << 7) 1632 1632 #define BXT_PORT_CL1CM_DW0(phy) _BXT_PHY((phy), _PORT_CL1CM_DW0_BC) 1633 1633 1634 - #define CNL_PORT_CL1CM_DW5 _MMIO(0x162014) 1635 - #define CL_POWER_DOWN_ENABLE (1 << 4) 1636 - #define SUS_CLOCK_CONFIG (3 << 0) 1634 + #define _PORT_CL1CM_DW9_A 0x162024 1635 + #define _PORT_CL1CM_DW9_BC 0x6C024 1636 + #define IREF0RC_OFFSET_SHIFT 8 1637 + #define IREF0RC_OFFSET_MASK (0xFF << IREF0RC_OFFSET_SHIFT) 1638 + #define BXT_PORT_CL1CM_DW9(phy) _BXT_PHY((phy), _PORT_CL1CM_DW9_BC) 1637 1639 1640 + #define _PORT_CL1CM_DW10_A 0x162028 1641 + #define _PORT_CL1CM_DW10_BC 0x6C028 1642 + #define IREF1RC_OFFSET_SHIFT 8 1643 + #define IREF1RC_OFFSET_MASK (0xFF << IREF1RC_OFFSET_SHIFT) 1644 + #define BXT_PORT_CL1CM_DW10(phy) _BXT_PHY((phy), _PORT_CL1CM_DW10_BC) 1645 + 1646 + #define _PORT_CL1CM_DW28_A 0x162070 1647 + #define _PORT_CL1CM_DW28_BC 0x6C070 1648 + #define OCL1_POWER_DOWN_EN (1 << 23) 1649 + #define DW28_OLDO_DYN_PWR_DOWN_EN (1 << 22) 1650 + #define SUS_CLK_CONFIG 0x3 1651 + #define BXT_PORT_CL1CM_DW28(phy) _BXT_PHY((phy), _PORT_CL1CM_DW28_BC) 1652 + 1653 + #define _PORT_CL1CM_DW30_A 0x162078 1654 + #define _PORT_CL1CM_DW30_BC 0x6C078 1655 + #define OCL2_LDOFUSE_PWR_DIS (1 << 6) 1656 + #define BXT_PORT_CL1CM_DW30(phy) _BXT_PHY((phy), _PORT_CL1CM_DW30_BC) 1657 + 1658 + /* 1659 + * CNL/ICL Port/COMBO-PHY Registers 1660 + */ 1661 + /* CNL/ICL Port CL_DW registers */ 1662 + #define CNL_PORT_CL1CM_DW5 _MMIO(0x162014) 1638 1663 #define _ICL_PORT_CL_DW5_A 0x162014 1639 1664 #define _ICL_PORT_CL_DW5_B 0x6C014 1640 1665 #define ICL_PORT_CL_DW5(port) _MMIO_PORT(port, _ICL_PORT_CL_DW5_A, \ 1641 1666 _ICL_PORT_CL_DW5_B) 1667 + #define CL_POWER_DOWN_ENABLE (1 << 4) 1668 + #define SUS_CLOCK_CONFIG (3 << 0) 1642 1669 1643 1670 #define _CNL_PORT_CL_DW10_A 0x162028 1644 1671 #define _ICL_PORT_CL_DW10_B 0x6c028 ··· 1687 1660 #define PWR_DOWN_LN_MASK (0xf << 4) 1688 1661 #define PWR_DOWN_LN_SHIFT 4 1689 1662 1690 - #define _PORT_CL1CM_DW9_A 0x162024 1691 - #define _PORT_CL1CM_DW9_BC 0x6C024 1692 - #define IREF0RC_OFFSET_SHIFT 8 1693 - #define IREF0RC_OFFSET_MASK (0xFF << IREF0RC_OFFSET_SHIFT) 1694 - #define BXT_PORT_CL1CM_DW9(phy) _BXT_PHY((phy), _PORT_CL1CM_DW9_BC) 1695 - 1696 - #define _PORT_CL1CM_DW10_A 0x162028 1697 - #define _PORT_CL1CM_DW10_BC 0x6C028 1698 - #define IREF1RC_OFFSET_SHIFT 8 1699 - #define IREF1RC_OFFSET_MASK (0xFF << IREF1RC_OFFSET_SHIFT) 1700 - #define BXT_PORT_CL1CM_DW10(phy) _BXT_PHY((phy), _PORT_CL1CM_DW10_BC) 1701 - 1702 1663 #define _ICL_PORT_CL_DW12_A 0x162030 1703 1664 #define _ICL_PORT_CL_DW12_B 0x6C030 1704 1665 #define ICL_LANE_ENABLE_AUX (1 << 0) ··· 1694 1679 _ICL_PORT_CL_DW12_A, \ 1695 1680 _ICL_PORT_CL_DW12_B) 1696 1681 1697 - #define _PORT_CL1CM_DW28_A 0x162070 1698 - #define _PORT_CL1CM_DW28_BC 0x6C070 1699 - #define OCL1_POWER_DOWN_EN (1 << 23) 1700 - #define DW28_OLDO_DYN_PWR_DOWN_EN (1 << 22) 1701 - #define SUS_CLK_CONFIG 0x3 1702 - #define BXT_PORT_CL1CM_DW28(phy) _BXT_PHY((phy), _PORT_CL1CM_DW28_BC) 1682 + /* CNL/ICL Port COMP_DW registers */ 1683 + #define CNL_PORT_COMP_DW0 _MMIO(0x162100) 1684 + #define _ICL_PORT_COMP_DW0_A 0x162100 1685 + #define _ICL_PORT_COMP_DW0_B 0x6C100 1686 + #define ICL_PORT_COMP_DW0(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW0_A, \ 1687 + _ICL_PORT_COMP_DW0_B) 1688 + #define COMP_INIT (1 << 31) 1703 1689 1704 - #define _PORT_CL1CM_DW30_A 0x162078 1705 - #define _PORT_CL1CM_DW30_BC 0x6C078 1706 - #define OCL2_LDOFUSE_PWR_DIS (1 << 6) 1707 - #define BXT_PORT_CL1CM_DW30(phy) _BXT_PHY((phy), _PORT_CL1CM_DW30_BC) 1690 + #define CNL_PORT_COMP_DW1 _MMIO(0x162104) 1691 + #define _ICL_PORT_COMP_DW1_A 0x162104 1692 + #define _ICL_PORT_COMP_DW1_B 0x6C104 1693 + #define ICL_PORT_COMP_DW1(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW1_A, \ 1694 + _ICL_PORT_COMP_DW1_B) 1695 + #define CNL_PORT_COMP_DW3 _MMIO(0x16210c) 1696 + #define _ICL_PORT_COMP_DW3_A 0x16210C 1697 + #define _ICL_PORT_COMP_DW3_B 0x6C10C 1698 + #define ICL_PORT_COMP_DW3(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW3_A, \ 1699 + _ICL_PORT_COMP_DW3_B) 1700 + #define PROCESS_INFO_DOT_0 (0 << 26) 1701 + #define PROCESS_INFO_DOT_1 (1 << 26) 1702 + #define PROCESS_INFO_DOT_4 (2 << 26) 1703 + #define PROCESS_INFO_MASK (7 << 26) 1704 + #define PROCESS_INFO_SHIFT 26 1705 + #define VOLTAGE_INFO_0_85V (0 << 24) 1706 + #define VOLTAGE_INFO_0_95V (1 << 24) 1707 + #define VOLTAGE_INFO_1_05V (2 << 24) 1708 + #define VOLTAGE_INFO_MASK (3 << 24) 1709 + #define VOLTAGE_INFO_SHIFT 24 1708 1710 1711 + #define CNL_PORT_COMP_DW9 _MMIO(0x162124) 1712 + #define _ICL_PORT_COMP_DW9_A 0x162124 1713 + #define _ICL_PORT_COMP_DW9_B 0x6C124 1714 + #define ICL_PORT_COMP_DW9(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW9_A, \ 1715 + _ICL_PORT_COMP_DW9_B) 1716 + 1717 + #define CNL_PORT_COMP_DW10 _MMIO(0x162128) 1718 + #define _ICL_PORT_COMP_DW10_A 0x162128 1719 + #define _ICL_PORT_COMP_DW10_B 0x6C128 1720 + #define ICL_PORT_COMP_DW10(port) _MMIO_PORT(port, \ 1721 + _ICL_PORT_COMP_DW10_A, \ 1722 + _ICL_PORT_COMP_DW10_B) 1723 + 1724 + /* CNL/ICL Port PCS registers */ 1709 1725 #define _CNL_PORT_PCS_DW1_GRP_AE 0x162304 1710 1726 #define _CNL_PORT_PCS_DW1_GRP_B 0x162384 1711 1727 #define _CNL_PORT_PCS_DW1_GRP_C 0x162B04 ··· 1780 1734 _ICL_PORT_PCS_DW1_AUX_B) 1781 1735 #define COMMON_KEEPER_EN (1 << 26) 1782 1736 1783 - /* CNL Port TX registers */ 1737 + /* CNL/ICL Port TX registers */ 1784 1738 #define _CNL_PORT_TX_AE_GRP_OFFSET 0x162340 1785 1739 #define _CNL_PORT_TX_B_GRP_OFFSET 0x1623C0 1786 1740 #define _CNL_PORT_TX_C_GRP_OFFSET 0x162B40 ··· 2099 2053 #define _PORT_CL2CM_DW6_BC 0x6C358 2100 2054 #define BXT_PORT_CL2CM_DW6(phy) _BXT_PHY((phy), _PORT_CL2CM_DW6_BC) 2101 2055 #define DW6_OLDO_DYN_PWR_DOWN_EN (1 << 28) 2102 - 2103 - #define CNL_PORT_COMP_DW0 _MMIO(0x162100) 2104 - #define COMP_INIT (1 << 31) 2105 - #define CNL_PORT_COMP_DW1 _MMIO(0x162104) 2106 - #define CNL_PORT_COMP_DW3 _MMIO(0x16210c) 2107 - #define PROCESS_INFO_DOT_0 (0 << 26) 2108 - #define PROCESS_INFO_DOT_1 (1 << 26) 2109 - #define PROCESS_INFO_DOT_4 (2 << 26) 2110 - #define PROCESS_INFO_MASK (7 << 26) 2111 - #define PROCESS_INFO_SHIFT 26 2112 - #define VOLTAGE_INFO_0_85V (0 << 24) 2113 - #define VOLTAGE_INFO_0_95V (1 << 24) 2114 - #define VOLTAGE_INFO_1_05V (2 << 24) 2115 - #define VOLTAGE_INFO_MASK (3 << 24) 2116 - #define VOLTAGE_INFO_SHIFT 24 2117 - #define CNL_PORT_COMP_DW9 _MMIO(0x162124) 2118 - #define CNL_PORT_COMP_DW10 _MMIO(0x162128) 2119 - 2120 - #define _ICL_PORT_COMP_DW0_A 0x162100 2121 - #define _ICL_PORT_COMP_DW0_B 0x6C100 2122 - #define ICL_PORT_COMP_DW0(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW0_A, \ 2123 - _ICL_PORT_COMP_DW0_B) 2124 - #define _ICL_PORT_COMP_DW1_A 0x162104 2125 - #define _ICL_PORT_COMP_DW1_B 0x6C104 2126 - #define ICL_PORT_COMP_DW1(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW1_A, \ 2127 - _ICL_PORT_COMP_DW1_B) 2128 - #define _ICL_PORT_COMP_DW3_A 0x16210C 2129 - #define _ICL_PORT_COMP_DW3_B 0x6C10C 2130 - #define ICL_PORT_COMP_DW3(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW3_A, \ 2131 - _ICL_PORT_COMP_DW3_B) 2132 - #define _ICL_PORT_COMP_DW9_A 0x162124 2133 - #define _ICL_PORT_COMP_DW9_B 0x6C124 2134 - #define ICL_PORT_COMP_DW9(port) _MMIO_PORT(port, _ICL_PORT_COMP_DW9_A, \ 2135 - _ICL_PORT_COMP_DW9_B) 2136 - #define _ICL_PORT_COMP_DW10_A 0x162128 2137 - #define _ICL_PORT_COMP_DW10_B 0x6C128 2138 - #define ICL_PORT_COMP_DW10(port) _MMIO_PORT(port, \ 2139 - _ICL_PORT_COMP_DW10_A, \ 2140 - _ICL_PORT_COMP_DW10_B) 2141 2056 2142 2057 /* ICL PHY DFLEX registers */ 2143 2058 #define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0)