Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5185892rdb; Sat, 16 Sep 2023 06:30:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFInXCcJooFcd/os5MKo8wuiesRv4GDRt1vMQ0sDkYPnQjSo73O5i+0i8U9qIIn1RmQWvWC X-Received: by 2002:a17:902:6ac7:b0:1b8:954c:1f6 with SMTP id i7-20020a1709026ac700b001b8954c01f6mr4119168plt.36.1694871046914; Sat, 16 Sep 2023 06:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694871046; cv=none; d=google.com; s=arc-20160816; b=uamurD4Tuod/M+M1dTvrl4AQwcvkH5oMw3TtgRkaUnC0U+LZE4gGI2zPm5JyIQD4ES 25n0L2W4JsmRAi41nNPcYp2IcVUYp5qKwCWqchi9ztb4ooMX0u4yzWKkx2tX8JxK9891 uLrS58XC9YwrTluMrA/k2rXDRCLCtI5hIeuQRMTLtR9PO5W7QY1itqt8XRNT9YlyGH/T RS7cK1wyfdF7K4zabOKlf9IeJs+haAHR/XCzEgMf7Gd+MxfhVv8Sgq+vhCKUuI0CY9Oy JhChnmSlmWzuDAJDDtWnn9s2J0PTTssTHeNqpNcnk1Y26xO5Apg0eDqILDGAeFJuhQI1 y5Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sxK8lRKWIBb9Z0O3Tvb06WKXqFsJaGZqBLWHiNoJa3o=; fh=xwJj7+GJ5325fRxBxTnI1lwwrmdk/p8s2IJTP9CHNEk=; b=UL+Hs3F6cHKbkb+t7J7qDCDG+qc+QJHZ/Jn9UgteS5rCaLSlo3tR9rz8noBrfOAizq 2aRi6KksUAiT7a4znTUl3EzSSbGXKO+WppJm7n8vODKxPFwZVU9pkLN3KVMewFeEvB7u TOsre78ih9xgBDXHq46sqiyC9qOb/pihcFMqH6em/qgdhhFA4uSzmaXM/Ws1P99dhHpQ Lqb4/CFbScA+YB9j59ppwr/mFyzMaPgYvPbYalr0JqvDrQD1FUYrCELH2orKjGsN8dhG lcIG1kEbQQYpKwG4Tzbv09Yi6rX9QZCUBOByoEfLs0dKB33VyMLZJcybzD2uyb2Q801w +rsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=DjJ2fCg+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id u15-20020a170903124f00b001c39b8b1d77si5273535plh.149.2023.09.16.06.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 06:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=DjJ2fCg+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BECC7809C181; Sat, 16 Sep 2023 04:14:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238889AbjIPLNk (ORCPT + 99 others); Sat, 16 Sep 2023 07:13:40 -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?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= 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=20=C5=A0ipraga?= , =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Marcin Wojtas , "Russell King (Oracle)" , Lars Povlsen , Steen Hegelund , Daniel Machon , Radhey Shyam Pandey , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 16 Sep 2023 04:14:12 -0700 (PDT) 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 ... -- 2.39.2