From: Daniel Golle <daniel@makrotopia.org>
To: "Arınç ÜNAL" <arinc.unal@arinc9.com>
Cc: Vladimir Oltean <olteanv@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Landen Chao <Landen.Chao@mediatek.com>,
DENG Qingfang <dqfext@gmail.com>,
Sean Wang <sean.wang@mediatek.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 RESEND net-next 2/2] dt-bindings: net: dsa: mediatek,mt7530: document MDIO-bus
Date: Sun, 26 Nov 2023 22:35:45 +0000 [thread overview]
Message-ID: <ZWPIQW1JA3rsvAzm@makrotopia.org> (raw)
In-Reply-To: <3f262579-eec1-4b21-9b18-1d1d612e715b@arinc9.com>
On Sat, Aug 12, 2023 at 01:45:29AM +0300, Arınç ÜNAL wrote:
> On 10.08.2023 01:01, Vladimir Oltean wrote:
> > [...]
> > Since commit fe7324b93222 ("net: dsa: OF-ware slave_mii_bus"), DSA as a
> > framework also supports auto-creating an internal MDIO bus based on the
> > presence of the "mdio" node name, so I guess it makes sense for the
> > "mdio" to appear in the generic dsa.yaml if there's nothing else that's
> > special about it.
>
> I agree with this. I've done this which works. It's even found a port
> node with the ethernet property missing, as it should've.
Are you planning to complete/submit your work below?
I'm asking because being able to reference the PHYs on the internal
MDIO bus is mandatory on MT7988 which requires calibration data from
NVMEM for each PHY, so supporting MT7988 depends on the associated
driver change[1].
[1]: https://patchwork.kernel.org/project/netdevbpf/patch/6eb1b7b8dbc3a4b14becad15f0707d4f624ee18b.1691246461.git.daniel@makrotopia.org/
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> index ec74a660beda..03ccedbc49dc 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/microchip,lan937x.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
> index 8d7e878b84dc..fe1e2008995d 100644
> --- a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
> @@ -78,6 +78,16 @@ examples:
> };
> };
> + macb1 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> + };
> +
> spi {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -138,6 +148,7 @@ examples:
> phy-mode = "rgmii";
> tx-internal-delay-ps = <2000>;
> rx-internal-delay-ps = <2000>;
> + ethernet = <&macb0>;
> fixed-link {
> speed = <1000>;
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> index cfd69c2604ea..f600e65fc990 100644
> --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> @@ -6,9 +6,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
> title: Realtek switches for unmanaged switches
> -allOf:
> - - $ref: dsa.yaml#/$defs/ethernet-ports
> -
> maintainers:
> - Linus Walleij <linus.walleij@linaro.org>
> @@ -95,37 +92,41 @@ properties:
> - '#address-cells'
> - '#interrupt-cells'
> - mdio:
> - $ref: /schemas/net/mdio.yaml#
> - unevaluatedProperties: false
> -
> - properties:
> - compatible:
> - const: realtek,smi-mdio
> -
> -if:
> - required:
> - - reg
> -
> -then:
> - $ref: /schemas/spi/spi-peripheral-props.yaml#
> - not:
> - required:
> - - mdc-gpios
> - - mdio-gpios
> - - mdio
> -
> - properties:
> - mdc-gpios: false
> - mdio-gpios: false
> - mdio: false
> -
> -else:
> - required:
> - - mdc-gpios
> - - mdio-gpios
> - - mdio
> - - reset-gpios
> +allOf:
> + - $ref: dsa.yaml#/$defs/ethernet-ports
> + - if:
> + required: [ mdio ]
> + then:
> + properties:
> + mdio:
> + properties:
> + compatible:
> + const: realtek,smi-mdio
> +
> + required:
> + - compatible
> +
> + - if:
> + required:
> + - reg
> + then:
> + $ref: /schemas/spi/spi-peripheral-props.yaml#
> + not:
> + required:
> + - mdc-gpios
> + - mdio-gpios
> + - mdio
> +
> + properties:
> + mdc-gpios: false
> + mdio-gpios: false
> + mdio: false
> + else:
> + required:
> + - mdc-gpios
> + - mdio-gpios
> + - mdio
> + - reset-gpios
> required:
> - compatible
>
next prev parent reply other threads:[~2023-11-26 22:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-05 14:42 [PATCH RESEND net-next 1/2] net: dsa: mt7530: register OF node for internal MDIO bus Daniel Golle
2023-08-05 14:43 ` [PATCH RESEND net-next 2/2] dt-bindings: net: dsa: mediatek,mt7530: document MDIO-bus Daniel Golle
2023-08-05 20:15 ` Arınç ÜNAL
2023-08-08 12:17 ` Vladimir Oltean
2023-08-09 9:03 ` Arınç ÜNAL
2023-08-09 22:01 ` Vladimir Oltean
2023-08-11 22:45 ` Arınç ÜNAL
2023-11-26 22:35 ` Daniel Golle [this message]
2023-11-27 11:30 ` 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=ZWPIQW1JA3rsvAzm@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arinc.unal@arinc9.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.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=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.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).