lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 7 Dec 2021 09:33:43 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     Rob Herring <robh@...nel.org>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Andreas Färber <afaerber@...e.de>,
        Manivannan Sadhasivam <mani@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
        Cristian Ciocaltea <cristian.ciocaltea@...il.com>,
        "G. Jaya Kumaran" <vineetha.g.jaya.kumaran@...el.com>,
        Oleksij Rempel <o.rempel@...gutronix.de>,
        Christophe Roullier <christophe.roullier@...s.st.com>,
        Grygorii Strashko <grygorii.strashko@...com>,
        devicetree@...r.kernel.org, netdev@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-actions@...ts.infradead.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: net: Add missing properties used in examples

On Mon, Dec 06, 2021 at 11:41:52AM -0600, Rob Herring wrote:
> With 'unevaluatedProperties' support implemented, the following warnings
> are generated in the net bindings:
> 
> Documentation/devicetree/bindings/net/actions,owl-emac.example.dt.yaml: ethernet@...10000: Unevaluated properties are not allowed ('mdio' was unexpected)
> Documentation/devicetree/bindings/net/intel,dwmac-plat.example.dt.yaml: ethernet@...00000: Unevaluated properties are not allowed ('snps,pbl', 'mdio0' were unexpected)
> Documentation/devicetree/bindings/net/qca,ar71xx.example.dt.yaml: ethernet@...00000: Unevaluated properties are not allowed ('qca,ethcfg' was unexpected)
> Documentation/devicetree/bindings/net/qca,ar71xx.example.dt.yaml: ethernet@...00000: Unevaluated properties are not allowed ('mdio' was unexpected)
> Documentation/devicetree/bindings/net/stm32-dwmac.example.dt.yaml: ethernet@...28000: Unevaluated properties are not allowed ('reg-names', 'snps,pbl' were unexpected)
> Documentation/devicetree/bindings/net/ti,cpsw-switch.example.dt.yaml: mdio@...0: Unevaluated properties are not allowed ('clocks', 'clock-names' were unexpected)
> Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.example.dt.yaml: mdio@f00: Unevaluated properties are not allowed ('clocks', 'clock-names' were unexpected)
> 
> Add the missing properties/nodes as necessary.
> 
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: "Andreas Färber" <afaerber@...e.de>
> Cc: Manivannan Sadhasivam <mani@...nel.org>
> Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>
> Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>
> Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
> Cc: Cristian Ciocaltea <cristian.ciocaltea@...il.com>
> Cc: "G. Jaya Kumaran" <vineetha.g.jaya.kumaran@...el.com>
> Cc: Oleksij Rempel <o.rempel@...gutronix.de>
> Cc: Christophe Roullier <christophe.roullier@...s.st.com>
> Cc: Grygorii Strashko <grygorii.strashko@...com>
> Cc: netdev@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-actions@...ts.infradead.org
> Cc: linux-stm32@...md-mailman.stormreply.com
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
>  .../devicetree/bindings/net/actions,owl-emac.yaml          | 3 +++
>  .../devicetree/bindings/net/intel,dwmac-plat.yaml          | 2 +-
>  Documentation/devicetree/bindings/net/qca,ar71xx.yaml      | 5 ++++-
>  Documentation/devicetree/bindings/net/stm32-dwmac.yaml     | 6 ++++++
>  Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml | 7 +++++++
>  .../devicetree/bindings/net/toshiba,visconti-dwmac.yaml    | 5 ++++-
>  6 files changed, 25 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/actions,owl-emac.yaml b/Documentation/devicetree/bindings/net/actions,owl-emac.yaml
> index 1626e0a821b0..e9c0d6360e74 100644
> --- a/Documentation/devicetree/bindings/net/actions,owl-emac.yaml
> +++ b/Documentation/devicetree/bindings/net/actions,owl-emac.yaml
> @@ -51,6 +51,9 @@ properties:
>      description:
>        Phandle to the device containing custom config.
>  
> +  mdio:
> +    type: object

In one of the conversions I've been working on, I've used this construct
for the mdio node:

	mdio:
	  $ref: mdio.yaml

In the cases here this may not be necessary because we could also match
on the compatible string, but for the example that I've been working on
there is no compatible string for the MDIO bus, so that's not an option.

On the other hand, it looks like the snps,dwmac-mdio that the examples
here use don't end up including mdio.yaml, so no validation (or rather
only very limited validation) will be performed on their properties and
children.

Thierry

> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
> index 08a3f1f6aea2..52a7fa4f49a4 100644
> --- a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
> +++ b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
> @@ -117,7 +117,7 @@ examples:
>          snps,mtl-tx-config = <&mtl_tx_setup>;
>          snps,tso;
>  
> -        mdio0 {
> +        mdio {
>              #address-cells = <1>;
>              #size-cells = <0>;
>              compatible = "snps,dwmac-mdio";
> diff --git a/Documentation/devicetree/bindings/net/qca,ar71xx.yaml b/Documentation/devicetree/bindings/net/qca,ar71xx.yaml
> index cf4d35edaa1b..f2bf1094d887 100644
> --- a/Documentation/devicetree/bindings/net/qca,ar71xx.yaml
> +++ b/Documentation/devicetree/bindings/net/qca,ar71xx.yaml
> @@ -62,6 +62,10 @@ properties:
>        - const: mac
>        - const: mdio
>  
> +
> +  mdio:
> +    type: object
> +
>  required:
>    - compatible
>    - reg
> @@ -85,7 +89,6 @@ examples:
>          reset-names = "mac", "mdio";
>          clocks = <&pll 1>, <&pll 2>;
>          clock-names = "eth", "mdio";
> -        qca,ethcfg = <&ethcfg>;
>          phy-mode = "mii";
>          phy-handle = <&phy_port4>;
>      };
> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> index 577f4e284425..86632e9d987e 100644
> --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> @@ -44,6 +44,12 @@ properties:
>                - st,stm32-dwmac
>            - const: snps,dwmac-3.50a
>  
> +  reg: true
> +
> +  reg-names:
> +    items:
> +      - const: stmmaceth
> +
>    clocks:
>      minItems: 3
>      items:
> diff --git a/Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml b/Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml
> index 5728fe23f530..dbfca5ee9139 100644
> --- a/Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml
> @@ -37,6 +37,13 @@ properties:
>      maximum: 2500000
>      description: MDIO Bus frequency
>  
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: fck
> +
>    ti,hwmods:
>      description: TI hwmod name
>      deprecated: true
> diff --git a/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
> index 59724d18e6f3..f5bec97460e4 100644
> --- a/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
> @@ -42,6 +42,9 @@ properties:
>        - const: stmmaceth
>        - const: phy_ref_clk
>  
> +  mdio:
> +    type: object
> +
>  required:
>    - compatible
>    - reg
> @@ -71,7 +74,7 @@ examples:
>              phy-mode = "rgmii-id";
>              phy-handle = <&phy0>;
>  
> -            mdio0 {
> +            mdio {
>                  #address-cells = <0x1>;
>                  #size-cells = <0x0>;
>                  compatible = "snps,dwmac-mdio";
> -- 
> 2.32.0
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