Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
To: "Konrad Dybcio" <konrad.dybcio@oss.qualcomm.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	cros-qcom-dts-watchers@chromium.org
Cc: linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	quic_vbadigan@quicinc.com, quic_mrana@quicinc.com
Subject: Re: [PATCH v3 2/3] PCI: qcom: Add support for multi-root port
Date: Wed, 23 Apr 2025 08:40:56 +0530	[thread overview]
Message-ID: <347a7348-664f-3636-604e-8dc6429691b9@oss.qualcomm.com> (raw)
In-Reply-To: <9be69535-08dd-4d60-b007-e9c50e706a58@oss.qualcomm.com>



On 4/23/2025 2:15 AM, Konrad Dybcio wrote:
> On 4/19/25 7:19 AM, Krishna Chaitanya Chundru wrote:
>> Move phy, perst handling to root port and provide a way to have multi-port
>> logic.
>>
>> Currently, qcom controllers only support single port, and all properties
>> are present in the controller node itself. This is incorrect, as
>> properties like phy, perst, wake, etc. can vary per port and should be
>> present in the root port node.
>>
>> To maintain DT backwards compatibility, fallback to the legacy method of
>> parsing the controller node if the port parsing fails.
>>
>> pci-bus-common.yaml uses reset-gpios property for representing PERST, use
>> same property instead of perst-gpios.
>>
>> Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
>> ---
> 
> [...]
> 
>> -static void qcom_ep_reset_assert(struct qcom_pcie *pcie)
>> +static void qcom_perst_assert_deassert(struct qcom_pcie *pcie, bool assert)
>>   {
>> -	gpiod_set_value_cansleep(pcie->reset, 1);
>> +	struct qcom_pcie_port *port, *tmp;
>> +	int val = assert ? 1 : 0;
> 
> assert is already a boolean - are some checkers complaining?
Ack, I will remove this in next patch.
> 
> [...]
> 
>> +	/*
>> +	 * In the case of failure in parsing the port nodes, fallback to the
>> +	 * legacy method of parsing the controller node. This is to maintain DT
>> +	 * backwards compatibility.
> 
> It'd be simpler to call qcom_pcie_parse_port on the PCIe controller's
> OF node, removing the need for the if-else-s throughout the patch
> 
There is difference in perst property name for controller's OF node and
the root port OF node. controller use perst-gpios, where as the root
port node uses the pci-bus-common.yaml defined way of perst i.e
reset-gpios.

It's better to have this way then having if else condition in the
qcom_pcie_parse_port.

- Krishna Chaitanya.
> Konrad
> 
> 

  reply	other threads:[~2025-04-23  3:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-19  5:19 [PATCH v3 0/3] PCI: qcom: Move PERST# GPIO & phy retrieval from controller to PCIe bridge node Krishna Chaitanya Chundru
2025-04-19  5:19 ` [PATCH v3 1/3] dt-bindings: PCI: qcom: Move phy, wake & reset gpio's to root port Krishna Chaitanya Chundru
2025-04-23 15:38   ` Rob Herring (Arm)
2025-06-01  5:14   ` Manivannan Sadhasivam
2025-04-19  5:19 ` [PATCH v3 2/3] PCI: qcom: Add support for multi-root port Krishna Chaitanya Chundru
2025-04-22 20:45   ` Konrad Dybcio
2025-04-23  3:10     ` Krishna Chaitanya Chundru [this message]
2025-06-01  7:02   ` Manivannan Sadhasivam
2025-04-19  5:19 ` [PATCH v3 3/3] arm64: qcom: sc7280: Move phy, perst to root port node Krishna Chaitanya Chundru
2025-04-23 15:37   ` Rob Herring
2025-05-08 14:26     ` Konrad Dybcio
2025-06-02 13:01       ` Krzysztof Kozlowski
2025-06-10 13:15         ` Konrad Dybcio
2025-06-11  6:36           ` Krzysztof Kozlowski
2025-06-11 15:17             ` Konrad Dybcio
2025-06-11 15:33               ` Krzysztof Kozlowski
2025-06-01  7:05   ` Manivannan Sadhasivam
2025-06-03  6:33     ` Krishna Chaitanya Chundru
2025-06-03  6:52       ` Manivannan Sadhasivam
2025-06-03  7:35         ` Krishna Chaitanya Chundru
2025-06-03  8:07           ` Manivannan Sadhasivam
2025-06-01  7:09 ` [PATCH v3 0/3] PCI: qcom: Move PERST# GPIO & phy retrieval from controller to PCIe bridge node Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=347a7348-664f-3636-604e-8dc6429691b9@oss.qualcomm.com \
    --to=krishna.chundru@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=quic_mrana@quicinc.com \
    --cc=quic_vbadigan@quicinc.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox