Commit Graph

8 Commits

Author SHA1 Message Date
Izabela Bakollari a04f1db914 net: phy: microchip_t1s: add c45 direct access in LAN865x internal PHY
JIRA: https://issues.redhat.com/browse/RHEL-57766

commit 18a918762fab8248e504edbe03c8df966d9666c9
Author: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Date:   Mon Sep 9 13:55:07 2024 +0530

    net: phy: microchip_t1s: add c45 direct access in LAN865x internal PHY

    This patch adds c45 registers direct access support in Microchip's
    LAN865x internal PHY.

    OPEN Alliance 10BASE-T1x compliance MAC-PHYs will have both C22 and C45
    registers space. If the PHY is discovered via C22 bus protocol it assumes
    it uses C22 protocol and always uses C22 registers indirect access to
    access C45 registers. This is because, we don't have a clean separation
    between C22/C45 register space and C22/C45 MDIO bus protocols. Resulting,
    PHY C45 registers direct access can't be used which can save multiple SPI
    bus access. To support this feature, set .read_mmd/.write_mmd in the PHY
    driver to call .read_c45/.write_c45 in the OPEN Alliance framework
    drivers/net/ethernet/oa_tc6.c

    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
    Link: https://patch.msgid.link/20240909082514.262942-8-Parthiban.Veerasooran@microchip.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>
2024-12-10 13:40:58 +01:00
Adrien Thierry 98f8fdda81 net: phy: microchip_t1s: add support for Microchip LAN865x Rev.B0 PHYs
JIRA: https://issues.redhat.com/browse/RHEL-2799

commit 972c6d8346333437ae784271e74129b3f0583248
Author: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Date:   Fri May 26 20:53:48 2023 +0530

    net: phy: microchip_t1s: add support for Microchip LAN865x Rev.B0 PHYs

    Add support for the Microchip LAN865x Rev.B0 10BASE-T1S Internal PHYs
    (LAN8650/1). The LAN865x combines a Media Access Controller (MAC) and an
    internal 10BASE-T1S Ethernet PHY to access 10BASE‑T1S networks. As
    LAN867X and LAN865X are using the same function for the read_status,
    rename the function as lan86xx_read_status.

    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
    Reviewed-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-09-19 14:18:20 -04:00
Adrien Thierry 2e93ecbb43 net: phy: microchip_t1s: remove unnecessary interrupts disabling code
JIRA: https://issues.redhat.com/browse/RHEL-2799

commit b4010beb347d63acd5715cd66eb791988128b7b8
Author: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Date:   Fri May 26 20:53:47 2023 +0530

    net: phy: microchip_t1s: remove unnecessary interrupts disabling code

    By default, except Reset Complete interrupt in the Interrupt Mask 2
    Register all other interrupts are disabled/masked. As Reset Complete
    status is already handled, it doesn't make sense to disable it.

    Reviewed-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Tested-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-09-19 14:18:20 -04:00
Adrien Thierry 298f9853da net: phy: microchip_t1s: fix reset complete status handling
JIRA: https://issues.redhat.com/browse/RHEL-2799

commit 1d7650b8ce6041be4ea0436ad7a69c057b4d22f8
Author: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Date:   Fri May 26 20:53:46 2023 +0530

    net: phy: microchip_t1s: fix reset complete status handling

    As per the datasheet DS-LAN8670-1-2-60001573C.pdf, the Reset Complete
    status bit in the STS2 register has to be checked before proceeding to
    the initial configuration. Reading STS2 register will also clear the
    Reset Complete interrupt which is non-maskable.

    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
    Reviewed-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Tested-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-09-19 14:18:20 -04:00
Adrien Thierry d4a8605b5d net: phy: microchip_t1s: update LAN867x PHY supported revision number
JIRA: https://issues.redhat.com/browse/RHEL-2799

commit 6f12765ecad399d3cc5f58fcaf7f3c69c275326c
Author: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Date:   Fri May 26 20:53:45 2023 +0530

    net: phy: microchip_t1s: update LAN867x PHY supported revision number

    As per AN1699, the initial configuration in the driver applies to LAN867x
    Rev.B1 hardware revision. 0x0007C160 (Rev.A0) and 0x0007C161 (Rev.B0)
    never released to production and hence they don't need to be supported.

    Reviewed-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-09-19 14:18:20 -04:00
Adrien Thierry 14deddca05 net: phy: microchip_t1s: replace read-modify-write code with phy_modify_mmd
JIRA: https://issues.redhat.com/browse/RHEL-2799

commit 221a5344806c3b8c2b172777b1b59f65228dbd8a
Author: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Date:   Fri May 26 20:53:44 2023 +0530

    net: phy: microchip_t1s: replace read-modify-write code with phy_modify_mmd

    Replace read-modify-write code in the lan867x_config_init function to
    avoid handling data type mismatch and to simplify the code.

    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
    Reviewed-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-09-19 14:18:20 -04:00
Adrien Thierry 2079ef16b5 net: phy: microchip_t1s: modify driver description to be more generic
JIRA: https://issues.redhat.com/browse/RHEL-2799

commit ca33db4a86023f1158dc2b3587ca3c90d2a0705e
Author: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Date:   Fri May 26 20:53:43 2023 +0530

    net: phy: microchip_t1s: modify driver description to be more generic

    Remove LAN867X from the driver description as this driver is common for
    all the Microchip 10BASE-T1S PHYs.

    Reviewed-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-09-19 14:18:19 -04:00
Adrien Thierry 7b7629e807 drivers/net/phy: add driver for Microchip LAN867x 10BASE-T1S PHY
JIRA: https://issues.redhat.com/browse/RHEL-2799

commit 4d2bd2581c3bc73e9fdf5f82b25c359212567457
Author: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
Date:   Fri Apr 21 18:38:54 2023 +0200

    drivers/net/phy: add driver for Microchip LAN867x 10BASE-T1S PHY

    This patch adds support for the Microchip LAN867x 10BASE-T1S family
    (LAN8670/1/2). The driver supports P2MP with PLCA.

    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Ramón Nordin Rodriguez <ramon.nordin.rodriguez@ferroamp.se>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-09-19 14:18:16 -04:00