hai all..

I loaded the CC2520[IEEE802.15.4] radio driver by using overlay. It provides SPI
interface to communicate with the controller.  I used SPI0 on BBB.
The Overlay is shown below:

nano BB-BONE-CC2520-00A0.dts

/dts-v1/;
/plugin/;


/ {
    compatible = "ti,beaglebone", "ti,beaglebone-black";

    /* Identification */
    part-number = "BB-BONE-CC2520";
    version = "00A0";

    /* state the resources this cape uses */
    exclusive-use =
        /* the pin header uses(GPIO) */
        "P9.12",
        "P9.14",
        "P9.16",
        "P9.15",
        "P8.11",
        "P8.14",
        "P9.13",
        "P8.12",
        "P9.17",
        "P9.18",
        "P9.21",
        "P9.22",
        /* the hardware IP uses */
        "gpio1_28",
        "gpio1_18",
        "gpio1_19",
        "gpio1_16",
        "gpio1_13",
        "gpio0_26",
        "gpio0_31",
        "gpio1_12",
        "spi0";

    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            cc2520_cape_pins: pinmux_cc2520_cape_pins {
                pinctrl-single,pins = <
                    /* Pinmux comes from TRM section
                       9.3.1: CONTROL_MODULE Regusters. */
                    0x078 0x2f
                    0x048 0x2f
                    0x04c 0x2f
                    0x040 0x2f
                    0x034 0x2f
                    0x028 0x2f
                    0x074 0x2f
                    0x030 0x2f
                >;
            };
            bone_cc2520_spi0_pins: pinmux_bone_cc2520_spi0_pins {
                pinctrl-single,pins = <
                    0x150 0x10  /* spi0_sclk, OUTPUT_PULLUP | MODE0 */
                          0x154 0x30  /* spi0_d0, INPUT_PULLUP | MODE0 */
                          0x158 0x10  /* spi0_d1, OUTPUT_PULLUP | MODE0 */
                          0x15c 0x10  /* spi0_cs0, OUTPUT_PULLUP | MODE0 */
                >;
            };
        };
    };


    fragment@1 {
        target = <&spi0>;

        __overlay__ {
            /* needed to avoid DTC warnings */
            #address-cells = <1>;
            #size-cells = <0>;

            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&bone_cc2520_spi0_pins>;

            cc2520 {
                compatible = "cc2520";
                reg = <0>; /* CHIPSEL */
                spi-max-frequency = <80000000>;
                mode = <1>;
                pinctrl-names = "default";
                pinctrl-0 = <&cc2520_cape_pins>;
            };
        };
    };
};

I am able to load the driver by using overlay.

