devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] PCI: Enable Power and configure the QPS615 PCIe switch
@ 2024-11-12 15:01 Krishna chaitanya chundru
  2024-11-12 15:01 ` [PATCH v3 1/6] dt-bindings: PCI: Add binding for qps615 Krishna chaitanya chundru
                   ` (5 more replies)
  0 siblings, 6 replies; 60+ messages in thread
From: Krishna chaitanya chundru @ 2024-11-12 15:01 UTC (permalink / raw)
  To: andersson, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	cros-qcom-dts-watchers, Jingoo Han, Bartosz Golaszewski
  Cc: quic_vbadigan, linux-arm-msm, linux-pci, devicetree, linux-kernel,
	Krishna chaitanya chundru

QPS615 is the PCIe switch which has one upstream and three downstream
ports. To one of the downstream ports ethernet MAC is connected as endpoint
device. Other two downstream ports are supposed to connect to external
device. One Host can connect to QPS615 by upstream port.

QPS615 switch power is controlled by the GPIO's. After powering on
the switch will immediately participate in the link training. if the
host is also ready by that time PCIe link will established. 

The QPS615 needs to configured certain parameters like de-emphasis,
disable unused port etc before link is established.

As the controller starts link training before the probe of pwrctl driver,
the PCIe link may come up as soon as we power on the switch. Due to this
configuring the switch itself through i2c will not have any effect as
this configuration needs to done before link training. To avoid this
introduce two functions in pci_ops to start_link() & stop_link() which
will disable the link training if the PCIe link is not up yet.

Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
---
Changes in v2:
- As per offline discussions with rob i2c-parent is best suitable to
  use i2c client device. So use i2c-parent as suggested and remove i2c
  client node reference from the dt-bindings & devicetree.
- Remove "PCI: Change the parent to correctly represent pcie hierarchy"
  as this requires seperate discussions.
- Remove bdf logic to identify the dsp's and usp's to make it generic
  by using the logic that downstream devices will always child of
  upstream node and dsp1, dsp2 will always in same order (dmitry)
- Remove recursive function for parsing devicetree instead parse
  only for required devicetree nodes (dmitry)
- Fix the issue in be & le conversion (dmitry).
- Call put_device for i2c device once done with the usage (dmitry)
- Use $defs to describe common properties between upstream port and
  downstream properties. and remove unneccessary if then. (Krzysztof)
- Place the qcom,qps615 compatibility in dt-binding document in alphabatic order (Krzysztof)
- Rename qcom,no-dfe to describe it as hardware capability and change
  qcom,nfts description to reflect hardware details (Krzysztof)
- Fix the indentation in the example in dt binding (dmitry)
- Add more description to qcom,nfts (dmitry)
- Remove nanosec from the property description (dmitry)
- Link to v2: https://lore.kernel.org/r/linux-arm-msm/20240803-qps615-v2-0-9560b7c71369@quicinc.com/T/
Changes in v1:
- Instead of referencing whole i2c-bus add i2c-client node and reference it (Dmitry)
- Change the regulator's as per the schematics as per offline review
(bjorn Andresson)
- Remove additional host check in bus.c (Bart)
- For stop_link op change return type from int to void (Bart)
- Remove firmware based approach for configuring sequence as suggested
by multiple reviewers.
- Introduce new dt-properties for the switch to configure the switch
as we are replacing the firmware based approach.
- The downstream ports add properties in the child nodes which will
represented in PCIe hierarchy format.
- Removed D3cold D0 sequence in suspend resume for now as it needs
separate discussion.
- Link to v1: https://lore.kernel.org/linux-pci/20240626-qps615-v1-4-2ade7bd91e02@quicinc.com/T/

---
Krishna chaitanya chundru (6):
      dt-bindings: PCI: Add binding for qps615
      arm64: dts: qcom: qcs6490-rb3gen2: Add node for qps615
      PCI: Add new start_link() & stop_link function ops
      PCI: dwc: Add support for new pci function op
      PCI: qcom: Add support for host_stop_link() & host_start_link()
      PCI: pwrctl: Add power control driver for qps615

 .../devicetree/bindings/pci/qcom,qps615.yaml       | 205 +++++++
 arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts       | 115 ++++
 arch/arm64/boot/dts/qcom/sc7280.dtsi               |   2 +-
 drivers/pci/controller/dwc/pcie-designware-host.c  |  18 +
 drivers/pci/controller/dwc/pcie-designware.h       |  16 +
 drivers/pci/controller/dwc/pcie-qcom.c             |  39 ++
 drivers/pci/pwrctl/Kconfig                         |   8 +
 drivers/pci/pwrctl/Makefile                        |   1 +
 drivers/pci/pwrctl/pci-pwrctl-qps615.c             | 630 +++++++++++++++++++++
 include/linux/pci.h                                |   2 +
 10 files changed, 1035 insertions(+), 1 deletion(-)
