Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5388170rdb; Sat, 16 Sep 2023 15:09:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVWQzlaa3rAYJePJFvVM0+ao3/IcqVAB/JeGNKdw3v2pr+HSR9hSze5CfW+2C/1yuF2Ga9 X-Received: by 2002:a17:902:e752:b0:1c3:e3b1:9902 with SMTP id p18-20020a170902e75200b001c3e3b19902mr6273968plf.67.1694902155160; Sat, 16 Sep 2023 15:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694902155; cv=none; d=google.com; s=arc-20160816; b=j9koXXEnH0M7AURN2Hc0EPY/r86/vgRJJfyiXNPGbPdbH/JXsUP+1nx9gFpMLqACJS rhHK1sVJj7LWuI0Ks2ovPLKoiykO2nvBDmTgSlQpYK/P280HrLj8yqEFjSpM1xFRxBG0 i5XWPzqQK8CED+nDJgTuiBO03iVr/mNUHWmelAULh38TIhjRWkjqRbkq1Bxfm2p9x6Ki Z+FbhpmyB2MrDsm8wNHJ0xffp+i78hc5YN0iERiZvKyUSe0AqLCtakoHcSeNV7Esd2vr wMJ+WAynSCfhVEZ1vPfuL3Ef4qYksEDz6KEyXv0pUFVfHX+rKPHkhmLYJusC0oDksmb9 QFsA== 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=4p0NlFBH4xgH4kzo+ZWXDnGHN/kVaqsbVlpwtx8tToU=; fh=xwJj7+GJ5325fRxBxTnI1lwwrmdk/p8s2IJTP9CHNEk=; b=OnoULxHQbHQJ1cldIvWK+hDp+yh7kCwnipA/N1Uzvlm3ueGBVblhHFWfj4rTniPCSo 8JRFQwwXWDGRGFSvmSYBDZBFzISICGNx+H7kZ56KODrix//vu4PnBgIEMdhwzDTFjW40 k+1EsnktAAXX9awikUiqBvKUhUiBQ6y0yNVOAUkSmMxLCz3pkSE9/iL08O0Twu7EIlnn +aKdThvjK1id3QCE+BGMMFmEwWBywxLX2uOKlbcGLlfOWOwtLKdCMQ8BCxfN68t5JxhU 429+DubQCTNKch7dQ+0lUuTv5Q7g+LdzYMMz49Sazw7Zz0YrDx94267cxyt/Sc7hiY5Y rGDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b="GE4iVrg/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id n19-20020a170902d0d300b001c3f96ec6d6si5548354pln.111.2023.09.16.15.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 15:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b="GE4iVrg/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 65C1B805E43F; Sat, 16 Sep 2023 04:12:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239024AbjIPLLc (ORCPT + 99 others); Sat, 16 Sep 2023 07:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239086AbjIPLLE (ORCPT ); Sat, 16 Sep 2023 07:11:04 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A6581AA; Sat, 16 Sep 2023 04:10:57 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id A131B240005; Sat, 16 Sep 2023 11:10:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862655; 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=4p0NlFBH4xgH4kzo+ZWXDnGHN/kVaqsbVlpwtx8tToU=; b=GE4iVrg/VE60T4umjJ4+5PcY1uIjtRw3gTxSOWhjhMl1LwG2XNoSjEFnOZ0dZOadfELSFU pOfLfwbcAltSQTZaKj/bT32T4K4uc/NY2+crFKO7ljS9at1cQKOmC5F1Bb6IFA/P3kEMY0 BgK/+953ow3X4WlpMSs4ZvNx/64Q6nPf3zfLGyEffzzkgUxlZ4/GI27HNd8U88/1PGNiM2 OFLtIXplJbGO72zyIhGV7N5r61QYKwIcVmZwppFqtgp4obfTpB5BnHlSB5jq4Q+nPWYVQm 44ZADQdPQEC1SMG+DcZ9V/9ZgjksBqHUUa3TmdTAxTBP0pey/1KlshitGGnVeg== 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 04/10] dt-bindings: net: dsa: nxp,sja1105: improve MDIO bus bindings Date: Sat, 16 Sep 2023 14:08:56 +0300 Message-Id: <20230916110902.234273-5-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 agentk.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 (agentk.vger.email [0.0.0.0]); Sat, 16 Sep 2023 04:12:01 -0700 (PDT) The SJA1110 switch uses the mdios property for its two MDIO buses. Instead of a pattern, define two mdio nodes. This ensures the same compatible string won't be used twice. The address and size cell definitions can also be removed now that the reg property has become unnecessary. Move the comment to the description of mdios, mdio0, and mdio1 properties. Disallow the mdios property for SJA1105. Require at least one of the MDIO buses to be defined to prevent empty mdios child node. Signed-off-by: Arınç ÜNAL --- .../bindings/net/dsa/nxp,sja1105.yaml | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index 4d5f5cc6d031..3f3c4ecc6442 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -35,42 +35,44 @@ properties: spi-cpha: true spi-cpol: true - # Optional container node for the 2 internal MDIO buses of the SJA1110 - # (one for the internal 100base-T1 PHYs and the other for the single - # 100base-TX PHY). The "reg" property does not have physical significance. - # The PHY addresses to port correspondence is as follows: for 100base-T1, - # port 5 has PHY 1, port 6 has PHY 2 etc, while for 100base-TX, port 1 has - # PHY 1. mdios: + description: + The optional container node for the two MDIO buses of the SJA1110. type: object properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 - - patternProperties: - "^mdio@[0-1]$": + mdio0: + description: + The node for the bus controlling the 100base-T1 PHYs of the SJA1110 + switch. PHY address to port correspondence is port 5 has PHY 1, port 6 + has PHY 2, etc. $ref: /schemas/net/mdio.yaml# unevaluatedProperties: false properties: compatible: - oneOf: - - enum: - - nxp,sja1110-base-t1-mdio - - nxp,sja1110-base-tx-mdio + const: nxp,sja1110-base-t1-mdio + + required: + - compatible - reg: - oneOf: - - enum: - - 0 - - 1 + mdio1: + description: + The node for the bus controlling the 100base-TX PHY of the SJA1110 + switch. PHY address to port correspondence is port 1 has PHY 1. + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + + properties: + compatible: + const: nxp,sja1110-base-tx-mdio required: - compatible - - reg + + anyOf: + - required: [ mdio0 ] + - required: [ mdio1 ] patternProperties: "^(ethernet-)?ports$": @@ -124,6 +126,7 @@ allOf: then: properties: spi-cpol: false + mdios: false required: - spi-cpha else: -- 2.39.2