linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Newby trying to get Ethernet going on MPC83xx series device.
@ 2009-02-19  4:26 Dushara Jayasinghe
  2009-02-19  5:21 ` Li Yang-R58472
  2009-02-19 18:38 ` Scott Wood
  0 siblings, 2 replies; 15+ messages in thread
From: Dushara Jayasinghe @ 2009-02-19  4:26 UTC (permalink / raw)
  To: 'linuxppc-dev@ozlabs.org'

[-- Attachment #1: Type: text/plain, Size: 3081 bytes --]

Hi I'm having difficulty getting an Ethernet device up on a dev board with an MPX8349 controller.

The contents of my .dts file are as follows (based on mpc8349emitx.dts):

        soc8349@e0000000 {
                ...

                mdio@24520 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "fsl,gianfar-mdio";
                        reg = <24520 20>;

                        /* Vitesse 8201 */
                        phy1c: ethernet-phy@1c {
                                interrupt-parent = <&ipic>;
                                interrupts = <3 8>;
                                reg = <0>;
                                device_type = "ethernet-phy";
                        };
                        tbi0: tbi-phy@11 {
                                reg = <11>;
                                device_type = "tbi-phy";
                        };
                };

                mdio@25520 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "fsl,gianfar-tbi";
                        reg = <25520 20>;

                        tbi1: tbi-phy@11 {
                                reg = <11>;
                                device_type = "tbi-phy";
                        };
                };

                ethernet@24000 {
                        cell-index = <0>;
                        device_type = "network";
                        model = "TSEC";
                        compatible = "gianfar";
                        reg = <24000 1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <20 8 21 8 22 8>;
                        interrupt-parent = <&ipic>;
                        tbi-handle = <&tbi0>;
                        phy-handle = <&phy1c>;
                        linux,network-index = <0>;
                };

                ethernet@25000 {
                        cell-index = <1>;
                        device_type = "network";
                        model = "TSEC";
                        compatible = "gianfar";
                        reg = <25000 1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <23 8 24 8 25 8>;
                        interrupt-parent = <&ipic>;
                        /* Vitesse 7385 isn't on the MDIO bus */
                        fixed-link = <1 1 1000 0 0>;
                        linux,network-index = <1>;
                        tbi-handle = <&tbi1>;
                        phy-connection-type = "gmii";
                };
        };

I get the following error during the boot sequence:

IP-Config: Device `eth0' not found

I also found that both gfar_init (in gianfar.c) and gfar_mdio_init (in gianfar_mii.c) are called but the probe handlers of either of these devices are not executed.

What am I missing?

Thanks in advance.
D





[-- Attachment #2: Type: text/html, Size: 11246 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  4:26 Newby trying to get Ethernet going on MPC83xx series device Dushara Jayasinghe
@ 2009-02-19  5:21 ` Li Yang-R58472
  2009-02-19  6:33   ` Dushara Jayasinghe
  2009-02-19  6:48   ` Aggrwal Poonam-B10812
  2009-02-19 18:38 ` Scott Wood
  1 sibling, 2 replies; 15+ messages in thread
From: Li Yang-R58472 @ 2009-02-19  5:21 UTC (permalink / raw)
  To: Dushara Jayasinghe, linuxppc-dev

> -----Original Message-----
> From: linuxppc-dev-bounces+leoli=3Dfreescale.com@ozlabs.org=20
> [mailto:linuxppc-dev-bounces+leoli=3Dfreescale.com@ozlabs.org]=20
> On Behalf Of Dushara Jayasinghe
> Sent: Thursday, February 19, 2009 12:27 PM
> To: 'linuxppc-dev@ozlabs.org'
> Subject: Newby trying to get Ethernet going on MPC83xx series device.
>=20
> Hi I'm having difficulty getting an Ethernet device up on a=20
> dev board with an MPX8349 controller.
> =20
> The contents of my .dts file are as follows (based on=20
> mpc8349emitx.dts):
> =20
>         soc8349@e0000000 {
>                 ...
> =20
>                 mdio@24520 {
>                         #address-cells =3D <1>;
>                         #size-cells =3D <0>;
>                         compatible =3D "fsl,gianfar-mdio";
>                         reg =3D <24520 20>;
> =20
>                         /* Vitesse 8201 */
>                         phy1c: ethernet-phy@1c {
>                                 interrupt-parent =3D <&ipic>;
>                                 interrupts =3D <3 8>;
>                                 reg =3D <0>;
>                                 device_type =3D "ethernet-phy";
>                         };
>                         tbi0: tbi-phy@11 {
>                                 reg =3D <11>;
>                                 device_type =3D "tbi-phy";
>                         };
>                 };
> =20
>                 mdio@25520 {
>                         #address-cells =3D <1>;
>                         #size-cells =3D <0>;
>                         compatible =3D "fsl,gianfar-tbi";
>                         reg =3D <25520 20>;
> =20
>                         tbi1: tbi-phy@11 {
>                                 reg =3D <11>;
>                                 device_type =3D "tbi-phy";
>                         };
>                 };
> =20
>                 ethernet@24000 {
>                         cell-index =3D <0>;
>                         device_type =3D "network";
>                         model =3D "TSEC";
>                         compatible =3D "gianfar";
>                         reg =3D <24000 1000>;
>                         local-mac-address =3D [ 00 00 00 00 00 00 ];
>                         interrupts =3D <20 8 21 8 22 8>;
>                         interrupt-parent =3D <&ipic>;
>                         tbi-handle =3D <&tbi0>;
>                         phy-handle =3D <&phy1c>;
>                         linux,network-index =3D <0>;
>                 };
> =20
>                 ethernet@25000 {
>                         cell-index =3D <1>;
>                         device_type =3D "network";
>                         model =3D "TSEC";
>                         compatible =3D "gianfar";
>                         reg =3D <25000 1000>;
>                         local-mac-address =3D [ 00 00 00 00 00 00 ];
>                         interrupts =3D <23 8 24 8 25 8>;
>                         interrupt-parent =3D <&ipic>;
>                         /* Vitesse 7385 isn't on the MDIO bus */
>                         fixed-link =3D <1 1 1000 0 0>;
>                         linux,network-index =3D <1>;
>                         tbi-handle =3D <&tbi1>;
>                         phy-connection-type =3D "gmii";
>                 };
>         };
> =20
> I get the following error during the boot sequence:
> =20
> IP-Config: Device `eth0' not found
> =20
> I also found that both gfar_init (in gianfar.c) and=20
> gfar_mdio_init (in gianfar_mii.c) are called but the probe=20
> handlers of either of these devices are not executed.
> =20
> What am I missing?

