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

phy: qcom: qmp: move common bits definitions to common header

Move bit definitions for the common headers to the common phy-qcom-qmp.h
header.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240126-phy-qmp-merge-common-v2-5-a463d0b57836@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Dmitry Baryshkov and committed by
Vinod Koul
c01e03f9 ef643d55

+26 -137
-21
drivers/phy/qualcomm/phy-qcom-qmp-combo.c
··· 41 41 #include "phy-qcom-qmp-dp-phy-v5.h" 42 42 #include "phy-qcom-qmp-dp-phy-v6.h" 43 43 44 - /* QPHY_SW_RESET bit */ 45 - #define SW_RESET BIT(0) 46 - /* QPHY_POWER_DOWN_CONTROL */ 47 - #define SW_PWRDN BIT(0) 48 - /* QPHY_START_CONTROL bits */ 49 - #define SERDES_START BIT(0) 50 - #define PCS_START BIT(1) 51 - /* QPHY_PCS_STATUS bit */ 52 - #define PHYSTATUS BIT(6) 53 - 54 44 /* QPHY_V3_DP_COM_RESET_OVRD_CTRL register bits */ 55 45 /* DP PHY soft reset */ 56 46 #define SW_DPPHY_RESET BIT(0) ··· 54 64 /* QPHY_V3_DP_COM_PHY_MODE_CTRL register bits */ 55 65 #define USB3_MODE BIT(0) /* enables USB3 mode */ 56 66 #define DP_MODE BIT(1) /* enables DP mode */ 57 - 58 - /* QPHY_PCS_AUTONOMOUS_MODE_CTRL register bits */ 59 - #define ARCVR_DTCT_EN BIT(0) 60 - #define ALFPS_DTCT_EN BIT(1) 61 - #define ARCVR_DTCT_EVENT_SEL BIT(4) 62 - 63 - /* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */ 64 - #define IRQ_CLEAR BIT(0) 65 - 66 - /* QPHY_V3_PCS_MISC_CLAMP_ENABLE register bits */ 67 - #define CLAMP_EN BIT(0) /* enables i/o clamp_n */ 68 67 69 68 /* QPHY_V3_DP_COM_TYPEC_CTRL register bits */ 70 69 #define SW_PORTSELECT_VAL BIT(0)
+1 -9
drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
··· 23 23 24 24 #include "phy-qcom-qmp.h" 25 25 26 - /* QPHY_SW_RESET bit */ 27 - #define SW_RESET BIT(0) 28 - /* QPHY_POWER_DOWN_CONTROL */ 29 - #define SW_PWRDN BIT(0) 30 - #define REFCLK_DRV_DSBL BIT(1) 31 26 /* QPHY_START_CONTROL bits */ 32 - #define SERDES_START BIT(0) 33 - #define PCS_START BIT(1) 34 27 #define PLL_READY_GATE_EN BIT(3) 35 - /* QPHY_PCS_STATUS bit */ 36 - #define PHYSTATUS BIT(6) 28 + 37 29 /* QPHY_COM_PCS_READY_STATUS bit */ 38 30 #define PCS_READY BIT(0) 39 31
-12
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
··· 34 34 #include "phy-qcom-qmp-pcs-pcie-v6_20.h" 35 35 #include "phy-qcom-qmp-pcie-qhp.h" 36 36 37 - /* QPHY_SW_RESET bit */ 38 - #define SW_RESET BIT(0) 39 - /* QPHY_POWER_DOWN_CONTROL */ 40 - #define SW_PWRDN BIT(0) 41 - #define REFCLK_DRV_DSBL BIT(1) 42 - /* QPHY_START_CONTROL bits */ 43 - #define SERDES_START BIT(0) 44 - #define PCS_START BIT(1) 45 - /* QPHY_PCS_STATUS bit */ 46 - #define PHYSTATUS BIT(6) 47 - #define PHYSTATUS_4_20 BIT(7) 48 - 49 37 #define PHY_INIT_COMPLETE_TIMEOUT 10000 50 38 51 39 /* set of registers with offsets different per-PHY */
-7
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
··· 32 32 33 33 #include "phy-qcom-qmp-qserdes-txrx-ufs-v6.h" 34 34 35 - /* QPHY_SW_RESET bit */ 36 - #define SW_RESET BIT(0) 37 - /* QPHY_POWER_DOWN_CONTROL */ 38 - #define SW_PWRDN BIT(0) 39 - /* QPHY_START_CONTROL bits */ 40 - #define SERDES_START BIT(0) 41 - #define PCS_START BIT(1) 42 35 /* QPHY_PCS_READY_STATUS bit */ 43 36 #define PCS_READY BIT(0) 44 37
-21
drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c
··· 27 27 28 28 #include "phy-qcom-qmp-dp-com-v3.h" 29 29 30 - /* QPHY_SW_RESET bit */ 31 - #define SW_RESET BIT(0) 32 - /* QPHY_POWER_DOWN_CONTROL */ 33 - #define SW_PWRDN BIT(0) 34 - /* QPHY_START_CONTROL bits */ 35 - #define SERDES_START BIT(0) 36 - #define PCS_START BIT(1) 37 - /* QPHY_PCS_STATUS bit */ 38 - #define PHYSTATUS BIT(6) 39 - 40 30 /* QPHY_V3_DP_COM_RESET_OVRD_CTRL register bits */ 41 31 /* DP PHY soft reset */ 42 32 #define SW_DPPHY_RESET BIT(0) ··· 40 50 /* QPHY_V3_DP_COM_PHY_MODE_CTRL register bits */ 41 51 #define USB3_MODE BIT(0) /* enables USB3 mode */ 42 52 #define DP_MODE BIT(1) /* enables DP mode */ 43 - 44 - /* QPHY_PCS_AUTONOMOUS_MODE_CTRL register bits */ 45 - #define ARCVR_DTCT_EN BIT(0) 46 - #define ALFPS_DTCT_EN BIT(1) 47 - #define ARCVR_DTCT_EVENT_SEL BIT(4) 48 - 49 - /* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */ 50 - #define IRQ_CLEAR BIT(0) 51 - 52 - /* QPHY_V3_PCS_MISC_CLAMP_ENABLE register bits */ 53 - #define CLAMP_EN BIT(0) /* enables i/o clamp_n */ 54 53 55 54 #define PHY_INIT_COMPLETE_TIMEOUT 10000 56 55
-35
drivers/phy/qualcomm/phy-qcom-qmp-usb.c
··· 29 29 #include "phy-qcom-qmp-pcs-usb-v6.h" 30 30 #include "phy-qcom-qmp-pcs-usb-v7.h" 31 31 32 - /* QPHY_SW_RESET bit */ 33 - #define SW_RESET BIT(0) 34 - /* QPHY_POWER_DOWN_CONTROL */ 35 - #define SW_PWRDN BIT(0) 36 - /* QPHY_START_CONTROL bits */ 37 - #define SERDES_START BIT(0) 38 - #define PCS_START BIT(1) 39 - /* QPHY_PCS_STATUS bit */ 40 - #define PHYSTATUS BIT(6) 41 - 42 - /* QPHY_V3_DP_COM_RESET_OVRD_CTRL register bits */ 43 - /* DP PHY soft reset */ 44 - #define SW_DPPHY_RESET BIT(0) 45 - /* mux to select DP PHY reset control, 0:HW control, 1: software reset */ 46 - #define SW_DPPHY_RESET_MUX BIT(1) 47 - /* USB3 PHY soft reset */ 48 - #define SW_USB3PHY_RESET BIT(2) 49 - /* mux to select USB3 PHY reset control, 0:HW control, 1: software reset */ 50 - #define SW_USB3PHY_RESET_MUX BIT(3) 51 - 52 - /* QPHY_V3_DP_COM_PHY_MODE_CTRL register bits */ 53 - #define USB3_MODE BIT(0) /* enables USB3 mode */ 54 - #define DP_MODE BIT(1) /* enables DP mode */ 55 - 56 - /* QPHY_PCS_AUTONOMOUS_MODE_CTRL register bits */ 57 - #define ARCVR_DTCT_EN BIT(0) 58 - #define ALFPS_DTCT_EN BIT(1) 59 - #define ARCVR_DTCT_EVENT_SEL BIT(4) 60 - 61 - /* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */ 62 - #define IRQ_CLEAR BIT(0) 63 - 64 - /* QPHY_V3_PCS_MISC_CLAMP_ENABLE register bits */ 65 - #define CLAMP_EN BIT(0) /* enables i/o clamp_n */ 66 - 67 32 #define PHY_INIT_COMPLETE_TIMEOUT 10000 68 33 69 34 /* set of registers with offsets different per-PHY */
-32
drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
··· 28 28 #include "phy-qcom-qmp.h" 29 29 #include "phy-qcom-qmp-pcs-misc-v3.h" 30 30 31 - /* QPHY_SW_RESET bit */ 32 - #define SW_RESET BIT(0) 33 - /* QPHY_POWER_DOWN_CONTROL */ 34 - #define SW_PWRDN BIT(0) 35 - /* QPHY_START_CONTROL bits */ 36 - #define SERDES_START BIT(0) 37 - #define PCS_START BIT(1) 38 - /* QPHY_PCS_STATUS bit */ 39 - #define PHYSTATUS BIT(6) 40 - 41 - /* QPHY_V3_DP_COM_RESET_OVRD_CTRL register bits */ 42 - /* DP PHY soft reset */ 43 - #define SW_DPPHY_RESET BIT(0) 44 - /* mux to select DP PHY reset control, 0:HW control, 1: software reset */ 45 - #define SW_DPPHY_RESET_MUX BIT(1) 46 - /* USB3 PHY soft reset */ 47 - #define SW_USB3PHY_RESET BIT(2) 48 - /* mux to select USB3 PHY reset control, 0:HW control, 1: software reset */ 49 - #define SW_USB3PHY_RESET_MUX BIT(3) 50 - 51 - /* QPHY_V3_DP_COM_PHY_MODE_CTRL register bits */ 52 - #define USB3_MODE BIT(0) /* enables USB3 mode */ 53 - #define DP_MODE BIT(1) /* enables DP mode */ 54 - 55 - /* QPHY_PCS_AUTONOMOUS_MODE_CTRL register bits */ 56 - #define ARCVR_DTCT_EN BIT(0) 57 - #define ALFPS_DTCT_EN BIT(1) 58 - #define ARCVR_DTCT_EVENT_SEL BIT(4) 59 - 60 - /* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */ 61 - #define IRQ_CLEAR BIT(0) 62 - 63 31 #define PHY_INIT_COMPLETE_TIMEOUT 10000 64 32 65 33 /* set of registers with offsets different per-PHY */
+25
drivers/phy/qualcomm/phy-qcom-qmp.h
··· 50 50 51 51 #include "phy-qcom-qmp-pcs-v7.h" 52 52 53 + /* QPHY_SW_RESET bit */ 54 + #define SW_RESET BIT(0) 55 + /* QPHY_POWER_DOWN_CONTROL */ 56 + #define SW_PWRDN BIT(0) 57 + #define REFCLK_DRV_DSBL BIT(1) /* PCIe */ 58 + 59 + /* QPHY_START_CONTROL bits */ 60 + #define SERDES_START BIT(0) 61 + #define PCS_START BIT(1) 62 + 63 + /* QPHY_PCS_STATUS bit */ 64 + #define PHYSTATUS BIT(6) 65 + #define PHYSTATUS_4_20 BIT(7) 66 + 67 + /* QPHY_PCS_AUTONOMOUS_MODE_CTRL register bits */ 68 + #define ARCVR_DTCT_EN BIT(0) 69 + #define ALFPS_DTCT_EN BIT(1) 70 + #define ARCVR_DTCT_EVENT_SEL BIT(4) 71 + 72 + /* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */ 73 + #define IRQ_CLEAR BIT(0) 74 + 75 + /* QPHY_PCS_MISC_CLAMP_ENABLE register bits */ 76 + #define CLAMP_EN BIT(0) /* enables i/o clamp_n */ 77 + 53 78 #endif