Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1153671pxb; Thu, 24 Mar 2022 13:54:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+gO2SucuUvi+zySUh4Mq9E5zL6VPZ8ytVnuKfjvLsySyb7cQ5erd4k3LQfHP0Ap0L4B+x X-Received: by 2002:a17:90b:1c01:b0:1c6:dc49:d146 with SMTP id oc1-20020a17090b1c0100b001c6dc49d146mr20123959pjb.29.1648155296688; Thu, 24 Mar 2022 13:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648155296; cv=none; d=google.com; s=arc-20160816; b=QvP2uUDqiuYx7AzoHmXrOg5oV8U4/rvAGgVGFVD7hqju3cs0uSRD8o9iClonmR1GIR oEIGHvJronF8CZAzJkPiMJ5s5Q9ZlVMRk0GJtaxy9DPILSd9Yvp6Le23jb+oi27Xx+Cf FRJMKIxMNEOpH2ixAsrF0uILKHQJOy5yNNOD6I1wTi8NTq9HhikKgk2S6k+ayNLoZw8a ZeYxGEUCaXEfPRDNGm6hAmcg71ruQ/dw9sjKdEMNFVHx2PRmHQEEPaWOwMeZSf6112OQ IXDNNiQznBrKeyrsbkOfbGhNV5loTDRcsxWsnsitzNB3jbjL2G7d3t1pOxN+gsqsLlqZ OdHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=MyuIGP+nmCsqpWBk9PTPX4dE0r0HKBc119+uy31RMdg=; b=sUrpuLlWXOqKWIZvPOLO0aP57R9SX01ZVqMYqO+JzdjCOAvwywyCQREE1oZBeiVh99 V3xq73li0+0y99TceVaVsEpLwXG8aW0BhbgPNQAdWngcxazHyue3b8M6hRQQyXeQEpwD elEXl7KJAUaz5+jmuo1So0p+DVlJmJPfSf9YwJDO7vCu+iCxaTJYqpPflg4ljXIST/o8 yM/zTqfEBnrrSoAlL78B/77kexIVmQdP4u59z+k86bTqGC4PGWulTObigHW/gjYro5NA TIvadUK6arSzDlaUQGXAecDc5qejrRFuDj0g3GoQ5wjToYWbDik5AO4m9EKw66Hkkf9f gK8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q31-20020a63505f000000b003816043f065si337666pgl.602.2022.03.24.13.54.42; Thu, 24 Mar 2022 13:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242409AbiCXLTW (ORCPT + 99 others); Thu, 24 Mar 2022 07:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349720AbiCXLTK (ORCPT ); Thu, 24 Mar 2022 07:19:10 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49F93A66E1; Thu, 24 Mar 2022 04:17:39 -0700 (PDT) Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22O8EDxU000304; Thu, 24 Mar 2022 07:17:07 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3f0hftjea7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Mar 2022 07:17:07 -0400 Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 22OBH6ju032720 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Mar 2022 07:17:06 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 24 Mar 2022 07:17:05 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 24 Mar 2022 07:17:05 -0400 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 22OBGjPZ000657; Thu, 24 Mar 2022 07:16:51 -0400 From: To: CC: , , , , , , , , , Subject: [PATCH v5 0/7] net: phy: adin1100: Add initial support for ADIN1100 industrial PHY Date: Thu, 24 Mar 2022 13:26:13 +0200 Message-ID: <20220324112620.46963-1-alexandru.tachici@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: t7QV_XB0tj72jaRm14JpnBCUk2-AdBki X-Proofpoint-ORIG-GUID: t7QV_XB0tj72jaRm14JpnBCUk2-AdBki X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-24_03,2022-03-24_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 priorityscore=1501 suspectscore=0 mlxscore=0 impostorscore=0 adultscore=0 mlxlogscore=825 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203240067 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandru Tachici The ADIN1100 is a low power single port 10BASE-T1L transceiver designed for industrial Ethernet applications and is compliant with the IEEE 802.3cg Ethernet standard for long reach 10 Mb/s Single Pair Ethernet. The ADIN1100 uses Auto-Negotiation capability in accordance with IEEE 802.3 Clause 98, providing a mechanism for exchanging information between PHYs to allow link partners to agree to a common mode of operation. The concluded operating mode is the transmit amplitude mode and master/slave preference common across the two devices. Both device and LP advertise their ability and request for increased transmit at: - BASE-T1 autonegotiation advertisement register [47:32]\ Clause 45.2.7.21 of Standard 802.3 - BIT(13) - 10BASE-T1L High Level Transmit Operating Mode Ability - BIT(12) - 10BASE-T1L High Level Transmit Operating Mode Request For 2.4 Vpp (high level transmit) operation, both devices need to have the High Level Transmit Operating Mode Ability bit set, and only one of them needs to have the High Level Transmit Operating Mode Request bit set. Otherwise 1.0 Vpp transmit level will be used. Settings for eth1: Supported ports: [ TP MII ] Supported link modes: 10baseT1L/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT1L/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT1L/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 10Mb/s Duplex: Full Auto-negotiation: on master-slave cfg: preferred slave master-slave status: slave Port: Twisted Pair PHYAD: 0 Transceiver: external MDI-X: Unknown Link detected: yes SQI: 7/7 1. Add basic support for ADIN1100. Alexandru Ardelean (1): net: phy: adin1100: Add initial support for ADIN1100 industrial PHY 1. Added 10baset-T1L link modes. 2. Added 10-BasetT1L registers. 3. Added Base-T1 auto-negotiation registers. For Base-T1 these registers decide master/slave status and TX voltage of the device and link partner. 4. Added 10BASE-T1L support in phy-c45.c. Now genphy functions will call Base-T1 functions where registers don't match, like the auto-negotiation ones. 5. Convert MSE to SQI using a predefined table and allow user access through ethtool. 6. DT bindings for the 2.4 Vpp transmit mode. Alexandru Ardelean (1): net: phy: adin1100: Add initial support for ADIN1100 industrial PHY Alexandru Tachici (6): ethtool: Add 10base-T1L link mode entry net: phy: Add 10-BaseT1L registers net: phy: Add BaseT1 auto-negotiation registers net: phy: Add 10BASE-T1L support in phy-c45 net: phy: adin1100: Add SQI support dt-bindings: net: phy: Add 10-baseT1L 2.4 Vpp Changelog V4 -> V5: - added int pma_extable; attribute to struct phy_device; - added genphy_c45_baset1_able() function to determine base-t1 ability - replaced constant reading of MDIO_PMA_EXTABLE and checking for MDIO_PMA_EXTABLE_BT1 in phy-c45.c with the genphy_c45_baset1_able() call .../devicetree/bindings/net/ethernet-phy.yaml | 9 + drivers/net/phy/Kconfig | 7 + drivers/net/phy/Makefile | 1 + drivers/net/phy/adin1100.c | 299 ++++++++++++++++++ drivers/net/phy/phy-c45.c | 258 ++++++++++++++- drivers/net/phy/phy-core.c | 3 +- drivers/net/phy/phy_device.c | 1 + include/linux/mdio.h | 70 ++++ include/linux/phy.h | 2 + include/uapi/linux/ethtool.h | 1 + include/uapi/linux/mdio.h | 75 +++++ net/ethtool/common.c | 3 + 12 files changed, 723 insertions(+), 6 deletions(-) create mode 100644 drivers/net/phy/adin1100.c -- 2.25.1