Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1312094rda; Mon, 23 Oct 2023 08:48:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEw5Tf+kf5zOEV6n33gZl026w3YAsadMdhSFkHW+d5l+cSiBz15/tnG8wrviTKVcayQcryx X-Received: by 2002:a05:6358:1804:b0:168:ea0e:e7e2 with SMTP id u4-20020a056358180400b00168ea0ee7e2mr1123896rwm.4.1698076095151; Mon, 23 Oct 2023 08:48:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698076095; cv=none; d=google.com; s=arc-20160816; b=OZ2fFOpH6dc2zH5ycIHbLXaZdYxch3w+FIvRNVHyboJcSAmKCxSyYTdqHVkjuyeigm ytzEkzdZsjGUH7cdUpLTxLYvj3FGsraaHsn8Vu0yEsa1FKE7OvefGTR+UZoKwtYuZkGj vqjjvlo+XXkCv6TD06ONttpBPzum4+GCaYprWzpw6P71vyeHOJFkwf30nPd8U8AB8FjJ nypnWVYQmIKl/4smnxJHPnmreH3BBlqqMBmCbrySZX4RMof0+4dEaAF4sIJd0o04/F/3 N3TfxYIwEiq0LI7g5oig+4xvld6QBoLMITtJO3O+uU+S1SQzBMgcIQGSoRVcfMEveDFA V6HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=BEJszNVMtEcwG1PxdVLoTbroSCex0Ihpwpciulv0SYY=; fh=Q8NcdHh7ZH3WNhS8B25W7Zd1jgCsteS1Xfmmwt5FzZY=; b=qf6K3yRQNAFdosD3yztwN7Kl72xnOn4ydpDR4ofzpsTavhtwN7wg9h6vV9IpdSd2Gc Z9f2uzc7BKYKZN3J2dqErYj1IuC+bW3epo4aWEFBAtkLGZzdRfWJMXipHhymTsWpdER0 NYGr01vLMkxLF/vQnsA2VhTShn3w8eNrG6LfYuKb+QDJ6VNuujamBj2tQcChVrAA+BPG vz43mnL72imdNnGWPHGN1DNDJsrX3Uum3vu8VAClAsuGO+v9winNHq35wU2Mq679LXTQ sjVV25evohTO94CPqbhB+CbrdObJSkAhLoUnSEN7lL5bG1JNjgyF+ROpRIO6Z4P3r/YA OKcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=AOcbmYXp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id v10-20020a63610a000000b005acf91427cfsi6763495pgb.628.2023.10.23.08.48.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 08:48:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=AOcbmYXp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0C5848087F10; Mon, 23 Oct 2023 08:48:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232060AbjJWPrZ (ORCPT + 99 others); Mon, 23 Oct 2023 11:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232139AbjJWPrY (ORCPT ); Mon, 23 Oct 2023 11:47:24 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0FFF10A; Mon, 23 Oct 2023 08:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1698076042; x=1729612042; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=azRF8Tr1FjS1mhmfgNj7KBFmuZpo8uSGPa9Rwz8beHA=; b=AOcbmYXpP3I3AeurpyTMMH9NIWqUTqv1/JnVYwMlZHWZ0PIjOcB5VkJz VUI8X1QMg6+gErmM8bxi9SU+Z1rMV6p0yBKhoTFIeri2gxGJYhWFcHiKW J1W1Y7S4HKgjtX7soYkG23s9/CO7WEpwcFSXL/WP/mwNYhSepkfjfCxnp pE5jh3oRVRn0GTVGI5tmCOtjjjJgQ9X89O50kFiQFhXW6NOYJOJt79yfw euUqyezUwQ89rXsi4U44OIZcG8l4dDMkSaNa8s+LAhTkwkkPDblU29IHh arMPZpE7myqngTRsXeTaAWxMKBhDEXmKS6O1jagfpMOdLJVLwvg21QrWh g==; X-CSE-ConnectionGUID: NJm2u3DySce+5c8BG0159g== X-CSE-MsgGUID: KpmGRKNCTo+hPa8sxGPz0A== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="10702766" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Oct 2023 08:47:20 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 23 Oct 2023 08:47:08 -0700 Received: from CHE-LT-I17164LX.microchip.com (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Mon, 23 Oct 2023 08:46:56 -0700 From: Parthiban Veerasooran To: , , , , , , , , , , , , CC: , , , , , , , , , Parthiban Veerasooran Subject: [PATCH net-next v2 0/9] Add support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface Date: Mon, 23 Oct 2023 21:16:40 +0530 Message-ID: <20231023154649.45931-1-Parthiban.Veerasooran@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 23 Oct 2023 08:48:09 -0700 (PDT) This patch series contain the below updates, - Adds support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface in the net/ethernet/oa_tc6.c. - Adds driver support for Microchip LAN8650/1 Rev.B0 10BASE-T1S MACPHY Ethernet driver in the net/ethernet/microchip/lan865x.c. Changes: v2: - Removed RFC tag. - OA TC6 framework configured in the Kconfig and Makefile to compile as a module. - Kerneldoc headers added for all the API methods exposed to MAC driver. - Odd parity calculation logic updated from the below link, https://elixir.bootlin.com/linux/latest/source/lib/bch.c#L348 - Control buffer memory allocation moved to the initial function. - struct oa_tc6 implemented as an obaque structure. - Removed kthread for handling mac-phy interrupt instead threaded irq is used. - Removed interrupt implementation for soft reset handling instead of that polling has been implemented. - Registers name in the defines changed according to the specification document. - Registers defines are arranged in the order of offset and followed by register fields. - oa_tc6_write_register() implemented for writing a single register and oa_tc6_write_registers() implemented for writing multiple registers. - oa_tc6_read_register() implemented for reading a single register and oa_tc6_read_registers() implemented for reading multiple registers. - Removed DRV_VERSION macro as git hash provided by ethtool. - Moved MDIO bus registration and PHY initialization to the OA TC6 lib. - Replaced lan865x_set/get_link_ksettings() functions with phy_ethtool_ksettings_set/get() functions. - MAC-PHY's standard capability register values checked against the user configured values. - Removed unnecessary parameters validity check in various places. - Removed MAC address configuration in the lan865x_net_open() function as it is done in the lan865x_probe() function already. - Moved standard registers and proprietary vendor registers to the respective files. - Added proper subject prefixes for the DT bindings. - Moved OA specific properties to a separate DT bindings and corrected the types & mistakes in the DT bindings. - Inherited OA specific DT bindings to the LAN865x specific DT bindings. - Removed sparse warnings in all the places. - Used net_err_ratelimited() for printing the error messages. - oa_tc6_process_rx_chunks() function and the content of oa_tc6_handler() function are split into small functions. - Used proper macros provided by network layer for calculating the MAX_ETH_LEN. - Return value of netif_rx() function handled properly. - Removed unnecessary NULL initialization of skb in the oa_tc6_rx_eth_ready() function removed. - Local variables declaration ordered in reverse xmas tree notation. Parthiban Veerasooran (9): net: ethernet: implement OPEN Alliance control transaction interface net: ethernet: oa_tc6: implement mac-phy software reset net: ethernet: oa_tc6: implement OA TC6 configuration function dt-bindings: net: add OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface net: ethernet: oa_tc6: implement internal PHY initialization dt-bindings: net: oa-tc6: add PHY register access capability net: ethernet: oa_tc6: implement data transaction interface microchip: lan865x: add driver support for Microchip's LAN865X MACPHY dt-bindings: net: add Microchip's LAN865X 10BASE-T1S MACPHY .../bindings/net/microchip,lan865x.yaml | 101 ++ .../devicetree/bindings/net/oa-tc6.yaml | 86 ++ Documentation/networking/oa-tc6-framework.rst | 233 ++++ MAINTAINERS | 16 + drivers/net/ethernet/Kconfig | 12 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/microchip/Kconfig | 11 + drivers/net/ethernet/microchip/Makefile | 2 + drivers/net/ethernet/microchip/lan865x.c | 415 ++++++ drivers/net/ethernet/oa_tc6.c | 1117 +++++++++++++++++ include/linux/oa_tc6.h | 109 ++ 11 files changed, 2103 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/microchip,lan865x.yaml create mode 100644 Documentation/devicetree/bindings/net/oa-tc6.yaml create mode 100644 Documentation/networking/oa-tc6-framework.rst create mode 100644 drivers/net/ethernet/microchip/lan865x.c create mode 100644 drivers/net/ethernet/oa_tc6.c create mode 100644 include/linux/oa_tc6.h -- 2.34.1