linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Bob Cochran <ppc@mindchasers.com>
To: b29983@freescale.com, linuxppc-dev@lists.ozlabs.org,
	Tang Yuantian <Yuantian.Tang@freescale.com>,
	Jin Qing <b24347@freescale.com>
Subject: Re: [PATCH 1/2 V3] powerpc/85xx: Add P1024rdb dts support
Date: Sun, 12 Feb 2012 20:40:08 -0500	[thread overview]
Message-ID: <4F3869F8.6080802@mindchasers.com> (raw)
In-Reply-To: <1328860851-392-1-git-send-email-b29983@freescale.com>

On 02/10/2012 03:00 AM, b29983@freescale.com wrote:
> From: Tang Yuantian<Yuantian.Tang@freescale.com>
>
> Signed-off-by: Jin Qing<b24347@freescale.com>
> Signed-off-by: Li Yang<leoli@freescale.com>
> Signed-off-by: Tang Yuantian<Yuantian.Tang@freescale.com>
> ---
> v3:



I'm curious how fsl_pq_mdio_probe returns successfully when probing the 
phys on the first pass (mdio@24000).  I don't have a P1024 to test with, 
but I believe it has the same ETSEC configuration as the P1010 that I 
work with.

Inside the fsl_pq_mdio_probe routine (fsl_pq_mdio.c), a successful 
search of a tbi child node is required with a tbi->type of "tby-phy". 
If it doesn't find this node, the probe routine will return an error of 
EBUSY.  The logic from the routine is provided below:


for_each_child_of_node(np, tbi) {
                 if (!strncmp(tbi->type, "tbi-phy", 8))
                         break;
         }

         if (tbi) {
                 const u32 *prop = of_get_property(tbi, "reg", NULL);

                 if (prop)
                         tbiaddr = *prop;
         }

         if (tbiaddr == -1) {
                 err = -EBUSY;
                 goto err_free_irqs;
         } else {
                 out_be32(tbipa, tbiaddr);
         }


If I look at the p1010rdb.dtsi file, I see that a tbi-phy child node was 
added inside mdio@24000; however, I don't see this inside your 
p1024rdb.dtsi.

On top of this, the current p1010rdb mdio@24000 node in p1024rdb.dtsi 
doesn't yield a successful probe (as I reported on this mail list on 
2/7/12).

So, it seems to me that a tbi child node needs to be added to your 
mdio@24000 node similar to what was done with the p1010rdb,

but it also requires some additional tweaking or perhaps a fix inside 
the fsl_pq_mdio_probe routine or of library (It's not clear to me how to 
best produce a successful probe given the circumstances).



> +
> +	mdio@24000 {
> +		phy0: ethernet-phy@0 {
> +			interrupts =<3 1 0 0>;
> +			reg =<0x0>;
> +		};
> +		phy1: ethernet-phy@1 {
> +			interrupts =<2 1 0 0>;
> +			reg =<0x1>;
> +		};
> +		phy2: ethernet-phy@2 {
> +			interrupts =<1 1 0 0>;
> +			reg =<0x2>;
> +		};
> +	};
> +
> +	mdio@25000 {
> +		tbi0: tbi-phy@11 {
> +			reg =<0x11>;
> +			device_type = "tbi-phy";
> +		};
> +	};
> +
> +	mdio@26000 {
> +		tbi1: tbi-phy@11 {
> +			reg =<0x11>;
> +			device_type = "tbi-phy";
> +		};
> +	};
> +
> +	ethernet@b0000 {
> +		phy-handle =<&phy2>;
> +		phy-connection-type = "rgmii-id";
> +	};
> +

  reply	other threads:[~2012-02-13  1:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  8:00 [PATCH 1/2 V3] powerpc/85xx: Add P1024rdb dts support b29983
2012-02-13  1:40 ` Bob Cochran [this message]
2012-02-14  7:23   ` Tang Yuantian-B29983

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=4F3869F8.6080802@mindchasers.com \
    --to=ppc@mindchasers.com \
    --cc=Yuantian.Tang@freescale.com \
    --cc=b24347@freescale.com \
    --cc=b29983@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.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).