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

Configure Feed

Select the types of activity you want to include in your feed.

phy: qcom-qmp-combo: rework regs layout arrays

Use symbolic names for the values inside reg layout arrays. New register
names are added following the PCS register layout that is used by the
particular PHY.

Note: ipq8074 tables appear to use a mixture of v2 and v3 registers.
This might need additional fixes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230113212102.421491-2-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Dmitry Baryshkov and committed by
Vinod Koul
aa14cff1 34d562ba

+12 -12
+12 -12
drivers/phy/qualcomm/phy-qcom-qmp-combo.c
··· 102 102 }; 103 103 104 104 static const unsigned int qmp_v3_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { 105 - [QPHY_SW_RESET] = 0x00, 106 - [QPHY_START_CTRL] = 0x08, 107 - [QPHY_PCS_STATUS] = 0x174, 108 - [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, 109 - [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = 0x0d8, 110 - [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = 0x0dc, 105 + [QPHY_SW_RESET] = QPHY_V3_PCS_SW_RESET, 106 + [QPHY_START_CTRL] = QPHY_V3_PCS_START_CONTROL, 107 + [QPHY_PCS_STATUS] = QPHY_V3_PCS_PCS_STATUS, 108 + [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V3_PCS_POWER_DOWN_CONTROL, 109 + [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V3_PCS_AUTONOMOUS_MODE_CTRL, 110 + [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V3_PCS_LFPS_RXTERM_IRQ_CLEAR, 111 111 }; 112 112 113 113 static const unsigned int qmp_v4_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { 114 - [QPHY_SW_RESET] = 0x00, 115 - [QPHY_START_CTRL] = 0x44, 116 - [QPHY_PCS_STATUS] = 0x14, 117 - [QPHY_PCS_POWER_DOWN_CONTROL] = 0x40, 114 + [QPHY_SW_RESET] = QPHY_V4_PCS_SW_RESET, 115 + [QPHY_START_CTRL] = QPHY_V4_PCS_START_CONTROL, 116 + [QPHY_PCS_STATUS] = QPHY_V4_PCS_PCS_STATUS1, 117 + [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V4_PCS_POWER_DOWN_CONTROL, 118 118 119 119 /* In PCS_USB */ 120 - [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = 0x008, 121 - [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = 0x014, 120 + [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V4_PCS_USB3_AUTONOMOUS_MODE_CTRL, 121 + [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V4_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR, 122 122 }; 123 123 124 124 static const struct qmp_phy_init_tbl qmp_v3_usb3_serdes_tbl[] = {