This series adds the relavent DT bindings, new compatible string,
update PHY, add support to EPF driver and add EP PCIe node in dtsi
file for ep pcie0 controller.
v2 -> v3:
- removed if/then schemas, added minItems for reg,
reg-bnames, interrupt and interrupt-names instead.
- adding qcom,sa8775p-pcie-ep compitable for sa8775p
as we have some specific change to add.
- reusing sm8450's pcs_misc num table as it is same as sa8775p.
used appropriate namespace for pcs.
- remove const from sa8775p_header as kernel test robot
throwing some warnings due to this.
- remove fallback compatiable as we are adding compatiable for sa8775p.
v1 -> v2:
- update description for dma
- Reusing qcom,sdx55-pcie-ep compatibe so remove compaitable
for sa8775p
- sort the defines in phy header file and remove extra defines
- add const in return type pci_epf_header and remove MHI_EPF_USE_DMA
flag as hdma patch is not ready
- add fallback compatiable as qcom,sdx55-pcie-ep, add iommu property
Mrinmay Sarkar (5):
dt-bindings: PCI: qcom-ep: Add support for SA8775P SoC
PCI: qcom-ep: Add support for SA8775P SOC
phy: qcom-qmp-pcie: add endpoint support for sa8775p
PCI: epf-mhi: Add support for SA8775P
arm64: dts: qcom: sa8775p: Add ep pcie0 controller node
.../devicetree/bindings/pci/qcom,pcie-ep.yaml | 44 +++++++++++++++++++-
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 48 ++++++++++++++++++++++
drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
drivers/pci/endpoint/functions/pci-epf-mhi.c | 17 ++++++++
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 37 +++++++++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h | 2 +
6 files changed, 147 insertions(+), 2 deletions(-)
--
2.7.4
Add devicetree bindings support for SA8775P SoC. It has DMA register
space and dma interrupt to support HDMA.
Signed-off-by: Mrinmay Sarkar <[email protected]>
---
.../devicetree/bindings/pci/qcom,pcie-ep.yaml | 44 +++++++++++++++++++++-
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
index a223ce0..7485248 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
@@ -13,6 +13,7 @@ properties:
compatible:
oneOf:
- enum:
+ - qcom,sa8775p-pcie-ep
- qcom,sdx55-pcie-ep
- qcom,sm8450-pcie-ep
- items:
@@ -20,6 +21,7 @@ properties:
- const: qcom,sdx55-pcie-ep
reg:
+ minItems: 6
items:
- description: Qualcomm-specific PARF configuration registers
- description: DesignWare PCIe registers
@@ -27,8 +29,10 @@ properties:
- description: Address Translation Unit (ATU) registers
- description: Memory region used to map remote RC address space
- description: BAR memory region
+ - description: DMA register space
reg-names:
+ minItems: 6
items:
- const: parf
- const: dbi
@@ -36,13 +40,14 @@ properties:
- const: atu
- const: addr_space
- const: mmio
+ - const: dma
clocks:
- minItems: 7
+ minItems: 5
maxItems: 8
clock-names:
- minItems: 7
+ minItems: 5
maxItems: 8
qcom,perst-regs:
@@ -57,14 +62,18 @@ properties:
- description: Perst separation enable offset
interrupts:
+ minItems: 2
items:
- description: PCIe Global interrupt
- description: PCIe Doorbell interrupt
+ - description: DMA interrupt
interrupt-names:
+ minItems: 2
items:
- const: global
- const: doorbell
+ - const: dma
reset-gpios:
description: GPIO used as PERST# input signal
@@ -173,6 +182,37 @@ allOf:
- const: ddrss_sf_tbu
- const: aggre_noc_axi
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sa8775p-pcie-ep
+ then:
+ properties:
+ reg:
+ minItems: 7
+ reg-names:
+ minItems: 7
+ clocks:
+ items:
+ - description: PCIe Auxiliary clock
+ - description: PCIe CFG AHB clock
+ - description: PCIe Master AXI clock
+ - description: PCIe Slave AXI clock
+ - description: PCIe Slave Q2A AXI clock
+ clock-names:
+ items:
+ - const: aux
+ - const: cfg
+ - const: bus_master
+ - const: bus_slave
+ - const: slave_q2a
+ interrupts:
+ minItems: 3
+ interrupt-names:
+ minItems: 3
+
unevaluatedProperties: false
examples:
--
2.7.4
Add support for SA8775P SoC to the Qualcomm PCIe Endpoint Controller
driver. There will be some change specific to SA8775P so adding new
compatible string.
Signed-off-by: Mrinmay Sarkar <[email protected]>
---
drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
index 32c8d9e..4c01c34 100644
--- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
+++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
@@ -858,6 +858,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
}
static const struct of_device_id qcom_pcie_ep_match[] = {
+ { .compatible = "qcom,sa8775p-pcie-ep", },
{ .compatible = "qcom,sdx55-pcie-ep", },
{ .compatible = "qcom,sm8450-pcie-ep", },
{ }
--
2.7.4
Add ep pcie dtsi node for pcie0 controller found on sa8775p platform.
It supports gen4 and x2 link width. Due to some stability issue in
gen4 enabling gen3 as of now.
Signed-off-by: Mrinmay Sarkar <[email protected]>
---
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 48 +++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 13dd44d..2aa7383 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -3714,4 +3714,52 @@
status = "disabled";
};
+
+ pcie0_ep: pcie-ep@1c00000 {
+ compatible = "qcom,sa8775p-pcie-ep";
+ reg = <0x0 0x01c00000 0x0 0x3000>,
+ <0x0 0x40000000 0x0 0xf20>,
+ <0x0 0x40000f20 0x0 0xa8>,
+ <0x0 0x40001000 0x0 0x4000>,
+ <0x0 0x40200000 0x0 0x100000>,
+ <0x0 0x01c03000 0x0 0x1000>,
+ <0x0 0x40005000 0x0 0x2000>;
+ reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
+ "mmio", "dma";
+
+ 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>;
+
+ clock-names = "aux",
+ "cfg",
+ "bus_master",
+ "bus_slave",
+ "slave_q2a";
+
+ interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 630 IRQ_TYPE_LEVEL_HIGH>;
+
+ interrupt-names = "global", "doorbell", "dma";
+
+ interconnects = <&pcie_anoc MASTER_PCIE_0 0 &mc_virt SLAVE_EBI1 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_0 0>;
+ interconnect-names = "pcie-mem", "cpu-pcie";
+
+ iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
+ <0x100 &pcie_smmu 0x0001 0x1>;
+
+ resets = <&gcc GCC_PCIE_0_BCR>;
+ reset-names = "core";
+ power-domains = <&gcc PCIE_0_GDSC>;
+ phys = <&pcie0_phy>;
+ phy-names = "pciephy";
+ max-link-speed = <3>;
+ num-lanes = <2>;
+
+ status = "disabled";
+ };
};
--
2.7.4
Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
SA8775P has the PID (0x0306) and supports HDMA. Currently, it has
no fixed PCI class, so it is being advertised as "PCI_CLASS_OTHERS".
Signed-off-by: Mrinmay Sarkar <[email protected]>
---
drivers/pci/endpoint/functions/pci-epf-mhi.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index b7b9d3e..4487260 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -114,6 +114,22 @@ static const struct pci_epf_mhi_ep_info sm8450_info = {
.flags = MHI_EPF_USE_DMA,
};
+static struct pci_epf_header sa8775p_header = {
+ .vendorid = PCI_VENDOR_ID_QCOM,
+ .deviceid = 0x0306,
+ .baseclass_code = PCI_CLASS_OTHERS,
+ .interrupt_pin = PCI_INTERRUPT_INTA,
+};
+
+static const struct pci_epf_mhi_ep_info sa8775p_info = {
+ .config = &mhi_v1_config,
+ .epf_header = &sa8775p_header,
+ .bar_num = BAR_0,
+ .epf_flags = PCI_BASE_ADDRESS_MEM_TYPE_32,
+ .msi_count = 32,
+ .mru = 0x8000,
+};
+
struct pci_epf_mhi {
const struct pci_epc_features *epc_features;
const struct pci_epf_mhi_ep_info *info;
@@ -677,6 +693,7 @@ static int pci_epf_mhi_probe(struct pci_epf *epf,
}
static const struct pci_epf_device_id pci_epf_mhi_ids[] = {
+ { .name = "sa8775p", .driver_data = (kernel_ulong_t)&sa8775p_info },
{ .name = "sdx55", .driver_data = (kernel_ulong_t)&sdx55_info },
{ .name = "sm8450", .driver_data = (kernel_ulong_t)&sm8450_info },
{},
--
2.7.4
Add support for dual lane end point mode PHY found on sa8755p platform.
Signed-off-by: Mrinmay Sarkar <[email protected]>
---
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 37 +++++++++++++++++++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h | 2 ++
2 files changed, 39 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index a63ca74..b64598a 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -2147,6 +2147,34 @@ static const struct qmp_phy_init_tbl sa8775p_qmp_gen4x4_pcie_rc_serdes_alt_tbl[]
QMP_PHY_INIT_CFG(QSERDES_V5_COM_CLK_SELECT, 0x34),
};
+static const struct qmp_phy_init_tbl sa8775p_qmp_gen4x2_pcie_ep_serdes_alt_tbl[] = {
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_BG_TIMER, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_SYS_CLK_CTRL, 0x07),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_CP_CTRL_MODE0, 0x27),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_CP_CTRL_MODE1, 0x0a),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_PLL_RCTRL_MODE0, 0x17),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_PLL_RCTRL_MODE1, 0x19),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_PLL_CCTRL_MODE0, 0x00),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_PLL_CCTRL_MODE1, 0x03),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_SYSCLK_EN_SEL, 0x00),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_INTEGLOOP_GAIN0_MODE0, 0xfb),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_INTEGLOOP_GAIN1_MODE0, 0x01),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_INTEGLOOP_GAIN0_MODE1, 0xfb),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_INTEGLOOP_GAIN1_MODE1, 0x01),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_CMN_MODE, 0x14),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_LOCK_CMP1_MODE0, 0xff),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_LOCK_CMP2_MODE0, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_LOCK_CMP1_MODE1, 0xff),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_LOCK_CMP2_MODE1, 0x09),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_DEC_START_MODE0, 0x19),
+ QMP_PHY_INIT_CFG(QSERDES_V5_COM_DEC_START_MODE1, 0x28),
+};
+
+static const struct qmp_phy_init_tbl sa8775p_qmp_gen4x2_pcie_ep_pcs_alt_tbl[] = {
+ QMP_PHY_INIT_CFG(QPHY_V5_20_PCS_INSIG_MX_CTRL7, 0x00),
+ QMP_PHY_INIT_CFG(QPHY_V5_20_PCS_INSIG_SW_CTRL7, 0x00),
+};
+
struct qmp_pcie_offsets {
u16 serdes;
u16 pcs;
@@ -3043,6 +3071,15 @@ static const struct qmp_phy_cfg sa8775p_qmp_gen4x2_pciephy_cfg = {
.pcs_misc_num = ARRAY_SIZE(sa8775p_qmp_gen4_pcie_rc_pcs_misc_tbl),
},
+ .tbls_ep = &(const struct qmp_phy_cfg_tbls) {
+ .serdes = sa8775p_qmp_gen4x2_pcie_ep_serdes_alt_tbl,
+ .serdes_num = ARRAY_SIZE(sa8775p_qmp_gen4x2_pcie_ep_serdes_alt_tbl),
+ .pcs_misc = sm8450_qmp_gen4x2_pcie_ep_pcs_misc_tbl,
+ .pcs_misc_num = ARRAY_SIZE(sm8450_qmp_gen4x2_pcie_ep_pcs_misc_tbl),
+ .pcs = sa8775p_qmp_gen4x2_pcie_ep_pcs_alt_tbl,
+ .pcs_num = ARRAY_SIZE(sa8775p_qmp_gen4x2_pcie_ep_pcs_alt_tbl),
+ },
+
.reset_list = sdm845_pciephy_reset_l,
.num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l),
.vreg_list = qmp_phy_vreg_l,
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h
index f0754b6..d3ad5b7 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h
@@ -6,6 +6,8 @@
#ifndef QCOM_PHY_QMP_PCS_V5_20_H_
#define QCOM_PHY_QMP_PCS_V5_20_H_
+#define QPHY_V5_20_PCS_INSIG_SW_CTRL7 0x060
+#define QPHY_V5_20_PCS_INSIG_MX_CTRL7 0x07c
#define QPHY_V5_20_PCS_G3S2_PRE_GAIN 0x170
#define QPHY_V5_20_PCS_RX_SIGDET_LVL 0x188
#define QPHY_V5_20_PCS_EQ_CONFIG2 0x1d8
--
2.7.4
On 19/10/2023 13:37, Mrinmay Sarkar wrote:
> Add devicetree bindings support for SA8775P SoC. It has DMA register
> space and dma interrupt to support HDMA.
>
> Signed-off-by: Mrinmay Sarkar <[email protected]>
> ---
> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 44 +++++++++++++++++++++-
> 1 file changed, 42 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
> index a223ce0..7485248 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
> @@ -13,6 +13,7 @@ properties:
> compatible:
> oneOf:
> - enum:
> + - qcom,sa8775p-pcie-ep
> - qcom,sdx55-pcie-ep
> - qcom,sm8450-pcie-ep
> - items:
> @@ -20,6 +21,7 @@ properties:
> - const: qcom,sdx55-pcie-ep
>
> reg:
> + minItems: 6
> items:
> - description: Qualcomm-specific PARF configuration registers
> - description: DesignWare PCIe registers
> @@ -27,8 +29,10 @@ properties:
> - description: Address Translation Unit (ATU) registers
> - description: Memory region used to map remote RC address space
> - description: BAR memory region
> + - description: DMA register space
You need to constrain IO space in all other variants.
>
> reg-names:
> + minItems: 6
> items:
> - const: parf
> - const: dbi
> @@ -36,13 +40,14 @@ properties:
> - const: atu
> - const: addr_space
> - const: mmio
> + - const: dma
>
> clocks:
> - minItems: 7
> + minItems: 5
> maxItems: 8
>
> clock-names:
> - minItems: 7
> + minItems: 5
> maxItems: 8
>
> qcom,perst-regs:
> @@ -57,14 +62,18 @@ properties:
> - description: Perst separation enable offset
>
> interrupts:
> + minItems: 2
> items:
> - description: PCIe Global interrupt
> - description: PCIe Doorbell interrupt
> + - description: DMA interrupt
>
> interrupt-names:
> + minItems: 2
> items:
> - const: global
> - const: doorbell
> + - const: dma
You need to constrain interrupts in all other variants.
>
> reset-gpios:
> description: GPIO used as PERST# input signal
> @@ -173,6 +182,37 @@ allOf:
> - const: ddrss_sf_tbu
> - const: aggre_noc_axi
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,sa8775p-pcie-ep
> + then:
> + properties:
> + reg:
> + minItems: 7
As well:
maxItems: 7
Otherwise any future update will for sure miss this and relax the reg.
> + reg-names:
> + minItems: 7
Ditto
> + clocks:
> + items:
> + - description: PCIe Auxiliary clock
> + - description: PCIe CFG AHB clock
> + - description: PCIe Master AXI clock
> + - description: PCIe Slave AXI clock
> + - description: PCIe Slave Q2A AXI clock
> + clock-names:
> + items:
> + - const: aux
> + - const: cfg
> + - const: bus_master
> + - const: bus_slave
> + - const: slave_q2a
> + interrupts:
> + minItems: 3
Ditto
> + interrupt-names:
> + minItems: 3
Ditto
> +
> unevaluatedProperties: false
>
> examples:
Best regards,
Krzysztof
On Thu, 19 Oct 2023 at 14:37, Mrinmay Sarkar <[email protected]> wrote:
>
> Add support for dual lane end point mode PHY found on sa8755p platform.
>
> Signed-off-by: Mrinmay Sarkar <[email protected]>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 37 +++++++++++++++++++++++++++
> drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h | 2 ++
> 2 files changed, 39 insertions(+)
Reviewed-by: Dmitry Baryshkov <[email protected]>
--
With best wishes
Dmitry
On Thu, 19 Oct 2023 17:07:05 +0530, Mrinmay Sarkar wrote:
> This series adds the relavent DT bindings, new compatible string,
> update PHY, add support to EPF driver and add EP PCIe node in dtsi
> file for ep pcie0 controller.
>
> v2 -> v3:
> - removed if/then schemas, added minItems for reg,
> reg-bnames, interrupt and interrupt-names instead.
> - adding qcom,sa8775p-pcie-ep compitable for sa8775p
> as we have some specific change to add.
> - reusing sm8450's pcs_misc num table as it is same as sa8775p.
> used appropriate namespace for pcs.
> - remove const from sa8775p_header as kernel test robot
> throwing some warnings due to this.
> - remove fallback compatiable as we are adding compatiable for sa8775p.
>
> [...]
Applied, thanks!
[3/5] phy: qcom-qmp-pcie: add endpoint support for sa8775p
commit: 8e11a94e15a49221510dd4737a70c8dd56eb9678
Best regards,
--
~Vinod
On Thu, Oct 19, 2023 at 05:07:10PM +0530, Mrinmay Sarkar wrote:
> Add ep pcie dtsi node for pcie0 controller found on sa8775p platform.
> It supports gen4 and x2 link width. Due to some stability issue in
> gen4 enabling gen3 as of now.
>
> Signed-off-by: Mrinmay Sarkar <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 48 +++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> index 13dd44d..2aa7383 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> @@ -3714,4 +3714,52 @@
>
> status = "disabled";
> };
> +
> + pcie0_ep: pcie-ep@1c00000 {
> + compatible = "qcom,sa8775p-pcie-ep";
> + reg = <0x0 0x01c00000 0x0 0x3000>,
> + <0x0 0x40000000 0x0 0xf20>,
> + <0x0 0x40000f20 0x0 0xa8>,
> + <0x0 0x40001000 0x0 0x4000>,
> + <0x0 0x40200000 0x0 0x100000>,
> + <0x0 0x01c03000 0x0 0x1000>,
> + <0x0 0x40005000 0x0 0x2000>;
Can we sort the reg entries?
> + reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
> + "mmio", "dma";
> +
> + 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>;
> +
> + clock-names = "aux",
> + "cfg",
> + "bus_master",
> + "bus_slave",
> + "slave_q2a";
> +
> + interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 630 IRQ_TYPE_LEVEL_HIGH>;
> +
> + interrupt-names = "global", "doorbell", "dma";
> +
> + interconnects = <&pcie_anoc MASTER_PCIE_0 0 &mc_virt SLAVE_EBI1 0>,
> + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_0 0>;
> + interconnect-names = "pcie-mem", "cpu-pcie";
> +
> + iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
> + <0x100 &pcie_smmu 0x0001 0x1>;
I think I recommended using "iommu-map" instead of "iommus" property. But
looking at it again, I think it is fine to use just "iommus" property as the SID
will be associated with the EP directly.
Unless you want to have different SID for each function.
> +
> + resets = <&gcc GCC_PCIE_0_BCR>;
> + reset-names = "core";
> + power-domains = <&gcc PCIE_0_GDSC>;
> + phys = <&pcie0_phy>;
> + phy-names = "pciephy";
> + max-link-speed = <3>;
Please add a comment here that you are limiting the Gen speed due to stability
issues. Like,
max-link-speed = <3>; /* FIXME: Limiting the Gen speed due to stability issues */
> + num-lanes = <2>;
Can you check if the controller is cache coherent? If so, we should add
"dma-coherent" property.
- Mani
> +
> + status = "disabled";
> + };
> };
> --
> 2.7.4
>
--
மணிவண்ணன் சதாசிவம்
On Thu, Oct 19, 2023 at 05:07:07PM +0530, Mrinmay Sarkar wrote:
> Add support for SA8775P SoC to the Qualcomm PCIe Endpoint Controller
> driver. There will be some change specific to SA8775P so adding new
> compatible string.
>
What are those specific changes?
- Mani
> Signed-off-by: Mrinmay Sarkar <[email protected]>
> ---
> drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> index 32c8d9e..4c01c34 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> @@ -858,6 +858,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
> }
>
> static const struct of_device_id qcom_pcie_ep_match[] = {
> + { .compatible = "qcom,sa8775p-pcie-ep", },
> { .compatible = "qcom,sdx55-pcie-ep", },
> { .compatible = "qcom,sm8450-pcie-ep", },
> { }
> --
> 2.7.4
>
--
மணிவண்ணன் சதாசிவம்
On Thu, Oct 19, 2023 at 05:07:09PM +0530, Mrinmay Sarkar wrote:
> Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
> SA8775P has the PID (0x0306) and supports HDMA. Currently, it has
Is the PID fixed? I thought you just want to reuse the SDXxx PID in the
meantime.
- Mani
> no fixed PCI class, so it is being advertised as "PCI_CLASS_OTHERS".
>
> Signed-off-by: Mrinmay Sarkar <[email protected]>
> ---
> drivers/pci/endpoint/functions/pci-epf-mhi.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
> index b7b9d3e..4487260 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
> @@ -114,6 +114,22 @@ static const struct pci_epf_mhi_ep_info sm8450_info = {
> .flags = MHI_EPF_USE_DMA,
> };
>
> +static struct pci_epf_header sa8775p_header = {
> + .vendorid = PCI_VENDOR_ID_QCOM,
> + .deviceid = 0x0306,
> + .baseclass_code = PCI_CLASS_OTHERS,
> + .interrupt_pin = PCI_INTERRUPT_INTA,
> +};
> +
> +static const struct pci_epf_mhi_ep_info sa8775p_info = {
> + .config = &mhi_v1_config,
> + .epf_header = &sa8775p_header,
> + .bar_num = BAR_0,
> + .epf_flags = PCI_BASE_ADDRESS_MEM_TYPE_32,
> + .msi_count = 32,
> + .mru = 0x8000,
> +};
> +
> struct pci_epf_mhi {
> const struct pci_epc_features *epc_features;
> const struct pci_epf_mhi_ep_info *info;
> @@ -677,6 +693,7 @@ static int pci_epf_mhi_probe(struct pci_epf *epf,
> }
>
> static const struct pci_epf_device_id pci_epf_mhi_ids[] = {
> + { .name = "sa8775p", .driver_data = (kernel_ulong_t)&sa8775p_info },
> { .name = "sdx55", .driver_data = (kernel_ulong_t)&sdx55_info },
> { .name = "sm8450", .driver_data = (kernel_ulong_t)&sm8450_info },
> {},
> --
> 2.7.4
>
--
மணிவண்ணன் சதாசிவம்
On 10/25/2023 1:26 PM, Manivannan Sadhasivam wrote:
> On Thu, Oct 19, 2023 at 05:07:09PM +0530, Mrinmay Sarkar wrote:
>> Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
>> SA8775P has the PID (0x0306) and supports HDMA. Currently, it has
> Is the PID fixed? I thought you just want to reuse the SDXxx PID in the
> meantime.
>
> - Mani
The PID for SA8775p EP is not decided yet. So using 0x0306 PID meantime.
--Mrinmay
>> no fixed PCI class, so it is being advertised as "PCI_CLASS_OTHERS".
>>
>> Signed-off-by: Mrinmay Sarkar <[email protected]>
>> ---
>> drivers/pci/endpoint/functions/pci-epf-mhi.c | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
>> index b7b9d3e..4487260 100644
>> --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
>> +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
>> @@ -114,6 +114,22 @@ static const struct pci_epf_mhi_ep_info sm8450_info = {
>> .flags = MHI_EPF_USE_DMA,
>> };
>>
>> +static struct pci_epf_header sa8775p_header = {
>> + .vendorid = PCI_VENDOR_ID_QCOM,
>> + .deviceid = 0x0306,
>> + .baseclass_code = PCI_CLASS_OTHERS,
>> + .interrupt_pin = PCI_INTERRUPT_INTA,
>> +};
>> +
>> +static const struct pci_epf_mhi_ep_info sa8775p_info = {
>> + .config = &mhi_v1_config,
>> + .epf_header = &sa8775p_header,
>> + .bar_num = BAR_0,
>> + .epf_flags = PCI_BASE_ADDRESS_MEM_TYPE_32,
>> + .msi_count = 32,
>> + .mru = 0x8000,
>> +};
>> +
>> struct pci_epf_mhi {
>> const struct pci_epc_features *epc_features;
>> const struct pci_epf_mhi_ep_info *info;
>> @@ -677,6 +693,7 @@ static int pci_epf_mhi_probe(struct pci_epf *epf,
>> }
>>
>> static const struct pci_epf_device_id pci_epf_mhi_ids[] = {
>> + { .name = "sa8775p", .driver_data = (kernel_ulong_t)&sa8775p_info },
>> { .name = "sdx55", .driver_data = (kernel_ulong_t)&sdx55_info },
>> { .name = "sm8450", .driver_data = (kernel_ulong_t)&sm8450_info },
>> {},
>> --
>> 2.7.4
>>
On 10/25/2023 1:22 PM, Manivannan Sadhasivam wrote:
> On Thu, Oct 19, 2023 at 05:07:10PM +0530, Mrinmay Sarkar wrote:
>> Add ep pcie dtsi node for pcie0 controller found on sa8775p platform.
>> It supports gen4 and x2 link width. Due to some stability issue in
>> gen4 enabling gen3 as of now.
>>
>> Signed-off-by: Mrinmay Sarkar <[email protected]>
>> ---
>> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 48 +++++++++++++++++++++++++++++++++++
>> 1 file changed, 48 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
>> index 13dd44d..2aa7383 100644
>> --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
>> @@ -3714,4 +3714,52 @@
>>
>> status = "disabled";
>> };
>> +
>> + pcie0_ep: pcie-ep@1c00000 {
>> + compatible = "qcom,sa8775p-pcie-ep";
>> + reg = <0x0 0x01c00000 0x0 0x3000>,
>> + <0x0 0x40000000 0x0 0xf20>,
>> + <0x0 0x40000f20 0x0 0xa8>,
>> + <0x0 0x40001000 0x0 0x4000>,
>> + <0x0 0x40200000 0x0 0x100000>,
>> + <0x0 0x01c03000 0x0 0x1000>,
>> + <0x0 0x40005000 0x0 0x2000>;
> Can we sort the reg entries?
>
>> + reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
>> + "mmio", "dma";
>> +
>> + 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>;
>> +
>> + clock-names = "aux",
>> + "cfg",
>> + "bus_master",
>> + "bus_slave",
>> + "slave_q2a";
>> +
>> + interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
>> + <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
>> + <GIC_SPI 630 IRQ_TYPE_LEVEL_HIGH>;
>> +
>> + interrupt-names = "global", "doorbell", "dma";
>> +
>> + interconnects = <&pcie_anoc MASTER_PCIE_0 0 &mc_virt SLAVE_EBI1 0>,
>> + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_0 0>;
>> + interconnect-names = "pcie-mem", "cpu-pcie";
>> +
>> + iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
>> + <0x100 &pcie_smmu 0x0001 0x1>;
> I think I recommended using "iommu-map" instead of "iommus" property. But
> looking at it again, I think it is fine to use just "iommus" property as the SID
> will be associated with the EP directly.
>
> Unless you want to have different SID for each function.
>
>> +
>> + resets = <&gcc GCC_PCIE_0_BCR>;
>> + reset-names = "core";
>> + power-domains = <&gcc PCIE_0_GDSC>;
>> + phys = <&pcie0_phy>;
>> + phy-names = "pciephy";
>> + max-link-speed = <3>;
> Please add a comment here that you are limiting the Gen speed due to stability
> issues. Like,
>
> max-link-speed = <3>; /* FIXME: Limiting the Gen speed due to stability issues */
>
>> + num-lanes = <2>;
> Can you check if the controller is cache coherent? If so, we should add
> "dma-coherent" property.
>
> - Mani
For cache coherency we need driver change as well. So will add this
property along with driver change.
--Mrinmay
>> +
>> + status = "disabled";
>> + };
>> };
>> --
>> 2.7.4
>>
On 10/25/2023 1:23 PM, Manivannan Sadhasivam wrote:
> On Thu, Oct 19, 2023 at 05:07:07PM +0530, Mrinmay Sarkar wrote:
>> Add support for SA8775P SoC to the Qualcomm PCIe Endpoint Controller
>> driver. There will be some change specific to SA8775P so adding new
>> compatible string.
>>
> What are those specific changes?
>
> - Mani
Need to enable cache snooping logic for SA8775P only.
--Mrinmay
>> Signed-off-by: Mrinmay Sarkar <[email protected]>
>> ---
>> drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
>> index 32c8d9e..4c01c34 100644
>> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
>> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
>> @@ -858,6 +858,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
>> }
>>
>> static const struct of_device_id qcom_pcie_ep_match[] = {
>> + { .compatible = "qcom,sa8775p-pcie-ep", },
>> { .compatible = "qcom,sdx55-pcie-ep", },
>> { .compatible = "qcom,sm8450-pcie-ep", },
>> { }
>> --
>> 2.7.4
>>
On 10/25/2023 1:22 PM, Manivannan Sadhasivam wrote:
> On Thu, Oct 19, 2023 at 05:07:10PM +0530, Mrinmay Sarkar wrote:
>> Add ep pcie dtsi node for pcie0 controller found on sa8775p platform.
>> It supports gen4 and x2 link width. Due to some stability issue in
>> gen4 enabling gen3 as of now.
>>
>> Signed-off-by: Mrinmay Sarkar <[email protected]>
>> ---
>> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 48 +++++++++++++++++++++++++++++++++++
>> 1 file changed, 48 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
>> index 13dd44d..2aa7383 100644
>> --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
>> @@ -3714,4 +3714,52 @@
>>
>> status = "disabled";
>> };
>> +
>> + pcie0_ep: pcie-ep@1c00000 {
>> + compatible = "qcom,sa8775p-pcie-ep";
>> + reg = <0x0 0x01c00000 0x0 0x3000>,
>> + <0x0 0x40000000 0x0 0xf20>,
>> + <0x0 0x40000f20 0x0 0xa8>,
>> + <0x0 0x40001000 0x0 0x4000>,
>> + <0x0 0x40200000 0x0 0x100000>,
>> + <0x0 0x01c03000 0x0 0x1000>,
>> + <0x0 0x40005000 0x0 0x2000>;
> Can we sort the reg entries?
Sort based on reg address? I think we are following the same sequence
for other target as well.
--Mrinmay
>> + reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
>> + "mmio", "dma";
>> +
>> + 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>;
>> +
>> + clock-names = "aux",
>> + "cfg",
>> + "bus_master",
>> + "bus_slave",
>> + "slave_q2a";
>> +
>> + interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
>> + <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
>> + <GIC_SPI 630 IRQ_TYPE_LEVEL_HIGH>;
>> +
>> + interrupt-names = "global", "doorbell", "dma";
>> +
>> + interconnects = <&pcie_anoc MASTER_PCIE_0 0 &mc_virt SLAVE_EBI1 0>,
>> + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_0 0>;
>> + interconnect-names = "pcie-mem", "cpu-pcie";
>> +
>> + iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
>> + <0x100 &pcie_smmu 0x0001 0x1>;
> I think I recommended using "iommu-map" instead of "iommus" property. But
> looking at it again, I think it is fine to use just "iommus" property as the SID
> will be associated with the EP directly.
>
> Unless you want to have different SID for each function.
>
>> +
>> + resets = <&gcc GCC_PCIE_0_BCR>;
>> + reset-names = "core";
>> + power-domains = <&gcc PCIE_0_GDSC>;
>> + phys = <&pcie0_phy>;
>> + phy-names = "pciephy";
>> + max-link-speed = <3>;
> Please add a comment here that you are limiting the Gen speed due to stability
> issues. Like,
>
> max-link-speed = <3>; /* FIXME: Limiting the Gen speed due to stability issues */
>
>> + num-lanes = <2>;
> Can you check if the controller is cache coherent? If so, we should add
> "dma-coherent" property.
>
> - Mani
>
>> +
>> + status = "disabled";
>> + };
>> };
>> --
>> 2.7.4
>>
On Thu, Oct 26, 2023 at 11:08:03AM +0530, Mrinmay Sarkar wrote:
>
> On 10/25/2023 1:23 PM, Manivannan Sadhasivam wrote:
> > On Thu, Oct 19, 2023 at 05:07:07PM +0530, Mrinmay Sarkar wrote:
> > > Add support for SA8775P SoC to the Qualcomm PCIe Endpoint Controller
> > > driver. There will be some change specific to SA8775P so adding new
> > > compatible string.
> > >
> > What are those specific changes?
> >
> > - Mani
>
> Need to enable cache snooping logic for SA8775P only.
>
Then you can add the compatible to the driver at that time and use the fallback
till then i.e., just document the SA8775P compatible in bindings and use both
SA8775P and SM8450 compatibles in the dts where the latter will act as a
fallback.
- Mani
> --Mrinmay
>
> > > Signed-off-by: Mrinmay Sarkar <[email protected]>
> > > ---
> > > drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> > > index 32c8d9e..4c01c34 100644
> > > --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
> > > +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> > > @@ -858,6 +858,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
> > > }
> > > static const struct of_device_id qcom_pcie_ep_match[] = {
> > > + { .compatible = "qcom,sa8775p-pcie-ep", },
> > > { .compatible = "qcom,sdx55-pcie-ep", },
> > > { .compatible = "qcom,sm8450-pcie-ep", },
> > > { }
> > > --
> > > 2.7.4
> > >
--
மணிவண்ணன் சதாசிவம்
On Thu, Oct 26, 2023 at 11:00:29AM +0530, Mrinmay Sarkar wrote:
>
> On 10/25/2023 1:26 PM, Manivannan Sadhasivam wrote:
> > On Thu, Oct 19, 2023 at 05:07:09PM +0530, Mrinmay Sarkar wrote:
> > > Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
> > > SA8775P has the PID (0x0306) and supports HDMA. Currently, it has
> > Is the PID fixed? I thought you just want to reuse the SDXxx PID in the
> > meantime.
> >
> > - Mani
>
> The PID for SA8775p EP is not decided yet. So using 0x0306 PID meantime.
>
Okay, then please mention that explicitly in the commit message.
- Mani
> --Mrinmay
>
> > > no fixed PCI class, so it is being advertised as "PCI_CLASS_OTHERS".
> > >
> > > Signed-off-by: Mrinmay Sarkar <[email protected]>
> > > ---
> > > drivers/pci/endpoint/functions/pci-epf-mhi.c | 17 +++++++++++++++++
> > > 1 file changed, 17 insertions(+)
> > >
> > > diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
> > > index b7b9d3e..4487260 100644
> > > --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
> > > +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
> > > @@ -114,6 +114,22 @@ static const struct pci_epf_mhi_ep_info sm8450_info = {
> > > .flags = MHI_EPF_USE_DMA,
> > > };
> > > +static struct pci_epf_header sa8775p_header = {
> > > + .vendorid = PCI_VENDOR_ID_QCOM,
> > > + .deviceid = 0x0306,
> > > + .baseclass_code = PCI_CLASS_OTHERS,
> > > + .interrupt_pin = PCI_INTERRUPT_INTA,
> > > +};
> > > +
> > > +static const struct pci_epf_mhi_ep_info sa8775p_info = {
> > > + .config = &mhi_v1_config,
> > > + .epf_header = &sa8775p_header,
> > > + .bar_num = BAR_0,
> > > + .epf_flags = PCI_BASE_ADDRESS_MEM_TYPE_32,
> > > + .msi_count = 32,
> > > + .mru = 0x8000,
> > > +};
> > > +
> > > struct pci_epf_mhi {
> > > const struct pci_epc_features *epc_features;
> > > const struct pci_epf_mhi_ep_info *info;
> > > @@ -677,6 +693,7 @@ static int pci_epf_mhi_probe(struct pci_epf *epf,
> > > }
> > > static const struct pci_epf_device_id pci_epf_mhi_ids[] = {
> > > + { .name = "sa8775p", .driver_data = (kernel_ulong_t)&sa8775p_info },
> > > { .name = "sdx55", .driver_data = (kernel_ulong_t)&sdx55_info },
> > > { .name = "sm8450", .driver_data = (kernel_ulong_t)&sm8450_info },
> > > {},
> > > --
> > > 2.7.4
> > >
>
--
மணிவண்ணன் சதாசிவம்
On 10/26/2023 11:40 AM, Manivannan Sadhasivam wrote:
> On Thu, Oct 26, 2023 at 11:08:03AM +0530, Mrinmay Sarkar wrote:
>> On 10/25/2023 1:23 PM, Manivannan Sadhasivam wrote:
>>> On Thu, Oct 19, 2023 at 05:07:07PM +0530, Mrinmay Sarkar wrote:
>>>> Add support for SA8775P SoC to the Qualcomm PCIe Endpoint Controller
>>>> driver. There will be some change specific to SA8775P so adding new
>>>> compatible string.
>>>>
>>> What are those specific changes?
>>>
>>> - Mani
>> Need to enable cache snooping logic for SA8775P only.
>>
> Then you can add the compatible to the driver at that time and use the fallback
> till then i.e., just document the SA8775P compatible in bindings and use both
> SA8775P and SM8450 compatibles in the dts where the latter will act as a
> fallback.
>
> - Mani
I am getting below error in dtb checking if I add SM8450 as fallback
compatible in dtsi. As both has different set of clocks.
//local/mnt/workspace/Mrinmay/new_lemans/next-20231018/linux-next/out/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb:
pcie-ep@1c00000: compatible: 'oneOf' conditional failed, one must be
fixed://
// ['qcom,sa8775p-pcie-ep', 'qcom,sm8450-pcie-ep'] is too long//
// 'qcom,sdx65-pcie-ep' was expected//
// 'qcom,sdx55-pcie-ep' was expected//
// from schema $id:
http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#//
///local/mnt/workspace/Mrinmay/new_lemans/next-20231018/linux-next/out/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb:
pcie-ep@1c00000: clocks: [[31, 66], [31, 68], [31, 69], [31, 78], [31,
79]] is too short//
// from schema $id:
http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#//
///local/mnt/workspace/Mrinmay/new_lemans/next-20231018/linux-next/out/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb:
pcie-ep@1c00000: clock-names: ['aux', 'cfg', 'bus_master', 'bus_slave',
'slave_q2a'] is too short/
>> --Mrinmay
>>
>>>> Signed-off-by: Mrinmay Sarkar <[email protected]>
>>>> ---
>>>> drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
>>>> index 32c8d9e..4c01c34 100644
>>>> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
>>>> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
>>>> @@ -858,6 +858,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
>>>> }
>>>> static const struct of_device_id qcom_pcie_ep_match[] = {
>>>> + { .compatible = "qcom,sa8775p-pcie-ep", },
>>>> { .compatible = "qcom,sdx55-pcie-ep", },
>>>> { .compatible = "qcom,sm8450-pcie-ep", },
>>>> { }
>>>> --
>>>> 2.7.4
>>>>
On 10/26/23 07:30, Mrinmay Sarkar wrote:
>
> On 10/25/2023 1:26 PM, Manivannan Sadhasivam wrote:
>> On Thu, Oct 19, 2023 at 05:07:09PM +0530, Mrinmay Sarkar wrote:
>>> Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
>>> SA8775P has the PID (0x0306) and supports HDMA. Currently, it has
>> Is the PID fixed? I thought you just want to reuse the SDXxx PID in the
>> meantime.
>>
>> - Mani
>
> The PID for SA8775p EP is not decided yet. So using 0x0306 PID meantime.
If it's not decided, why should it go upstream then? Would that
not break the hosts' expectations when the EP device is updated?
Konrad
On 10/26/2023 4:40 PM, Konrad Dybcio wrote:
>
>
> On 10/26/23 07:30, Mrinmay Sarkar wrote:
>>
>> On 10/25/2023 1:26 PM, Manivannan Sadhasivam wrote:
>>> On Thu, Oct 19, 2023 at 05:07:09PM +0530, Mrinmay Sarkar wrote:
>>>> Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
>>>> SA8775P has the PID (0x0306) and supports HDMA. Currently, it has
>>> Is the PID fixed? I thought you just want to reuse the SDXxx PID in the
>>> meantime.
>>>
>>> - Mani
>>
>> The PID for SA8775p EP is not decided yet. So using 0x0306 PID meantime.
> If it's not decided, why should it go upstream then? Would that
> not break the hosts' expectations when the EP device is updated?
>
> Konrad
I don't think it will break the host's functionality. In host side as
well we are reusing same 0x0306 for SA8775p
--Mrinmay
On Thu, Oct 26, 2023 at 01:10:00PM +0200, Konrad Dybcio wrote:
>
>
> On 10/26/23 07:30, Mrinmay Sarkar wrote:
> >
> > On 10/25/2023 1:26 PM, Manivannan Sadhasivam wrote:
> > > On Thu, Oct 19, 2023 at 05:07:09PM +0530, Mrinmay Sarkar wrote:
> > > > Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver.
> > > > SA8775P has the PID (0x0306) and supports HDMA. Currently, it has
> > > Is the PID fixed? I thought you just want to reuse the SDXxx PID in the
> > > meantime.
> > >
> > > - Mani
> >
> > The PID for SA8775p EP is not decided yet. So using 0x0306 PID meantime.
> If it's not decided, why should it go upstream then? Would that
> not break the hosts' expectations when the EP device is updated?
>
No, it won't. If the device uses existing PID, then the existing host drivers
matching the PID will be used for this device. When the PID gets changed, then
the host drivers need to be updated too.
- Mani
> Konrad
--
மணிவண்ணன் சதாசிவம்
On Thu, Oct 26, 2023 at 12:29:30PM +0530, Mrinmay Sarkar wrote:
>
> On 10/26/2023 11:40 AM, Manivannan Sadhasivam wrote:
> > On Thu, Oct 26, 2023 at 11:08:03AM +0530, Mrinmay Sarkar wrote:
> > > On 10/25/2023 1:23 PM, Manivannan Sadhasivam wrote:
> > > > On Thu, Oct 19, 2023 at 05:07:07PM +0530, Mrinmay Sarkar wrote:
> > > > > Add support for SA8775P SoC to the Qualcomm PCIe Endpoint Controller
> > > > > driver. There will be some change specific to SA8775P so adding new
> > > > > compatible string.
> > > > >
> > > > What are those specific changes?
> > > >
> > > > - Mani
> > > Need to enable cache snooping logic for SA8775P only.
> > >
> > Then you can add the compatible to the driver at that time and use the fallback
> > till then i.e., just document the SA8775P compatible in bindings and use both
> > SA8775P and SM8450 compatibles in the dts where the latter will act as a
> > fallback.
> >
> > - Mani
>
> I am getting below error in dtb checking if I add SM8450 as fallback
> compatible in dtsi. As both has different set of clocks.
>
Ok. I didn't realize that the clocks are different. In that case, you need to
mention it in the commit message to make it clear and introduce a new
compatible.
- Mani
> //local/mnt/workspace/Mrinmay/new_lemans/next-20231018/linux-next/out/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb:
> pcie-ep@1c00000: compatible: 'oneOf' conditional failed, one must be
> fixed://
> // ['qcom,sa8775p-pcie-ep', 'qcom,sm8450-pcie-ep'] is too long//
> // 'qcom,sdx65-pcie-ep' was expected//
> // 'qcom,sdx55-pcie-ep' was expected//
> // from schema $id:
> http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#//
> ///local/mnt/workspace/Mrinmay/new_lemans/next-20231018/linux-next/out/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb:
> pcie-ep@1c00000: clocks: [[31, 66], [31, 68], [31, 69], [31, 78], [31, 79]]
> is too short//
> // from schema $id:
> http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#//
> ///local/mnt/workspace/Mrinmay/new_lemans/next-20231018/linux-next/out/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb:
> pcie-ep@1c00000: clock-names: ['aux', 'cfg', 'bus_master', 'bus_slave',
> 'slave_q2a'] is too short/
>
> > > --Mrinmay
> > >
> > > > > Signed-off-by: Mrinmay Sarkar <[email protected]>
> > > > > ---
> > > > > drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
> > > > > 1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> > > > > index 32c8d9e..4c01c34 100644
> > > > > --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
> > > > > +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> > > > > @@ -858,6 +858,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
> > > > > }
> > > > > static const struct of_device_id qcom_pcie_ep_match[] = {
> > > > > + { .compatible = "qcom,sa8775p-pcie-ep", },
> > > > > { .compatible = "qcom,sdx55-pcie-ep", },
> > > > > { .compatible = "qcom,sm8450-pcie-ep", },
> > > > > { }
> > > > > --
> > > > > 2.7.4
> > > > >
--
மணிவண்ணன் சதாசிவம்