Don't find any obvious problem.  I suggest you to debug gfar_of_init()
in arch/powerpc/sysdev/fsl_soc.c to see if it works correctly.

- Leo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  5:21 ` Li Yang-R58472
@ 2009-02-19  6:33   ` Dushara Jayasinghe
  2009-02-19  6:41     ` Li Yang-R58472
  2009-02-19  6:48   ` Aggrwal Poonam-B10812
  1 sibling, 1 reply; 15+ messages in thread
From: Dushara Jayasinghe @ 2009-02-19  6:33 UTC (permalink / raw)
  To: linuxppc-dev

Thanks for the swift response.

> > I also found that both gfar_init (in gianfar.c) and=20
> > gfar_mdio_init (in gianfar_mii.c) are called but the probe=20
> > handlers of either of these devices are not executed.
> > =20
> > What am I missing?

> Don't find any obvious problem.  I suggest you to debug gfar_of_init()
> in arch/powerpc/sysdev/fsl_soc.c to see if it works correctly.

That fn doesn't exist in the dev tree I'm using (commit 103f194f3ccf4684254=
8eb52e607167b6d4951ef)

The driver is now initialised through of_device. I can't figure out how the=
 probe handler is invoked.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  6:33   ` Dushara Jayasinghe
@ 2009-02-19  6:41     ` Li Yang-R58472
  0 siblings, 0 replies; 15+ messages in thread
From: Li Yang-R58472 @ 2009-02-19  6:41 UTC (permalink / raw)
  To: Dushara Jayasinghe, linuxppc-dev

> -----Original Message-----
> From: Dushara Jayasinghe [mailto:DusharaJ@optiscan.com]=20
> Sent: Thursday, February 19, 2009 2:33 PM
> To: linuxppc-dev@ozlabs.org
> Cc: Li Yang-R58472
> Subject: RE: Newby trying to get Ethernet going on MPC83xx=20
> series device.
>=20
> Thanks for the swift response.
>=20
> > > I also found that both gfar_init (in gianfar.c) and=20
> gfar_mdio_init=20
> > > (in gianfar_mii.c) are called but the probe handlers of either of=20
> > > these devices are not executed.
> > > =20
> > > What am I missing?
>=20
> > Don't find any obvious problem.  I suggest you to debug=20
> gfar_of_init()=20
> > in arch/powerpc/sysdev/fsl_soc.c to see if it works correctly.
>=20
> That fn doesn't exist in the dev tree I'm using (commit=20
> 103f194f3ccf46842548eb52e607167b6d4951ef)
>=20
> The driver is now initialised through of_device. I can't=20
> figure out how the probe handler is invoked.

Well, I was looking at an older tree.  If you are using of_device for
TSEC, the most likely cause of this problem is that
of_platform_bus_probe() didn't probe your ethernet nodes.

Refer to the following code in
arch/powerpc/platforms/83xx/mpc834x_itx.c.  Make sure it creates
of_platform_device for TSEC.

static struct of_device_id __initdata mpc834x_itx_ids[] =3D {
        { .compatible =3D "fsl,pq2pro-localbus", },
        { .compatible =3D "simple-bus", },
        {},
};

static int __init mpc834x_itx_declare_of_platform_devices(void)
{
        return of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
}
machine_device_initcall(mpc834x_itx,
mpc834x_itx_declare_of_platform_devices);

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  5:21 ` Li Yang-R58472
  2009-02-19  6:33   ` Dushara Jayasinghe
@ 2009-02-19  6:48   ` Aggrwal Poonam-B10812
  2009-02-19  6:58     ` Dushara Jayasinghe
  1 sibling, 1 reply; 15+ messages in thread
From: Aggrwal Poonam-B10812 @ 2009-02-19  6:48 UTC (permalink / raw)
  To: Li Yang-R58472, Dushara Jayasinghe, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 5053 bytes --]

