devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: "Arınç ÜNAL" <arinc.unal@arinc9.com>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Woojung Huh" <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Alvin Šipraga" <alsi@bang-olufsen.dk>,
	"Daniel Golle" <daniel@makrotopia.org>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	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
Subject: Re: [PATCH 2/4] dt-bindings: net: dsa: document internal MDIO bus
Date: Mon, 21 Aug 2023 12:44:23 -0500	[thread overview]
Message-ID: <20230821174423.GA2008354-robh@kernel.org> (raw)
In-Reply-To: <47b61929-5c2d-4906-b153-2046a94858c8@arinc9.com>

On Sat, Aug 12, 2023 at 10:20:43PM +0300, Arınç ÜNAL wrote:
> I've realised there are more schemas that extend the mdio.yaml schema. This
> is the final state of this patch.
> 
> dt-bindings: net: dsa: document internal MDIO bus
> 
> Add the schema to document the internal MDIO bus. Require the phy-handle
> property on the non-CPU ports if the mdio property is being used.
> 
> Define the mdio property on all of the schemas that refer to
> dsa.yaml#/$defs/ethernet-ports. Refer to dsa.yaml#/properties/mdio to point
> the human readers to the description on the dsa.yaml schema.
> 
> Some of these schemas extend the mdio.yaml schema. The mdio.yaml schema is
> also being referred to through dsa.yaml#/$defs/ethernet-ports now which
> means we cannot disallow additional properties by 'unevaluatedProperties:
> false' on the dsa.yaml schema.
> 
> ---
>  .../bindings/net/dsa/arrow,xrs700x.yaml        |  4 ++++
>  .../devicetree/bindings/net/dsa/brcm,b53.yaml  |  4 ++++
>  .../devicetree/bindings/net/dsa/brcm,sf2.yaml  |  4 ++++
>  .../devicetree/bindings/net/dsa/dsa.yaml       | 18 ++++++++++++++++++
>  .../bindings/net/dsa/hirschmann,hellcreek.yaml |  4 ++++
>  .../bindings/net/dsa/mediatek,mt7530.yaml      |  4 ++++
>  .../bindings/net/dsa/microchip,ksz.yaml        |  4 ++++
>  .../bindings/net/dsa/microchip,lan937x.yaml    |  2 +-
>  .../bindings/net/dsa/mscc,ocelot.yaml          |  4 ++++
>  .../bindings/net/dsa/nxp,sja1105.yaml          |  4 ++++
>  .../devicetree/bindings/net/dsa/qca8k.yaml     |  2 +-
>  .../devicetree/bindings/net/dsa/realtek.yaml   |  2 +-
>  .../bindings/net/dsa/renesas,rzn1-a5psw.yaml   |  2 +-
>  13 files changed, 54 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> index 9565a740214629..f0229352e05694 100644
> --- a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> @@ -29,6 +29,10 @@ properties:
>    reg:
>      maxItems: 1
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    unevaluatedProperties: false
> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> index 4c78c546343f5e..e14562b33bfb97 100644
> --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> @@ -65,6 +65,10 @@ properties:
>                - brcm,bcm63268-switch
>            - const: brcm,bcm63xx-switch
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    unevaluatedProperties: false
> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml
> index c745407f2f6853..1bf4317e038687 100644
> --- a/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml
> @@ -90,6 +90,10 @@ properties:
>                tags enabled (per-packet metadata)
>              type: boolean
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    unevaluatedProperties: false
> +
>  required:
>    - reg
>    - interrupts
> diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> index ec74a660bedaed..03ccedbc49dcc3 100644
> --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> @@ -31,6 +31,24 @@ properties:
>        (single device hanging off a CPU port) must not specify this property
>      $ref: /schemas/types.yaml#/definitions/uint32-array
> +  mdio:
> +    description: The internal MDIO bus of the switch
> +    $ref: /schemas/net/mdio.yaml#
> +
> +if:
> +  required: [ mdio ]
> +then:
> +  patternProperties:
> +    "^(ethernet-)?ports$":
> +      patternProperties:
> +        "^(ethernet-)?port@[0-9]+$":
> +          if:
> +            not:
> +              required: [ ethernet ]
> +          then:
> +            required:
> +              - phy-handle
> +
>  additionalProperties: true
>  $defs:
> diff --git a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
> index 4021b054f68446..32f17345825d4a 100644
> --- a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
> @@ -67,6 +67,10 @@ properties:
>      additionalProperties: false
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    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 e532c6b795f4fc..293d1affe75451 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -151,6 +151,10 @@ properties:
>        ethsys.
>      maxItems: 1
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    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 e51be1ac036237..01d11c642ecfd4 100644
> --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> @@ -49,6 +49,10 @@ properties:
>        Set if the output SYNCLKO clock should be disabled. Do not mix with
>        microchip,synclko-125.
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    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 49af4b0d591695..15f24a1716cd44 100644
> --- a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
> @@ -32,7 +32,7 @@ properties:
>      maxItems: 1
>    mdio:
> -    $ref: /schemas/net/mdio.yaml#
> +    $ref: dsa.yaml#/properties/mdio
>      unevaluatedProperties: false
>  patternProperties:
> diff --git a/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml b/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml
> index fe02d05196e4a6..d781b8c2324836 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml
> @@ -73,6 +73,10 @@ properties:
>    little-endian: true
>    big-endian: true
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    unevaluatedProperties: false
> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
> index 4d5f5cc6d031e2..82dda8fae8b16e 100644
> --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
> @@ -72,6 +72,10 @@ properties:
>            - compatible
>            - reg
> +  mdio:
> +    $ref: dsa.yaml#/properties/mdio
> +    unevaluatedProperties: false
> +
>  patternProperties:
>    "^(ethernet-)?ports$":
>      patternProperties:
> diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> index df64eebebe1856..001b72bcd0746b 100644
> --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> @@ -60,7 +60,7 @@ properties:
>        B68 on the QCA832x and B49 on the QCA833x.
>    mdio:
> -    $ref: /schemas/net/mdio.yaml#
> +    $ref: dsa.yaml#/properties/mdio
>      unevaluatedProperties: false