But after  "echo BB-BONE-CC2520 > /sys/devices/bone_capemgr.6/slots" the BBB
halts.
In dmesg it is showing as:
[   67.398861] bone-capemgr bone_capemgr.6: part_number 'BB-BONE-CC2520',
version 'N/A'
[   67.398944] bone-capemgr bone_capemgr.6: slot #7: generic override
[   67.398973] bone-capemgr bone_capemgr.6: bone: Using override eeprom data at
slot 7
[   67.399003] bone-capemgr bone_capemgr.6: slot #7: 'Override Board
Name,00A0,Override Manuf,BB-BONE-CC2520'
[   67.399151] bone-capemgr bone_capemgr.6: slot #7: Requesting part
number/version based 'BB-BONE-CC2520-00A0.dtbo
[   67.399179] bone-capemgr bone_capemgr.6: slot #7: Requesting firmware
'BB-BONE-CC2520-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[   67.411234] bone-capemgr bone_capemgr.6: slot #7: dtbo
'BB-BONE-CC2520-00A0.dtbo' loaded; converting to live tree
[   67.411595] bone-capemgr bone_capemgr.6: slot #7: #2 overlays
[   67.456921] omap2_mcspi 48030000.spi: registered master spi1
[   67.572272] edma-dma-engine edma-dma-engine.0: allocated channel for 0:17
[   67.572327] edma-dma-engine edma-dma-engine.0: allocated channel for 0:16
[   67.572360] spi spi1.0: setup: speed 48000000, sample leading edge, clk
normal
[   67.572391] spi spi1.0: setup mode 0, 8 bits/w, 80000000 Hz max --> 0
[   67.575781] Status value in get_status:0
[   67.576031] omap2_mcspi 48030000.spi: transfer: 80000000 Hz, 1 txrx, 8 bpw
[   67.576057] spi_master spi1: failed to transfer one message from queue
[   72.257038] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data
may be corrupt. Please run fsck.
[  600.208054] INFO: task sh:410 blocked for more than 300 seconds.
[  600.214467]       Not tainted 3.12.0-rc6-00364-g729a294-dirty #3
[  600.220801] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[  600.229042] sh              D c0508dd4     0   410    312 0x00000004
[  600.229132] [<c0508dd4>] (__schedule+0x5d0/0x694) from [<c05061b4>]
(schedule_timeout+0x1c/0x1c8)
[  600.229164] [<c05061b4>] (schedule_timeout+0x1c/0x1c8) from [<c0509008>]
(wait_for_common+0xd4/0x168)
[  600.229194] [<c0509008>] (wait_for_common+0xd4/0x168) from [<c033db2c>]
(__spi_sync+0x90/0xb0)
[  600.229238] [<c033db2c>] (__spi_sync+0x90/0xb0) from [<bf22911c>]
(cc2520_get_status+0x88/0xb0 [cc2520])
[  600.229295] [<bf22911c>] (cc2520_get_status+0x88/0xb0 [cc2520]) from
[<bf229ac0>] (cc2520_probe+0x2c0/0x700 [cc2520])
[  600.229330] [<bf229ac0>] (cc2520_probe+0x2c0/0x700 [cc2520]) from
[<c033d584>] (spi_drv_probe+0x18/0x1c)
[  600.229371] [<c033d584>] (spi_drv_probe+0x18/0x1c) from [<c02e5a84>]
(driver_probe_device+0xc8/0x1f8)
[  600.229403] [<c02e5a84>] (driver_probe_device+0xc8/0x1f8) from [<c02e4304>]
(bus_for_each_drv+0x4c/0x84)
[  600.229432] [<c02e4304>] (bus_for_each_drv+0x4c/0x84) from [<c02e5974>]
(device_attach+0x5c/0x88)
[  600.229461] [<c02e5974>] (device_attach+0x5c/0x88) from [<c02e4fd4>]
(bus_probe_device+0x28/0x98)
[  600.229490] [<c02e4fd4>] (bus_probe_device+0x28/0x98) from [<c02e3618>]
(device_add+0x43c/0x5d4)
[  600.229518] [<c02e3618>] (device_add+0x43c/0x5d4) from [<c033e3f4>]
(spi_add_device+0xe0/0x154)
[  600.229546] [<c033e3f4>] (spi_add_device+0xe0/0x154) from [<c033ecc4>]
(spi_register_master+0x5e8/0x6f0)
[  600.229576] [<c033ecc4>] (spi_register_master+0x5e8/0x6f0) from [<c033ffcc>]
(omap2_mcspi_probe+0x310/0x3c0)
[  600.229606] [<c033ffcc>] (omap2_mcspi_probe+0x310/0x3c0) from [<c02e68f4>]
(platform_drv_probe+0x14/0x18)
[  600.229636] [<c02e68f4>] (platform_drv_probe+0x14/0x18) from [<c02e5a84>]
(driver_probe_device+0xc8/0x1f8)
[  600.229666] [<c02e5a84>] (driver_probe_device+0xc8/0x1f8) from [<c02e4304>]
(bus_for_each_drv+0x4c/0x84)
[  600.229695] [<c02e4304>] (bus_for_each_drv+0x4c/0x84) from [<c02e5974>]
(device_attach+0x5c/0x88)
[  600.229724] [<c02e5974>] (device_attach+0x5c/0x88) from [<c02e4fd4>]
(bus_probe_device+0x28/0x98)
[  600.229752] [<c02e4fd4>] (bus_probe_device+0x28/0x98) from [<c02e3618>]
(device_add+0x43c/0x5d4)
[  600.229790] [<c02e3618>] (device_add+0x43c/0x5d4) from [<c040aa28>]
(of_platform_device_create_pdata+0x5c/0x7c)
[  600.229828] [<c040aa28>] (of_platform_device_create_pdata+0x5c/0x7c) from
[<c040d7dc>] (of_overlay_device_entry_change.isra.4+0x88/0x158)
[  600.229860] [<c040d7dc>] (of_overlay_device_entry_change.isra.4+0x88/0x158)
from [<c040dfc8>] (of_overlay+0xdc/0x190)
[  600.229891] [<c040dfc8>] (of_overlay+0xdc/0x190) from [<c02f81e8>]
(bone_capemgr_load+0x48c/0x5d0)
[  600.229919] [<c02f81e8>] (bone_capemgr_load+0x48c/0x5d0) from [<c02f9448>]
(slots_store+0x354/0x398)
[  600.229947] [<c02f9448>] (slots_store+0x354/0x398) from [<c02e1e20>]
(dev_attr_store+0x18/0x24)
[  600.229980] [<c02e1e20>] (dev_attr_store+0x18/0x24) from [<c013f258>]
(sysfs_write_file+0x108/0x13c)
[  600.230020] [<c013f258>] (sysfs_write_file+0x108/0x13c) from [<c00e7e3c>]
(vfs_write+0xd4/0x1bc)
[  600.230051] [<c00e7e3c>] (vfs_write+0xd4/0x1bc) from [<c00e826c>]
(SyS_write+0x3c/0x60)
[  600.230087] [<c00e826c>] (SyS_write+0x3c/0x60) from [<c000db60>]
(ret_fast_syscall+0x0/0x30)


The error is from : http://lxr.free-electrons.com/source/drivers/spi/spi.c#L600

whether the problem related to the omap2_mcspi driver or with the device tree
overlay ?

I tried with SPI1[P9.28,29,30,31] also i am getting the same problem.

Thanks in advance.

Regards,
Bhadram
-------------------------------------------------------------------------------------------------------------------------------

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to