netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] net: phy: micrel: add Microchip KSZ 9897 Switch PHY
@ 2022-02-07 17:45 Enguerrand de Ribaucourt
  2022-02-07 17:45 ` [PATCH v2 1/2] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support Enguerrand de Ribaucourt
  2022-02-07 17:45 ` [PATCH v2 2/2] net: phy: micrel: add Microchip KSZ 9477 to the device table Enguerrand de Ribaucourt
  0 siblings, 2 replies; 11+ messages in thread
From: Enguerrand de Ribaucourt @ 2022-02-07 17:45 UTC (permalink / raw)
  To: netdev; +Cc: andrew, hkallweit1, linux

v2: I was on my way to convert the .phy_id_mask to PHY_ID_MATCH_EXACT()
following reviews, but I discovered that the datasheet actually contained PHY id
registers but they do not correspond to RMII ports. I rechecked the phy_id value
on my KSZ9897 and confirmed that I did not make this up. But this lead me to
find that the KSZ8081 revision A2's datasheet shared the exact same phy_id.
Hence, in order not to break compatibility with this model, I wrote a new way to
differenciate them with the default LED MODE configuration instead of
PHY_ID_MATCH_EXACT() by mimicking ksz8051_ksz8795_match_phy_device().

I abstained from converting MICREL_PHY_ID_MASK to PHY_ID_MATCH_MODEL() because
it is used in other drivers, and would take a very long time to check all the
datasheets of these models.

Thanks again to Andrew Lunn for your reviews and suggestions.

Original patch v1 discussion:
https://lore.kernel.org/all/20220204133635.296974-1-enguerrand.de-ribaucourt@savoirfairelinux.com/

---

Hi,
I've recently used a KSZ9897 DSA switch that was connected to an i.MX6 CPU
through SPI for the DSA control, and RMII as the data cpu-port. The SPI/DSA was
well supported in drivers/net/dsa/microchip/ksz9477.c, but the RMII connection
was not working. I would like to upstream the patch I developped to add support
for the KSZ9897 RMII bus. This is required for the cpu-port capability of
the DSA switch and have a complete support of this DSA switch.

Since PHY_ID_KSZ9897 and PHY_ID_KSZ8081 are very close, I had to modify the mask
used for the latter. I don't have this one, so it would be very appreciated if
someone could test this patch with the KSZ8081 or KSZ8091. In particular, I'd
like to know the exact phy_id used by those models to check that the new mask is
valid, and that they don't collide with the KSZ9897. The phy_ids cannot be found
in the datasheet, so I couldn't verify that myself.

My definition of the struct phy_driver was copied from the similar
PHY_ID_KSZ8873MLL and proved to work on a 5.4 kernel. However, my patch may not
support the Gigabit Ethernet but works reliably otherwise.

The second patch fixes an issue with the KSZ9477 declaration I noticed. I
couldn't find PHY_ID_KSZ9477, or an equivalent mask in the MODULE_DEVICE_TABLE
declaration. I fear the driver is not initialized properly with this PHY. I
don't have this model either so it would be great if someone could test this.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-04-05 20:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-07 17:45 [PATCH v2 0/2] net: phy: micrel: add Microchip KSZ 9897 Switch PHY Enguerrand de Ribaucourt
2022-02-07 17:45 ` [PATCH v2 1/2] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support Enguerrand de Ribaucourt
2022-02-07 23:28   ` Andrew Lunn
2022-02-08  8:38     ` Enguerrand de Ribaucourt
2022-02-08 13:13       ` Andrew Lunn
2022-02-10 15:30         ` Prasanna.VengateshanVaradharajan
2022-02-10 15:38           ` Prasanna.VengateshanVaradharajan
2022-04-05 14:53             ` Enguerrand de Ribaucourt
2022-04-05 16:47               ` Russell King (Oracle)
2022-02-07 17:45 ` [PATCH v2 2/2] net: phy: micrel: add Microchip KSZ 9477 to the device table Enguerrand de Ribaucourt
2022-02-07 23:29   ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).