Can you look into your board specific file 
Like board/freescale/mpc8249_mds/mpc8349_mds.c

And check if the buses are getting probed.

For example

static struct of_device_id mpc834x_ids[] = {
        { .type = "soc", },
        { .compatible = "soc", },
        { .compatible = "simple-bus", },
        {},
};

static int __init mpc834x_declare_of_platform_devices(void)
{
        of_platform_bus_probe(NULL, mpc834x_ids, NULL);
        return 0;
}
machine_device_initcall(mpc834x_mds,
mpc834x_declare_of_platform_devices);

Regards
Poonam
 

> -----Original Message-----
> From: 
> linuxppc-dev-bounces+poonam.aggrwal=freescale.com@ozlabs.org 
> [mailto:linuxppc-dev-bounces+poonam.aggrwal=freescale.com@ozla
> bs.org] On Behalf Of Li Yang-R58472
> Sent: Thursday, February 19, 2009 10:52 AM
> To: Dushara Jayasinghe; linuxppc-dev@ozlabs.org
> Subject: RE: Newby trying to get Ethernet going on MPC83xx 
> series device.
> 
> > -----Original Message-----
> > From: linuxppc-dev-bounces+leoli=freescale.com@ozlabs.org
> > [mailto:linuxppc-dev-bounces+leoli=freescale.com@ozlabs.org]
> > On Behalf Of Dushara Jayasinghe
> > Sent: Thursday, February 19, 2009 12:27 PM
> > To: 'linuxppc-dev@ozlabs.org'
> > Subject: Newby trying to get Ethernet going on MPC83xx 
> series device.
> > 
> > Hi I'm having difficulty getting an Ethernet device up on a 
> dev board 
> > with an MPX8349 controller.
> >  
> > The contents of my .dts file are as follows (based on
> > mpc8349emitx.dts):
> >  
> >         soc8349@e0000000 {
> >                 ...
> >  
> >                 mdio@24520 {
> >                         #address-cells = <1>;
> >                         #size-cells = <0>;
> >                         compatible = "fsl,gianfar-mdio";
> >                         reg = <24520 20>;
> >  
> >                         /* Vitesse 8201 */
> >                         phy1c: ethernet-phy@1c {
> >                                 interrupt-parent = <&ipic>;
> >                                 interrupts = <3 8>;
> >                                 reg = <0>;
> >                                 device_type = "ethernet-phy";
> >                         };
> >                         tbi0: tbi-phy@11 {
> >                                 reg = <11>;
> >                                 device_type = "tbi-phy";
> >                         };
> >                 };
> >  
> >                 mdio@25520 {
> >                         #address-cells = <1>;
> >                         #size-cells = <0>;
> >                         compatible = "fsl,gianfar-tbi";
> >                         reg = <25520 20>;
> >  
> >                         tbi1: tbi-phy@11 {
> >                                 reg = <11>;
> >                                 device_type = "tbi-phy";
> >                         };
> >                 };
> >  
> >                 ethernet@24000 {
> >                         cell-index = <0>;
> >                         device_type = "network";
> >                         model = "TSEC";
> >                         compatible = "gianfar";
> >                         reg = <24000 1000>;
> >                         local-mac-address = [ 00 00 00 00 00 00 ];
> >                         interrupts = <20 8 21 8 22 8>;
> >                         interrupt-parent = <&ipic>;
> >                         tbi-handle = <&tbi0>;
> >                         phy-handle = <&phy1c>;
> >                         linux,network-index = <0>;
> >                 };
> >  
> >                 ethernet@25000 {
> >                         cell-index = <1>;
> >                         device_type = "network";
> >                         model = "TSEC";
> >                         compatible = "gianfar";
> >                         reg = <25000 1000>;
> >                         local-mac-address = [ 00 00 00 00 00 00 ];
> >                         interrupts = <23 8 24 8 25 8>;
> >                         interrupt-parent = <&ipic>;
> >                         /* Vitesse 7385 isn't on the MDIO bus */
> >                         fixed-link = <1 1 1000 0 0>;
> >                         linux,network-index = <1>;
> >                         tbi-handle = <&tbi1>;
> >                         phy-connection-type = "gmii";
> >                 };
> >         };
> >  
> > I get the following error during the boot sequence:
> >  
> > IP-Config: Device `eth0' not found
> >  
> > I also found that both gfar_init (in gianfar.c) and 
> gfar_mdio_init (in 
> > gianfar_mii.c) are called but the probe handlers of either of these 
> > devices are not executed.
> >  
> > What am I missing?
> 
> Don't find any obvious problem.  I suggest you to debug 
> gfar_of_init() in arch/powerpc/sysdev/fsl_soc.c to see if it 
> works correctly.
> 
> - Leo
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 
> 

[-- Attachment #2: Type: text/html, Size: 22716 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  6:48   ` Aggrwal Poonam-B10812
@ 2009-02-19  6:58     ` Dushara Jayasinghe
  2009-02-19  7:19       ` Li Yang
  2009-02-19 15:17       ` Timur Tabi
  0 siblings, 2 replies; 15+ messages in thread
From: Dushara Jayasinghe @ 2009-02-19  6:58 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: 'Aggrwal Poonam-B10812'

[-- Attachment #1: Type: text/plain, Size: 5569 bytes --]

That did it.

I based my board specific file on mpc834x_itx.c which had

static struct of_device_id __initdata mpc834x_itx_ids[] = {
                { .compatible = "fsl,pq2pro-localbus", },
                { .compatible = "simple-bus", },
                {},
};

Don't know if this is broken?

From: Aggrwal Poonam-B10812 [mailto:Poonam.Aggrwal@freescale.com]
Sent: Thursday, 19 February 2009 5:49 PM
To: Li Yang-R58472; Dushara Jayasinghe; linuxppc-dev@ozlabs.org
Subject: RE: Newby trying to get Ethernet going on MPC83xx series device.


Can you look into your board specific file
Like board/freescale/mpc8249_mds/mpc8349_mds.c

And check if the buses are getting probed.

For example

static struct of_device_id mpc834x_ids[] = {
        { .type = "soc", },
        { .compatible = "soc", },
        { .compatible = "simple-bus", },
        {},
};

static int __init mpc834x_declare_of_platform_devices(void)
{
        of_platform_bus_probe(NULL, mpc834x_ids, NULL);
        return 0;
}
machine_device_initcall(mpc834x_mds, mpc834x_declare_of_platform_devices);

Regards
Poonam


> -----Original Message-----
> From:
> linuxppc-dev-bounces+poonam.aggrwal=freescale.com@ozlabs.org
> [mailto:linuxppc-dev-bounces+poonam.aggrwal=freescale.com@ozla
> bs.org] On Behalf Of Li Yang-R58472
> Sent: Thursday, February 19, 2009 10:52 AM
> To: Dushara Jayasinghe; linuxppc-dev@ozlabs.org
> Subject: RE: Newby trying to get Ethernet going on MPC83xx
> series device.
>
> > -----Original Message-----
> > From: linuxppc-dev-bounces+leoli=freescale.com@ozlabs.org
> > [mailto:linuxppc-dev-bounces+leoli=freescale.com@ozlabs.org]
> > On Behalf Of Dushara Jayasinghe
> > Sent: Thursday, February 19, 2009 12:27 PM
> > To: 'linuxppc-dev@ozlabs.org'
> > Subject: Newby trying to get Ethernet going on MPC83xx
> series device.
> >
> > Hi I'm having difficulty getting an Ethernet device up on a
> dev board
> > with an MPX8349 controller.
> >
> > The contents of my .dts file are as follows (based on
> > mpc8349emitx.dts):
> >
> >         soc8349@e0000000 {
> >                 ...
> >
> >                 mdio@24520 {
> >                         #address-cells = <1>;
> >                         #size-cells = <0>;
> >                         compatible = "fsl,gianfar-mdio";
> >                         reg = <24520 20>;
> >
> >                         /* Vitesse 8201 */
> >                         phy1c: ethernet-phy@1c {
> >                                 interrupt-parent = <&ipic>;
> >                                 interrupts = <3 8>;
> >                                 reg = <0>;
> >                                 device_type = "ethernet-phy";
> >                         };
> >                         tbi0: tbi-phy@11 {
> >                                 reg = <11>;
> >                                 device_type = "tbi-phy";
> >                         };
> >                 };
> >
> >                 mdio@25520 {
> >                         #address-cells = <1>;
> >                         #size-cells = <0>;
> >                         compatible = "fsl,gianfar-tbi";
> >                         reg = <25520 20>;
> >
> >                         tbi1: tbi-phy@11 {
> >                                 reg = <11>;
> >                                 device_type = "tbi-phy";
> >                         };
> >                 };
> >
> >                 ethernet@24000 {
> >                         cell-index = <0>;
> >                         device_type = "network";
> >                         model = "TSEC";
> >                         compatible = "gianfar";
> >                         reg = <24000 1000>;
> >                         local-mac-address = [ 00 00 00 00 00 00 ];
> >                         interrupts = <20 8 21 8 22 8>;
> >                         interrupt-parent = <&ipic>;
> >                         tbi-handle = <&tbi0>;
> >                         phy-handle = <&phy1c>;
> >                         linux,network-index = <0>;
> >                 };
> >
> >                 ethernet@25000 {
> >                         cell-index = <1>;
> >                         device_type = "network";
> >                         model = "TSEC";
> >                         compatible = "gianfar";
> >                         reg = <25000 1000>;
> >                         local-mac-address = [ 00 00 00 00 00 00 ];
> >                         interrupts = <23 8 24 8 25 8>;
> >                         interrupt-parent = <&ipic>;
> >                         /* Vitesse 7385 isn't on the MDIO bus */
> >                         fixed-link = <1 1 1000 0 0>;
> >                         linux,network-index = <1>;
> >                         tbi-handle = <&tbi1>;
> >                         phy-connection-type = "gmii";
> >                 };
> >         };
> >
> > I get the following error during the boot sequence:
> >
> > IP-Config: Device `eth0' not found
> >
> > I also found that both gfar_init (in gianfar.c) and
> gfar_mdio_init (in
> > gianfar_mii.c) are called but the probe handlers of either of these
> > devices are not executed.
> >
> > What am I missing?
>
> Don't find any obvious problem.  I suggest you to debug
> gfar_of_init() in arch/powerpc/sysdev/fsl_soc.c to see if it
> works correctly.
>
> - Leo
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
>

