From patchwork Fri Jul 14 10:14:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samin Guo X-Patchwork-Id: 702957 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D07ACEB64DA for ; Fri, 14 Jul 2023 10:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236067AbjGNKOO (ORCPT ); Fri, 14 Jul 2023 06:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235938AbjGNKON (ORCPT ); Fri, 14 Jul 2023 06:14:13 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F106E44; Fri, 14 Jul 2023 03:14:11 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 6BE9D24E1AC; Fri, 14 Jul 2023 18:14:09 +0800 (CST) Received: from EXMBX062.cuchost.com (172.16.6.62) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 14 Jul 2023 18:14:09 +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; Fri, 14 Jul 2023 18:14:08 +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 v4 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg Date: Fri, 14 Jul 2023 18:14:05 +0800 Message-ID: <20230714101406.17686-2-samin.guo@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230714101406.17686-1-samin.guo@starfivetech.com> References: <20230714101406.17686-1-samin.guo@starfivetech.com> MIME-Version: 1.0 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The motorcomm phy (YT8531) supports the ability to adjust the drive strength of the rx_clk/rx_data. The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the LDO voltage can be configured with hardware pull-up resistors to match the SOC voltage (usually 1.8V). The software can read the registers 0xA001 obtain the current LDO voltage value. When we configure the drive strength, we need to read the current LDO voltage value to ensure that it is a legal value at that LDO voltage. Reviewed-by: Hal Feng Signed-off-by: Samin Guo --- .../bindings/net/motorcomm,yt8xxx.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml b/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml index 157e3bbcaf6f..097bf143af35 100644 --- a/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml +++ b/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml @@ -52,6 +52,52 @@ properties: for a timer. type: boolean + motorcomm,rx-clk-driver-strength: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + drive strength of rx_clk rgmii pad. + |----------------------------------| + | rx_clk ds map table | + |----------------------------------| + | DS(3b) | wol@1.8v | wol@3.3v | + |________|_________________________| + | | current(uA)| current(uA)| + | 000 | 1200 | 3070 | + | 001 | 2100 | 4080 | + | 010 | 2700 | 4370 | + | 011 | 2910 | 4680 | + | 100 | 3110 | 5020 | + | 101 | 3600 | 5450 | + | 110 | 3970 | 5740 | + | 111 | 4350 | 6140 | + |--------|------------|------------| + enum: [ 1200, 2100, 2700, 2910, 3070, 3110, 3600, 3970, + 4080, 4350, 4370, 4680, 5020, 5450, 5740, 6140 ] + default: 2910 + + motorcomm,rx-data-driver-strength: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + drive strength of rx_data/rx_ctl rgmii pad. + |----------------------------------| + | rx_data ds map table | + |----------------------------------| + | DS(3b) | wol@1.8v | wol@3.3v | + |________|_________________________| + | | current(uA)| current(uA)| + | 000 | 1200 | 3070 | + | 001 | 2100 | 4080 | + | 010 | 2700 | 4370 | + | 011 | 2910 | 4680 | + | 100 | 3110 | 5020 | + | 101 | 3600 | 5450 | + | 110 | 3970 | 5740 | + | 111 | 4350 | 6140 | + |--------|------------|------------| + enum: [ 1200, 2100, 2700, 2910, 3070, 3110, 3600, 3970, + 4080, 4350, 4370, 4680, 5020, 5450, 5740, 6140 ] + default: 2910 + motorcomm,tx-clk-adj-enabled: description: | This configuration is mainly to adapt to VF2 with JH7110 SoC.