[PATCH net v5 0/4] net: phy: bcm54811: Fix the PHY initialization

Kamil Horák - 2N posted 4 patches 3 months, 1 week ago
There is a newer version of this series
.../bindings/net/ethernet-controller.yaml     |  1 +
Documentation/networking/phy.rst              |  7 ++++
drivers/net/phy/broadcom.c                    | 39 ++++++++++++++++---
drivers/net/phy/phy-core.c                    |  1 +
drivers/net/phy/phy_caps.c                    |  4 ++
drivers/net/phy/phylink.c                     |  1 +
include/linux/brcmphy.h                       |  6 +++
include/linux/phy.h                           |  4 ++
8 files changed, 58 insertions(+), 5 deletions(-)
[PATCH net v5 0/4] net: phy: bcm54811: Fix the PHY initialization
Posted by Kamil Horák - 2N 3 months, 1 week ago
PATCH 1 - Add MII-Lite PHY interface mode as defined by Broadcom for
   their two-wire PHYs. It can be used with most Ethernet controllers
   under certain limitations (no half-duplex link modes etc.).

PATCH 2 - Add MII-Lite PHY interface type

PATCH 3 - Activation of MII-Lite interface mode on Broadcom bcm5481x
   PHYs

PATCH 4 - Fix the BCM54811 PHY initialization so that it conforms
   to the datasheet regarding a reserved bit in the LRE Control
   register, which must be written to zero after every device reset.
   Also fix the LRE Status register reading, there is another bit to
   be ignored on bcm54811.

Changes in v2:
  - Applied reviewers' comments
  - Divided into more patches (separated common and Broadcom
   PHY specific code)

Changes in v3:
  - Added MII-Lite documentation

Changes in v4:
  - Added missing Fixes headers

Changes in v5:
  - Removed unused PHY register bits definition

Kamil Horák - 2N (4):
  net: phy: MII-Lite PHY interface mode
  dt-bindings: ethernet-phy: add MII-Lite phy interface type
  net: phy: bcm5481x: MII-Lite activation
  net: phy: bcm54811: Fix the PHY initialization

 .../bindings/net/ethernet-controller.yaml     |  1 +
 Documentation/networking/phy.rst              |  7 ++++
 drivers/net/phy/broadcom.c                    | 39 ++++++++++++++++---
 drivers/net/phy/phy-core.c                    |  1 +
 drivers/net/phy/phy_caps.c                    |  4 ++
 drivers/net/phy/phylink.c                     |  1 +
 include/linux/brcmphy.h                       |  6 +++
 include/linux/phy.h                           |  4 ++
 8 files changed, 58 insertions(+), 5 deletions(-)

-- 
2.39.5

Re: [PATCH net v5 0/4] net: phy: bcm54811: Fix the PHY initialization
Posted by Jakub Kicinski 3 months, 1 week ago
On Tue, 1 Jul 2025 09:50:11 +0200 Kamil Horák - 2N wrote:
> PATCH 1 - Add MII-Lite PHY interface mode as defined by Broadcom for
>    their two-wire PHYs. It can be used with most Ethernet controllers
>    under certain limitations (no half-duplex link modes etc.).
> 
> PATCH 2 - Add MII-Lite PHY interface type
> 
> PATCH 3 - Activation of MII-Lite interface mode on Broadcom bcm5481x
>    PHYs
> 
> PATCH 4 - Fix the BCM54811 PHY initialization so that it conforms
>    to the datasheet regarding a reserved bit in the LRE Control
>    register, which must be written to zero after every device reset.
>    Also fix the LRE Status register reading, there is another bit to
>    be ignored on bcm54811.

I'm a bit lost why the first 3 patches are included in a series for net.
My naive reading is we didn't support this extra mode, now we do,
which sounds like a new feature.. Patch 4, sure, but the dependency
is not obvious.
Re: [PATCH net v5 0/4] net: phy: bcm54811: Fix the PHY initialization
Posted by Florian Fainelli 3 months, 1 week ago
On 7/2/25 15:02, Jakub Kicinski wrote:
> On Tue, 1 Jul 2025 09:50:11 +0200 Kamil Horák - 2N wrote:
>> PATCH 1 - Add MII-Lite PHY interface mode as defined by Broadcom for
>>     their two-wire PHYs. It can be used with most Ethernet controllers
>>     under certain limitations (no half-duplex link modes etc.).
>>
>> PATCH 2 - Add MII-Lite PHY interface type
>>
>> PATCH 3 - Activation of MII-Lite interface mode on Broadcom bcm5481x
>>     PHYs
>>
>> PATCH 4 - Fix the BCM54811 PHY initialization so that it conforms
>>     to the datasheet regarding a reserved bit in the LRE Control
>>     register, which must be written to zero after every device reset.
>>     Also fix the LRE Status register reading, there is another bit to
>>     be ignored on bcm54811.
> 
> I'm a bit lost why the first 3 patches are included in a series for net.
> My naive reading is we didn't support this extra mode, now we do,
> which sounds like a new feature.. Patch 4, sure, but the dependency
> is not obvious.

