Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eef92962 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'cc2520'



Varka Bhadram says:

====================
Driver for TI CC2520 Radio

changes since v6:
	- proper releasing of resources
	- changed pr_debug() to dev_dbg()
	- removed unwanted header file
	- changed is_tx type to bool

changes since v5:
	- added saddr and panc_changed functionality
	- rework on lqi field
	- improvements in checkings for reception
	- modification in debug messages

changes since v4:
	- feature to write into cc2520 RAM
	- added h/w address filtering

changes since v3:
	- drop the unused varible

changes since v2:
	- drop spi mode dt binding

changes since v1:
	- improvement in gpio setup
	- changed len pointer to len variable

changes for v1:
	- improvements in the locking mechanism in Tx and SFD ISR
	- proper checkings for GPIO pins
	- avoids the memory leak for priv
	- used devm_* API's
	- moved the code from header file to .c file
	- removed cc2520_unregister()
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 47cc3b4f 1952e8e0
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
*CC2520 IEEE 802.15.4 Compatible Radio*

Required properties:
	- compatible: 		should be "ti,cc2520"
	- spi-max-frequency:	maximal bus speed (8000000), should be set to 4000000 depends
				sync or async operation mode
	- reg:			the chipselect index
	- pinctrl-0: 		pin control group to be used for this controller.
	- pinctrl-names: 	must contain a "default" entry.
	- fifo-gpio:		GPIO spec for the FIFO pin
	- fifop-gpio:		GPIO spec for the FIFOP pin
	- sfd-gpio:		GPIO spec for the SFD pin
	- cca-gpio:		GPIO spec for the CCA pin
	- vreg-gpio:		GPIO spec for the VREG pin
	- reset-gpio:		GPIO spec for the RESET pin
Example:
	cc2520@0 {
		compatible = "ti,cc2520";
		reg = <0>;
		spi-max-frequency = <4000000>;
		pinctrl-names = "default";
		pinctrl-0 = <&cc2520_cape_pins>;
		fifo-gpio = <&gpio1 18 0>;
		fifop-gpio = <&gpio1 19 0>;
		sfd-gpio = <&gpio1 13 0>;
		cca-gpio = <&gpio1 16 0>;
		vreg-gpio = <&gpio0 31 0>;
		reset-gpio = <&gpio1 12 0>;
	};
+11 −0
Original line number Diff line number Diff line
@@ -51,3 +51,14 @@ config IEEE802154_MRF24J40

	  This driver can also be built as a module. To do so, say M here.
	  the module will be called 'mrf24j40'.

config IEEE802154_CC2520
	depends on IEEE802154_DRIVERS && MAC802154
	tristate "CC2520 transceiver driver"
	depends on SPI
	---help---
	  Say Y here to enable the CC2520 SPI 802.15.4 wireless
	  controller.

	  This driver can also be built as a module. To do so, say M here.
	  the module will be called 'cc2520'.
+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@ obj-$(CONFIG_IEEE802154_FAKEHARD) += fakehard.o
obj-$(CONFIG_IEEE802154_FAKELB) += fakelb.o
obj-$(CONFIG_IEEE802154_AT86RF230) += at86rf230.o
obj-$(CONFIG_IEEE802154_MRF24J40) += mrf24j40.o
obj-$(CONFIG_IEEE802154_CC2520) += cc2520.o
+1039 −0

File added.

Preview size limit exceeded, changes collapsed.

+26 −0
Original line number Diff line number Diff line
/* Header file for cc2520 radio driver
 *
 * Copyright (C) 2014 Varka Bhadram <varkab@cdac.in>
 *                    Md.Jamal Mohiuddin <mjmohiuddin@cdac.in>
 *                    P Sowjanya <sowjanyap@cdac.in>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 */

#ifndef __CC2520_H
#define __CC2520_H

struct cc2520_platform_data {
	int fifo;
	int fifop;
	int cca;
	int sfd;
	int reset;
	int vreg;
};

#endif