[PATCH v2 0/5] net: phy: bcm63xx: Enable internal GPHY on BCM63268

Kyle Hendry posted 5 patches 9 months, 4 weeks ago
.../mfd/brcm,bcm63268-gpio-sysctl.yaml        | 13 +++
.../devicetree/bindings/mfd/syscon.yaml       |  2 +
.../bindings/net/brcm,bcm6368-mdio-mux.yaml   |  7 ++
drivers/net/phy/Kconfig                       |  4 +-
drivers/net/phy/bcm63xx.c                     | 96 +++++++++++++++++++
5 files changed, 120 insertions(+), 2 deletions(-)
[PATCH v2 0/5] net: phy: bcm63xx: Enable internal GPHY on BCM63268
Posted by Kyle Hendry 9 months, 4 weeks ago
Some BCM63268 bootloaders do not enable the internal PHYs by default.
This patch series adds a phy driver to set the registers required 
for the gigabit PHY to work. 

Currently the PHY can't be detected until the b53 switch is initialized,
but this should be solvable through the device tree. I'm currently 
investigating whether the the PHY needs the whole switch to be set up
or just specific clocks, etc. 

v2 changes:
- Remove changes to b53 dsa code and rework fix as a PHY driver
- Use a regmap for accessing GPHY control register
- Add documentaion for device tree changes

v1: https://lore.kernel.org/netdev/20250206043055.177004-1-kylehendrydev@gmail.com/

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>

Kyle Hendry (5):
  net: phy: bcm63xx: add support for BCM63268 GPHY
  net: phy: enable bcm63xx on bmips
  dt-bindings: net: bcm6368-mdio-mux: add gphy-ctrl property
  dt-bindings: mfd: brcm: add brcm,bcm63268-gphy-ctrl compatible
  dt-bindings: mfd: brcm: add gphy controller to BCM63268 sysctl

 .../mfd/brcm,bcm63268-gpio-sysctl.yaml        | 13 +++
 .../devicetree/bindings/mfd/syscon.yaml       |  2 +
 .../bindings/net/brcm,bcm6368-mdio-mux.yaml   |  7 ++
 drivers/net/phy/Kconfig                       |  4 +-
 drivers/net/phy/bcm63xx.c                     | 96 +++++++++++++++++++
 5 files changed, 120 insertions(+), 2 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/5] net: phy: bcm63xx: Enable internal GPHY on BCM63268
Posted by Florian Fainelli 9 months, 3 weeks ago

On 2/17/2025 5:36 PM, Kyle Hendry wrote:
> Some BCM63268 bootloaders do not enable the internal PHYs by default.
> This patch series adds a phy driver to set the registers required
> for the gigabit PHY to work.
> 
> Currently the PHY can't be detected until the b53 switch is initialized,
> but this should be solvable through the device tree. I'm currently
> investigating whether the the PHY needs the whole switch to be set up
> or just specific clocks, etc.
> 
> v2 changes:
> - Remove changes to b53 dsa code and rework fix as a PHY driver
> - Use a regmap for accessing GPHY control register
> - Add documentaion for device tree changes

I really preferred v1 to v2 which conveyed the special intent better 
than going through layers and layers of abstraction here with limited 
re-usability.

At least with v2, the logic to toggle the IDDQ enable/disable remains 
within the PHY driver which is a better location.
-- 
Florian
Re: [PATCH v2 0/5] net: phy: bcm63xx: Enable internal GPHY on BCM63268
Posted by Kyle Hendry 9 months, 3 weeks ago
On 2025-02-21 12:09, Florian Fainelli wrote:
>
>
> On 2/17/2025 5:36 PM, Kyle Hendry wrote:
>> Some BCM63268 bootloaders do not enable the internal PHYs by default.
>> This patch series adds a phy driver to set the registers required
>> for the gigabit PHY to work.
>>
>> Currently the PHY can't be detected until the b53 switch is initialized,
>> but this should be solvable through the device tree. I'm currently
>> investigating whether the the PHY needs the whole switch to be set up
>> or just specific clocks, etc.
>>
>> v2 changes:
>> - Remove changes to b53 dsa code and rework fix as a PHY driver
>> - Use a regmap for accessing GPHY control register
>> - Add documentaion for device tree changes
>
> I really preferred v1 to v2 which conveyed the special intent better 
> than going through layers and layers of abstraction here with limited 
> re-usability.
>
> At least with v2, the logic to toggle the IDDQ enable/disable remains 
> within the PHY driver which is a better location.


The next version should be much more simplified. I'm going to move
the syscon phandle to the actual phy node, so I think the device tree
documentation is going to need a new schema file for the phy. Who
should I list as the maintainer for the new binding?

Best regards,
Kyle