Commit 3cfb5aa1 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'add-support-for-open-alliance-10base-t1x-macphy-serial-interface'

Parthiban Veerasooran says:

====================
Add support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface

This patch series contain the below updates,

- Adds support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface
  in the net/ethernet/oa_tc6.c.

  Link to the spec:
  -----------------
  https://opensig.org/download/document/OPEN_Alliance_10BASET1x_MAC-PHY_Serial_Interface_V1.1.pdf

- Adds driver support for Microchip LAN8650/1 Rev.B1 10BASE-T1S MACPHY
  Ethernet driver in the net/ethernet/microchip/lan865x/lan865x.c.

  Link to the product:
  --------------------
  https://www.microchip.com/en-us/product/lan8650

Testing Details:
----------------
The driver performance was tested using iperf3 in the below two setups
separately.

Setup 1:
--------
Node 0 - Raspberry Pi 4 with LAN8650 MAC-PHY
Node 1 - Raspberry Pi 4 with EVB-LAN8670-USB USB Stick

Setup 2:
--------
Node 0 - SAMA7G54-EK with LAN8650 MAC-PHY
Node 1 - Raspberry Pi 4 with EVB-LAN8670-USB USB Stick

Achieved maximum of 9.4 Mbps.

Some systems like Raspberry Pi 4 need performance mode enabled to get the
proper clock speed for SPI. Refer below link for more details.

https://github.com/raspberrypi/linux/issues/3381#issuecomment-1144723750
====================

Link: https://patch.msgid.link/20240909082514.262942-1-Parthiban.Veerasooran@microchip.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents e331673a ac49b950
Loading
Loading
Loading
Loading
+74 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/microchip,lan8650.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip LAN8650/1 10BASE-T1S MACPHY Ethernet Controllers

maintainers:
  - Parthiban Veerasooran <parthiban.veerasooran@microchip.com>

description:
  The LAN8650/1 combines a Media Access Controller (MAC) and an Ethernet
  PHY to enable 10BASE‑T1S networks. The Ethernet Media Access Controller
  (MAC) module implements a 10 Mbps half duplex Ethernet MAC, compatible
  with the IEEE 802.3 standard and a 10BASE-T1S physical layer transceiver
  integrated into the LAN8650/1. The communication between the Host and
  the MAC-PHY is specified in the OPEN Alliance 10BASE-T1x MACPHY Serial
  Interface (TC6).

allOf:
  - $ref: /schemas/net/ethernet-controller.yaml#
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
  compatible:
    oneOf:
      - const: microchip,lan8650
      - items:
          - const: microchip,lan8651
          - const: microchip,lan8650

  reg:
    maxItems: 1

  interrupts:
    description:
      Interrupt from MAC-PHY asserted in the event of Receive Chunks
      Available, Transmit Chunk Credits Available and Extended Status
      Event.
    maxItems: 1

  spi-max-frequency:
    minimum: 15000000
    maximum: 25000000

required:
  - compatible
  - reg
  - interrupts
  - spi-max-frequency

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/gpio/gpio.h>

    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      ethernet@0 {
        compatible = "microchip,lan8651", "microchip,lan8650";
        reg = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&eth0_pins>;
        interrupt-parent = <&gpio>;
        interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
        local-mac-address = [04 05 06 01 02 03];
        spi-max-frequency = <15000000>;
      };
    };
+1 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ Contents:
   nexthop-group-resilient
   nf_conntrack-sysctl
   nf_flowtable
   oa-tc6-framework
   openvswitch
   operstates
   packet_mmap
+497 −0

File added.

Preview size limit exceeded, changes collapsed.

+15 −0
Original line number Diff line number Diff line
@@ -14980,6 +14980,13 @@ L: netdev@vger.kernel.org
S:	Maintained
F:	drivers/net/ethernet/microchip/lan743x_*
MICROCHIP LAN8650/1 10BASE-T1S MACPHY ETHERNET DRIVER
M:	Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
L:	netdev@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/net/microchip,lan8650.yaml
F:	drivers/net/ethernet/microchip/lan865x/lan865x.c
MICROCHIP LAN87xx/LAN937x T1 PHY DRIVER
M:	Arun Ramadoss <arun.ramadoss@microchip.com>
R:	UNGLinuxDriver@microchip.com
@@ -17113,6 +17120,14 @@ L: linux-rdma@vger.kernel.org
S:	Supported
F:	drivers/infiniband/ulp/opa_vnic
OPEN ALLIANCE 10BASE-T1S MACPHY SERIAL INTERFACE FRAMEWORK
M:	Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
L:	netdev@vger.kernel.org
S:	Maintained
F:	Documentation/networking/oa-tc6-framework.rst
F:	drivers/include/linux/oa_tc6.h
F:	drivers/net/ethernet/oa_tc6.c
OPEN FIRMWARE AND FLATTENED DEVICE TREE
M:	Rob Herring <robh@kernel.org>
M:	Saravana Kannan <saravanak@google.com>
+11 −0
Original line number Diff line number Diff line
@@ -158,6 +158,17 @@ config ETHOC
	help
	  Say Y here if you want to use the OpenCores 10/100 Mbps Ethernet MAC.

config OA_TC6
	tristate "OPEN Alliance TC6 10BASE-T1x MAC-PHY support"
	depends on SPI
	select PHYLIB
	help
	  This library implements OPEN Alliance TC6 10BASE-T1x MAC-PHY
	  Serial Interface protocol for supporting 10BASE-T1x MAC-PHYs.

	  To know the implementation details, refer documentation in
	  <file:Documentation/networking/oa-tc6-framework.rst>.

source "drivers/net/ethernet/packetengines/Kconfig"
source "drivers/net/ethernet/pasemi/Kconfig"
source "drivers/net/ethernet/pensando/Kconfig"
Loading