[-- Attachment #2: Type: text/html, Size: 30260 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  6:58     ` Dushara Jayasinghe
@ 2009-02-19  7:19       ` Li Yang
  2009-02-19  7:25         ` Aggrwal Poonam-B10812
  2009-02-19 15:17       ` Timur Tabi
  1 sibling, 1 reply; 15+ messages in thread
From: Li Yang @ 2009-02-19  7:19 UTC (permalink / raw)
  To: Dushara Jayasinghe; +Cc: linuxppc-dev, Aggrwal Poonam-B10812

On Thu, Feb 19, 2009 at 2:58 PM, Dushara Jayasinghe
<DusharaJ@optiscan.com> wrote:
> That did it.
>
>
>
> I based my board specific file on mpc834x_itx.c which had
>
>
>
> static struct of_device_id __initdata mpc834x_itx_ids[] = {
>
>                 { .compatible = "fsl,pq2pro-localbus", },
>
>                 { .compatible = "simple-bus", },
>
>                 {},
>
> };
>
>
>
> Don't know if this is broken?

It's not broken as long as you have compatible = "simple-bus" for your soc node.

- Leo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  7:19       ` Li Yang
@ 2009-02-19  7:25         ` Aggrwal Poonam-B10812
  2009-02-20  0:36           ` Dushara Jayasinghe
  0 siblings, 1 reply; 15+ messages in thread
From: Aggrwal Poonam-B10812 @ 2009-02-19  7:25 UTC (permalink / raw)
  To: Li Yang-R58472, Dushara Jayasinghe; +Cc: linuxppc-dev

Probably better would be to check the board file for  mpc834x_mds.c

I mean just cross that you probe all the buses which are on the device.
What is fsl,pq2pro-localbus? Do u have such node in dts as the
mpc8349_itx has.

> -----Original Message-----
> From: pku.leo@gmail.com [mailto:pku.leo@gmail.com] On Behalf=20
> Of Li Yang-R58472
> Sent: Thursday, February 19, 2009 12:50 PM
> To: Dushara Jayasinghe
> Cc: linuxppc-dev@ozlabs.org; Aggrwal Poonam-B10812
> Subject: Re: Newby trying to get Ethernet going on MPC83xx=20
> series device.
>=20
> On Thu, Feb 19, 2009 at 2:58 PM, Dushara Jayasinghe=20
> <DusharaJ@optiscan.com> wrote:
> > That did it.
> >
> >
> >
> > I based my board specific file on mpc834x_itx.c which had
> >
> >
> >
> > static struct of_device_id __initdata mpc834x_itx_ids[] =3D {
> >
> >                 { .compatible =3D "fsl,pq2pro-localbus", },
> >
> >                 { .compatible =3D "simple-bus", },
> >
> >                 {},
> >
> > };
> >
> >
> >
> > Don't know if this is broken?
>=20
> It's not broken as long as you have compatible =3D "simple-bus"=20
> for your soc node.
>=20
> - Leo
>=20
>=20

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  6:58     ` Dushara Jayasinghe
  2009-02-19  7:19       ` Li Yang
@ 2009-02-19 15:17       ` Timur Tabi
  1 sibling, 0 replies; 15+ messages in thread
From: Timur Tabi @ 2009-02-19 15:17 UTC (permalink / raw)
  To: Dushara Jayasinghe; +Cc: linuxppc-dev, Aggrwal Poonam-B10812

On Thu, Feb 19, 2009 at 12:58 AM, Dushara Jayasinghe
<DusharaJ@optiscan.com> wrote:
> I based my board specific file on mpc834x_itx.c which had
>
> static struct of_device_id __initdata mpc834x_itx_ids[] = {
>                 { .compatible = "fsl,pq2pro-localbus", },
>                 { .compatible = "simple-bus", },
>                 {},
> };
>
> Don't know if this is broken?

Actually, it's your device tree that's broken.  The above is the right
way to do it.  The other way:

static struct of_device_id mpc834x_ids[] = {
        { .type = "soc", },
        { .compatible = "soc", },
        { .compatible = "simple-bus", },
        {},
};

is the old way.  You're missing a compatible=simple-bus in your device tree.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  4:26 Newby trying to get Ethernet going on MPC83xx series device Dushara Jayasinghe
  2009-02-19  5:21 ` Li Yang-R58472
@ 2009-02-19 18:38 ` Scott Wood
  1 sibling, 0 replies; 15+ messages in thread
From: Scott Wood @ 2009-02-19 18:38 UTC (permalink / raw)
  To: Dushara Jayasinghe; +Cc: 'linuxppc-dev@ozlabs.org'

On Thu, Feb 19, 2009 at 03:26:41PM +1100, Dushara Jayasinghe wrote:
> I get the following error during the boot sequence:
> 
> IP-Config: Device `eth0' not found
> 
> I also found that both gfar_init (in gianfar.c) and gfar_mdio_init (in
> gianfar_mii.c) are called but the probe handlers of either of these
> devices are not executed.

Check your board code to see if the soc node is being probed by
of_platform_bus_probe.  Ideally, the soc node would have "simple-bus"
included in the compatible property, as would the of_device_id array.

-Scott

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-19  7:25         ` Aggrwal Poonam-B10812
@ 2009-02-20  0:36           ` Dushara Jayasinghe
  2009-02-20  5:00             ` Michael Bergandi
  0 siblings, 1 reply; 15+ messages in thread
From: Dushara Jayasinghe @ 2009-02-20  0:36 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: 'Aggrwal Poonam-B10812', 'Timur Tabi'

Yes I now base it on mpc834x_mds.c and it works (almost) :-(

The devices are successfully probed, but I'm getting this error on the debu=
g console:

[    7.119389] mdio@24520:00 not found
[    7.161370] eth0: Could not attach to PHY
[    7.209600] IP-Config: Failed to open eth0
[    7.258879] IP-Config: Device `eth0' not found.

My mdio & Ethernet nodes are as follows (commenting out device_type below i=
s an experiment)

		mdio@24520 {
			/*device_type =3D "mdio";*/
			compatible =3D "fsl,gianfar-mdio";
			#address-cells =3D <1>;
			#size-cells =3D <0>;
			reg =3D <24520 20>;

			phy0: ethernet-phy@0 {
				interrupt-parent =3D <&ipic>;
				interrupts =3D <3 8>;
				reg =3D <0>;
				device_type =3D "ethernet-phy";
			};
			phy1: ethernet-phy@1 {
				interrupt-parent =3D <&ipic>;
				interrupts =3D <3 8>;
				reg =3D <1>;
				device_type =3D "ethernet-phy";
			};
		};

		enet0: ethernet@24000 {
			cell-index =3D <0>;
			device_type =3D "network";
			model =3D "TSEC";
			compatible =3D "gianfar";
			reg =3D <24000 1000>;
			local-mac-address =3D [ 00 00 00 00 00 00 ];
			interrupts =3D <20 8 21 8 22 8>;
			interrupt-parent =3D <&ipic>;
			phy-handle =3D <&phy0>;
			linux,network-index =3D <0>;
		};

		enet1: ethernet@25000 {
			cell-index =3D <1>;
			device_type =3D "network";
			model =3D "TSEC";
			compatible =3D "gianfar";
			reg =3D <25000 1000>;
			local-mac-address =3D [ 00 00 00 00 00 00 ];
			interrupts =3D <23 8 24 8 25 8>;
			interrupt-parent =3D <&ipic>;
			phy-handle =3D <&phy1>;
			linux,network-index =3D <1>;
			phy-connection-type =3D "gmii";
		};

Any clues as to where I should start looking?

BTW, I assume CCing all those who replied to me is accepted/expected conduc=
t or should I avoid this and just write to the list?

Also is top posting ok? I haven't figured out how to enable '>' on bloody M=
icrosoft Outlook, for incoming plain text messages.

Thanks again for all your help.
D

-----Original Message-----
From: Aggrwal Poonam-B10812 [mailto:Poonam.Aggrwal@freescale.com]=20
Sent: Thursday, 19 February 2009 6:25 PM
To: Li Yang-R58472; Dushara Jayasinghe
Cc: linuxppc-dev@ozlabs.org
Subject: RE: Newby trying to get Ethernet going on MPC83xx series device.

Probably better would be to check the board file for  mpc834x_mds.c

I mean just cross that you probe all the buses which are on the device.
What is fsl,pq2pro-localbus? Do u have such node in dts as the
mpc8349_itx has.

> -----Original Message-----
> From: pku.leo@gmail.com [mailto:pku.leo@gmail.com] On Behalf=20
> Of Li Yang-R58472
> Sent: Thursday, February 19, 2009 12:50 PM
> To: Dushara Jayasinghe
> Cc: linuxppc-dev@ozlabs.org; Aggrwal Poonam-B10812
> Subject: Re: Newby trying to get Ethernet going on MPC83xx=20
> series device.
>=20
> On Thu, Feb 19, 2009 at 2:58 PM, Dushara Jayasinghe=20
> <DusharaJ@optiscan.com> wrote:
> > That did it.
> >
> >
> >
> > I based my board specific file on mpc834x_itx.c which had
> >
> >
> >
> > static struct of_device_id __initdata mpc834x_itx_ids[] =3D {
> >
> >                 { .compatible =3D "fsl,pq2pro-localbus", },
> >
> >                 { .compatible =3D "simple-bus", },
> >
> >                 {},
> >
> > };
> >
> >
> >
> > Don't know if this is broken?
>=20
> It's not broken as long as you have compatible =3D "simple-bus"=20
> for your soc node.
>=20
> - Leo
>=20
>=20

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-20  0:36           ` Dushara Jayasinghe
@ 2009-02-20  5:00             ` Michael Bergandi
  2009-02-20  7:18               ` Dushara Jayasinghe
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Bergandi @ 2009-02-20  5:00 UTC (permalink / raw)
  To: Dushara Jayasinghe; +Cc: linuxppc-dev, Aggrwal Poonam-B10812, Timur Tabi

[-- Attachment #1: Type: text/plain, Size: 4891 bytes --]

Hi Dushara,

Sorry, I'm a late comer here, but I might have an idea.  First off, I don't
see below what
kernel version you are using? I may have missed it somewhere.


> The devices are successfully probed, but I'm getting this error on the
> debug console:
>
> [    7.119389] mdio@24520:00 not found
> [    7.161370] eth0: Could not attach to PHY
> [    7.209600] IP-Config: Failed to open eth0
> [    7.258879] IP-Config: Device `eth0' not found.


I have similar output on my MPC8313E RDB. In my case, eth0 shared lines with
the external USB OTG and its PHY. I modified the resister banks on the board
that essentially cuts off the interrupt to the eth0 PHY. So, I don't expect
it to find it. Here is the kernel output at init time:

24520:01 not found
eth0: Could not attach to PHY


My mdio & Ethernet nodes are as follows (commenting out device_type below is
> an experiment)
>
>                mdio@24520 {
>                        /*device_type = "mdio";*/
>                        compatible = "fsl,gianfar-mdio";
>                        #address-cells = <1>;
>                        #size-cells = <0>;
>                        reg = <24520 20>;


Hmm, well, the first thing I catch is this is an old dts format. Depending
on your kernel version, you
may want to comply with the  dts v1 spec. The v1 spec is much more strict on
the format of the values
that are provided for the properties.

ex. reg = <0x24520 0x20> makes it very clear that these values are hex, not
decimal.

You will notice this ambiguity below with the 'interrupts' properties. Are
the values decimal or hex?
Turns out that the values are hex. You will find dts version specifier "
/dts-v1/; " at the top or just before
the root node in any dts file that meets the v1 spec.


>
>                        phy0: ethernet-phy@0 {
>                                interrupt-parent = <&ipic>;
>                                interrupts = <3 8>;
>                                reg = <0>;
>                                device_type = "ethernet-phy";
>                        };
>                        phy1: ethernet-phy@1 {
>                                interrupt-parent = <&ipic>;
>                                interrupts = <3 8>;
>                                reg = <1>;
>                                device_type = "ethernet-phy";
>                        };
>                };


Are you sure both PHY's use interrupt 3? I would think not.


               enet0: ethernet@24000 {
>                        cell-index = <0>;
>                        device_type = "network";
>                        model = "TSEC";
>                        compatible = "gianfar";
>                        reg = <24000 1000>;
>                        local-mac-address = [ 00 00 00 00 00 00 ];
>                        interrupts = <20 8 21 8 22 8>;
>                        interrupt-parent = <&ipic>;
>                        phy-handle = <&phy0>;
>                        linux,network-index = <0>;
>                };
>
>                enet1: ethernet@25000 {
>                        cell-index = <1>;
>                        device_type = "network";
>                        model = "TSEC";
>                        compatible = "gianfar";
>                        reg = <25000 1000>;
>                        local-mac-address = [ 00 00 00 00 00 00 ];
>                        interrupts = <23 8 24 8 25 8>;
>                        interrupt-parent = <&ipic>;
>                        phy-handle = <&phy1>;
>                        linux,network-index = <1>;
>                        phy-connection-type = "gmii";
>                };


Finally, I don't know which silicon rev that you are using, but I have seen
the enet0 and enet1 interrupts swapped.

As in the very latest silicon may have the interrupt lines switched between
them. You can find a statement to that
affect on this list somewhere. I am using a revB MPC8313E and I specify the
interrupts as you have them here.
However, the dts file for the mpc8313erdb in the 2.6.28 kernel has them
reversed. Presumably for a revC chip.

ex.
enet0: ethernet@24000 {
...
        interrupts = <23 8 24 8 25 8>;
...
};

enet1: ethernet@25000 {
...
        interrupts = <20 8 21 8 22 8>;
...
};



> BTW, I assume CCing all those who replied to me is accepted/expected
> conduct or should I avoid this and just write to the list?


Yes, you should cc those who have replied. It is expected --- well, at least
by me.


Also is top posting ok? I haven't figured out how to enable '>' on bloody
> Microsoft Outlook, for incoming plain text messages.


I'm a little new to this list, but in general top posting is frowned upon.
Unfortunately, I can't help you with the Outlook problem.
I can tell you that not being able to determine what part of a message came
when is extremely annoying. I hope you find a fix
for it. Or, you could try Thunderbird :)

