From: Christian Lamparter <chunkeey@gmail.com>
To: "Michal Vokáč" <michal.vokac@ysoft.com>
Cc: Shawn Guo <shawnguo@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch
Date: Wed, 20 Mar 2019 14:35:55 +0100 [thread overview]
Message-ID: <3167549.DapOIHJhgP@debian64> (raw)
In-Reply-To: <1553080145-29348-1-git-send-email-michal.vokac@ysoft.com>
On Wednesday, March 20, 2019 12:09:05 PM CET Michal Vokáč wrote:
> The switch is accessible through pseudo PHY which is located at 0x10.
from what I know the switch@0 came from John' original qca8k submission patch
<https://lore.kernel.org/patchwork/patch/715974/> (this is v1! not the later
version)
In this version, the qca8k_sw_probe() function used read the MII_PHYID1 and 2
from the PHY0 in order to identify the switch (much like ar8216.c / ar8327.c
switchdev does):
| /* sw_addr is irrelevant as the switch occupies the MDIO bus from
| * addresses 0 to 4 (PHYs) and 16-23 (for MDIO 32bits protocol). So
| * we'll probe address 0 to see if we see the right switch family.
| */
| phy_id = mdiobus_read(mdiodev->bus, 0, MII_PHYSID1) << 16;
| phy_id |= mdiobus_read(mdiodev->bus, 0, MII_PHYSID2);
|
| switch (phy_id) {
| case PHY_ID_QCA8337:
| break;
| default:
| return -ENODEV;
| }
However, this code was changed in v2. Probably because if the PHY is put in
isolation and powered down the MII_PHYID1 and 2 will read "0xffff". So the
discovery would no longer worked on systems that purposely disable the switch
during the bootloader-handoff procedure (like the Meraki MX60).
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> ---
> arch/arm/boot/dts/imx6dl-yapp4-common.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi b/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi
> index 091d829f6b05..e8d800fec637 100644
> --- a/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi
> +++ b/arch/arm/boot/dts/imx6dl-yapp4-common.dtsi
> @@ -114,9 +114,9 @@
> reg = <2>;
> };
>
> - switch@0 {
> + switch@10 {
> compatible = "qca,qca8334";
> - reg = <0>;
> + reg = <10>;
>
> switch_ports: ports {
> #address-cells = <1>;
>
next prev parent reply other threads:[~2019-03-20 13:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 11:09 [PATCH] ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch Michal Vokáč
2019-03-20 13:35 ` Christian Lamparter [this message]
[not found] ` <3351685.tXMZElDEK0@debian64>
2019-03-21 12:44 ` PM: " Michal Vokáč
2019-03-22 1:22 ` Shawn Guo
2019-03-22 6:02 ` Michal Vokáč
2019-03-22 1:20 ` Shawn Guo
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=3167549.DapOIHJhgP@debian64 \
--to=chunkeey@gmail.com \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=michal.vokac@ysoft.com \
--cc=robh+dt@kernel.org \
--cc=shawnguo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.