From patchwork Sat Sep 16 11:08:56 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: 1835482 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=arinc9.com header.i=@arinc9.com header.a=rsa-sha256 header.s=gm1 header.b=GE4iVrg/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=permerror (SPF Permanent Error: More than 10 MX records returned) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-759-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RnpKq0PF9z1yhy for ; Sat, 16 Sep 2023 21:11:59 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F16ED1C2093C for ; Sat, 16 Sep 2023 11:11:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 728F0134C0; Sat, 16 Sep 2023 11:11:01 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA566134B4; Sat, 16 Sep 2023 11:10:59 +0000 (UTC) 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?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 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: arinc.unal@arinc9.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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: