From nobody Fri Sep 20 11:41:13 2024 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 D8B1FCD37BB for ; Sat, 16 Sep 2023 11:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239104AbjIPLLd (ORCPT ); Sat, 16 Sep 2023 07:11:33 -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: quoted-printable X-GND-Sasl: arinc.unal@arinc9.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=C4=B1n=C3=A7 =C3=9CNAL --- .../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/D= ocumentation/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 =20 - # 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 significanc= e. - # 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 h= as - # PHY 1. mdios: + description: + The optional container node for the two MDIO buses of the SJA1110. type: object =20 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 SJA1= 110 + 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 =20 properties: compatible: - oneOf: - - enum: - - nxp,sja1110-base-t1-mdio - - nxp,sja1110-base-tx-mdio + const: nxp,sja1110-base-t1-mdio + + required: + - compatible =20 - reg: - oneOf: - - enum: - - 0 - - 1 + mdio1: + description: + The node for the bus controlling the 100base-TX PHY of the SJA11= 10 + 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 =20 required: - compatible - - reg + + anyOf: + - required: [ mdio0 ] + - required: [ mdio1 ] =20 patternProperties: "^(ethernet-)?ports$": @@ -124,6 +126,7 @@ allOf: then: properties: spi-cpol: false + mdios: false required: - spi-cpha else: --=20 2.39.2