Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9386302rwp; Thu, 20 Jul 2023 04:19:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlHx9Slp+w8jldWx7J0xmW3GLQq6fm8f83iPo/Hc9two6R81YXnzne6/1mSU/SyKGOZGQTuU X-Received: by 2002:a19:6448:0:b0:4f8:7513:8cac with SMTP id b8-20020a196448000000b004f875138cacmr1352924lfj.48.1689851960659; Thu, 20 Jul 2023 04:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689851960; cv=none; d=google.com; s=arc-20160816; b=BCd+rwRXXRwBZsyOzsDr1mE7ipUuWQyHn71EY1VtIT6YyipXBTKLkTSs2DUhe3mzQB mOmP7bYv2hZ413r+4bda4u8WCbU9OCho9IK4WX6MPIwM8gfj4sKyRg9M0wuqJEgMLh5F tsnBP9rVWZ30I0iSVtPFUen5aTnj7SPbGMRCEwkfTxdgTDAiWGn1H9rWkb6VSxdcpaIh rqcV0o/R2jfHtbHqFkh5+/MckHQ/9Y24vaHJG/8RFLkEbCYmkp2z6r1bB+t5q2ZD5TFZ qFZ/sFPf57oIlEWstC3Ke44SN0RgwoY3StI8Z+k8kGUVNr6AZc0U9NPxgO2uOsxPfAgC X/zg== 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=Twua0CZDnbE6NCadwhU8quhEOSi2smYp/f5gcyLuuwI=; fh=P0b/g348bZwYtt4242sI6uTUj2SsQhKh2PNE6+fA3lc=; b=VfBkR5CQc0anPv5aZau2kFxVcspk+VNQe0HB6CPyflt0GBpFBI/GH7gL26FxPb7IrL JkvesI3Uf2fsytGE80Um5c7cnXLbfZoEjf5TR7EI8ggvlNx13gjIXqQKyM8+mjQAs8lo Yv89jWMuR0fawJwgqMQR0bmbm2CMeh3JZUxkgo9MGZSw/Ajnjcinn1XVZEvSezN+ju90 td56LKPGmHN00ssP+vqc381YrGvnD5kgQm1XzzdtGQVycZePvmSdnB+gYmouUg2AUrzn Gae1TQPhDkzV1Gz3XHyht3gIPfSSAtZsT0EqsuO2CDkph8t6pc/b5Bo2WzVKO4y+FTzK hGeQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay17-20020a170906d29100b0098df7d0e09csi491722ejb.923.2023.07.20.04.18.55; Thu, 20 Jul 2023 04:19:20 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230333AbjGTLPZ (ORCPT + 99 others); Thu, 20 Jul 2023 07:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbjGTLPT (ORCPT ); Thu, 20 Jul 2023 07:15:19 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5B182699; Thu, 20 Jul 2023 04:15:17 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 6662024DEC3; Thu, 20 Jul 2023 19:15:11 +0800 (CST) Received: from EXMBX062.cuchost.com (172.16.6.62) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 20 Jul 2023 19:15:11 +0800 Received: from starfive-sdk.starfivetech.com (171.223.208.138) by EXMBX062.cuchost.com (172.16.6.62) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 20 Jul 2023 19:15:09 +0800 From: Samin Guo To: , , , Peter Geis , Frank CC: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Andrew Lunn , Heiner Kallweit , "Russell King" , Samin Guo , "Yanhong Wang" Subject: [PATCH v5 0/2] Add motorcomm phy pad-driver-strength-cfg support Date: Thu, 20 Jul 2023 19:15:07 +0800 Message-ID: <20230720111509.21843-1-samin.guo@starfivetech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX062.cuchost.com (172.16.6.62) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 The motorcomm phy (YT8531) supports the ability to adjust the drive strength of the rx_clk/rx_data, and the default strength may not be suitable for all boards. So add configurable options to better match the boards.(e.g. StarFive VisionFive 2) The first patch adds a description of dt-bingding, and the second patch adds YT8531's parsing and settings for pad-driver-strength-cfg. Changes since v4: Patch 1: - Removed register-related DS(3b) values and added vol descriptions (by Andrew Lunn) - Dropped the type and added '-microamp' suffix. (by Rob Herring) Patch 2: - Return -EINVAL if the value in DT but it is invalid (by Andrew Lunn) Changes since v3: Patch 1: - Used current values instead of register values - Added units and numerical descriptions of driver-strength Patch 2: - Added a lookup table to listing the valid values in the schema (by Andrew Lunn) Changes since v2: Patch 2: - Readjusted the order of YT8531_RGMII_xxx to below YTPHY_PAD_DRIVE_STRENGTH_REG (by Frank Sae) - Reversed Christmas tree, sort these longest first, shortest last (by Andrew Lunn) - Rebased on tag v6.4 Changes since v1: Patch 1: - Renamed "rx-xxx-driver-strength" to "motorcomm,rx-xxx-driver-strength" (by Frank Sae) Patch 2: - Added default values for rxc/rxd driver strength (by Frank Sea/Andrew Lunn) - Added range checking when val is in DT (by Frank Sea/Andrew Lunn) Previous versions: v1 - https://patchwork.kernel.org/project/netdevbpf/cover/20230426063541.15378-1-samin.guo@starfivetech.com v2 - https://patchwork.kernel.org/project/netdevbpf/cover/20230505090558.2355-1-samin.guo@starfivetech.com v3 - https://patchwork.kernel.org/project/netdevbpf/cover/20230526090502.29835-1-samin.guo@starfivetech.com v4 - https://patchwork.kernel.org/project/netdevbpf/cover/20230714101406.17686-1-samin.guo@starfivetech.com Samin Guo (2): dt-bindings: net: motorcomm: Add pad driver strength cfg net: phy: motorcomm: Add pad drive strength cfg support .../bindings/net/motorcomm,yt8xxx.yaml | 34 +++++ drivers/net/phy/motorcomm.c | 118 ++++++++++++++++++ 2 files changed, 152 insertions(+) base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 -- 2.17.1