From patchwork Sat Sep 16 11:08:53 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: 723718 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 35EDB134AE; Sat, 16 Sep 2023 11:09:52 +0000 (UTC) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB70119F; Sat, 16 Sep 2023 04:09:50 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 73E3E240003; Sat, 16 Sep 2023 11:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862589; 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=lscCcidsJMMOQkHcl8eCmBbaHAYgbiEltqPqbGnvzb8=; b=VdvydhjubqnTb7zMzlmvDb1AyuPlHiJU1Pmq977kdg2rTcKM8lqKF5FamXN2RD0kuYAIKy N8Ya1bJkDpYePX037ZX6DqzRS0aKK2BR1qZd/1rKahuc1ZE1+DtjF2ml8+DyuBdJko/L41 uVMRjFxnMGH+z0aMGnqqBl5aZtHgnocmV81BBECvLyncbHRVPeGz6eTvI95chAwCXQdidJ S32jFRpQiAwE/WbqdYKdR+VXecLnoA4IslS+9AACuM+g+hehqFq9qshqXUr5pYUhcDGqXJ a4fsb0r7UVYdHD6LyPImW+59xuH2V1lIYn95YPoIeElxjf65EAGYpMe3WTuxug== 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: David Bauer , 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 01/10] net: dsa: mt7530: register OF node for internal MDIO bus Date: Sat, 16 Sep 2023 14:08:53 +0300 Message-Id: <20230916110902.234273-2-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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 From: David Bauer The MT753x switches provide a switch-internal MDIO bus for the embedded PHYs. Register a OF sub-node on the switch OF-node for this internal MDIO bus. This allows to configure the embedded PHYs using device-tree. Signed-off-by: David Bauer Signed-off-by: Daniel Golle Signed-off-by: Arınç ÜNAL --- drivers/net/dsa/mt7530.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 035a34b50f31..7db9af7b9658 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2156,10 +2156,13 @@ mt7530_setup_mdio(struct mt7530_priv *priv) { struct dsa_switch *ds = priv->ds; struct device *dev = priv->dev; + struct device_node *np, *mnp; struct mii_bus *bus; static int idx; int ret; + np = priv->dev->of_node; + bus = devm_mdiobus_alloc(dev); if (!bus) return -ENOMEM; @@ -2178,7 +2181,9 @@ mt7530_setup_mdio(struct mt7530_priv *priv) if (priv->irq) mt7530_setup_mdio_irq(priv); - ret = devm_mdiobus_register(dev, bus); + mnp = of_get_child_by_name(np, "mdio"); + ret = devm_of_mdiobus_register(dev, bus, mnp); + of_node_put(mnp); if (ret) { dev_err(dev, "failed to register MDIO bus: %d\n", ret); if (priv->irq) From patchwork Sat Sep 16 11:08:55 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: 723717 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 02A89134AF; Sat, 16 Sep 2023 11:10:31 +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 8148E19A; Sat, 16 Sep 2023 04:10:29 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 91CB3240003; Sat, 16 Sep 2023 11:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862628; 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=BgK1RR7PvoKyZDk0Jc59OCF7MxiLvtGydv7ioUqbT0Y=; b=jfHvHtuc+xqfSbVdGtke/CXe36aT3ln5BhveQlDrHTC4bUBcwnisulq7Nq5WitSm3y/Zro v8JuJhLWLr+P6UfJQfQBfkcldkNix/BAG7b5INH2Zo461XHQKOBuaLe6MPW8EfCvMimDe6 esnrB0UDXQ23P3rmQZgIXkzecBbPtSgH+S/RokQbhJMm0/w4dI3Mqws6oIHcRuVm6z64UW kV1yltovhTPM93EnMDIBCf7n7vc0phIBwojsrPUnl76AEqrFIKhc1bte9p5fs+MkZjpUVY Lk084pAvydhldmDOQkS9YGPo7O/vNcPTmYi5hOvW9iFD/bqArjKLiqclwu8EJg== 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 03/10] dt-bindings: net: dsa: realtek: fix MDIO bus child node restrictions Date: Sat, 16 Sep 2023 14:08:55 +0300 Message-Id: <20230916110902.234273-4-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 MDIO controlled Realtek switches (distinguished by the reg property being used) are allowed to have their MDIO bus registered OF-based. Allow the mdio property for them. Only the SMI controlled Realtek switches require the compatible property of the mdio child node. Require it for them and disallow it for the MDIO controlled ones. Remove the unnecessary if:then:not:required rule and comments. Signed-off-by: Arınç ÜNAL --- .../devicetree/bindings/net/dsa/realtek.yaml | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml index cfd69c2604ea..7eb025df0df8 100644 --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml @@ -109,18 +109,19 @@ if: then: $ref: /schemas/spi/spi-peripheral-props.yaml# - not: - required: - - mdc-gpios - - mdio-gpios - - mdio - properties: mdc-gpios: false mdio-gpios: false - mdio: false + mdio: + properties: + compatible: false else: + properties: + mdio: + required: + - compatible + required: - mdc-gpios - mdio-gpios @@ -130,11 +131,6 @@ else: required: - compatible - # - mdc-gpios - # - mdio-gpios - # - reset-gpios - # - mdio - unevaluatedProperties: false examples: From patchwork Sat Sep 16 11:08:57 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: 723716 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 AC41F12B7D; Sat, 16 Sep 2023 11:11:55 +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 BE547CCE; Sat, 16 Sep 2023 04:11:44 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id D5488240009; Sat, 16 Sep 2023 11:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862703; 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=suIxn/V1rRA2+i2OMNh+42WJYyF57dcYWh8ZSEA+/F0=; b=oKtg3XpodpdjUhzQjpCkBzarcFQRj4F4QCwlzZkIFFJYwvaiP7MqRY/Sz4zz9B70NMzFn8 RWs6pOLSgl6y6+ku3TAWE29sxTh/XYiFQIl6IvylUInZ/d/8k+RTFGs8z7i4rekGW7ff5L BtFgzeTZMu1CCHbhqCvJtZ053PhAjpNBi9ItemSAzcnz8XEN0U0MJKqrFtTO427SR7TaYp OIgWRbg15SRbhLtwp9KDq/MbOxyVP8Mt1q18cBW95upVAW9bnmjuhY4V8IO7DdeB1bcQXy Zcn0Jkg1yI0jVxLcFacG+KC19Kfo5rTeg7OUR5edfx0DOZ6/IgXAJ+OCygMlMg== 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 05/10] dt-bindings: net: dsa: define MDIO bus child node Date: Sat, 16 Sep 2023 14:08:57 +0300 Message-Id: <20230916110902.234273-6-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 Some DSA subdrivers register the MDIO bus of the switch they control. Or let the DSA driver register the MDIO bus. The node for these buses are either required or optional, depending on the subdriver. Document this on all of the affected DSA switch schemas. The attributes of a DSA subdriver that lets the DSA driver register the bus: - ds->ops->phy_read() and ds->ops->phy_write() are present. - ds->slave_mii_bus is not populated by the DSA subdriver. - The bus is registered non-OF-based or OF-based. Registered OF-based if "mdio" child node is defined. The affected DSA switch schemas are documented below. - brcm,b53.yaml drivers/net/dsa/b53/b53_common.c: - The DSA subdriver lets the DSA driver register the bus. --- - mediatek,mt7530.yaml drivers/net/dsa/mt7530.c: - The DSA subdriver won't let the DSA driver register the bus. - No ds->ops->phy_read() or ds->ops->phy_write(). - Registers the bus non-OF-based or OF-based. Registers OF-based if "mdio" child node is defined. --- - microchip,ksz.yaml - microchip,lan937x.yaml drivers/net/dsa/microchip/ksz_common.c: - The DSA subdriver won't let the DSA driver register the bus when "mdio" child node is defined. Registers the bus OF-based only. Registers the bus when "mdio" child node is defined. - mdio_np = of_get_child_by_name(dev->dev->of_node, "mdio"); if (!mdio_np) return 0; ds->slave_mii_bus = bus; --- - nxp,sja1105.yaml drivers/net/dsa/sja1105/sja1105_mdio.c: - The DSA subdriver won't let the DSA driver register the bus. - No ds->ops->phy_read() or ds->ops->phy_write(). - Registers multiple buses OF-based only. Registers the buses when "mdios" child node and "nxp,sja1110-base-tx-mdio" and "nxp,sja1110-base-t1-mdio" compatible strings per child node under "mdios" is defined. - mdio_node = of_get_child_by_name(switch_node, "mdios"); if (!mdio_node) return 0; - np = of_get_compatible_child(mdio_node, "nxp,sja1110-base-tx-mdio"); if (!np) return 0; - np = of_get_compatible_child(mdio_node, "nxp,sja1110-base-t1-mdio"); if (!np) return 0; --- - qca8k.yaml drivers/net/dsa/qca/qca8k-8xxx.c: - The DSA subdriver won't let the DSA driver register the bus. - No ds->ops->phy_read() or ds->ops->phy_write(). - Registers the bus non-OF-based or OF-based. Registers OF-based if "mdio" child node is defined. - mdio = of_get_child_by_name(priv->dev->of_node, "mdio"); --- - realtek.yaml drivers/net/dsa/realtek/realtek-smi.c: - The DSA subdriver won't let the DSA driver register the bus. Registers the bus OF-based only. Registering the bus is mandatory. Registers the bus when compatible string "realtek,smi-mdio" on a child node is defined. - mdio_np = of_get_compatible_child(priv->dev->of_node, "realtek,smi-mdio"); if (!mdio_np) return -ENODEV; ds->slave_mii_bus = priv->slave_mii_bus; drivers/net/dsa/realtek/realtek-mdio.c: - The DSA subdriver lets the DSA driver register the bus. --- - renesas,rzn1-a5psw.yaml drivers/net/dsa/rzn1_a5psw.c: - The DSA subdriver won't let the DSA driver register the bus. - No ds->ops->phy_read() or ds->ops->phy_write(). - Registers the bus OF-based only. Registers the bus when "mdio" child node is defined. - mdio = of_get_child_by_name(dev->of_node, "mdio"); if (of_device_is_available(mdio)) ret = a5psw_probe_mdio(a5psw, mdio); --- - ar9331.txt drivers/net/dsa/qca/ar9331.c: - The DSA subdriver won't let the DSA driver register the bus. - No ds->ops->phy_read() or ds->ops->phy_write(). - Registers the bus OF-based only. Registering the bus is mandatory. Registers the bus when "mdio" child node is defined. - mnp = of_get_child_by_name(np, "mdio"); if (!mnp) return -ENODEV; --- - lan9303.txt drivers/net/dsa/lan9303-core.c: - The DSA subdriver lets the DSA driver register the bus. --- - lantiq-gswip.txt drivers/net/dsa/lantiq_gswip.c: - The DSA subdriver won't let the DSA driver register the bus. - No ds->ops->phy_read() or ds->ops->phy_write(). - Registers the bus OF-based only. Registers the bus when compatible string "lantiq,xrx200-mdio" on a child node is defined. - mdio_np = of_get_compatible_child(dev->of_node, "lantiq,xrx200-mdio"); if (mdio_np) err = gswip_mdio(priv, mdio_np); --- - marvell.txt drivers/net/dsa/mv88e6xxx/chip.c: - The DSA subdriver won't let the DSA driver register the bus. - ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip); - Registers the bus non-OF-based or OF-based. Registers OF-based if "mdio" child node is defined. --- - vitesse,vsc73xx.txt drivers/net/dsa/vitesse-vsc73xx-core.c: - The DSA subdriver lets the DSA driver register the bus. I will convert the non json-schema documents accordingly. Signed-off-by: Arınç ÜNAL --- .../devicetree/bindings/net/dsa/brcm,b53.yaml | 7 +++++++ .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 7 +++++++ .../devicetree/bindings/net/dsa/microchip,ksz.yaml | 7 +++++++ .../devicetree/bindings/net/dsa/microchip,lan937x.yaml | 3 +++ .../devicetree/bindings/net/dsa/nxp,sja1105.yaml | 3 ++- Documentation/devicetree/bindings/net/dsa/qca8k.yaml | 10 +++++----- Documentation/devicetree/bindings/net/dsa/realtek.yaml | 4 ++++ .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 3 +++ 8 files changed, 38 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml index 4c78c546343f..0bb2ff0cf2d0 100644 --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml @@ -65,6 +65,13 @@ properties: - brcm,bcm63268-switch - const: brcm,bcm63xx-switch + mdio: + description: + The optional node for the MDIO bus of the switch. The bus will be + registered non-OF-based if this is not defined. + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml index e532c6b795f4..31a7dbbf704d 100644 --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml @@ -151,6 +151,13 @@ properties: ethsys. maxItems: 1 + mdio: + description: + The optional node for the MDIO bus of the switch. The bus will be + registered non-OF-based if this is not defined. + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + patternProperties: "^(ethernet-)?ports$": type: object diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml index e51be1ac0362..20e4174fe1ab 100644 --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml @@ -49,6 +49,13 @@ properties: Set if the output SYNCLKO clock should be disabled. Do not mix with microchip,synclko-125. + mdio: + description: + The optional node for the MDIO bus of the switch. The bus will be + registered non-OF-based if this is not defined. + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml index d187034fb31a..33a4926b2d94 100644 --- a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml @@ -32,6 +32,9 @@ properties: maxItems: 1 mdio: + description: + The optional node for the MDIO bus of the switch. The bus will be + registered non-OF-based if this is not defined. $ref: /schemas/net/mdio.yaml# unevaluatedProperties: false diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index 3f3c4ecc6442..6838dc165d06 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -37,7 +37,8 @@ properties: mdios: description: - The optional container node for the two MDIO buses of the SJA1110. + The optional container node for the two MDIO buses of the SJA1110. The bus + won't be registered if its node is not defined. type: object properties: diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml index df64eebebe18..c472050582be 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml @@ -60,13 +60,13 @@ properties: B68 on the QCA832x and B49 on the QCA833x. mdio: + description: + The optional node for the MDIO bus of the switch. The bus will be + registered non-OF-based if this is not defined. In that case, the legacy + mapping will be used. With the legacy mapping, the reg corresponding to + the MDIO bus is the switch reg with an offset of -1. $ref: /schemas/net/mdio.yaml# unevaluatedProperties: false - description: Qca8k switch have an internal mdio to access switch port. - If this is not present, the legacy mapping is used and the - internal mdio access is used. - With the legacy mapping the reg corresponding to the internal - mdio is the switch reg with an offset of -1. $ref: dsa.yaml# diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml index 7eb025df0df8..62ebaa4b5ae3 100644 --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml @@ -96,6 +96,10 @@ properties: - '#interrupt-cells' mdio: + description: + The node for the MDIO bus of the switch. For the MDIO controlled switches, + this is optional and the bus will be registered non-OF-based if this is + not defined. $ref: /schemas/net/mdio.yaml# unevaluatedProperties: false diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml index 833d2f68daa1..9ad9f5cdf688 100644 --- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml +++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml @@ -46,6 +46,9 @@ properties: maxItems: 1 mdio: + description: + The optional node for the MDIO bus of the switch. The bus won't be + registered if this is not defined. $ref: /schemas/net/mdio.yaml# unevaluatedProperties: false From patchwork Sat Sep 16 11:08:59 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: 723715 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 6FA4D134AD; Sat, 16 Sep 2023 11:13:35 +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 45320E4E; Sat, 16 Sep 2023 04:13:08 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 51BF6240003; Sat, 16 Sep 2023 11:12:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862786; 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=xhIrExaH+Pxga2qgOi/puibscZ/eAZoI/ny/hgH81io=; b=jQd0Gg737dggiZcbuwSo9+ScBsaoWp0hSmSQV+Uw4DHZL9+nAfv+His6tE/s4jcaPECdfS 3PGuHtcD6ZBST3GP+GcXpao4T+19AD3mR7a0iFPctDerOEbID43OqogHDjknexA5ZJOMTR 3jQreJPImNKLVLB66K/k1GeC6ELcVz0NXoe6iqaEVmyCFzqMiKcrxkYwbQTNGoIiWJ8S2i yKMaMRd2GDcKecgNAeNhq+uSnl0ewa5HnqlZUOUerSkE/fUtuZtuSqfhDSNnZLYA1l01DN p3PY5iRyOgyQh/9bP1g7+HlEF4DT8I/684zeGZ1QKOS/0rQtEvPXZazEW85C9w== 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 07/10] dt-bindings: net: enforce phylink bindings on certain ethernet controllers Date: Sat, 16 Sep 2023 14:08:59 +0300 Message-Id: <20230916110902.234273-8-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 Phylink bindings are required for ethernet controllers that utilise phylink_fwnode_phy_connect() directly or through phylink_of_phy_connect(), and register OF-based only MDIO buses, if they register any. All the drivers that utilise phylink_fwnode_phy_connect() directly or through phylink_of_phy_connect(): - DSA - drivers/net/ethernet/mscc/ocelot_net.c - mscc,vsc7514-switch.yaml - drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c - microchip,sparx5-switch.yaml - drivers/net/ethernet/altera/altera_tse_main.c - altr,tse.yaml - drivers/net/ethernet/xilinx/xilinx_axienet_main.c - xlnx,axi-ethernet.yaml - drivers/net/ethernet/mediatek/mtk_eth_soc.c - mediatek,net.yaml - drivers/net/ethernet/ti/am65-cpsw-nuss.c - ti,k3-am654-cpsw-nuss.yaml - drivers/net/ethernet/atheros/ag71xx.c - qca,ar71xx.yaml - drivers/net/ethernet/freescale/dpaa/dpaa_eth.c - fsl,fman-dtsec.yaml - drivers/net/ethernet/microchip/lan966x/lan966x_main.c - microchip,lan966x-switch.yaml - drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c - marvell,pp2.yaml - drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c - fsl,qoriq-mc-dpmac.yaml - drivers/net/ethernet/cadence/macb_main.c - cdns,macb.yaml - Can register non-OF-based bus. - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c - snps,dwmac.yaml - Can register non-OF-based bus. - drivers/net/ethernet/marvell/mvneta.c - marvell-armada-370-neta.txt - drivers/net/ethernet/freescale/enetc/enetc.c - fsl-enetc.txt RFC: The drivers marked with "can register non-OF-based bus" seem to search the MDIO bus to connect the PHY to the MAC using phylink_connect_phy() and/or phy_find_first() if phylink bindings don't exist. Should we enforce phylink bindings on their schemas regardless? DSA, like any other driver utilising the Linux MDIO infrastructure, can register a bus. On certain conditions, it registers the MDIO bus of the switch it controls non-OF-based. We can know when DSA won't create any non-OF-based buses. That leaves us with only OF-based buses in which case we can enforce phylink bindings for user ports. The bindings are already enforced for shared ports so we can enforce the bindings for all ports on the switch schemas which will achieve the same result with fewer lines. By looking at whether the mdio child node exists and what is explained on it, we can enforce phylink bindings. - mscc,vsc7514-switch.yaml - Enforce phylink bindings for all ports. - arrow,xrs700x.yaml - Enforce phylink bindings for all ports. - brcm,b53.yaml - Enforce phylink bindings for all ports if "mdio" is defined. - brcm,sf2.yaml - Enforce phylink bindings for all ports. - hirschmann,hellcreek.yaml - Enforce phylink bindings for all ports. - mediatek,mt7530.yaml - Enforce phylink bindings for all ports if "mdio" is defined. - microchip,ksz.yaml - Enforce phylink bindings for all ports if "mdio" is defined. - microchip,lan937x.yaml - Enforce phylink bindings for all ports if "mdio" is defined. - mscc,ocelot.yaml - Enforce phylink bindings for all ports. - nxp,sja1105.yaml - Enforce phylink bindings for all ports. - qca8k.yaml - Enforce phylink bindings for all ports if "mdio" is defined. - realtek.yaml - Enforce phylink bindings for all ports if "mdio" is defined. - renesas,rzn1-a5psw.yaml - Enforce phylink bindings for all ports. - ar9331.txt - Enforce phylink bindings for all ports. - lan9303.txt - Enforce phylink bindings for all ports if "mdio" is defined. - lantiq-gswip.txt - Enforce phylink bindings for all ports. - marvell.txt - Enforce phylink bindings for all ports if "mdio" is defined. - vitesse,vsc73xx.txt - Enforce phylink bindings for all ports if "mdio" is defined. I will convert the non json-schema documents accordingly. Signed-off-by: Arınç ÜNAL --- .../devicetree/bindings/net/altr,tse.yaml | 1 + .../devicetree/bindings/net/cdns,macb.yaml | 1 + .../bindings/net/dsa/arrow,xrs700x.yaml | 6 ++ .../devicetree/bindings/net/dsa/brcm,b53.yaml | 9 +++ .../devicetree/bindings/net/dsa/brcm,sf2.yaml | 6 +- .../net/dsa/hirschmann,hellcreek.yaml | 6 ++ .../bindings/net/dsa/mediatek,mt7530.yaml | 9 +++ .../bindings/net/dsa/microchip,ksz.yaml | 9 +++ .../bindings/net/dsa/microchip,lan937x.yaml | 9 +++ .../bindings/net/dsa/mscc,ocelot.yaml | 6 ++ .../bindings/net/dsa/nxp,sja1105.yaml | 1 + .../devicetree/bindings/net/dsa/qca8k.yaml | 9 +++ .../devicetree/bindings/net/dsa/realtek.yaml | 57 +++++++++++-------- .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 2 +- .../bindings/net/fsl,fman-dtsec.yaml | 1 + .../bindings/net/fsl,qoriq-mc-dpmac.yaml | 1 + .../devicetree/bindings/net/marvell,pp2.yaml | 4 +- .../devicetree/bindings/net/mediatek,net.yaml | 1 + .../net/microchip,lan966x-switch.yaml | 4 +- .../bindings/net/microchip,sparx5-switch.yaml | 5 +- .../bindings/net/mscc,vsc7514-switch.yaml | 5 ++ .../devicetree/bindings/net/qca,ar71xx.yaml | 1 + .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../bindings/net/ti,k3-am654-cpsw-nuss.yaml | 4 +- .../bindings/net/xlnx,axi-ethernet.yaml | 3 +- 25 files changed, 130 insertions(+), 31 deletions(-) diff --git a/Documentation/devicetree/bindings/net/altr,tse.yaml b/Documentation/devicetree/bindings/net/altr,tse.yaml index f5d3b70af07a..24e0f1213109 100644 --- a/Documentation/devicetree/bindings/net/altr,tse.yaml +++ b/Documentation/devicetree/bindings/net/altr,tse.yaml @@ -67,6 +67,7 @@ required: allOf: - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink - if: properties: compatible: diff --git a/Documentation/devicetree/bindings/net/cdns,macb.yaml b/Documentation/devicetree/bindings/net/cdns,macb.yaml index bf8894a0257e..a455de04c5f1 100644 --- a/Documentation/devicetree/bindings/net/cdns,macb.yaml +++ b/Documentation/devicetree/bindings/net/cdns,macb.yaml @@ -156,6 +156,7 @@ required: allOf: - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink - if: not: diff --git a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml index 9565a7402146..7829fc9e202d 100644 --- a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml +++ b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml @@ -29,6 +29,12 @@ properties: reg: maxItems: 1 +patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml index 0bb2ff0cf2d0..ed5b3eab1948 100644 --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml @@ -142,6 +142,15 @@ allOf: reg: maxItems: 1 + - if: + required: [ mdio ] + then: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + unevaluatedProperties: false examples: diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml index c745407f2f68..6cffcd35a943 100644 --- a/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml +++ b/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml @@ -81,7 +81,10 @@ properties: patternProperties: '^port@[0-9a-f]$': - $ref: dsa-port.yaml# + type: object + allOf: + - $ref: dsa-port.yaml# + - $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink unevaluatedProperties: false properties: @@ -161,6 +164,7 @@ examples: port@0 { label = "gphy"; reg = <0>; + phy-handle = <&phy8>; }; }; }; diff --git a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml index 4021b054f684..30b4c7b1fd08 100644 --- a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml +++ b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml @@ -67,6 +67,12 @@ properties: additionalProperties: false +patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml index 31a7dbbf704d..a8e1134707e4 100644 --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml @@ -297,6 +297,15 @@ allOf: mediatek,mcm: false reset-names: false + - if: + required: [ mdio ] + then: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + unevaluatedProperties: false examples: diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml index 20e4174fe1ab..d8f12234eec6 100644 --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml @@ -60,6 +60,15 @@ required: - compatible - reg +if: + required: [ mdio ] +then: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + unevaluatedProperties: false examples: diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml index 33a4926b2d94..44a892b93eca 100644 --- a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml @@ -65,6 +65,15 @@ required: - compatible - reg +if: + required: [ mdio ] +then: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + unevaluatedProperties: false examples: diff --git a/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml b/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml index fe02d05196e4..80cc9c49282b 100644 --- a/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml @@ -73,6 +73,12 @@ properties: little-endian: true big-endian: true +patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index 6838dc165d06..1d5c4a81caf6 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -79,6 +79,7 @@ patternProperties: "^(ethernet-)?ports$": patternProperties: "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink allOf: - if: properties: diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml index c472050582be..546939ab2053 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml @@ -114,6 +114,15 @@ required: - compatible - reg +if: + required: [ mdio ] +then: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-6]$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink + unevaluatedProperties: false examples: diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml index 62ebaa4b5ae3..ec0428b74157 100644 --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml @@ -6,8 +6,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Realtek switches for unmanaged switches -allOf: - - $ref: dsa.yaml#/$defs/ethernet-ports +$ref: dsa.yaml#/$defs/ethernet-ports maintainers: - Linus Walleij @@ -107,33 +106,43 @@ properties: compatible: const: realtek,smi-mdio -if: - required: - - reg +allOf: + - if: + required: + - reg -then: - $ref: /schemas/spi/spi-peripheral-props.yaml# - properties: - mdc-gpios: false - mdio-gpios: false - mdio: + then: + $ref: /schemas/spi/spi-peripheral-props.yaml# properties: - compatible: false + mdc-gpios: false + mdio-gpios: false + mdio: + properties: + compatible: false -else: - properties: - mdio: - required: - - compatible + else: + properties: + mdio: + required: + - compatible - required: - - mdc-gpios - - mdio-gpios - - mdio - - reset-gpios + required: + - mdc-gpios + - mdio-gpios + - mdio + - reset-gpios -required: - - compatible + required: + - compatible + + - if: + required: [ mdio ] + then: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink unevaluatedProperties: false diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml index 9ad9f5cdf688..7ec4371932ef 100644 --- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml +++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml @@ -72,7 +72,7 @@ properties: patternProperties: "^(ethernet-)?port@[0-4]$": - type: object + $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink description: Ethernet switch ports properties: diff --git a/Documentation/devicetree/bindings/net/fsl,fman-dtsec.yaml b/Documentation/devicetree/bindings/net/fsl,fman-dtsec.yaml index c80c880a9dab..c31db5f7d548 100644 --- a/Documentation/devicetree/bindings/net/fsl,fman-dtsec.yaml +++ b/Documentation/devicetree/bindings/net/fsl,fman-dtsec.yaml @@ -136,6 +136,7 @@ dependencies: allOf: - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink - if: properties: compatible: diff --git a/Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml b/Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml index a1b71b35319e..b2cab0fa7b35 100644 --- a/Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml +++ b/Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml @@ -15,6 +15,7 @@ description: allOf: - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink properties: compatible: diff --git a/Documentation/devicetree/bindings/net/marvell,pp2.yaml b/Documentation/devicetree/bindings/net/marvell,pp2.yaml index 4eadafc43d4f..8e60cc4bbbc9 100644 --- a/Documentation/devicetree/bindings/net/marvell,pp2.yaml +++ b/Documentation/devicetree/bindings/net/marvell,pp2.yaml @@ -59,7 +59,9 @@ patternProperties: '^(ethernet-)?port@[0-2]$': type: object description: subnode for each ethernet port. - $ref: ethernet-controller.yaml# + allOf: + - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink unevaluatedProperties: false properties: diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Documentation/devicetree/bindings/net/mediatek,net.yaml index e74502a0afe8..7562bb64baa9 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -391,6 +391,7 @@ patternProperties: unevaluatedProperties: false allOf: - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink description: Ethernet MAC node properties: diff --git a/Documentation/devicetree/bindings/net/microchip,lan966x-switch.yaml b/Documentation/devicetree/bindings/net/microchip,lan966x-switch.yaml index 306ef9ecf2b9..a770cfc490a9 100644 --- a/Documentation/devicetree/bindings/net/microchip,lan966x-switch.yaml +++ b/Documentation/devicetree/bindings/net/microchip,lan966x-switch.yaml @@ -73,7 +73,9 @@ properties: "^port@[0-9a-f]+$": type: object - $ref: /schemas/net/ethernet-controller.yaml# + allOf: + - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink unevaluatedProperties: false properties: diff --git a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml index fcafef8d5a33..da4b4d934705 100644 --- a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml +++ b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml @@ -84,7 +84,10 @@ properties: patternProperties: "^port@[0-9a-f]+$": - $ref: /schemas/net/ethernet-controller.yaml# + type: object + allOf: + - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink unevaluatedProperties: false properties: diff --git a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml index 8ee2c7d7ff42..b3aff7b0790e 100644 --- a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml +++ b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml @@ -126,6 +126,11 @@ properties: - const: xtr - const: fdma + ethernet-ports: + patternProperties: + "^port@[0-9a-f]+$": + $ref: ethernet-controller.yaml#/$defs/phylink + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/net/qca,ar71xx.yaml b/Documentation/devicetree/bindings/net/qca,ar71xx.yaml index 89f94b31b546..d021bfb4ad20 100644 --- a/Documentation/devicetree/bindings/net/qca,ar71xx.yaml +++ b/Documentation/devicetree/bindings/net/qca,ar71xx.yaml @@ -8,6 +8,7 @@ title: QCA AR71XX MAC allOf: - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink maintainers: - Oleksij Rempel diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index ddf9522a5dc2..62d8c2cfafe9 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -567,6 +567,7 @@ dependencies: allOf: - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink - if: properties: compatible: diff --git a/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml b/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml index c9c25132d154..d4366a11918e 100644 --- a/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml +++ b/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml @@ -117,7 +117,9 @@ properties: type: object description: CPSWxG NUSS external ports - $ref: ethernet-controller.yaml# + allOf: + - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink unevaluatedProperties: false properties: diff --git a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml index 1d33d80af11c..f8894546c02a 100644 --- a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml +++ b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml @@ -130,7 +130,8 @@ required: - phy-handle allOf: - - $ref: /schemas/net/ethernet-controller.yaml# + - $ref: ethernet-controller.yaml# + - $ref: ethernet-controller.yaml#/$defs/phylink additionalProperties: false From patchwork Sat Sep 16 11:09:01 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: 723714 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 1B610134AD; Sat, 16 Sep 2023 11:14:09 +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 783D1CE9; Sat, 16 Sep 2023 04:13:46 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id A4B67240004; Sat, 16 Sep 2023 11:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694862825; 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=PDRE70R3lGz5ezhDBmTyzAtvLuORLg4w0dd0nsfORgc=; b=Neaf6SAGL7XVuZ5i4UaYHEGAe9v3D5Al2VGQf2Q38vACYLlG1sm2cRx5W3Rh0XMh8REHma f/frjptNDm5AijdY9O1S8i7IlT99bnn2y1dKH0Wt13Dj81J/6uZqd2NDYmNQsKSgOHb4b+ i1JN+vAayRvuB1vRJamwKLfUB6BYDx9XKvggqxhWFn7pfTbJ2F6uo+nlJp7F8Wz3zhtOO+ 3lS8G3atb6Th+AoBgRcGre1ZtuupEFaTQhQtlA9FcXFugFt3jfG99ujrthbkPmKNtlGhxj OE7Zr6czr5evQ71Q84QOEXsNBGF242x4vaBtV24ikCLdenRtlq2zDfmjndAy6Q== 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 09/10] MAINTAINERS: update MARVELL 88E6XXX ETHERNET SWITCH document file name Date: Sat, 16 Sep 2023 14:09:01 +0300 Message-Id: <20230916110902.234273-10-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 dt-bindings document was converted to json-schema. Update the file name. Signed-off-by: Arınç ÜNAL --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 612d6d1dbf36..5d4e6b578c04 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12564,7 +12564,7 @@ MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER M: Andrew Lunn L: netdev@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/net/dsa/marvell.txt +F: Documentation/devicetree/bindings/net/dsa/marvell.yaml F: Documentation/networking/devlink/mv88e6xxx.rst F: drivers/net/dsa/mv88e6xxx/ F: include/linux/dsa/mv88e6xxx.h