From patchwork Sat Sep 16 11:08:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 13388326 X-Patchwork-Delegate: geert@linux-m68k.org 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 4F7F8CD37BB for ; Sat, 16 Sep 2023 11:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbjIPLNj (ORCPT ); Sat, 16 Sep 2023 07:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231482AbjIPLNI (ORCPT ); Sat, 16 Sep 2023 07:13:08 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9F36E62; Sat, 16 Sep 2023 04:12:41 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 86FEF240002; Sat, 16 Sep 2023 11:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sxK8lRKWIBb9Z0O3Tvb06WKXqFsJaGZqBLWHiNoJa3o=; b=DjJ2fCg+wOKIS1DRGr73CWt8njm6u2HR4WWyOJN4HutNBHu3/1RBIe+MHn7PjSeGIMw80C yP9rtDIfZKpD82VrW1U/XKKELh1kDRKoMHwxMdgEyyPzKJShHGQ9cxqafjEDOkmlfw23WY pCa2BdbZUMV8QP1VaCiRb5Q061T7COsXPzdtfNE1S5pDdfbWus9ads9qANlQwgR/Zn3dGN 5v4N9sqpqn8MM/3dA//0l6TKN38AtKhhOtmLqUkNaLVB/eO2NomBYxZsESH18gCfMzu5i7 cYOy2zBTTP4eNXco6g9d1Werqui7D+26dueceOzN3KMSzZIGPNE0/N81TmDHXA== From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , George McCollister , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Kurt Kanzenbach , Matthias Brugger , AngeloGioacchino Del Regno , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , =?utf-8?q?Alvin_=C5=A0ipraga?= , =?utf-8?b?Q2zDqW1l?= =?utf-8?b?bnQgTMOpZ2Vy?= , Marcin Wojtas , "Russell King (Oracle)" , Lars Povlsen , Steen Hegelund , Daniel Machon , Radhey Shyam Pandey , =?utf-8?b?QXLEsW7DpyA=?= =?utf-8?b?w5xOQUw=?= , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Geert Uytterhoeven , Magnus Damm , Maxime Chevallier , Nicolas Ferre , Claudiu Beznea , Marek Vasut , Claudiu Manoil , Alexandre Belloni , John Crispin , Madalin Bucur , Ioana Ciornei , Lorenzo Bianconi , Felix Fietkau , Horatiu Vultur , Oleksij Rempel , Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , Grygorii Strashko , Sekhar Nori , Shyam Pandey Cc: Woojung Huh , Steen Hegelund , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next v2 06/10] dt-bindings: net: define phylink bindings Date: Sat, 16 Sep 2023 14:08:58 +0300 Message-Id: <20230916110902.234273-7-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230916110902.234273-1-arinc.unal@arinc9.com> References: <20230916110902.234273-1-arinc.unal@arinc9.com> MIME-Version: 1.0 X-GND-Sasl: arinc.unal@arinc9.com Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Define the phylink bindings on ethernet-controller.yaml and replace the bindings on the dsa-port.yaml schema with them. The shared ports of DSA requires phy-mode so keep that. Important remarks about the phylink bindings: - fsl,fman-dtsec uses tbi-handle instead of pcs-handle, therefore tbi-handle is included. - For sfp, only managed with the in-band-status value must be required, but phy-handle is required as another option because of a special case on the eth2 node on arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts. Signed-off-by: Arınç ÜNAL --- .../devicetree/bindings/net/dsa/dsa-port.yaml | 12 ++------ .../bindings/net/ethernet-controller.yaml | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml index 480120469953..53efb686cfc7 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml @@ -65,16 +65,8 @@ if: - required: [ ethernet ] - required: [ link ] then: - allOf: - - required: - - phy-mode - - oneOf: - - required: - - fixed-link - - required: - - phy-handle - - required: - - managed + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + required: [ phy-mode ] additionalProperties: true diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index 9f6a5ccbcefe..ef28ebc76798 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml @@ -284,6 +284,35 @@ allOf: controllers that have configurable TX internal delays. If this property is present then the MAC applies the TX delay. +$defs: + phylink: + description: phylink bindings for ethernet controllers + allOf: + - anyOf: + - required: [ fixed-link ] + - required: [ pcs-handle ] + - required: [ tbi-handle ] + - required: [ phy-handle ] + - required: [ sfp ] + - required: [ managed ] + + - if: + required: [ fixed-link ] + then: + properties: + managed: + const: auto + + - if: + required: [ sfp ] + then: + oneOf: + - required: [ phy-handle ] + - required: [ managed ] + properties: + managed: + const: in-band-status + additionalProperties: true ...