devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, geert+renesas@glider.be,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 5/5] arm64: dts: renesas: r8a779f0: spider: Enable Ethernet Switch
Date: Tue, 13 Sep 2022 02:16:21 +0200	[thread overview]
Message-ID: <Yx/L1VeVmR/QAErf@lunn.ch> (raw)
In-Reply-To: <20220909132614.1967276-6-yoshihiro.shimoda.uh@renesas.com>

> +	ports {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		port@0 {
> +			reg = <0>;
> +			phy-handle = <&etha0>;
> +			phy-mode = "sgmii";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			etha0: ethernet-phy@0 {
> +				reg = <1>;

reg = 1 means you should have @1.


> +				compatible = "ethernet-phy-ieee802.3-c45";
> +			};
> +		};

You are mixing Ethernet and MDIO properties in one node. Past
experience says this is a bad idea, particularly when you have
switches involved. I would suggest you add an mdio container:


> +		port@1 {
> +			reg = <1>;
> +			phy-handle = <&etha1>;
> +			phy-mode = "sgmii";
> +			#address-cells = <1>;
> +			#size-cells = <0>;

                        mdio {
> +			    etha1: ethernet-phy@1 {
> +				reg = <2>;
> +				compatible = "ethernet-phy-ieee802.3-c45";
> +			    };
                        };
> +		};
> +		port@2 {
> +			reg = <2>;
> +			phy-handle = <&etha2>;
> +			phy-mode = "sgmii";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			etha2: ethernet-phy@2 {
> +				reg = <3>;
> +				compatible = "ethernet-phy-ieee802.3-c45";
> +			};
> +		};

I find it interesting you have PHYs are address 1, 2, 3, even though
they are on individual busses. Why pay for the extra pullup/down
resistors when they could all have the same address?

	  Andrew

  reply	other threads:[~2022-09-13  0:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 13:26 [PATCH 0/5] treewide: Add R-Car S4-8 Ethernet Switch support Yoshihiro Shimoda
2022-09-09 13:26 ` [PATCH 1/5] clk: renesas: r8a779f0: Add Ethernet Switch clocks Yoshihiro Shimoda
2022-09-09 13:26 ` [PATCH 2/5] dt-bindings: net: renesas: Document Renesas Ethernet Switch Yoshihiro Shimoda
2022-09-12 22:32   ` Andrew Lunn
2022-09-13  5:56     ` Yoshihiro Shimoda
2022-09-13 13:02   ` Rob Herring
2022-09-14  5:01     ` Yoshihiro Shimoda
2022-09-09 13:26 ` [PATCH 3/5] net: ethernet: renesas: Add Ethernet Switch driver Yoshihiro Shimoda
2022-09-09 17:26   ` kernel test robot
2022-09-12 12:41     ` Yoshihiro Shimoda
2022-09-12 22:33   ` Andrew Lunn
2022-09-14  4:48     ` Yoshihiro Shimoda
2022-09-12 23:14   ` Andrew Lunn
2022-09-14  4:38     ` Yoshihiro Shimoda
2022-09-14 12:03       ` Andrew Lunn
2022-09-09 13:26 ` [PATCH 4/5] arm64: dts: renesas: r8a779f0: Add Ethernet Switch node Yoshihiro Shimoda
2022-09-09 13:26 ` [PATCH 5/5] arm64: dts: renesas: r8a779f0: spider: Enable Ethernet Switch Yoshihiro Shimoda
2022-09-13  0:16   ` Andrew Lunn [this message]
2022-09-14  4:47     ` Yoshihiro Shimoda
2022-09-14 12:14       ` Andrew Lunn
2022-09-21  7:54         ` Yoshihiro Shimoda

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=Yx/L1VeVmR/QAErf@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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).