[PATCH 1/2 V3] powerpc/85xx: Add P1024rdb dts support
Bob Cochran
ppc at mindchasers.com
Mon Feb 13 12:40:08 EST 2012
On 02/10/2012 03:00 AM, b29983 at freescale.com wrote:
> From: Tang Yuantian<Yuantian.Tang at freescale.com>
>
> Signed-off-by: Jin Qing<b24347 at freescale.com>
> Signed-off-by: Li Yang<leoli at freescale.com>
> Signed-off-by: Tang Yuantian<Yuantian.Tang at freescale.com>
> ---
> v3:
I'm curious how fsl_pq_mdio_probe returns successfully when probing the
phys on the first pass (mdio at 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 at 24000; however, I don't see this inside your
p1024rdb.dtsi.
On top of this, the current p1010rdb mdio at 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 at 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 at 24000 {
> + phy0: ethernet-phy at 0 {
> + interrupts =<3 1 0 0>;
> + reg =<0x0>;
> + };
> + phy1: ethernet-phy at 1 {
> + interrupts =<2 1 0 0>;
> + reg =<0x1>;
> + };
> + phy2: ethernet-phy at 2 {
> + interrupts =<1 1 0 0>;
> + reg =<0x2>;
> + };
> + };
> +
> + mdio at 25000 {
> + tbi0: tbi-phy at 11 {
> + reg =<0x11>;
> + device_type = "tbi-phy";
> + };
> + };
> +
> + mdio at 26000 {
> + tbi1: tbi-phy at 11 {
> + reg =<0x11>;
> + device_type = "tbi-phy";
> + };
> + };
> +
> + ethernet at b0000 {
> + phy-handle =<&phy2>;
> + phy-connection-type = "rgmii-id";
> + };
> +
More information about the Linuxppc-dev
mailing list