I don't see the dependency either, at least not in an explicit way. 
Kamil, could patch #4 stand on its own and routed through "net" while 
patches 1-3 are routed through "net-next"?

Thanks
-- 
Florian

Re: [PATCH net v5 0/4] net: phy: bcm54811: Fix the PHY initialization
Posted by Kamil Horák (2N) 3 months ago

On 7/3/25 01:46, Florian Fainelli wrote:
> On 7/2/25 15:02, Jakub Kicinski wrote:
>> On Tue, 1 Jul 2025 09:50:11 +0200 Kamil Horák - 2N wrote:
>>> PATCH 1 - Add MII-Lite PHY interface mode as defined by Broadcom for
>>>     their two-wire PHYs. It can be used with most Ethernet controllers
>>>     under certain limitations (no half-duplex link modes etc.).
>>>
>>> PATCH 2 - Add MII-Lite PHY interface type
>>>
>>> PATCH 3 - Activation of MII-Lite interface mode on Broadcom bcm5481x
>>>     PHYs
>>>
>>> PATCH 4 - Fix the BCM54811 PHY initialization so that it conforms
>>>     to the datasheet regarding a reserved bit in the LRE Control
>>>     register, which must be written to zero after every device reset.
>>>     Also fix the LRE Status register reading, there is another bit to
>>>     be ignored on bcm54811.
>>
>> I'm a bit lost why the first 3 patches are included in a series for net.
>> My naive reading is we didn't support this extra mode, now we do,
>> which sounds like a new feature.. Patch 4, sure, but the dependency
>> is not obvious.
> 
> I don't see the dependency either, at least not in an explicit way. 
> Kamil, could patch #4 stand on its own and routed through "net" while 
> patches 1-3 are routed through "net-next"?
It can be done this way, however, even the patch #3 is effectively a 
fix, not new feature, because the bcm54811 PHY in MLP package only has 
MII-Lite interface available externally. As far I know, there is no BGA 
casing available for bcm54811 (unlike bcm54810, that one having both MLP 
and BGA). Thus, it cannot function without being switched to MII-Lite 
mode. The introduction of MII-Lite itself is clearly a new feature and 
it is even (theoretically) available for any MII-capable PHY. So if 
putting it all to net it is really impossible or contrary to the 
net-next vs. net selection rules, let's divide it....
To get fully functional, bcm54811-based networking, all patches are 
necessary so any other user out there must wait for both branches to join.

> 
> Thanks


Kamil
Re: [PATCH net v5 0/4] net: phy: bcm54811: Fix the PHY initialization
Posted by Paolo Abeni 3 months ago
On 7/3/25 11:03 AM, Kamil Horák (2N) wrote:
> On 7/3/25 01:46, Florian Fainelli wrote:
>> On 7/2/25 15:02, Jakub Kicinski wrote:
>>> On Tue, 1 Jul 2025 09:50:11 +0200 Kamil Horák - 2N wrote:
>>>> PATCH 1 - Add MII-Lite PHY interface mode as defined by Broadcom for
>>>>     their two-wire PHYs. It can be used with most Ethernet controllers
>>>>     under certain limitations (no half-duplex link modes etc.).
>>>>
>>>> PATCH 2 - Add MII-Lite PHY interface type
>>>>
>>>> PATCH 3 - Activation of MII-Lite interface mode on Broadcom bcm5481x
>>>>     PHYs
>>>>
>>>> PATCH 4 - Fix the BCM54811 PHY initialization so that it conforms
>>>>     to the datasheet regarding a reserved bit in the LRE Control
>>>>     register, which must be written to zero after every device reset.
>>>>     Also fix the LRE Status register reading, there is another bit to
>>>>     be ignored on bcm54811.
>>>
>>> I'm a bit lost why the first 3 patches are included in a series for net.
>>> My naive reading is we didn't support this extra mode, now we do,
>>> which sounds like a new feature.. Patch 4, sure, but the dependency
>>> is not obvious.
>>
>> I don't see the dependency either, at least not in an explicit way. 
>> Kamil, could patch #4 stand on its own and routed through "net" while 
>> patches 1-3 are routed through "net-next"?
> It can be done this way, however, even the patch #3 is effectively a 
> fix, not new feature, because the bcm54811 PHY in MLP package only has 
> MII-Lite interface available externally. As far I know, there is no BGA 
> casing available for bcm54811 (unlike bcm54810, that one having both MLP 
> and BGA). Thus, it cannot function without being switched to MII-Lite 
> mode. The introduction of MII-Lite itself is clearly a new feature and 
> it is even (theoretically) available for any MII-capable PHY. So if 
> putting it all to net it is really impossible or contrary to the 
> net-next vs. net selection rules, let's divide it....
> To get fully functional, bcm54811-based networking, all patches are 
> necessary so any other user out there must wait for both branches to join.

