RFC: Adding Microchip's LAN865x 10BASE-T1S MAC-PHY driver support to Linux
Subsystems (2)
Hi All,
I would like to add Microchip's LAN865x 10BASE-T1S MAC-PHY driver support to Linux kernel.
(Product link: https://www.microchip.com/en-us/product/LAN8650)
The LAN8650 combines a Media Access Controller (MAC) and an Ethernet PHY to access 10BASE‑T1S networks. The common standard Serial Peripheral Interface (SPI) is used so that the transfer of Ethernet packets and LAN8650 control/status commands are performed over a single, serial interface.
Ethernet packets are segmented and transferred over the serial interface according to the OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification designed by TC6.
(link: https://www.opensig.org/Automotive-Ethernet-Specifications/)
The serial interface protocol can simultaneously transfer both transmit and receive packets between the host and the LAN8650.
Basically the driver comprises of two parts. One part is to interface with networking subsystem and SPI subsystem. The other part is a TC6 state machine which implements the Ethernet packets segmentation according to OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification.
The idea behind the TC6 state machine implementation is to make it as a generic library and platform independent. A set of API's provided by this TC6 state machine library can be used by the 10BASE-T1x MAC-PHY drivers to segment the Ethernet packets according to the OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification.
With the above information, kindly provide your valuable feedback on my below queries.
Can we keep this TC6 state machine within the LAN865x driver or as a separate generic library accessible for other 10BASE-T1x MAC-PHY drivers as well?
If you recommend to have that as a separate generic library then could you please advice on what is the best way to do that in kernel?
I am very interested to hear your opinion on this topic. Please let me know in case you need more information on this.
Best Regards,
Parthiban V
Quoted 19 lines · On Fri, Mar 10, 2023 at 11:13:23AM +0000, [email protected]…
Hi All,
I would like to add Microchip's LAN865x 10BASE-T1S MAC-PHY driver support to Linux kernel.
(Product link: https://www.microchip.com/en-us/product/LAN8650)The LAN8650 combines a Media Access Controller (MAC) and an Ethernet PHY to access 10BASE‑T1S networks. The common standard Serial Peripheral Interface (SPI) is used so that the transfer of Ethernet packets and LAN8650 control/status commands are performed over a single, serial interface.
Ethernet packets are segmented and transferred over the serial interface according to the OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification designed by TC6.
(link: https://www.opensig.org/Automotive-Ethernet-Specifications/)
The serial interface protocol can simultaneously transfer both transmit and receive packets between the host and the LAN8650.
Quoted 5 lines
Basically the driver comprises of two parts. One part is to interface with networking subsystem and SPI subsystem. The other part is a TC6 state machine which implements the Ethernet packets segmentation according to OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification.
I only spent about 5 minutes glancing through the standards document, but i guess i would disagree with this. I would say 90% is shared code which probably wants to live in net/ethernet, and the remaining 10% is code for where the silicon vendor has extra registers that need to be used, workarounds for silicon bugs, etc. I guess hardware statistics would also be in this part of code, since they don't seem to be in the standard.
Please also make sure you keep with the Linux network architecture. I would expect the shared code includes a linux MDIO bus driver, so the existing PHY drivers can be used. PTP time stamping should be done the standard Linux way. PLCA is configured using the netlink methods recently added, etc. And it looks like all this should be in the shared code, since it is all part of the standard.
Andrew
Hi Allan
It has been a long time since we talked, maybe 2019 at the Linux Plumbers conference.... And then PTP discussions etc.
It seems like Sparx5 is going well, along with felix, seville, etc.
Quoted 34 lines · On Fri, Mar 10, 2023 at 11:13:23AM +0000, [email protected]…
Hi All,
I would like to add Microchip's LAN865x 10BASE-T1S MAC-PHY driver support to Linux kernel.
(Product link: https://www.microchip.com/en-us/product/LAN8650)The LAN8650 combines a Media Access Controller (MAC) and an Ethernet PHY to access 10BASE‑T1S networks. The common standard Serial Peripheral Interface (SPI) is used so that the transfer of Ethernet packets and LAN8650 control/status commands are performed over a single, serial interface.
Ethernet packets are segmented and transferred over the serial interface according to the OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification designed by TC6.
(link: https://www.opensig.org/Automotive-Ethernet-Specifications/)
The serial interface protocol can simultaneously transfer both transmit and receive packets between the host and the LAN8650.Basically the driver comprises of two parts. One part is to interface with networking subsystem and SPI subsystem. The other part is a TC6 state machine which implements the Ethernet packets segmentation according to OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification.
The idea behind the TC6 state machine implementation is to make it as a generic library and platform independent. A set of API's provided by this TC6 state machine library can be used by the 10BASE-T1x MAC-PHY drivers to segment the Ethernet packets according to the OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification.
With the above information, kindly provide your valuable feedback on my below queries.
Quoted 6 lines
Can we keep this TC6 state machine within the LAN865x driver or as a separate generic library accessible for other 10BASE-T1x MAC-PHY drivers as well?
If you recommend to have that as a separate generic library then could you please advice on what is the best way to do that in kernel?
Microchip is getting more and more involved in mainline. Jakub publishes some developers statistics for netdev:
https://lwn.net/Articles/918007/
It shows Microchip are near the top for code contributions. Which is great. However, as a reviewer, i see the quality really varies. Given how active Microchip is within Linux, the netdev community, and to some extent Linux as a whole, expects a company like Microchip to build up its internal resources to offer training and Mentoring to mainline developers, rather than expect the community to do that work. Does such a thing exist within Microchip? Could you point Parthiban towards a mentor who can help guide the work adding generic support for the OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface and the LAN8650/1 specific bits? If not, could Steen Hegelund or Horatiu Vultur make some time available to be a mentor?
Thanks
Andrew
Hi Andrew,
Thanks a lot for your support. I will check with our colleagues suggested by you and get back to mainline again.
Best Regards,
Parthiban V
Quoted 70 lines · Andrew Lunn
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi Allan
It has been a long time since we talked, maybe 2019 at the Linux Plumbers conference.... And then PTP discussions etc.
It seems like Sparx5 is going well, along with felix, seville, etc.
Quoted 34 lines · On Fri, Mar 10, 2023 at 11:13:23AM +0000, [email protected]…
Hi All,
I would like to add Microchip's LAN865x 10BASE-T1S MAC-PHY driver support to Linux kernel.
(Product link: https://www.microchip.com/en-us/product/LAN8650)The LAN8650 combines a Media Access Controller (MAC) and an Ethernet PHY to access 10BASE‑T1S networks. The common standard Serial Peripheral Interface (SPI) is used so that the transfer of Ethernet packets and LAN8650 control/status commands are performed over a single, serial interface.
Ethernet packets are segmented and transferred over the serial interface according to the OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification designed by TC6.
(link: https://www.opensig.org/Automotive-Ethernet-Specifications/)
The serial interface protocol can simultaneously transfer both transmit and receive packets between the host and the LAN8650.Basically the driver comprises of two parts. One part is to interface with networking subsystem and SPI subsystem. The other part is a TC6 state machine which implements the Ethernet packets segmentation according to OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification.
The idea behind the TC6 state machine implementation is to make it as a generic library and platform independent. A set of API's provided by this TC6 state machine library can be used by the 10BASE-T1x MAC-PHY drivers to segment the Ethernet packets according to the OPEN Alliance 10BASE‑T1x MAC‑PHY Serial Interface specification.
With the above information, kindly provide your valuable feedback on my below queries.
Quoted 6 lines
Can we keep this TC6 state machine within the LAN865x driver or as a separate generic library accessible for other 10BASE-T1x MAC-PHY drivers as well?
If you recommend to have that as a separate generic library then could you please advice on what is the best way to do that in kernel?
Microchip is getting more and more involved in mainline. Jakub publishes some developers statistics for netdev:
https://lwn.net/Articles/918007/
It shows Microchip are near the top for code contributions. Which is great. However, as a reviewer, i see the quality really varies. Given how active Microchip is within Linux, the netdev community, and to some extent Linux as a whole, expects a company like Microchip to build up its internal resources to offer training and Mentoring to mainline developers, rather than expect the community to do that work. Does such a thing exist within Microchip? Could you point Parthiban towards a mentor who can help guide the work adding generic support for the OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface and the LAN8650/1 specific bits? If not, could Steen Hegelund or Horatiu Vultur make some time available to be a mentor?
Thanks
Andrew