* [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets
@ 2024-12-12 10:32 Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties Krishna Chaitanya Chundru
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Krishna Chaitanya Chundru @ 2024-12-12 10:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas,
Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna Chaitanya Chundru, Krishna chaitanya chundru
PCIe equalization presets are predefined settings used to optimize
signal integrity by compensating for signal loss and distortion in
high-speed data transmission.
As per PCIe spec 6.0.1 revision section 8.3.3.3 & 4.2.4 for data rates
of 8.0 GT/s, 16.0 GT/s, 32.0 GT/s, and 64.0 GT/s, there is a way to
configure lane equalization presets for each lane to enhance the PCIe
link reliability. Each preset value represents a different combination
of pre-shoot and de-emphasis values. For each data rate, different
registers are defined: for 8.0 GT/s, registers are defined in section
7.7.3.4; for 16.0 GT/s, in section 7.7.5.9, etc. The 8.0 GT/s rate has
an extra receiver preset hint, requiring 16 bits per lane, while the
remaining data rates use 8 bits per lane.
Based on the number of lanes and the supported data rate, read the
device tree property and stores in the presets structure.
Based upon the lane width and supported data rate update lane
equalization registers.
This patch depends on the this dt binding pull request: https://github.com/devicetree-org/dt-schema/pull/146
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
Changes in v2:
- Fix the kernel test robot error
- As suggested by konrad use for loop and read "eq-presets-%ugts", (8 << i)
- Link to v1: https://lore.kernel.org/r/20241116-presets-v1-0-878a837a4fee@quicinc.com
---
Krishna chaitanya chundru (4):
arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties
PCI: of: Add API to retrieve equalization presets from device tree
PCI: dwc: Improve handling of PCIe lane configuration
PCI: dwc: Add support for new pci function op
arch/arm64/boot/dts/qcom/x1e80100.dtsi | 8 ++++
drivers/pci/controller/dwc/pcie-designware-host.c | 21 +++++++++++
drivers/pci/controller/dwc/pcie-designware.c | 14 ++++++-
drivers/pci/controller/dwc/pcie-designware.h | 1 +
drivers/pci/of.c | 45 +++++++++++++++++++++++
drivers/pci/pci.h | 17 ++++++++-
6 files changed, 103 insertions(+), 3 deletions(-)
---
base-commit: 87d6aab2389e5ce0197d8257d5f8ee965a67c4cd
change-id: 20241212-preset_v2-549b7acda9b7
Best regards,
--
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties
2024-12-12 10:32 [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
@ 2024-12-12 10:32 ` Krishna Chaitanya Chundru
2024-12-12 12:25 ` Krzysztof Kozlowski
2024-12-12 10:32 ` [PATCH v2 2/4] PCI: of: Add API to retrieve equalization presets from device tree Krishna Chaitanya Chundru
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Krishna Chaitanya Chundru @ 2024-12-12 10:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas,
Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna Chaitanya Chundru, Krishna chaitanya chundru
From: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Add PCIe lane equalization preset properties for 8 GT/s and 16 GT/s data
rates used in lane equalization procedure.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/x1e80100.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index a36076e3c56b..6a2074297030 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -2993,6 +2993,10 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
phys = <&pcie6a_phy>;
phy-names = "pciephy";
+ eq-presets-8gts = /bits/ 16 <0x5555 0x5555>;
+
+ eq-presets-16gts = /bits/ 8 <0x55 0x55>;
+
status = "disabled";
};
@@ -3115,6 +3119,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
phys = <&pcie5_phy>;
phy-names = "pciephy";
+ eq-presets-8gts = /bits/ 16 <0x5555 0x5555>;
+
status = "disabled";
};
@@ -3235,6 +3241,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
phys = <&pcie4_phy>;
phy-names = "pciephy";
+ eq-presets-8gts = /bits/ 16 <0x5555 0x5555>;
+
status = "disabled";
pcie4_port0: pcie@0 {
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/4] PCI: of: Add API to retrieve equalization presets from device tree
2024-12-12 10:32 [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties Krishna Chaitanya Chundru
@ 2024-12-12 10:32 ` Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 3/4] PCI: dwc: Improve handling of PCIe lane configuration Krishna Chaitanya Chundru
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Krishna Chaitanya Chundru @ 2024-12-12 10:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas,
Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna Chaitanya Chundru, Krishna chaitanya chundru
From: Krishna chaitanya chundru <quic_krichai@quicinc.com>
PCIe equalization presets are predefined settings used to optimize
signal integrity by compensating for signal loss and distortion in
high-speed data transmission.
As per PCIe spec 6.0.1 revision section 8.3.3.3 & 4.2.4 for data rates
of 8.0 GT/s, 16.0 GT/s, 32.0 GT/s, and 64.0 GT/s, there is a way to
configure lane equalization presets for each lane to enhance the PCIe
link reliability. Each preset value represents a different combination
of pre-shoot and de-emphasis values. For each data rate, different
registers are defined: for 8.0 GT/s, registers are defined in section
7.7.3.4; for 16.0 GT/s, in section 7.7.5.9, etc. The 8.0 GT/s rate has
an extra receiver preset hint, requiring 16 bits per lane, while the
remaining data rates use 8 bits per lane.
Based on the number of lanes and the supported data rate, this function
reads the device tree property and stores in the presets structure.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
drivers/pci/of.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
drivers/pci/pci.h | 17 +++++++++++++++--
2 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index dacea3fc5128..99e0e7ae12e9 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -826,3 +826,48 @@ u32 of_pci_get_slot_power_limit(struct device_node *node,
return slot_power_limit_mw;
}
EXPORT_SYMBOL_GPL(of_pci_get_slot_power_limit);
+
+int of_pci_get_equalization_presets(struct device *dev,
+ struct pci_eq_presets *presets,
+ int num_lanes)
+{
+ char name[20];
+ void **preset;
+ void *temp;
+ int ret;
+
+ if (of_property_present(dev->of_node, "eq-presets-8gts")) {
+ presets->eq_presets_8gts = devm_kzalloc(dev, sizeof(u16) * num_lanes, GFP_KERNEL);
+ if (!presets->eq_presets_8gts)
+ return -ENOMEM;
+
+ ret = of_property_read_u16_array(dev->of_node, "eq-presets-8gts",
+ presets->eq_presets_8gts, num_lanes);
+ if (ret) {
+ dev_err(dev, "Error reading eq-presets-8gts %d\n", ret);
+ return ret;
+ }
+ }
+
+ for (int i = 1; i < sizeof(struct pci_eq_presets) / sizeof(void *); i++) {
+ snprintf(name, sizeof(name), "eq-presets-%dgts", 8 << i);
+ if (of_property_present(dev->of_node, name)) {
+ temp = devm_kzalloc(dev, sizeof(u8) * num_lanes, GFP_KERNEL);
+ if (!temp)
+ return -ENOMEM;
+
+ ret = of_property_read_u8_array(dev->of_node, name,
+ temp, num_lanes);
+ if (ret) {
+ dev_err(dev, "Error %s %d\n", name, ret);
+ return ret;
+ }
+
+ preset = (void **)((u8 *)presets + i * sizeof(void *));
+ *preset = temp;
+ }
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(of_pci_get_equalization_presets);
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 14d00ce45bfa..82362d58bedc 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -731,7 +731,12 @@ static inline u64 pci_rebar_size_to_bytes(int size)
}
struct device_node;
-
+struct pci_eq_presets {
+ void *eq_presets_8gts;
+ void *eq_presets_16gts;
+ void *eq_presets_32gts;
+ void *eq_presets_64gts;
+};
#ifdef CONFIG_OF
int of_pci_parse_bus_range(struct device_node *node, struct resource *res);
int of_get_pci_domain_nr(struct device_node *node);
@@ -746,7 +751,9 @@ void pci_set_bus_of_node(struct pci_bus *bus);
void pci_release_bus_of_node(struct pci_bus *bus);
int devm_of_pci_bridge_init(struct device *dev, struct pci_host_bridge *bridge);
-
+int of_pci_get_equalization_presets(struct device *dev,
+ struct pci_eq_presets *presets,
+ int num_lanes);
#else
static inline int
of_pci_parse_bus_range(struct device_node *node, struct resource *res)
@@ -793,6 +800,12 @@ static inline int devm_of_pci_bridge_init(struct device *dev, struct pci_host_br
return 0;
}
+static inline int of_pci_get_equalization_presets(struct device *dev,
+ struct pci_eq_presets *presets,
+ int num_lanes)
+{
+ return 0;
+}
#endif /* CONFIG_OF */
struct of_changeset;
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/4] PCI: dwc: Improve handling of PCIe lane configuration
2024-12-12 10:32 [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 2/4] PCI: of: Add API to retrieve equalization presets from device tree Krishna Chaitanya Chundru
@ 2024-12-12 10:32 ` Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 4/4] PCI: dwc: Add support for new pci function op Krishna Chaitanya Chundru
2024-12-12 10:40 ` [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
4 siblings, 0 replies; 10+ messages in thread
From: Krishna Chaitanya Chundru @ 2024-12-12 10:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas,
Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna Chaitanya Chundru, Krishna chaitanya chundru
From: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Currently even if the number of lanes hardware supports is equal to
the number lanes provided in the devicetree, the driver is trying to
configure again the maximum number of lanes which is not needed.
Update number of lanes only when it is not equal to hardware capability.
And also if the num-lanes property is not present in the devicetree
update the num_lanes with the maximum hardware supports.
Introduce dw_pcie_link_get_max_link_width() to get the maximum lane
width the hardware supports.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
drivers/pci/controller/dwc/pcie-designware-host.c | 3 +++
drivers/pci/controller/dwc/pcie-designware.c | 14 +++++++++++++-
drivers/pci/controller/dwc/pcie-designware.h | 1 +
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 3e41865c7290..2cd0acbf9e18 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -504,6 +504,9 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
dw_pcie_iatu_detect(pci);
+ if (pci->num_lanes < 1)
+ pci->num_lanes = dw_pcie_link_get_max_link_width(pci);
+
/*
* Allocate the resource for MSG TLP before programming the iATU
* outbound window in dw_pcie_setup_rc(). Since the allocation depends
diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
index 6d6cbc8b5b2c..acb2a963ae1a 100644
--- a/drivers/pci/controller/dwc/pcie-designware.c
+++ b/drivers/pci/controller/dwc/pcie-designware.c
@@ -736,6 +736,16 @@ static void dw_pcie_link_set_max_speed(struct dw_pcie *pci)
}
+int dw_pcie_link_get_max_link_width(struct dw_pcie *pci)
+{
+ u32 lnkcap;
+ u8 cap;
+
+ cap = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
+ lnkcap = dw_pcie_readl_dbi(pci, cap + PCI_EXP_LNKCAP);
+ return FIELD_GET(PCI_EXP_LNKCAP_MLW, lnkcap);
+}
+
static void dw_pcie_link_set_max_link_width(struct dw_pcie *pci, u32 num_lanes)
{
u32 lnkcap, lwsc, plc;
@@ -1069,6 +1079,7 @@ void dw_pcie_edma_remove(struct dw_pcie *pci)
void dw_pcie_setup(struct dw_pcie *pci)
{
+ int num_lanes = dw_pcie_link_get_max_link_width(pci);
u32 val;
dw_pcie_link_set_max_speed(pci);
@@ -1102,5 +1113,6 @@ void dw_pcie_setup(struct dw_pcie *pci)
val |= PORT_LINK_DLL_LINK_EN;
dw_pcie_writel_dbi(pci, PCIE_PORT_LINK_CONTROL, val);
- dw_pcie_link_set_max_link_width(pci, pci->num_lanes);
+ if (num_lanes != pci->num_lanes)
+ dw_pcie_link_set_max_link_width(pci, pci->num_lanes);
}
diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
index 347ab74ac35a..500e793c9361 100644
--- a/drivers/pci/controller/dwc/pcie-designware.h
+++ b/drivers/pci/controller/dwc/pcie-designware.h
@@ -486,6 +486,7 @@ void dw_pcie_write_dbi2(struct dw_pcie *pci, u32 reg, size_t size, u32 val);
int dw_pcie_link_up(struct dw_pcie *pci);
void dw_pcie_upconfig_setup(struct dw_pcie *pci);
int dw_pcie_wait_for_link(struct dw_pcie *pci);
+int dw_pcie_link_get_max_link_width(struct dw_pcie *pci);
int dw_pcie_prog_outbound_atu(struct dw_pcie *pci,
const struct dw_pcie_ob_atu_cfg *atu);
int dw_pcie_prog_inbound_atu(struct dw_pcie *pci, int index, int type,
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 4/4] PCI: dwc: Add support for new pci function op
2024-12-12 10:32 [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
` (2 preceding siblings ...)
2024-12-12 10:32 ` [PATCH v2 3/4] PCI: dwc: Improve handling of PCIe lane configuration Krishna Chaitanya Chundru
@ 2024-12-12 10:32 ` Krishna Chaitanya Chundru
2024-12-12 10:40 ` [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
4 siblings, 0 replies; 10+ messages in thread
From: Krishna Chaitanya Chundru @ 2024-12-12 10:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas,
Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna Chaitanya Chundru, Krishna chaitanya chundru
From: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Add the support for stop_link() & start_link() function op.
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
---
drivers/pci/controller/dwc/pcie-designware-host.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 2cd0acbf9e18..5f017b7ab932 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -694,10 +694,28 @@ void __iomem *dw_pcie_own_conf_map_bus(struct pci_bus *bus, unsigned int devfn,
}
EXPORT_SYMBOL_GPL(dw_pcie_own_conf_map_bus);
+static int dw_pcie_host_start_link(struct pci_bus *bus)
+{
+ struct dw_pcie_rp *pp = bus->sysdata;
+ struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
+
+ return dw_pcie_start_link(pci);
+}
+
+static void dw_pcie_host_stop_link(struct pci_bus *bus)
+{
+ struct dw_pcie_rp *pp = bus->sysdata;
+ struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
+
+ dw_pcie_stop_link(pci);
+}
+
static struct pci_ops dw_pcie_ops = {
.map_bus = dw_pcie_own_conf_map_bus,
.read = pci_generic_config_read,
.write = pci_generic_config_write,
+ .start_link = dw_pcie_host_start_link,
+ .stop_link = dw_pcie_host_stop_link,
};
static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp)
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets
2024-12-12 10:32 [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
` (3 preceding siblings ...)
2024-12-12 10:32 ` [PATCH v2 4/4] PCI: dwc: Add support for new pci function op Krishna Chaitanya Chundru
@ 2024-12-12 10:40 ` Krishna Chaitanya Chundru
2024-12-12 12:26 ` Krzysztof Kozlowski
4 siblings, 1 reply; 10+ messages in thread
From: Krishna Chaitanya Chundru @ 2024-12-12 10:40 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas,
Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna chaitanya chundru
Please ignore this series it has wrong patches I will send new series to
fix this.
- Krishna Chaitanya.
On 12/12/2024 4:02 PM, Krishna Chaitanya Chundru wrote:
> PCIe equalization presets are predefined settings used to optimize
> signal integrity by compensating for signal loss and distortion in
> high-speed data transmission.
>
> As per PCIe spec 6.0.1 revision section 8.3.3.3 & 4.2.4 for data rates
> of 8.0 GT/s, 16.0 GT/s, 32.0 GT/s, and 64.0 GT/s, there is a way to
> configure lane equalization presets for each lane to enhance the PCIe
> link reliability. Each preset value represents a different combination
> of pre-shoot and de-emphasis values. For each data rate, different
> registers are defined: for 8.0 GT/s, registers are defined in section
> 7.7.3.4; for 16.0 GT/s, in section 7.7.5.9, etc. The 8.0 GT/s rate has
> an extra receiver preset hint, requiring 16 bits per lane, while the
> remaining data rates use 8 bits per lane.
>
> Based on the number of lanes and the supported data rate, read the
> device tree property and stores in the presets structure.
>
> Based upon the lane width and supported data rate update lane
> equalization registers.
>
> This patch depends on the this dt binding pull request: https://github.com/devicetree-org/dt-schema/pull/146
>
> Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
> ---
> Changes in v2:
> - Fix the kernel test robot error
> - As suggested by konrad use for loop and read "eq-presets-%ugts", (8 << i)
> - Link to v1: https://lore.kernel.org/r/20241116-presets-v1-0-878a837a4fee@quicinc.com
>
> ---
> Krishna chaitanya chundru (4):
> arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties
> PCI: of: Add API to retrieve equalization presets from device tree
> PCI: dwc: Improve handling of PCIe lane configuration
> PCI: dwc: Add support for new pci function op
>
> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 8 ++++
> drivers/pci/controller/dwc/pcie-designware-host.c | 21 +++++++++++
> drivers/pci/controller/dwc/pcie-designware.c | 14 ++++++-
> drivers/pci/controller/dwc/pcie-designware.h | 1 +
> drivers/pci/of.c | 45 +++++++++++++++++++++++
> drivers/pci/pci.h | 17 ++++++++-
> 6 files changed, 103 insertions(+), 3 deletions(-)
> ---
> base-commit: 87d6aab2389e5ce0197d8257d5f8ee965a67c4cd
> change-id: 20241212-preset_v2-549b7acda9b7
>
> Best regards,
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties
2024-12-12 10:32 ` [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties Krishna Chaitanya Chundru
@ 2024-12-12 12:25 ` Krzysztof Kozlowski
2024-12-12 12:32 ` Krishna Chaitanya Chundru
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-12 12:25 UTC (permalink / raw)
To: Krishna Chaitanya Chundru, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Helgaas, Jingoo Han, Manivannan Sadhasivam,
Lorenzo Pieralisi, Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna chaitanya chundru
On 12/12/2024 11:32, Krishna Chaitanya Chundru wrote:
> From: Krishna chaitanya chundru <quic_krichai@quicinc.com>
>
> Add PCIe lane equalization preset properties for 8 GT/s and 16 GT/s data
> rates used in lane equalization procedure.
>
> Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
> index a36076e3c56b..6a2074297030 100644
> --- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
> +++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
> @@ -2993,6 +2993,10 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
> phys = <&pcie6a_phy>;
> phy-names = "pciephy";
>
> + eq-presets-8gts = /bits/ 16 <0x5555 0x5555>;
> +
> + eq-presets-16gts = /bits/ 8 <0x55 0x55>;
NAK for two reasons (stated many times during review):
1. There is no way driver code can depend on DTS, unless you fix
something serious but nothing is explained about that serious fix in
commit msg.
2. There are no such properties. It does not look like you tested the
DTS against bindings. Please run `make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets
2024-12-12 10:40 ` [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
@ 2024-12-12 12:26 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-12 12:26 UTC (permalink / raw)
To: Krishna Chaitanya Chundru, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Helgaas, Jingoo Han, Manivannan Sadhasivam,
Lorenzo Pieralisi, Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio,
Krishna chaitanya chundru
On 12/12/2024 11:40, Krishna Chaitanya Chundru wrote:
> Please ignore this series it has wrong patches I will send new series to
> fix this.
You got feedback already.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties
2024-12-12 12:25 ` Krzysztof Kozlowski
@ 2024-12-12 12:32 ` Krishna Chaitanya Chundru
2024-12-12 12:37 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Krishna Chaitanya Chundru @ 2024-12-12 12:32 UTC (permalink / raw)
To: Krzysztof Kozlowski, Krishna Chaitanya Chundru, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas, Jingoo Han,
Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio
On 12/12/2024 5:55 PM, Krzysztof Kozlowski wrote:
> On 12/12/2024 11:32, Krishna Chaitanya Chundru wrote:
>> From: Krishna chaitanya chundru <quic_krichai@quicinc.com>
>>
>> Add PCIe lane equalization preset properties for 8 GT/s and 16 GT/s data
>> rates used in lane equalization procedure.
>>
>> Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
>> ---
>> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
>> index a36076e3c56b..6a2074297030 100644
>> --- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
>> @@ -2993,6 +2993,10 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>> phys = <&pcie6a_phy>;
>> phy-names = "pciephy";
>>
>> + eq-presets-8gts = /bits/ 16 <0x5555 0x5555>;
>> +
>> + eq-presets-16gts = /bits/ 8 <0x55 0x55>;
> NAK for two reasons (stated many times during review):
> 1. There is no way driver code can depend on DTS, unless you fix
> something serious but nothing is explained about that serious fix in
> commit msg.
>
Please ignore this series as the main patch was missing in this series,
I will resend this after adding missing patch shortly, currently facing
issues with git config on my system. If you look in to v1 patch there is
driver patch which is missing in this series. I will fix it next series.
> 2. There are no such properties. It does not look like you tested the
> DTS against bindings. Please run `make dtbs_check W=1` (see
> Documentation/devicetree/bindings/writing-schema.rst or
> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
> for instructions).
The property is added recently in to the dtschema in github repo, I
added the pull request details in the cover letter, I will add the
github link as part of the comment section for this patch in next
series.
- Krishna Chaitanya
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties
2024-12-12 12:32 ` Krishna Chaitanya Chundru
@ 2024-12-12 12:37 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-12 12:37 UTC (permalink / raw)
To: Krishna Chaitanya Chundru, Krishna Chaitanya Chundru, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Helgaas, Jingoo Han,
Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński
Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, konrad.dybcio,
quic_mrana, quic_vbadigan, Bjorn Andersson, Konrad Dybcio
On 12/12/2024 13:32, Krishna Chaitanya Chundru wrote:
>> 2. There are no such properties. It does not look like you tested the
>> DTS against bindings. Please run `make dtbs_check W=1` (see
>> Documentation/devicetree/bindings/writing-schema.rst or
>> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
>> for instructions).
> The property is added recently in to the dtschema in github repo, I
> added the pull request details in the cover letter, I will add the
> github link as part of the comment section for this patch in next
> series.
>
Mention in the commit msg or cover letter where are the bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-12-12 12:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 10:32 [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 1/4] arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties Krishna Chaitanya Chundru
2024-12-12 12:25 ` Krzysztof Kozlowski
2024-12-12 12:32 ` Krishna Chaitanya Chundru
2024-12-12 12:37 ` Krzysztof Kozlowski
2024-12-12 10:32 ` [PATCH v2 2/4] PCI: of: Add API to retrieve equalization presets from device tree Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 3/4] PCI: dwc: Improve handling of PCIe lane configuration Krishna Chaitanya Chundru
2024-12-12 10:32 ` [PATCH v2 4/4] PCI: dwc: Add support for new pci function op Krishna Chaitanya Chundru
2024-12-12 10:40 ` [PATCH v2 0/4] PCI: dwc: Add support for configuring lane equalization presets Krishna Chaitanya Chundru
2024-12-12 12:26 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox