public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Maxime Ripard <mripard@kernel.org>, Nishanth Menon <nm@ti.com>
Cc: Ravi Gunasekaran <r-gunasekaran@ti.com>,
	Simon Glass <sjg@chromium.org>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	Javier Martinez Canillas <javierm@redhat.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH 0/4] net: ti: am65-cpsw-nuss: Fix DT binding handling of pinctrl
Date: Thu, 20 Jul 2023 17:41:45 +0300	[thread overview]
Message-ID: <877e9b47-1f0a-765f-0344-148b2c1fb9ae@kernel.org> (raw)
In-Reply-To: <3vbx7cxv3gfqakbpe2uw2zreyvrbdxkxv73ve2s7zfwikk67to@rddhv4nxompj>



On 20/07/2023 17:12, Maxime Ripard wrote:
> Hi
> 
> Sorry, I didn't receive Roger mail so I'll reply here
> 
> On Thu, Jul 20, 2023 at 09:00:19AM -0500, Nishanth Menon wrote:
>> On 16:56-20230720, Roger Quadros wrote:
>>> Hi,
>>>
>>> On 20/07/2023 16:33, Ravi Gunasekaran wrote:
>>>>
>>>>
>>>> On 7/20/2023 3:25 PM, Maxime Ripard wrote:
>>>>> Hi,
>>>>>
>>>>> This series is based on:
>>>>> https://lore.kernel.org/all/20230713072019.3153871-1-nm@ti.com/
>>>>>
>>>>> It fixes the issue of Linux booting from the DT embedded by U-boot. The
>>>>> main issue there is that U-Boot doesn't handle the MDIO child node that
>>>>> might have resources attached to it.
>>>>>
>>>>> Thus, any pinctrl configuration that could be attached to the MDIO
>>>>> child node is effectively ignored. Unfortunately, starting with 6.5-rc1,
>>>>> Linux does just that.
>>>
>>> I didn't get this part. Linux does not ignore pinctrl configuration attached
>>> to MDIO child node. What changed in 6.5-rc1?
> 
> Linux doesn't ignore it, but Linux started putting pinctrl configuration
> on the MDIO node, which is ignored by U-Boot.

Linux always had MDIO pinctrl configuration in the MDIO node, way before 6.5-rc1.
Let's not mention 6.5-rc1 here as it gives an indication that something in 6.5-rc1
caused this issue. ;)

Earlier, u-boot didn't enable the MDIO node. With Nishanth's sync it does which
is fine, but duplicating the MDIO pinctrl node in the CPSW node causes problems
on Linux.

I see you reverted that change in patch 3, but probably Nishanth can avoid it if we
got this route.

> 
>>>>> This was solved by duplicating the pinctrl configuration onto the MAC
>>>
>>> If I remember right, there is no driver model driver for MDIO in u-boot and
>>> adding the mdio pinctrl into CPSW DT node was a hack in u-boot.
> 
> Yeah, but we now have in the U-Boot DT two nodes referencing the same
> pinctrl configuration: the CPSW and the MDIO node. Linux then tries to
> assign that configuration to both devices and it fails.

Understood.
> 
>>>>> device node. Unfortunately, this doesn't work for Linux since now it has
>>>>> two devices competing for the same pins.
>>>
>>> What has really changed here is that you are passing u-boot's device
>>> tree to Linux.
> 
> I didn't change anything. This is the default boot process if you don't
> provide a DT in the ESP partition.
> 

OK.
>>> This has nothing to do with 6.5-rc1 right?
> 
> The issue started to occur with Nishanth patch to sync with Linux
> 6.5-rc1 device trees, so there's definitely a connection.
> 
>>> I suppose your solution is still a hack but of lesser evil than
>>> duplicating MDIO pinctrl in CPSW node.
>>>
>>> The proper solution would be to implement driver model for the
>>> davinci MDIO driver. Siddharth has been working on this. If that is
>>> close to ready we should just use that instead.
>>
>> But this allows for a cleaner device tree while the driver can be fixed
>> up independently, correct? Unfortunately, Siddharth's driver model work,

Yes. MDIO pinctrl no longer needs to be duplicated in CPSW node at u-boot.

>> from what I understand, is around 2024 timeframe.. which is probably not
>> something that helps us in the community at this point.

OK, then we need to resort to some temporary solution like this then.
> 
> Yeah, at the moment I have to choose between getting the MMC to work in
> Linux or the Ethernet ports. The former is working thanks to your patch,
> the latter is broken because of it. Ideally I'd like both :)
> 

-- 
cheers,
-roger

  reply	other threads:[~2023-07-20 14:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20  9:55 [PATCH 0/4] net: ti: am65-cpsw-nuss: Fix DT binding handling of pinctrl Maxime Ripard
2023-07-20  9:55 ` [PATCH 1/4] pinctrl: Create a select_state variant with the ofnode Maxime Ripard
2023-07-20 15:56   ` Roger Quadros
2023-07-20  9:55 ` [PATCH 2/4] net: ti: am65-cpsw-nuss: Enforce pinctrl state on the MDIO child node Maxime Ripard
2023-07-20 15:47   ` Roger Quadros
2023-07-21 12:17     ` Maxime Ripard
2023-07-20  9:55 ` [PATCH 3/4] fixup! arm: dts: k3-am62: Bump dtsi from linux v6.5-rc1 Maxime Ripard
2023-07-20  9:55 ` [PATCH 4/4] " Maxime Ripard
2023-07-20 15:27   ` Roger Quadros
2023-07-21  7:46     ` Maxime Ripard
2023-07-21  9:14       ` Roger Quadros
2023-07-21  9:23         ` Maxime Ripard
2023-07-20 13:33 ` [PATCH 0/4] net: ti: am65-cpsw-nuss: Fix DT binding handling of pinctrl Ravi Gunasekaran
2023-07-20 13:56   ` Roger Quadros
2023-07-20 14:00     ` Nishanth Menon
2023-07-20 14:12       ` Maxime Ripard
2023-07-20 14:41         ` Roger Quadros [this message]
2023-07-20 14:52           ` Nishanth Menon
2023-07-26  9:14         ` Ravi Gunasekaran
2023-07-26 12:49           ` Maxime Ripard
2023-07-27  5:27             ` Ravi Gunasekaran
2023-07-26 12:52           ` Nishanth Menon
2023-07-27  5:36             ` Ravi Gunasekaran
2023-07-27  7:10               ` Roger Quadros

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=877e9b47-1f0a-765f-0344-148b2c1fb9ae@kernel.org \
    --to=rogerq@kernel.org \
    --cc=javierm@redhat.com \
    --cc=joe.hershberger@ni.com \
    --cc=mripard@kernel.org \
    --cc=nm@ti.com \
    --cc=pbrobinson@gmail.com \
    --cc=r-gunasekaran@ti.com \
    --cc=rfried.dev@gmail.com \
    --cc=s-vadapalli@ti.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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