The above makes sense to me, but I think it would be nice to capture
some of this info in the cover letter - the fact that many people were
confused by the series is an hint the info was indeed missing and required.

Please resubmit with an extended cover letter, thanks!
(unless Florian jumps in and explicitly asks for something different :-P)

Paolo

Re: [PATCH net v5 0/4] net: phy: bcm54811: Fix the PHY initialization
Posted by Kamil Horák (2N) 3 months ago

On 7/3/25 12:03, Paolo Abeni wrote:
> On 7/3/25 11:03 AM, Kamil Horák (2N) wrote:
>> On 7/3/25 01:46, Florian Fainelli wrote:
>>> On 7/2/25 15:02, Jakub Kicinski wrote:
>>>> On Tue, 1 Jul 2025 09:50:11 +0200 Kamil Horák - 2N wrote:
>>>>> PATCH 1 - Add MII-Lite PHY interface mode as defined by Broadcom for
>>>>>      their two-wire PHYs. It can be used with most Ethernet controllers
>>>>>      under certain limitations (no half-duplex link modes etc.).
>>>>>
>>>>> PATCH 2 - Add MII-Lite PHY interface type
>>>>>
>>>>> PATCH 3 - Activation of MII-Lite interface mode on Broadcom bcm5481x
>>>>>      PHYs
>>>>>
>>>>> PATCH 4 - Fix the BCM54811 PHY initialization so that it conforms
>>>>>      to the datasheet regarding a reserved bit in the LRE Control
>>>>>      register, which must be written to zero after every device reset.
>>>>>      Also fix the LRE Status register reading, there is another bit to
>>>>>      be ignored on bcm54811.
>>>>
>>>> I'm a bit lost why the first 3 patches are included in a series for net.
>>>> My naive reading is we didn't support this extra mode, now we do,
>>>> which sounds like a new feature.. Patch 4, sure, but the dependency
>>>> is not obvious.
>>>
>>> I don't see the dependency either, at least not in an explicit way.
>>> Kamil, could patch #4 stand on its own and routed through "net" while
>>> patches 1-3 are routed through "net-next"?
>> It can be done this way, however, even the patch #3 is effectively a
>> fix, not new feature, because the bcm54811 PHY in MLP package only has
>> MII-Lite interface available externally. As far I know, there is no BGA
>> casing available for bcm54811 (unlike bcm54810, that one having both MLP
>> and BGA). Thus, it cannot function without being switched to MII-Lite
>> mode. The introduction of MII-Lite itself is clearly a new feature and
>> it is even (theoretically) available for any MII-capable PHY. So if
>> putting it all to net it is really impossible or contrary to the
>> net-next vs. net selection rules, let's divide it....
>> To get fully functional, bcm54811-based networking, all patches are
>> necessary so any other user out there must wait for both branches to join.
> 
> The above makes sense to me, but I think it would be nice to capture
> some of this info in the cover letter - the fact that many people were
> confused by the series is an hint the info was indeed missing and required.
OK, tried to write more about it
> 
> Please resubmit with an extended cover letter, thanks!
> (unless Florian jumps in and explicitly asks for something different :-P)
> 
No such request appeared since yesterday, so submitting an updated text 
version

> Paolo
> 


Kamil