Mike

[-- Attachment #2: Type: text/html, Size: 9422 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-20  5:00             ` Michael Bergandi
@ 2009-02-20  7:18               ` Dushara Jayasinghe
  2009-02-23  5:28                 ` Dushara Jayasinghe
  0 siblings, 1 reply; 15+ messages in thread
From: Dushara Jayasinghe @ 2009-02-20  7:18 UTC (permalink / raw)
  To: 'Michael Bergandi'
  Cc: linuxppc-dev, Aggrwal Poonam-B10812, Timur Tabi

[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]

Sorry, I'm a late comer here, but I might have an idea.  First off, I don't see below what
kernel version you are using? I may have missed it somewhere.
[dj]
Sorry I should have mentioned that earlier. I'm using 2.6.29-rc5 (pulled couple of days ago)

Hmm, well, the first thing I catch is this is an old dts format. Depending on your kernel version, you
may want to comply with the  dts v1 spec. The v1 spec is much more strict on the format of the values
that are provided for the properties.
[dj]
I've fixed that since. Thanks.

                       phy0: ethernet-phy@0 {
                               interrupt-parent = <&ipic>;
                               interrupts = <3 8>;
                               reg = <0>;
                               device_type = "ethernet-phy";
                       };
                       phy1: ethernet-phy@1 {
                               interrupt-parent = <&ipic>;
                               interrupts = <3 8>;
                               reg = <1>;
                               device_type = "ethernet-phy";
                       };
               };

