FW: P4080 device tree problems with fsl dpaa ...

Thomas De Schampheleire patrickdepinguin+linuxppc at gmail.com
Mon Oct 17 20:01:26 EST 2011


Hi Robert,

On Fri, Oct 14, 2011 at 11:57 PM, Robert Sciuk <robert.sciuk at exfo.com> wrote:
>
>
> -----Original Message-----
> From: Robert Sciuk
> Sent: Friday, October 14, 2011 5:27 PM
> To: 'devicetree-discuss at lists.ozlabs.org'
> Subject: P4080 device tree problems with fsl dpaa ...
>
> I've just joined the list, and I hope that this is not an inappropriate question, but I'm looking for some direction with respect to device trees, and the fsl, dpaa Ethernet drivers.
>
> I'm wondering if anyone has had any experience with the FreeScale DPAA drivers for the 1g dtsec interface.  We are getting interfaces defined, and the tx count increases, but we are not seeing packets on the "wire".
>
> ...
> [    0.911592] Freescale FM module (Oct 13 2011:14:41:07)
> [    0.916745] cpu6/6: fsl_mac: FSL FMan MAC API based driver ()
> [    0.923077] cpu6/6: fsl_mac: ffe4e0000.ethernet: FMan dTSEC version: 0x08240101
> [    0.930403] cpu6/6: fsl_mac: ffe4e0000.ethernet: FMan MAC address: 00:a0:a9:be:ef:10
> ...
> [    1.015863] cpu6/6: fsl_dpa: FSL DPAA Ethernet driver ()
> [    1.021446] cpu6/6: fsl_dpa: ethernet.23: dpaa_eth.c:1684:dpa_bp_create() eth%d: Using private BM buffer pools
> [    1.032263] cpu6/6: Using dynamic RX QM frame queues
> [    1.037242] cpu6/6: Using dynamic TX QM frame queues
> [    1.042263] cpu6/6: > WARNING (FM) [/export2/rd2/dev/robsci1/Work/gold/wr4linux-layer/obj/hotwire1/hotwire1/build/linux/drivers/n
> et/dpa/NetCommSw/Peripherals/FM/fm.c:911 FmGetSetPortParams]:
> [    1.059138] cpu6/6: FIFO size enlarged to 11008
> [    1.063670] cpu6/6:
> [    1.066672] cpu6/6: fsl_dpa: ethernet.23: dpaa_eth.c:2327:dpaa_oh_probe() no OH port bindings on node /fsl,dpaa/ethernet at 0
> [    1.077806] cpu6/6: fsl_dpa: ethernet.24: dpaa_eth.c:1684:dpa_bp_create() eth%d: Using private BM buffer pools
> [    1.087826] cpu6/6: Using dynamic RX QM frame queues
> [    1.092798] cpu6/6: Using dynamic TX QM frame queues
> ...
>
> Our device tree defines the top level Ethernet as:
> ethernet at 0 {
>  compatible = "fsl,p4080-dpa-ethernet", "fsl,dpa-ethernet";
>  fsl,qman-channel = <0x13>;
>  fsl,fman-mac = <0x50>;
> };
>
> And the mac and phys are defined as follows:
>
> ethernet at e0000 {
>  cell-index = <0x0>;
>  compatible = "fsl,p4080-fman-1g-mac", "fsl,fman-1g-mac";
>  reg = <0xe0000 0x1000>;
>  fsl,port-handles = <0x22 0x23>;
>  tbi-handle = <0x24>;
>  phy-handle = <0x25>;
>  phy-connection-type = "sgmii";
>  ptimer-handle = <0x26>;
>  linux,phandle = <0x50>;
> };
> mdio at e1120 {
>  #address-cells = <0x1>;
>  #size-cells = <0x0>;
>  compatible = "fsl,fman-mdio";
>  reg = <0xe1120 0xee0>;
>  interrupts = <0x64 0x1 0x0 0x0>;
>  gpios = <0x27 0x0 0x0 0x27 0x1 0x0>;
>  linux,phandle = <0x28>;
>  tbi-phy at 8 {
>  reg = <0x8>;
>  device_type = "tbi-phy";
>  linux,phandle = <0x24>;
>  };
>  phy0: ethernet-phy at 0 {
>  device_type="ethernet-phy";
>  compatible="broadcom,BCM5482";
>  reg = <0>;
>  linux,phandle = <0x25>;
>  };
> };
>
>
> I have no idea what an OH binding is, what it might look like, and what it entails, but I think that it might be a significant factor in our not seeing a working interface.  Has anyone any experience with dpaa device trees, and configuration?  Any pointers?  Any docs? Shots in the dark?

We are using a device tree on p4080 with a dpaa configuration, yes.
I also don't know about the OH bindings, but I have a vague memory of
us having that message too, and it not being a real problem.

What I do know is that the device tree is very easy to get wrong, and
that it should match your hardware precisely. I'm not using the same
configuration as you are (there are no MDIO devices between our phy
and dTSEC) so the device tree looks a little different.

Are you using the reference design or is this custom?
Did you have a look at the device tree in the linux kernel sources?
(arch/powerpc/boot/dts/p4080.dts). Does this configuration match
yours? In that configuration, there are separate nodes of type
p4080ds-mdio, inside the main mdio node.

Is your phy configured correctly? Are there any boot messages about
this? Can you check its registers?
The same for the mdio.

Some generic pointers:
* If you set CONFIG_PROC_DEVICETREE in the kernel config, you can read
out the device-tree at runtime in /proc/device-tree. This helps in
verifying whether the nodes you programmed actually appear in the
running system.

* The /sys/devices directory can also be useful in identifying
potential problems for unfound devices (which does not appear to be
your case).

* Can you step through the code, e.g. with a JTAG debugger? Try
following the transmit path in the dpaa_eth driver. Maybe something
errors out prematurely.

Best regards,
Thomas


More information about the Linuxppc-dev mailing list