From: Pannirselvam Kanagaratnam <pannir@xsmail.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: Device Tree Binding for DSA on P1023RDB
Date: Fri, 13 Jun 2014 18:34:58 +0800 [thread overview]
Message-ID: <1402655698.25732.128363405.372AD838@webmail.messagingengine.com> (raw)
In-Reply-To: <1402608088.6603.549.camel@snotra.buserror.net>
On Fri, Jun 13, 2014, at 05:21 AM, Scott Wood wrote:
> On Thu, 2014-06-12 at 23:36 +0800, Pannirselvam Kanagaratnam wrote:
> > The QORIQ P1023RDB has an option to populate the Marvell 88E6165
> > Ethernet switch. We populated this device and was able to initialize
> > it as a basic switch in U-Boot. However, the switch driver was not
> > loaded upon kernel bootup. DSA kernel config was enabled for the
> > 88E6165. The following patch was applied:
> >
> >
> > http://patchwork.ozlabs.org/patch/230257/
> >
> >
> > The switch is attached to phy address 0x3 via dtsec2. My dts file is
> > as below. Would appreciate any feedback on whether the DSA is
> > correctly structured in the dts.
>
> If you have a dtsec driver you're not working with an upstream kernel
> (or you've ported a lot of SDK code to it)... What tree are you working
> with? Are there prerequisites to the above patch that you might be
> missing?
>
I am using QorIQ-SDK-V1.5-20131219-yocto (3.8-r11.1). Not sure if I am
missing
any prerequisites.
> The above patch is a platform driver and you put the node in the
> toplevel device tree node. Have you added marvell,dsa to the list of
> compatible strings that get probed (of_device_ids in corenet_generic.c
> or an equivalent list in your SDK kernel)?
> >
I was missing this. I added it in arch/powerpc/platforms/85xx/common.c
After adding the above, the driver is now attempting to probe. However,
I got the following message:
Distributed Switch Architecture driver version 0.1
dsa: probe of dsa.16 failed with error -22
I dumped the mdio, mdio_bus and ethernet parameters:
1) For mdio = of_parse_phandle(np, "dsa,mii-bus", 0); I get the
following:
np-name: dsa
mdio-name: mdio
mdio-type: <NULL>
mdio-full-name: /soc@ff600000/fman@100000/mdio@e1120
2) mdio_bus = of_mdio_find_bus(mdio);
mdio_bus_name: Freescale PowerQUICC MII Bus
mdio_bus_id: mdio@ff7e1120
3) ethernet = of_parse_phandle(np, "dsa,ethernet", 0);
ethernet-name: ethernet
ethernet-type: <NULL>
ethernet-full-name: /soc@ff600000/fman@100000/ethernet@e2000
Anything amiss here?
> > dsa@0 {
> > compatible = "marvell,dsa";
> > #address-cells = <2>;
> > #size-cells = <0>;
> >
> > interrupts = <3>;
>
> This interrupts property needs to be four cells rather than one, if MPIC
> is the parent -- assuming you have #interrupt-cells = <4> and not some
> old device tree with #interrupt-cells = <2>, but in any case you need
> more than one cell.
>
The interrupt is an optional entry and not supported by the driver. I
have omitted it for now.
Pannir
prev parent reply other threads:[~2014-06-13 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 15:36 Device Tree Binding for DSA on P1023RDB Pannirselvam Kanagaratnam
2014-06-12 21:21 ` Scott Wood
2014-06-13 10:34 ` Pannirselvam Kanagaratnam [this message]
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=1402655698.25732.128363405.372AD838@webmail.messagingengine.com \
--to=pannir@xsmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=scottwood@freescale.com \
/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).