---
base-commit: ae43de0875223d271eb6004cfb08be697520f55c
change-id: 20241022-qps615_pwr-8d3837f61aec

Best regards,
-- 
Krishna chaitanya chundru <quic_krichai@quicinc.com>


^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2025-02-10 10:13 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 15:01 [PATCH v3 0/6] PCI: Enable Power and configure the QPS615 PCIe switch Krishna chaitanya chundru
2024-11-12 15:01 ` [PATCH v3 1/6] dt-bindings: PCI: Add binding for qps615 Krishna chaitanya chundru
2024-11-12 15:49   ` Bjorn Andersson
2024-11-15 16:18   ` Rob Herring
2024-11-24  1:32     ` Krishna Chaitanya Chundru
2024-12-04  8:49       ` Krishna Chaitanya Chundru
2024-12-23 16:45         ` Krishna Chaitanya Chundru
2025-02-10  7:51         ` Manivannan Sadhasivam
2025-02-10  9:37           ` Krishna Chaitanya Chundru
2024-12-23 18:57       ` Dmitry Baryshkov
2024-12-24  6:04         ` Krishna Chaitanya Chundru
2024-12-24  6:54           ` Dmitry Baryshkov
2024-12-24  9:09             ` Krishna Chaitanya Chundru
2024-12-24  9:47               ` Dmitry Baryshkov
2024-12-27  2:14         ` Krishna Chaitanya Chundru
2024-12-30 18:30           ` Dmitry Baryshkov
2024-12-30 18:22         ` Manivannan Sadhasivam
2025-01-07 14:28           ` Krishna Chaitanya Chundru
2025-02-10  7:58             ` Manivannan Sadhasivam
2025-02-10 10:13               ` Krishna Chaitanya Chundru
2024-11-20  8:04   ` Krzysztof Kozlowski
2024-11-24  1:41     ` Krishna Chaitanya Chundru
2024-11-25  7:40       ` Krzysztof Kozlowski
2024-11-26  6:50         ` Krishna Chaitanya Chundru
2024-11-26  6:58           ` Krzysztof Kozlowski
2024-11-28 13:24             ` Manivannan Sadhasivam
2024-11-28 14:08               ` Dmitry Baryshkov
2024-12-03  9:06                 ` Krishna Chaitanya Chundru
2024-12-04 21:25   ` Bjorn Helgaas
2024-12-11  6:00     ` Manivannan Sadhasivam
2024-12-23 16:48       ` Krishna Chaitanya Chundru
2024-12-23 18:58         ` Dmitry Baryshkov
2024-12-24  9:11     ` Krishna Chaitanya Chundru
2024-12-24  9:49       ` Dmitry Baryshkov
2025-01-07 22:42         ` Bjorn Helgaas
2025-01-15 17:23           ` Manivannan Sadhasivam
2024-11-12 15:01 ` [PATCH v3 2/6] arm64: dts: qcom: qcs6490-rb3gen2: Add node " Krishna chaitanya chundru
2024-11-12 15:49   ` Bjorn Andersson
2024-11-15 11:45   ` Manivannan Sadhasivam
2024-11-20  8:06   ` Krzysztof Kozlowski
2024-11-20 11:03     ` Dmitry Baryshkov
2024-11-20 13:28       ` Krzysztof Kozlowski
2024-11-21 22:44         ` Dmitry Baryshkov
2024-11-12 15:01 ` [PATCH v3 3/6] PCI: Add new start_link() & stop_link function ops Krishna chaitanya chundru
2024-11-12 23:41   ` Bjorn Helgaas
2024-11-13  8:41     ` Krishna Chaitanya Chundru
2024-11-15 11:51     ` Manivannan Sadhasivam
2024-11-12 15:01 ` [PATCH v3 4/6] PCI: dwc: Add support for new pci function op Krishna chaitanya chundru
2024-11-12 23:32   ` Bjorn Helgaas
2024-11-12 15:01 ` [PATCH v3 5/6] PCI: qcom: Add support for host_stop_link() & host_start_link() Krishna chaitanya chundru
2024-11-12 23:36   ` Bjorn Helgaas
2024-11-15 11:57   ` Manivannan Sadhasivam
2024-11-24  1:44     ` Krishna Chaitanya Chundru
2024-11-12 15:01 ` [PATCH v3 6/6] PCI: pwrctl: Add power control driver for qps615 Krishna chaitanya chundru
2024-11-12 15:51   ` Bjorn Andersson
2024-11-12 23:21     ` Bjorn Andersson
2024-11-13 13:38   ` Bartosz Golaszewski
2024-11-15 12:25   ` Manivannan Sadhasivam
2024-11-20 14:59   ` Uwe Kleine-König
2024-12-04 21:19   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).