Just from a schema standpoint, this is pointless indirection as 
dsa.yaml#/properties/mdio is just a reference to /schemas/net/mdio.yaml#.

As it seems an MDIO bus is not universal for DSA, it seems you'll be 
dropping this change anyways.

Rob

  parent reply	other threads:[~2023-08-21 17:44 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12  9:17 [PATCH net-next 0/4] Document internal MDIO bus of DSA switch and support it on MT7530 Arınç ÜNAL
2023-08-12  9:17 ` [PATCH 1/4] dt-bindings: net: dsa: microchip,lan937x: add missing ethernet on example Arınç ÜNAL
2023-08-13 11:07   ` Vladimir Oltean
2023-08-13 11:23     ` Arınç ÜNAL
2023-08-14 14:54   ` Vladimir Oltean
2023-08-16 16:29   ` Florian Fainelli
2023-08-21 17:36   ` Rob Herring
2023-08-12  9:17 ` [PATCH 2/4] dt-bindings: net: dsa: document internal MDIO bus Arınç ÜNAL
2023-08-12 16:28   ` Arınç ÜNAL
2023-08-12 19:20     ` Arınç ÜNAL
2023-08-13 11:53       ` Vladimir Oltean
2023-08-13 12:59         ` Arınç ÜNAL
2023-08-13 14:58           ` Arınç ÜNAL
2023-08-13 19:02             ` Vladimir Oltean
2023-08-14 10:06               ` Arınç ÜNAL
2023-08-14 10:39                 ` Vladimir Oltean
2023-08-13 19:01           ` Vladimir Oltean
2023-08-14 10:06             ` Arınç ÜNAL
2023-08-14 13:09               ` Andrew Lunn
2023-08-27  8:38                 ` Arınç ÜNAL
2023-09-09  6:23                 ` Arınç ÜNAL
2023-09-13  1:21                   ` Andrew Lunn
2023-09-13 12:44                     ` Arınç ÜNAL
2023-08-14 14:36               ` Vladimir Oltean
2023-08-27  8:33                 ` Arınç ÜNAL
2023-08-27 12:12                   ` Vladimir Oltean
2023-09-04 11:33                     ` Arınç ÜNAL
2023-09-05  2:42                       ` Luiz Angelo Daros de Luca
2023-09-05 11:00                         ` Arınç ÜNAL
2023-09-05 11:05                         ` Vladimir Oltean
2023-09-05 11:11                         ` Vladimir Oltean
2023-09-05 12:13                           ` Andrew Lunn
2023-09-09  8:53                       ` Arınç ÜNAL
2023-09-09 14:35                         ` Arınç ÜNAL
2023-09-09 19:53                         ` Arınç ÜNAL
2023-09-09 21:16                         ` Andrew Lunn
2023-09-12 18:09                           ` Arınç ÜNAL
2023-09-11 22:51                         ` Vladimir Oltean
2023-09-12 19:23                           ` Arınç ÜNAL
2023-09-12 19:34                             ` Vladimir Oltean
2023-09-13  5:52                               ` Arınç ÜNAL
2023-09-13  7:42                                 ` Vladimir Oltean
2023-09-13 10:59                                   ` Arınç ÜNAL
2023-09-13 11:04                                     ` Vladimir Oltean
2023-09-13 11:35                                       ` Arınç ÜNAL
2023-09-13 13:00                                         ` Vladimir Oltean
2023-09-13 14:36                                           ` Arınç ÜNAL
2023-09-13 15:59                                   ` Russell King (Oracle)
2023-09-14 16:12                                     ` Vladimir Oltean
2023-09-14 18:06                                     ` Russell King (Oracle)
2023-09-14 18:07                                       ` Russell King (Oracle)
2023-09-15 12:18                                         ` Vladimir Oltean
2023-08-14 14:57           ` Vladimir Oltean
2023-08-21 17:44       ` Rob Herring [this message]
2023-08-27  8:42         ` Arınç ÜNAL
2023-08-13 11:15   ` Vladimir Oltean
2023-08-13 12:58     ` Arınç ÜNAL
2023-08-12  9:17 ` [PATCH 3/4] dt-bindings: net: dsa: realtek: require compatible property under mdio node Arınç ÜNAL
2023-08-12 16:31   ` Arınç ÜNAL
2023-08-14 14:53   ` Vladimir Oltean
2023-08-14 18:23   ` Linus Walleij
2023-08-16 16:28   ` Florian Fainelli
2023-08-12  9:17 ` [PATCH 4/4] net: dsa: mt7530: register OF node for internal MDIO bus Arınç ÜNAL

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230821174423.GA2008354-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Landen.Chao@mediatek.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alsi@bang-olufsen.dk \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arinc.unal@arinc9.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=erkin.bozoglu@xeront.com \
    --cc=f.fainelli@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mithat.guner@xeront.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).