Are you sure both PHY's use interrupt 3? I would think not.
[dj]
I need to follow that through and see.

 Also is top posting ok? I haven't figured out how to enable '>' on bloody Microsoft Outlook, for incoming plain text messages.

I'm a little new to this list, but in general top posting is frowned upon. Unfortunately, I can't help you with the Outlook problem.
I can tell you that not being able to determine what part of a message came when is extremely annoying. I hope you find a fix
for it. Or, you could try Thunderbird :)
[dj]
I'm using the HTML format. I've tagged my comments just in case the context is lost.
Consequently, I found, some further insights into the issue. Here's a debug output.
[    7.124188] {
[    7.143107] bus_id=mdio@24520:00                                 < - - printed in drivers/net/phy/phy_device.c : phy_connect()
[    7.181907] match check mdio@24520:1f                       < - - printed in drivers/base/bus.c : match_name()
[    7.225946] mdio@24520:00 not found
[    7.267883] }
Where does the :1f or :00 get added?
Thanks
D


[-- Attachment #2: Type: text/html, Size: 9093 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-20  7:18               ` Dushara Jayasinghe
@ 2009-02-23  5:28                 ` Dushara Jayasinghe
  2009-02-23 18:14                   ` Michael Bergandi
  0 siblings, 1 reply; 15+ messages in thread
From: Dushara Jayasinghe @ 2009-02-23  5:28 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Aggrwal Poonam-B10812, Timur Tabi, 'Michael Bergandi'

> -----Original Message-----
> From: linuxppc-dev-bounces+dusharaj=3Doptiscan.com@ozlabs.org
> [mailto:linuxppc-dev-bounces+dusharaj=3Doptiscan.com@ozlabs.org] On
> Behalf Of Dushara Jayasinghe
> Sent: Friday, 20 February 2009 6:18 PM
> To: 'Michael Bergandi'
> Cc: linuxppc-dev@ozlabs.org; Aggrwal Poonam-B10812; Timur Tabi
> Subject: RE: Newby trying to get Ethernet going on MPC83xx series
> device.

Hi all, I've solved this issue. I was passing the wrong .dtb file to the ke=
rnel. Sorry for adding noise the list.

Thanks again for all you help.
D

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Newby trying to get Ethernet going on MPC83xx series device.
  2009-02-23  5:28                 ` Dushara Jayasinghe
@ 2009-02-23 18:14                   ` Michael Bergandi
  0 siblings, 0 replies; 15+ messages in thread
From: Michael Bergandi @ 2009-02-23 18:14 UTC (permalink / raw)
  To: Dushara Jayasinghe; +Cc: linuxppc-dev, Aggrwal Poonam-B10812, Timur Tabi

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Great. Glad you have it working.

I actually did the very same thing not too long ago.  Amazing how well
things work, when
you pass the right information :)


