arm64: dts: qcom: Add PCIe Support for sm8750
Subsystems (7)
cover arm64: dts: qcom: Add PCIe Support for sm8750
Describe PCIe controller and PHY. Also add required system resources like regulators, clocks, interrupts and registers configuration for PCIe.
---
Krishna Chaitanya Chundru (4):
dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Document the SM8750 QMP PCIe PHY Gen3 x2
phy: qcom-qmp-pcie: add dual lane PHY support for SM8750
dt-bindings: PCI: qcom,pcie-sm8550: Add SM8750 compatible
arm64: dts: qcom: sm8750: Add PCIe PHY and controller node
.../devicetree/bindings/pci/qcom,pcie-sm8550.yaml | 1 + .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 2 + arch/arm64/boot/dts/qcom/sm8750.dtsi | 174 ++++++++++++++++++++- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 149 ++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v7.h | 2 + .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v7.h | 4 +- 6 files changed, 330 insertions(+), 2 deletions(-)
---
base-commit: 37816488247ddddbc3de113c78c83572274b1e2e
change-id: 20250809-pakala-25a7c1ddba85
Best regards,
Signature · 1 line
Krishna Chaitanya Chundru <[email protected]>
PATCH 1/4 dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Document the SM8750 QMP PCIe PHY Gen3 x2
Document the QMP PCIe PHY on the SM8750 platform.
--- Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +2 -0
@@ -42,6 +42,7 @@ properties: - qcom,sm8550-qmp-gen4x2-pcie-phy - qcom,sm8650-qmp-gen3x2-pcie-phy - qcom,sm8650-qmp-gen4x2-pcie-phy + - qcom,sm8750-qmp-gen3x2-pcie-phy - qcom,x1e80100-qmp-gen3x2-pcie-phy - qcom,x1e80100-qmp-gen4x2-pcie-phy - qcom,x1e80100-qmp-gen4x4-pcie-phy
@@ -164,6 +165,7 @@ allOf: - qcom,sm8550-qmp-gen4x2-pcie-phy - qcom,sm8650-qmp-gen3x2-pcie-phy - qcom,sm8650-qmp-gen4x2-pcie-phy + - qcom,sm8750-qmp-gen3x2-pcie-phy then: properties: clocks:
Signature · 1 line
2.34.1
Re: [PATCH 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Document the SM8750 QMP PCIe PHY Gen3 x2
Quoted 7 lines · Krishna Chaitanya Chundru
Document the QMP PCIe PHY on the SM8750 platform.
Signed-off-by Krishna Chaitanya Chundru <[email protected]>--- Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 2 ++ 1 file changed, 2 insertions(+)
PATCH 2/4 phy: qcom-qmp-pcie: add dual lane PHY support for SM8750
In reply to Krishna Chaitanya ChundruThe PCIe Gen3 x2 PHY for SM8750 uses new phy, add the required registers and offsets for this phy.
--- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 149 +++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v7.h | 2 + .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v7.h | 4 +- 3 files changed, 154 insertions(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +149 -0
@@ -93,6 +93,13 @@ static const unsigned int pciephy_v6_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V6_PCS_POWER_DOWN_CONTROL, }; +static const unsigned int pciephy_v7_regs_layout[QPHY_LAYOUT_SIZE ] = { + [QPHY_SW_RESET ] =QPHY_V7_PCS_SW_RESET , + [QPHY_START_CTRL ] =QPHY_V7_PCS_START_CONTROL , + [QPHY_PCS_STATUS ] =QPHY_V7_PCS_PCS_STATUS1 , + [QPHY_PCS_POWER_DOWN_CONTROL ] =QPHY_V7_PCS_POWER_DOWN_CONTROL , +}; +static const struct qmp_phy_init_tbl msm8998_pcie_serdes_tbl[] = {QMP_PHY_INIT_CFG (QSERDES_V3_COM_BIAS_EN_CLKBUFLR_EN ,0x14 ),QMP_PHY_INIT_CFG (QSERDES_V3_COM_CLK_SELECT ,0x30 ),
@@ -2590,6 +2597,108 @@ static const struct qmp_phy_init_tbl sm8650_qmp_gen4x2_pcie_rx_tbl[] = { QMP_PHY_INIT_CFG(QSERDES_V6_20_RX_MODE_RATE3_B6, 0xff), }; +static const struct qmp_phy_init_tbl sm8750_qmp_gen3x2_pcie_serdes_tbl[] = { +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SSC_EN_CENTER ,0x1 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SSC_PER1 ,0x62 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SSC_PER2 ,0x02 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SSC_STEP_SIZE1_MODE0 ,0xf8 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SSC_STEP_SIZE2_MODE0 ,0x01 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SSC_STEP_SIZE1_MODE1 ,0x93 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SSC_STEP_SIZE2_MODE1 ,0x01 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_CLK_ENABLE1 ,0x90 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SYS_CLK_CTRL ,0x82 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_PLL_IVCO ,0x07 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_CP_CTRL_MODE0 ,0x02 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_CP_CTRL_MODE1 ,0x02 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_PLL_RCTRL_MODE0 ,0x16 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_PLL_RCTRL_MODE1 ,0x16 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_PLL_CCTRL_MODE0 ,0x36 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_PLL_CCTRL_MODE1 ,0x36 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_SYSCLK_EN_SEL ,0x08 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_BG_TIMER ,0x0a ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_LOCK_CMP_EN ,0x42 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_LOCK_CMP1_MODE0 ,0x04 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_LOCK_CMP2_MODE0 ,0x0d ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_LOCK_CMP1_MODE1 ,0x0a ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_LOCK_CMP2_MODE1 ,0x1a ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DEC_START_MODE0 ,0x41 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DEC_START_MODE1 ,0x34 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DIV_FRAC_START1_MODE0 ,0xab ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DIV_FRAC_START2_MODE0 ,0xaa ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DIV_FRAC_START3_MODE0 ,0x01 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DIV_FRAC_START1_MODE1 ,0x55 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DIV_FRAC_START2_MODE1 ,0x55 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_DIV_FRAC_START3_MODE1 ,0x01 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_VCO_TUNE_MAP ,0x14 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_CLK_SELECT ,0x34 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_HSCLK_SEL_1 ,0x01 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_CORECLK_DIV_MODE1 ,0x04 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_CMN_CONFIG_1 ,0x16 ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_ADDITIONAL_MISC_3 ,0x0F ), +QMP_PHY_INIT_CFG (QSERDES_V7_COM_CORE_CLK_EN ,0xA0 ), +}; + +static const struct qmp_phy_init_tbl sm8750_qmp_gen3x2_pcie_rx_tbl[] = { +QMP_PHY_INIT_CFG (QSERDES_V7_RX_DFE_CTLE_POST_CAL_OFFSET ,0x38 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_GM_CAL ,0x11 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_00_HIGH ,0xBF ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_00_HIGH2 ,0xBF ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_00_HIGH3 ,0xB7 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_00_HIGH4 ,0xEA ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_00_LOW ,0x3F ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_01_HIGH ,0x09 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_01_HIGH2 ,0x49 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_01_HIGH3 ,0x1B ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_01_HIGH4 ,0x9C ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_01_LOW ,0xD1 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_10_HIGH ,0x09 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_10_HIGH2 ,0x49 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_10_HIGH3 ,0x1B ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_10_HIGH4 ,0x9C ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_MODE_10_LOW ,0xD1 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_TX_ADAPT_PRE_THRESH1 ,0x3E ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_TX_ADAPT_PRE_THRESH2 ,0x1E ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_TX_ADAPT_POST_THRESH ,0xD2 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_UCDR_FO_GAIN ,0x09 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_UCDR_SO_GAIN ,0x05 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_UCDR_SB2_THRESH1 ,0x08 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_UCDR_SB2_THRESH2 ,0x08 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_VGA_CAL_CNTRL2 ,0x09 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_SIGDET_ENABLES ,0x1C ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_SIGDET_CNTRL ,0x60 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_RX_IDAC_TSETTLE_LOW ,0x07 ), +QMP_PHY_INIT_CFG (QSERDES_V7_RX_SIGDET_CAL_TRIM ,0x08 ), +}; + +static const struct qmp_phy_init_tbl sm8750_qmp_gen3x2_pcie_tx_tbl[] = { +QMP_PHY_INIT_CFG (QSERDES_V7_TX_LANE_MODE_1 ,0x35 ), +QMP_PHY_INIT_CFG (QSERDES_V7_TX_LANE_MODE_3 ,0x10 ), +QMP_PHY_INIT_CFG (QSERDES_V7_TX_LANE_MODE_4 ,0x31 ), +QMP_PHY_INIT_CFG (QSERDES_V7_TX_LANE_MODE_5 ,0x7F ), +QMP_PHY_INIT_CFG (QSERDES_V7_TX_PI_QEC_CTRL ,0x02 ), +QMP_PHY_INIT_CFG (QSERDES_V7_TX_RES_CODE_LANE_OFFSET_RX ,0x08 ), +QMP_PHY_INIT_CFG (QSERDES_V7_TX_RES_CODE_LANE_OFFSET_TX ,0x14 ), +}; + +static const struct qmp_phy_init_tbl sm8750_qmp_gen3x2_pcie_pcs_tbl[] = { +QMP_PHY_INIT_CFG (QPHY_V7_PCS_REFGEN_REQ_CONFIG1 ,0x05 ), +QMP_PHY_INIT_CFG (QPHY_V7_PCS_RX_SIGDET_LVL ,0x77 ), +QMP_PHY_INIT_CFG (QPHY_V7_PCS_RATE_SLEW_CNTRL1 ,0x0B ), +QMP_PHY_INIT_CFG (QPHY_V7_PCS_EQ_CONFIG2 ,0x0F ), +QMP_PHY_INIT_CFG (QPHY_V7_PCS_PCS_TX_RX_CONFIG ,0x8C ), +QMP_PHY_INIT_CFG (QPHY_V7_PCS_G12S1_TXDEEMPH_M6DB ,0x17 ), +QMP_PHY_INIT_CFG (QPHY_V7_PCS_G3S2_PRE_GAIN ,0x2E ), +}; + +static const struct qmp_phy_init_tbl sm8750_qmp_gen3x2_pcie_pcs_misc_tbl[] = { +QMP_PHY_INIT_CFG (QPHY_PCIE_V6_PCS_PCIE_EQ_CONFIG1 ,0x1E ), +QMP_PHY_INIT_CFG (QPHY_PCIE_V6_PCS_PCIE_RXEQEVAL_TIME ,0x27 ), +QMP_PHY_INIT_CFG (QPHY_PCIE_V6_PCS_PCIE_POWER_STATE_CONFIG2 ,0x1D ), +QMP_PHY_INIT_CFG (QPHY_PCIE_V6_PCS_PCIE_POWER_STATE_CONFIG4 ,0x07 ), +QMP_PHY_INIT_CFG (QPHY_PCIE_V6_PCS_PCIE_ENDPOINT_REFCLK_DRIVE ,0xC1 ), +QMP_PHY_INIT_CFG (QPHY_PCIE_V6_PCS_PCIE_OSC_DTCT_ACTIONS ,0x00 ), +}; +static const struct qmp_phy_init_tbl sa8775p_qmp_gen4x2_pcie_serdes_alt_tbl[] = {QMP_PHY_INIT_CFG (QSERDES_V5_COM_BIAS_EN_CLKBUFLR_EN ,0x14 ),QMP_PHY_INIT_CFG (QSERDES_V5_COM_PLL_IVCO ,0x0f ),
@@ -3207,6 +3316,16 @@ static const struct qmp_pcie_offsets qmp_pcie_offsets_v5_30 = { .rx2 = 0x3a00, }; +static const struct qmp_pcie_offsets qmp_pcie_offsets_v7 = { + .serdes =0x0 , + .pcs =0x400 , + .pcs_misc =0x800 , + .tx =0x1000 , + .rx =0x1200 , + .tx2 =0x1800 , + .rx2 =0x1a00 , +}; +static const struct qmp_pcie_offsets qmp_pcie_offsets_v6_20 = { .serdes =0x1000 , .pcs =0x1200 ,
@@ -3996,6 +4115,33 @@ static const struct qmp_phy_cfg sm8550_qmp_gen3x2_pciephy_cfg = { .phy_status = PHYSTATUS, }; +static const struct qmp_phy_cfg sm8750_qmp_gen3x2_pciephy_cfg = { + .lanes =2 , + + .offsets = &qmp_pcie_offsets_v7, + + .tbls = { + .serdes = sm8750_qmp_gen3x2_pcie_serdes_tbl, + .serdes_num =ARRAY_SIZE (sm8750_qmp_gen3x2_pcie_serdes_tbl), + .tx = sm8750_qmp_gen3x2_pcie_tx_tbl, + .tx_num =ARRAY_SIZE (sm8750_qmp_gen3x2_pcie_tx_tbl), + .rx = sm8750_qmp_gen3x2_pcie_rx_tbl, + .rx_num =ARRAY_SIZE (sm8750_qmp_gen3x2_pcie_rx_tbl), + .pcs = sm8750_qmp_gen3x2_pcie_pcs_tbl, + .pcs_num =ARRAY_SIZE (sm8750_qmp_gen3x2_pcie_pcs_tbl), + .pcs_misc = sm8750_qmp_gen3x2_pcie_pcs_misc_tbl, + .pcs_misc_num =ARRAY_SIZE (sm8750_qmp_gen3x2_pcie_pcs_misc_tbl), + }, + .reset_list = sdm845_pciephy_reset_l, + .num_resets =ARRAY_SIZE (sdm845_pciephy_reset_l), + .vreg_list = qmp_phy_vreg_l, + .num_vregs =ARRAY_SIZE (qmp_phy_vreg_l), + .regs = pciephy_v7_regs_layout, + + .pwrdn_ctrl =SW_PWRDN |REFCLK_DRV_DSBL , + .phy_status =PHYSTATUS , +}; +static const struct qmp_phy_cfg sm8550_qmp_gen4x2_pciephy_cfg = { .lanes =2 ,
@@ -5099,6 +5245,9 @@ static const struct of_device_id qmp_pcie_of_match_table[] = { }, { .compatible = "qcom,sm8650-qmp-gen4x2-pcie-phy", .data = &sm8650_qmp_gen4x2_pciephy_cfg, + }, { + .compatible = "qcom,sm8750-qmp-gen3x2-pcie-phy", + .data = &sm8750_qmp_gen3x2_pciephy_cfg, }, { .compatible = "qcom,x1e80100-qmp-gen3x2-pcie-phy", .data = &sm8550_qmp_gen3x2_pciephy_cfg,
drivers/phy/qualcomm/phy-qcom-qmp-pcs-v7.h +2 -0
@@ -17,6 +17,8 @@#define QPHY_V7_PCS_LOCK_DETECT_CONFIG3 0x0cc#define QPHY_V7_PCS_LOCK_DETECT_CONFIG6 0x0d8#define QPHY_V7_PCS_REFGEN_REQ_CONFIG1 0x0dc +#define QPHY_V7_PCS_G12S1_TXDEEMPH_M6DB 0x168 +#define QPHY_V7_PCS_G3S2_PRE_GAIN 0x170#define QPHY_V7_PCS_RX_SIGDET_LVL 0x188#define QPHY_V7_PCS_RCVR_DTCT_DLY_P1U2_L 0x190#define QPHY_V7_PCS_RCVR_DTCT_DLY_P1U2_H 0x194
drivers/phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v7.h +3 -1
@@ -40,6 +40,8 @@#define QSERDES_V7_RX_UCDR_SB2_GAIN1 0x54#define QSERDES_V7_RX_UCDR_SB2_GAIN2 0x58#define QSERDES_V7_RX_AUX_DATA_TCOARSE_TFINE 0x60 +#define QSERDES_V7_RX_TX_ADAPT_PRE_THRESH1 0xc4 +#define QSERDES_V7_RX_TX_ADAPT_PRE_THRESH2 0xc8#define QSERDES_V7_RX_TX_ADAPT_POST_THRESH 0xcc#define QSERDES_V7_RX_VGA_CAL_CNTRL1 0xd4#define QSERDES_V7_RX_VGA_CAL_CNTRL2 0xd8
@@ -50,7 +52,7 @@#define QSERDES_V7_RX_RX_IDAC_TSETTLE_LOW 0xf8#define QSERDES_V7_RX_RX_IDAC_TSETTLE_HIGH 0xfc#define QSERDES_V7_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1 0x110 -#define QSERDES_V7_RX_SIDGET_ENABLES 0x118 +#define QSERDES_V7_RX_SIGDET_ENABLES 0x118#define QSERDES_V7_RX_SIGDET_CNTRL 0x11c#define QSERDES_V7_RX_SIGDET_DEGLITCH_CNTRL 0x124#define QSERDES_V7_RX_RX_MODE_00_LOW 0x15c
Signature · 1 line
2.34.1
Re: [PATCH 2/4] phy: qcom-qmp-pcie: add dual lane PHY support for SM8750
Quoted 10 lines · Krishna Chaitanya Chundru
The PCIe Gen3 x2 PHY for SM8750 uses new phy, add the required registers and offsets for this phy.
Signed-off-by Krishna Chaitanya Chundru <[email protected]>--- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 149 +++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v7.h | 2 + .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v7.h | 4 +- 3 files changed, 154 insertions(+), 1 deletion(-)
Signature · 2 lines
With best wishes Dmitry
PATCH 3/4 dt-bindings: PCI: qcom,pcie-sm8550: Add SM8750 compatible
In reply to Krishna Chaitanya ChundruOn the Qualcomm SM8750 platform the PCIe host is compatible with the DWC controller present on the SM8550 platorm.
--- Documentation/devicetree/bindings/pci/qcom,pcie-sm8550.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pci/qcom,pcie-sm8550.yaml +1 -0
@@ -22,6 +22,7 @@ properties: - enum: - qcom,sar2130p-pcie - qcom,pcie-sm8650 + - qcom,pcie-sm8750 - const: qcom,pcie-sm8550 reg:
Signature · 1 line
2.34.1
Re: [PATCH 3/4] dt-bindings: PCI: qcom,pcie-sm8550: Add SM8750 compatible
Quoted 8 lines · Krishna Chaitanya Chundru
On the Qualcomm SM8750 platform the PCIe host is compatible with the DWC controller present on the SM8550 platorm.
Signed-off-by Krishna Chaitanya Chundru <[email protected]>--- Documentation/devicetree/bindings/pci/qcom,pcie-sm8550.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH 4/4 arm64: dts: qcom: sm8750: Add PCIe PHY and controller node
In reply to Krishna Chaitanya ChundruAdd PCIe controller and PHY nodes which supports data rates of 8GT/s and x2 lane.
--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 174 ++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8750.dtsi +173 -1
@@ -631,7 +631,7 @@ gcc: clock-controller@100000 { clocks = <&bi_tcxo_div2>, <0>, <&sleep_clk>, - <0>, + <&pcie0_phy>, <0>, <0>, <0>,
@@ -3304,6 +3304,178 @@ gic_its: msi-controller@16040000 { }; }; + pcie0: pcie@1c00000 { + device_type = "pci"; + compatible = "qcom,pcie-sm8750", "qcom,pcie-sm8550"; + reg = <0 0x01c00000 0 0x3000>, + <0 0x40000000 0 0xf1d>, + <0 0x40000f20 0 0xa8>, + <0 0x40001000 0 0x1000>, + <0 0x40100000 0 0x100000>; + reg-names = "parf", "dbi", "elbi", "atu", "config"; + + interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "msi0", + "msi1", + "msi2", + "msi3", + "msi4", + "msi5", + "msi6", + "msi7", + "global"; + + clocks = <&gcc GCC_PCIE_0_AUX_CLK>, + <&gcc GCC_PCIE_0_CFG_AHB_CLK>, + <&gcc GCC_PCIE_0_MSTR_AXI_CLK>, + <&gcc GCC_PCIE_0_SLV_AXI_CLK>, + <&gcc GCC_PCIE_0_SLV_Q2A_AXI_CLK>, + <&gcc GCC_DDRSS_PCIE_SF_QTB_CLK>, + <&gcc GCC_AGGRE_NOC_PCIE_AXI_CLK>, + <&gcc GCC_CNOC_PCIE_SF_AXI_CLK>; + clock-names = "aux", + "cfg", + "bus_master", + "bus_slave", + "slave_q2a", + "ddrss_sf_tbu", + "noc_aggr", + "cnoc_sf_axi"; + + resets = <&gcc GCC_PCIE_0_BCR>; + reset-names = "pci"; + + interconnects = <&pcie_noc MASTER_PCIE_0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &cnoc_main SLAVE_PCIE_0 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "pcie-mem", + "cpu-pcie"; + + power-domains = <&gcc GCC_PCIE_0_GDSC>; + + iommu-map = <0 &apps_smmu 0x1400 0x1>, + <0x100 &apps_smmu 0x1401 0x1>; + + interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &intc 0 0 0 151 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &intc 0 0 0 152 IRQ_TYPE_LEVEL_HIGH>; + interrupt-map-mask = <0 0 0 0x7>; + #interrupt-cells = <1>; + + msi-map = <0x0 &gic_its 0x1400 0x1>, + <0x100 &gic_its 0x1401 0x1>; + msi-map-mask = <0xff00>; + + linux,pci-domain = <0>; + num-lanes = <2>; + bus-range = <0 0xff>; + + phys = <&pcie0_phy>; + phy-names = "pciephy"; + + #address-cells = <3>; + #size-cells = <2>; + ranges = <0x01000000 0 0x00000000 0 0x40200000 0 0x100000>, + <0x02000000 0 0x60300000 0 0x40300000 0 0x3d00000>; + + dma-coherent; + + operating-points-v2 = <&pcie0_opp_table>; + + status = "disabled"; + + pcie0_opp_table: opp-table { + compatible = "operating-points-v2"; + + /* GEN 1 x1 */ + opp-2500000 { + opp-hz = /bits/ 64 <2500000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <250000 1>; + }; + + /* GEN 1 x2 and GEN 2 x1 */ + opp-5000000 { + opp-hz = /bits/ 64 <5000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <500000 1>; + }; + + /* GEN 2 x2 */ + opp-10000000 { + opp-hz = /bits/ 64 <10000000>; + required-opps = <&rpmhpd_opp_low_svs>; + opp-peak-kBps = <1000000 1>; + }; + + /* GEN 3 x1 */ + opp-8000000 { + opp-hz = /bits/ 64 <8000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <984500 1>; + }; + + /* GEN 3 x2 */ + opp-16000000 { + opp-hz = /bits/ 64 <16000000>; + required-opps = <&rpmhpd_opp_nom>; + opp-peak-kBps = <1969000 1>; + }; + + }; + + pcieport0: pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + }; + + pcie0_phy: phy@1c06000 { + compatible = "qcom,sm8750-qmp-gen3x2-pcie-phy"; + reg = <0 0x01c06000 0 0x2000>; + + clocks = <&gcc GCC_PCIE_0_AUX_CLK>, + <&gcc GCC_PCIE_0_CFG_AHB_CLK>, + <&tcsrcc TCSR_PCIE_0_CLKREF_EN>, + <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>, + <&gcc GCC_PCIE_0_PIPE_CLK>; + clock-names = "aux", + "cfg_ahb", + "ref", + "rchng", + "pipe"; + + assigned-clocks = <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>; + assigned-clock-rates = <100000000>; + + resets = <&gcc GCC_PCIE_0_PHY_BCR>; + reset-names = "phy"; + + power-domains = <&gcc GCC_PCIE_0_PHY_GDSC>; + + #clock-cells = <0>; + clock-output-names = "pcie0_pipe_clk"; + + #phy-cells = <0>; + + status = "disabled"; + }; + ufs_mem_phy: phy@1d80000 { compatible = "qcom,sm8750-qmp-ufs-phy"; reg = <0x0 0x01d80000 0x0 0x2000>;
Signature · 1 line
2.34.1
Re: [PATCH 4/4] arm64: dts: qcom: sm8750: Add PCIe PHY and controller node
Quoted 23 lines · Krishna Chaitanya Chundru
Add PCIe controller and PHY nodes which supports data rates of 8GT/s and x2 lane.
Signed-off-by Krishna Chaitanya Chundru <[email protected]>--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 174 ++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sm8750.dtsi +1
-1@@ -631,7 +631,7 @@ gcc: clock-controller@100000 { clocks = <&bi_tcxo_div2>, <0>, <&sleep_clk>, - <0>, + <&pcie0_phy>, <0>, <0>, <0>,@@ -3304,6 +3304,178 @@ gic_its: msi-controller@16040000 { };
arch/arm64/boot/dts/qcom/sm8750.dtsi gic_its: msi-controller@16040000 { · line 3314
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi +8
-0}; + pcie0: pcie@1c00000 { + device_type = "pci"; + compatible = "qcom,pcie-sm8750", "qcom,pcie-sm8550"; + reg = <0 0x01c00000 0 0x3000>, + <0 0x40000000 0 0xf1d>, + <0 0x40000f20 0 0xa8>, + <0 0x40001000 0 0x1000>, + <0 0x40100000 0 0x100000>;
Look at rest of the code - it's hex everywhere. Keep consistent style.
Best regards,
Krzysztof
Re: [PATCH 4/4] arm64: dts: qcom: sm8750: Add PCIe PHY and controller node
In reply to Krishna Chaitanya ChundruQuoted 5 lines · Krishna Chaitanya Chundru
Add PCIe controller and PHY nodes which supports data rates of 8GT/s and x2 lane.
Signed-off-by Krishna Chaitanya Chundru <[email protected]>---
[...]
arch/arm64/boot/dts/qcom/sm8750.dtsi gic_its: msi-controller@16040000 { · line 3389
Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi +7
-0+ phys = <&pcie0_phy>; + phy-names = "pciephy"; + + #address-cells = <3>; + #size-cells = <2>; + ranges = <0x01000000 0 0x00000000 0 0x40200000 0 0x100000>, + <0x02000000 0 0x60300000 0 0x40300000 0 0x3d00000>;
The BAR space is larger (0x2400_0000)
please align the overall node style with x1e80100.dtsi
Konrad
Re: (subset) [PATCH 0/4] arm64: dts: qcom: Add PCIe Support for sm8750
In reply to Krishna Chaitanya ChundruQuoted 4 lines · Krishna Chaitanya Chundru
Describe PCIe controller and PHY. Also add required system resources like regulators, clocks, interrupts and registers configuration for PCIe.
Applied, thanks!
[1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Document the SM8750 QMP PCIe PHY Gen3 x2
commit: edafd4f3fd52a614c5cee2684559367eac2286dc
[2/4] phy: qcom-qmp-pcie: add dual lane PHY support for SM8750
commit: 0f051749c804b5a4f485013c0e3c932e1dd9f70bBest regards,
Signature · 1 line
~Vinod