[PATCH 0/4] net: ti: am65-cpsw-nuss: Fix DT binding handling of pinctrl

Ravi Gunasekaran r-gunasekaran at ti.com
Thu Jul 27 07:27:01 CEST 2023


Maxime,

On 7/26/23 6:19 PM, Maxime Ripard wrote:
> Hi Ravi,
> 
> On Wed, Jul 26, 2023 at 02:44:00PM +0530, Ravi Gunasekaran wrote:
>> On 7/20/23 7:42 PM, 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.
>>>
>>>>>>> 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.
>>
>> This response might be late, as I know things have moved ahead after this
>> discussion. But I just wanted to understand the root cause little bit more.
>> Is the issue mainly because the same mdio pinctrl node(phandle) is referenced in
>> two other nodes? Or is it because of same pins being updated in two different
>> places in the kernel?
>>
>> If it is the former, then would a duplicate mdio node help keep the changes
>> to minimum?
> 
> Neither, actually :/ The issue is that, with the changes made by
> Nishanth to bring the 6.5-rc1 DTS in, the same pinctrl node is
> referenced in two separate nodes, and Linux sees that as conflicting
> users of the same pins.

So you mean to say, finally it boils down to the users of the same pins.
Even if there are two nodes with the same pinctrl configuration, we would
still hit the issue. 

> 
> One quick workaround would be to remove the MDIO pinctrl property, and
> add it to the MAC pinctrl property.
> 
> That's fairly dangerous if either get extended though, so it might not
> be a proper solution long term.

A proper solution would be to update the MDIO driver. I'm sorry that it 
doesn't follow the standard driver model. We have plans to fix it soon.

> 
> I hope it's clearer
> 
> Maxime

-- 
Regards,
Ravi


More information about the U-Boot mailing list