On Mon, Feb 23, 2009 at 12:28 AM, Dushara Jayasinghe
<DusharaJ@optiscan.com>wrote:

> > -----Original Message-----
> > From: linuxppc-dev-bounces+dusharaj=optiscan.com@ozlabs.org
> > [mailto:linuxppc-dev-bounces+dusharaj <linuxppc-dev-bounces%2Bdusharaj>=
> optiscan.com@ozlabs.org] On
> > Behalf Of Dushara Jayasinghe
> > Sent: Friday, 20 February 2009 6:18 PM
> > To: 'Michael Bergandi'
> > Cc: linuxppc-dev@ozlabs.org; Aggrwal Poonam-B10812; Timur Tabi
> > Subject: RE: Newby trying to get Ethernet going on MPC83xx series
> > device.
>
> Hi all, I've solved this issue. I was passing the wrong .dtb file to the
> kernel. Sorry for adding noise the list.
>
> Thanks again for all you help.
> D
>
>


-- 
Michael Bergandi

[-- Attachment #2: Type: text/html, Size: 1583 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-02-23 18:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-19  4:26 Newby trying to get Ethernet going on MPC83xx series device Dushara Jayasinghe
2009-02-19  5:21 ` Li Yang-R58472
2009-02-19  6:33   ` Dushara Jayasinghe
2009-02-19  6:41     ` Li Yang-R58472
2009-02-19  6:48   ` Aggrwal Poonam-B10812
2009-02-19  6:58     ` Dushara Jayasinghe
2009-02-19  7:19       ` Li Yang
2009-02-19  7:25         ` Aggrwal Poonam-B10812
2009-02-20  0:36           ` Dushara Jayasinghe
2009-02-20  5:00             ` Michael Bergandi
2009-02-20  7:18               ` Dushara Jayasinghe
2009-02-23  5:28                 ` Dushara Jayasinghe
2009-02-23 18:14                   ` Michael Bergandi
2009-02-19 15:17       ` Timur Tabi
2009-02-19 18:38 ` Scott Wood

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).