From: Andrew Lunn <andrew@lunn.ch>
To: Benjamin Beckmeyer <beb@eks-engel.de>
Cc: netdev@vger.kernel.org
Subject: Re: DSA with MV88E6321 and imx28
Date: Wed, 5 Jun 2019 15:31:02 +0200 [thread overview]
Message-ID: <20190605133102.GF19627@lunn.ch> (raw)
In-Reply-To: <414bd616-9383-073d-b3f3-6b6138c8b163@eks-engel.de>
> Here is my device tree
>
> mdio {
> #address-cells = <1>;
> #size-cells = <0>;
>
> switch0: switch0@0 {
> compatible = "marvell,mv88e6085";
> reg = <0x0>;
> pinctrl-0 = <&lcd_d06_pins>;
> reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
>
> dsa,member = <0 0>;
>
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> /* Changed reg to 0xc too, same error message */
> reg = <0x0>;
> label = "Serdes0";
> phy-handle = <&switch0phy0>;
> };
>
> port@1 {
> /* Changed reg to 0xd too, same error message */
> reg = <0x1>;
> label = "Serdes1";
> phy-handle = <&switch0phy1>;
> };
>
> port@2 {
> reg = <0x2>;
> label = "lan1";
> phy-handle = <&switch0phy2>;
> };
>
> port@3 {
> reg = <0x3>;
> label = "lan2";
> phy-handle = <&switch0phy3>;
> };
>
> port@4 {
> reg = <0x4>;
> label = "lan3";
> phy-handle = <&switch0phy4>;
> };
You don't need to list phy-handle for the internal PHYs. It should
just find them.
> mdio {
> #address-cells = <1>;
> #size-cells = <0>;
> switch0phy0: switch0phy0@0 {
> /* Changed reg to 0 too, same error message */
> reg = <0xc>;
> };
> switch0phy1: switch0phy1@1 {
> /* Changed reg to 1 too, same error message */
> reg = <0xd>;
> };
> switch0phy3: switch0phy3@3 {
> reg = <0x3>;
> };
> switch0phy4: switch0phy4@4 {
> reg = <0x4>;
> };
> };
>
> mdio1 {
> compatible = "marvell,mv88e6xxx-mdio-external";
> #address-cells = <1>;
> #size-cells = <0>;
>
> switch0phy2: switch0phy2@2 {
> reg = <0x2>;
> };
> switch0phy6: switch0phy6@6 {
> reg = <0x6>;
> };
> };
I doubt this second mdio bus is correct. The 6390 uses that, but i
don't think any other family does. The older generations have one MDIO
bus for both internal and external PHYs.
One other idea. Take a look at the data sheet. Can the MDIO pins also
be used for GPIO? Do they default to GPIO or MDIO? For the 6390 they
default to GPIO and there is code to reconfigure them for MDIO.
Andrew
next prev parent reply other threads:[~2019-06-05 13:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 13:07 DSA with MV88E6321 and imx28 Benjamin Beckmeyer
2019-06-04 13:50 ` Andrew Lunn
2019-06-05 4:52 ` Benjamin Beckmeyer
2019-06-05 12:24 ` Andrew Lunn
2019-06-05 13:12 ` Benjamin Beckmeyer
2019-06-05 13:31 ` Andrew Lunn [this message]
2019-06-05 13:54 ` Benjamin Beckmeyer
2019-06-05 18:47 ` Andrew Lunn
2019-06-06 9:39 ` Benjamin Beckmeyer
[not found] ` <c27f2b9b-90d7-db63-f01c-2dfaef7a014b@eks-engel.de>
[not found] ` <20190606122437.GA20899@lunn.ch>
2019-06-06 13:27 ` Benjamin Beckmeyer
2019-06-06 13:35 ` Andrew Lunn
2019-06-06 13:47 ` Benjamin Beckmeyer
2019-06-06 13:59 ` Andrew Lunn
2019-06-07 9:41 ` Benjamin Beckmeyer
2019-06-07 12:47 ` Andrew Lunn
2019-06-11 7:36 ` Benjamin Beckmeyer
2019-06-11 12:19 ` Andrew Lunn
2019-06-11 13:09 ` Benjamin Beckmeyer
2019-06-11 13:27 ` Andrew Lunn
2019-06-12 9:05 ` Benjamin Beckmeyer
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=20190605133102.GF19627@lunn.ch \
--to=andrew@lunn.ch \
--cc=beb@eks-engel.de \
--cc=netdev@vger.kernel.org \
/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).