[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <169487630940.1637895.12001153052612710003.robh@kernel.org>
Date: Sat, 16 Sep 2023 09:58:30 -0500
From: Rob Herring <robh@...nel.org>
To: Arınç ÜNAL <arinc.unal@...nc9.com>
Cc: Marcin Wojtas <mw@...ihalf.com>, erkin.bozoglu@...ont.com, Jakub Kicinski <kuba@...nel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Daniel Machon <daniel.machon@...rochip.com>, Clément Léger <clement.leger@...tlin.com>, Vladimir Oltean <olteanv@...il.com>, netdev@...r.kernel.org, Matthias Brugger <matthias.bgg@...il.com>, linux-renesas-soc@...r.kernel.org, Jose Abreu <joabreu@...opsys.com>, Grygorii Strashko <grygorii.strashko@...com>, Daniel Golle <daniel@...rotopia.org>, Maxime Chevallier <maxime.chevallier@...tlin.com>, Claudiu Beznea <claudiu.beznea@...rochip.com>, Oleksij Rempel <linux@...pel-privat.de>, Florian Fainelli <f.fainelli@...il.com>, Sekhar Nori <nsekhar@...com>, Landen Chao <Landen.Chao@...iatek.com>, Lorenzo Bianconi <lorenzo@...nel.org>, Andrew Lunn <andrew@...n.ch>, Magnus Damm <magnus.damm@...il.com>, Madalin Bucur <madalin.bucur@....com>, Lars Povlsen <lars.povlsen@...rochip.com>, UNGLinuxDriver@...rochip.com, Steen He
gelund <steen.hegelund@...rochip.com>, Rob Herring <robh+dt@...nel.org>, mithat.guner@...ont.com, AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Horatiu Vultur <horatiu.vultur@...rochip.com>, devicetree@...r.kernel.org, Giuseppe Cavallaro <peppe.cavallaro@...com>, Geert Uytterhoeven <geert+renesas@...der.be>, Conor Dooley <conor+dt@...nel.org>, linux-arm-kernel@...ts.infradead.org, John Crispin <john@...ozen.org>, George McCollister <george.mccollister@...il.com>, Marek Vasut <marex@...x.de>, "David S. Miller" <davem@...emloft.net>, Ioana Ciornei <ioana.ciornei@....com>, DENG Qingfang <dqfext@...il.com>, Felix Fietkau <nbd@....name>, Claudiu Manoil <claudiu.manoil@....com>, linux-mediatek@...ts.infradead.org, Eric Dumazet <edumazet@...gle.com>, Linus Walleij <linus.walleij@...aro.org>, Sean Wang <sean.wang@...iatek.com>, Nicolas Ferre <nicolas.ferre@...rochip.com>, Steen Hegelund <Steen.Hegelund@...rochip.com>, Woojung Huh <woojung.huh@...rochip.com>, Alexandr
e Torgue <alexandre.torgue@...s.st.com>, Shyam Pandey <radhey.shyam.pandey@...inx.com>, Paolo Abeni <pabeni@...hat.com>, Kurt Kanzenbach <kurt@...utronix.de>, Woojung Huh <Woojung.Huh@...rochip.com>, "Russell King (Oracle)" <linux@...linux.org.uk>, Radhey Shyam Pandey <radhey.shyam.pandey@....com>, Alvin Šipraga <alsi@...g-olufsen.dk>, Alexandre Belloni <alexandre.belloni@...tlin.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 07/10] dt-bindings: net: enforce phylink
bindings on certain ethernet controllers
On Sat, 16 Sep 2023 14:08:59 +0300, Arınç ÜNAL wrote:
> 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 <arinc.unal@...nc9.com>
> ---
> .../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(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...0a000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...0a000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode', 'snps,axi-config', 'snps,pbl', 'snps,tso' were unexpected)
from schema $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...0a000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...28000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...28000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode', 'snps,mixed-burst', 'snps,pbl' were unexpected)
from schema $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...28000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...27000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...27000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode', 'snps,pbl' were unexpected)
from schema $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/stm32-dwmac.example.dtb: ethernet@...27000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/cdns,macb.example.dtb: ethernet@...c4000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/cdns,macb.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/marvell,pp2.example.dtb: ethernet@...00: ethernet-port@0: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/marvell,pp2.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/marvell,pp2.example.dtb: ethernet@...00: ethernet-port@1: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/marvell,pp2.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/marvell,pp2.example.dtb: ethernet@0: ethernet-port@0: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/marvell,pp2.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/marvell,pp2.example.dtb: ethernet@0: ethernet-port@1: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/marvell,pp2.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,dwmac-imx.example.dtb: ethernet@...f0000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/nxp,dwmac-imx.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,dwmac-imx.example.dtb: ethernet@...f0000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode', 'reg' were unexpected)
from schema $id: http://devicetree.org/schemas/net/nxp,dwmac-imx.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,dwmac-imx.example.dtb: ethernet@...f0000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/rockchip-dwmac.example.dtb: ethernet@...90000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/rockchip-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/rockchip-dwmac.example.dtb: ethernet@...90000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode', 'reg' were unexpected)
from schema $id: http://devicetree.org/schemas/net/rockchip-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.example.dtb: ethernet@...10000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/amlogic,meson-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.example.dtb: ethernet@...10000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode' were unexpected)
from schema $id: http://devicetree.org/schemas/net/amlogic,meson-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.example.dtb: ethernet@...10000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/snps,dwmac.example.dtb: ethernet@...00000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.example.dtb: ethernet@...0000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/allwinner,sun7i-a20-gmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.example.dtb: ethernet@...0000: Unevaluated properties are not allowed ('phy-mode' was unexpected)
from schema $id: http://devicetree.org/schemas/net/allwinner,sun7i-a20-gmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/mediatek-dwmac.example.dtb: ethernet@...1c000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/mediatek-dwmac.example.dtb: ethernet@...1c000: 'anyOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'pcs-handle' is a required property
'tbi-handle' is a required property
'phy-handle' is a required property
'sfp' is a required property
'managed' is a required property
from schema $id: http://devicetree.org/schemas/net/mediatek-dwmac.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/mediatek-dwmac.example.dtb: ethernet@...1c000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'mac-address', 'phy-mode', 'reg', 'snps,reset-delays-us', 'snps,reset-gpio', 'snps,rxpbl', 'snps,txpbl' were unexpected)
from schema $id: http://devicetree.org/schemas/net/mediatek-dwmac.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230916110902.234273-8-arinc.unal@arinc9.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Powered by blists - more mailing lists