From patchwork Wed Jan 12 18:16:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12711840 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2120BC433F5 for ; Wed, 12 Jan 2022 18:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5x8hlfT8B6Yk8sNrjWiQntVs5e1Sw/UV7PiAoKrEz6M=; b=RQXDG7E09QWm1X HDS6GD3seICSkzKvXVZHqfo0X8CI4J7E67Yoh4nvUPoNqdKkCaj1BtNY/UcDeU+p5eiLPP067tyaB S6UDv8xylmcViL5Z7MJqntVBxElwAL7kLleevsJoQhpDpQ6F7FPrOqKXmmXKjZmeg8JXALeOaYxLS OG0POGWmkyNmj+taFXw69k3wx0Qh4BUKqhmAFI0Kx3mYV/G6FyyPw1RtZ0UkSGiA8kOgxWkzsDuwj shPuLY5hA0y8mrq1hAQ8wUm/uk1Lraim+25YSi+V4bDbKO+Mt+Bo7MQHWxqJqpUeoKFb1HqoqxYCX 5iSnn30IxZiDE2TVJ3+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7iAT-003Rag-I9; Wed, 12 Jan 2022 18:16:17 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7iAN-003RZV-SN for linux-phy@lists.infradead.org; Wed, 12 Jan 2022 18:16:13 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 025B2B82021; Wed, 12 Jan 2022 18:16:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8360BC36AE5; Wed, 12 Jan 2022 18:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642011368; bh=J7F1bUADdGWlMHvynFP562AieLiEYMIBcsKTpe9EoMA=; h=From:To:Cc:Subject:Date:From; b=KQJGwu2zKzZ7CKlTuhdL1yof+jHa8eS22zW41Zdrd/dvL0YtMjCFm6qDLihvd+N6I 3/RZeRUTC5cuV9A0YIPf2nYuAGRWKfpoFXwTSVGP5fWAsvJY7TABfK4rE9ZSw9dO/7 KFAuIObzERpezDLX0/08qkkDHxr45wAQPhsUxw1paTW1OX1K/dqNoPqSGJ1mpLzGd+ X9tzqantNSikvWEbHQPwH26hJemh8VKBs18fCmAmPwSeZSLq/QBeEkxn19kAIYv0sA JY0mR7PVqfe2IbHc/kcxG86O4TpK2GoOmZZOepZVUjtXPdD/yFhu80WYWXbhX80JH9 BCSwZdQHL6W6Q== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Rob Herring , devicetree@vger.kernel.org Cc: Vladimir Oltean , Holger Brunck , Andrew Lunn , "netdev@vger.kernel.org" , Russell King , linux-phy@lists.infradead.org, Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH devicetree v2] dt-bindings: phy: Add `tx-p2p-microvolt` property binding Date: Wed, 12 Jan 2022 19:16:02 +0100 Message-Id: <20220112181602.13661-1-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220112_101612_240469_AA94A7B0 X-CRM114-Status: GOOD ( 16.22 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Common PHYs and network PCSes often have the possibility to specify peak-to-peak voltage on the differential pair - the default voltage sometimes needs to be changed for a particular board. Add properties `tx-p2p-microvolt` and `tx-p2p-microvolt-names` for this purpose. The second property is needed to specify the mode for the corresponding voltage in the `tx-p2p-microvolt` property, if the voltage is to be used only for speficic mode. More voltage-mode pairs can be specified. Example usage with only one voltage (it will be used for all supported PHY modes, the `tx-p2p-microvolt-names` property is not needed in this case): tx-p2p-microvolt = <915000>; Example usage with voltages for multiple modes: tx-p2p-microvolt = <915000>, <1100000>, <1200000>; tx-p2p-microvolt-names = "2500base-x", "usb", "pcie"; Add these properties into a separate file phy/transmit-amplitude.yaml, selecting it for validation if either of the `tx-p2p-microvolt`, `tx-p2p-microvolt-names` properties is set for a node. Signed-off-by: Marek BehĂșn --- .../bindings/phy/transmit-amplitude.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/transmit-amplitude.yaml diff --git a/Documentation/devicetree/bindings/phy/transmit-amplitude.yaml b/Documentation/devicetree/bindings/phy/transmit-amplitude.yaml new file mode 100644 index 000000000000..90a491b75f61 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/transmit-amplitude.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/transmit-amplitude.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common PHY and network PCS transmit amplitude property binding + +description: + Binding describing the peak-to-peak transmit amplitude for common PHYs + and network PCSes. + +maintainers: + - Marek BehĂșn + +properties: + tx-p2p-microvolt: + description: + Transmit amplitude voltages in microvolts, peak-to-peak. If this property + contains multiple values for various PHY modes, the + 'tx-p2p-microvolt-names' property must be provided and contain + corresponding mode names. + + tx-p2p-microvolt-names: + description: | + Names of the modes corresponding to voltages in the 'tx-p2p-microvolt' + property. Required only if multiple voltages are provided. + + If a value of 'default' is provided, the system should use it for any PHY + mode that is otherwise not defined here. If 'default' is not provided, the + system should use manufacturer default value. + minItems: 1 + maxItems: 16 + items: + enum: + - default + + # ethernet modes + - sgmii + - qsgmii + - xgmii + - 1000base-x + - 2500base-x + - 5gbase-r + - rxaui + - xaui + - 10gbase-kr + - usxgmii + - 10gbase-r + - 25gbase-r + + # PCIe modes + - pcie + - pcie1 + - pcie2 + - pcie3 + - pcie4 + - pcie5 + - pcie6 + + # USB modes + - usb + - usb-ls + - usb-fs + - usb-hs + - usb-ss + - usb-ss+ + - usb-4 + + # storage modes + - sata + - ufs-hs + - ufs-hs-a + - ufs-hs-b + + # display modes + - lvds + - dp + - dp-rbr + - dp-hbr + - dp-hbr2 + - dp-hbr3 + - dp-uhbr-10 + - dp-uhbr-13.5 + - dp-uhbr-20 + + # camera modes + - mipi-dphy + - mipi-dphy-univ + - mipi-dphy-v2.5-univ + +dependencies: + tx-p2p-microvolt-names: [ tx-p2p-microvolt ] + +select: + anyOf: + - required: + - 'tx-p2p-microvolt' + - required: + - 'tx-p2p-microvolt-names' + +additionalProperties: true + +examples: + - | + phy: phy { + #phy-cells = <1>; + tx-p2p-microvolt = <915000>, <1100000>, <1200000>; + tx-p2p-microvolt-names = "2500base-x", "usb-hs", "usb-ss"; + };