From: mr.nuke.me@gmail.com
To: Lei Wei <quic_leiwei@quicinc.com>,
"Russell King (Oracle)" <linux@armlinux.org.uk>,
Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
quic_kkumarcs@quicinc.com, quic_suruchia@quicinc.com,
quic_pavir@quicinc.com, quic_linchen@quicinc.com,
quic_luoj@quicinc.com, srinivas.kandagatla@linaro.org,
bartosz.golaszewski@linaro.org, vsmuthu@qti.qualcomm.com,
john@phrozen.org,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH net-next v5 0/5] Add PCS support for Qualcomm IPQ9574 SoC
Date: Thu, 15 May 2025 20:40:33 -0500 [thread overview]
Message-ID: <be7f0fda-ac21-4f94-a6cf-b4c3ca59630a@gmail.com> (raw)
In-Reply-To: <df2fa427-00d9-4d74-adec-c81feda69df5@quicinc.com>
On 5/15/25 10:27 AM, Lei Wei wrote:
>
>
> On 5/15/2025 10:32 AM, Alex G. wrote:
>> On 5/14/25 11:03, Lei Wei wrote:> On 5/13/2025 6:56 AM,
>> mr.nuke.me@gmail.com wrote:
>>>> On 2/19/25 4:46 AM, Lei Wei wrote:
>>>>
>>>> I tried this PCS driver, and I am seeing a circular dependency in
>>>> the clock init. If the clock tree is:
>>>> GCC -> NSSCC -> PCS(uniphy) -> NSSCC -> PCS(mii)
>>>>
>>>> The way I understand it, the UNIPHY probe depends on the MII probe.
>>>> If MII .probe() returns -EPROBE_DEFER, then so will the
>>>> UNIPHY .probe(). But the MII cannot probe until the UNIPHY is done,
>>>> due to the clock dependency. How is it supposed to work?
>>>>
>>>> The way I found to resolve this is to move the probing of the MII
>>>> clocks to ipq_pcs_get().
>>>>
>>>> This is the kernel log that I see:
>>>>
>>>> [ 12.008754] platform 39b00000.clock-controller: deferred probe
>>>> pending: platform: supplier 7a00000.ethernet-pcs not ready
>>>> [ 12.008788] mdio_bus 90000.mdio-1:18: deferred probe pending:
>>>> mdio_bus: supplier 7a20000.ethernet-pcs not ready
>>>> [ 12.018704] mdio_bus 90000.mdio-1:00: deferred probe pending:
>>>> mdio_bus: supplier 90000.mdio-1:18 not ready
>>>> [ 12.028588] mdio_bus 90000.mdio-1:01: deferred probe pending:
>>>> mdio_bus: supplier 90000.mdio-1:18 not ready
>>>> [ 12.038310] mdio_bus 90000.mdio-1:02: deferred probe pending:
>>>> mdio_bus: supplier 90000.mdio-1:18 not ready
>>>> [ 12.047943] mdio_bus 90000.mdio-1:03: deferred probe pending:
>>>> mdio_bus: supplier 90000.mdio-1:18 not ready
>>>> [ 12.057579] platform 7a00000.ethernet-pcs: deferred probe
>>>> pending: ipq9574_pcs: Failed to get MII 0 RX clock
>>>> [ 12.067209] platform 7a20000.ethernet-pcs: deferred probe
>>>> pending: ipq9574_pcs: Failed to get MII 0 RX clock
>>>> [ 12.077200] platform 3a000000.qcom-ppe: deferred probe pending:
>>>> platform: supplier 39b00000.clock-controller not ready
>>>>
>>>>
>>>
>>> Hello, thanks for bringing this to our notice. Let me try to
>>> understand the reason for the probe failure:
>>>
>>> The merged NSSCC DTS does not reference the PCS node directly in the
>>> "clocks" property. It uses a placeholder phandle '<0>' for the
>>> reference. Please see below patch which is merged.
>>> https://lore.kernel.org/all/20250313110359.242491-6-
>>> quic_mmanikan@quicinc.com/
>>>
>>> Ideally there should be no direct dependency from NSSCC to PCS driver if
>>> we use this version of the NSSCC DTS.
>>>
>>> Hence it seems that you may have a modified patch here, and DTS
>>> changes have been applied to enable all the Ethernet components
>>> including PCS and NSSCC, and NSSCC modified to have a direct
>>> reference to PCS? However even in this case, I think the driver probe
>>> should work if the drivers are built as modules. Can you please
>>> confirm if the NSSCC and PCS drivers are built-in to the kernel and
>>> not built as modules
>>
>> The NSSCC and PCS built-in. I also added the uniphy PCS clocks to the
>> NSSCC in order to expose the issue.
>>
>> I have a heavily patched tree with PPE driver and EDMA support. That's
>> the final use case in order to support ethernet, right?
>>
>
> Yes, all the drivers are eventually for enabling the Ethernet function
> on IPQ9574.
>
>>
>>> For the case where the drivers are built-in to kernel, and the NSSCC DTS
>>> node has a direct reference to PCS node, we can use the below solution:
>>> [Note that the 'UNIPHY' PCS clocks are not needed for NSSCC clocks
>>> initialization/registration.]
>>>
>>> Enable 'post-init-providers' property in the NSSCC DTS node to mark
>>> 'UNIPHY' PCS as post-initialization providers to NSSCC. This will
>>> ensure following probe order by the kernel:
>>>
>>> 1.) NSSCC driver
>>> 2.) PCS driver.
>>>
>>> Please let me know if the above suggestion can help.
>>
>> I see. Adding the 'post-init-providers' property does fix the circular
>> dependency. Thank you!
>>
>> I have another question. Do you have a public repository with the
>> unmerged IPQ9574 patches, including, PCS, PPE, EDMA, QCA8084 ?
>>
>
> May I know the source of your PPE/EDMA changes using which this issue
> is seen?
I use a mix of upstream submissions, and openwrt patches. As noted,
using 'post-init-providers' takes care of the problem.
https://github.com/mrnuke/linux/commits/ipq95xx-devel-20250515/
>
> The openwrt repository contains the unmerged IPQ9574 patches, Although
> this version will be updated very soon with latest code(with some
> fixes), the version of the code in the repo currently is also functional
> and tested.
>
> https://github.com/CodeLinaro/openwrt/tree/main/target/linux/qualcommbe/
> patches-6.6
Will you be updating a clock example with IPQ9574 + QCA8084 to the repo?
Alex
>>
>>> Later once the IPQ PCS driver is merged, we are planning to push the
>>> PCS DTS changes, along with an update of the NSSCC DTS to point to
>>> the PCS node and mark the "post-init-providers" property. This should
>>> work for all cases.
>>>
>>> Also, in my view, it is not suitable to move PCS MII clocks get to
>>> "ipq_pcs_get()" because the natural loading order for the drivers
>>> is as below:
>>>
>>> 1) NSSCC driver
>>> 2) PCS driver
>>> 3) Ethernet driver.
>>>
>>> Additionally, the community is currently working on an infrastructure to
>>> provide a common pcs get method. (Christian and Sean Anderson has
>>> been working on this). Therefore, I expect "ipq_pcs_get" to be
>>> dropped in the future and replaced with the common pcs get method
>>> once this common infra is merged.
>>
>> That makes sense. Thank you for clarifying.
>
next prev parent reply other threads:[~2025-05-16 1:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 15:53 [PATCH net-next v5 0/5] Add PCS support for Qualcomm IPQ9574 SoC Lei Wei
2025-02-07 15:53 ` [PATCH net-next v5 1/5] dt-bindings: net: pcs: Add Ethernet PCS " Lei Wei
2025-02-07 15:53 ` [PATCH net-next v5 2/5] net: pcs: Add PCS driver " Lei Wei
2025-02-07 15:53 ` [PATCH net-next v5 3/5] net: pcs: qcom-ipq9574: Add PCS instantiation and phylink operations Lei Wei
2025-02-07 15:53 ` [PATCH net-next v5 4/5] net: pcs: qcom-ipq9574: Add USXGMII interface mode support Lei Wei
2025-02-07 15:53 ` [PATCH net-next v5 5/5] MAINTAINERS: Add maintainer for Qualcomm IPQ9574 PCS driver Lei Wei
2025-02-12 3:59 ` [PATCH net-next v5 0/5] Add PCS support for Qualcomm IPQ9574 SoC Jakub Kicinski
2025-02-12 10:19 ` Russell King (Oracle)
2025-02-19 10:46 ` Lei Wei
2025-02-28 12:05 ` Lei Wei
2025-02-28 14:22 ` Russell King (Oracle)
2025-03-06 9:12 ` Lei Wei
2025-03-17 15:11 ` Lei Wei
2025-05-12 22:56 ` mr.nuke.me
2025-05-14 16:03 ` Lei Wei
2025-05-15 2:32 ` Alex G.
2025-05-15 15:27 ` Lei Wei
2025-05-16 1:40 ` mr.nuke.me [this message]
2025-05-16 11:18 ` Lei Wei
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=be7f0fda-ac21-4f94-a6cf-b4c3ca59630a@gmail.com \
--to=mr.nuke.me@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=bartosz.golaszewski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=john@phrozen.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_kkumarcs@quicinc.com \
--cc=quic_leiwei@quicinc.com \
--cc=quic_linchen@quicinc.com \
--cc=quic_luoj@quicinc.com \
--cc=quic_pavir@quicinc.com \
--cc=quic_suruchia@quicinc.com \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=vsmuthu@qti.qualcomm.com \
/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