drivers: ieee802154: add Decawave DW1000 driver
Add initial support for Decawave DW1000 IEEE 802.15.4-2011 UWB transceiver. Driver has basic functionality. Additional functions such as reading out timestamps and delayed TX were implemented for test purposes, but also require support in the 802154 subsystem. Register, sub-register, and defaults defines in the file ieee802154_dw1000_regs.h are taken from the Decawave's DW1000 driver for the Mynewt OS. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
fc7b142961
commit
8f983c3654
6 changed files with 3903 additions and 0 deletions
|
@ -9,3 +9,4 @@ zephyr_sources_ifdef(CONFIG_IEEE802154_CC1200 ieee802154_cc1200.c)
|
|||
zephyr_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX ieee802154_cc13xx_cc26xx.c)
|
||||
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx.c)
|
||||
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx_iface.c)
|
||||
zephyr_sources_ifdef(CONFIG_IEEE802154_DW1000 ieee802154_dw1000.c)
|
||||
|
|
|
@ -21,6 +21,11 @@ config IEEE802154_RAW_MODE
|
|||
be built). Used only for very specific cases, such as wpan_serial
|
||||
and wpanusb samples.
|
||||
|
||||
config IEEE802154_RDEV
|
||||
bool
|
||||
help
|
||||
PHY is a ranging-capable device (RDEV)
|
||||
|
||||
source "drivers/ieee802154/Kconfig.cc2520"
|
||||
|
||||
source "drivers/ieee802154/Kconfig.kw41z"
|
||||
|
@ -35,6 +40,8 @@ source "drivers/ieee802154/Kconfig.cc13xx_cc26xx"
|
|||
|
||||
source "drivers/ieee802154/Kconfig.rf2xx"
|
||||
|
||||
source "drivers/ieee802154/Kconfig.dw1000"
|
||||
|
||||
menuconfig IEEE802154_UPIPE
|
||||
bool "UART PIPE fake radio driver support for QEMU"
|
||||
depends on (BOARD_QEMU_X86 || BOARD_QEMU_CORTEX_M3) && NETWORKING
|
||||
|
|
36
drivers/ieee802154/Kconfig.dw1000
Normal file
36
drivers/ieee802154/Kconfig.dw1000
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Copyright (c) 2020 PHYTEC Messtechnik GmbH
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menuconfig IEEE802154_DW1000
|
||||
bool "Decawave DW1000 Driver support"
|
||||
depends on NETWORKING && SPI
|
||||
|
||||
if IEEE802154_DW1000
|
||||
|
||||
config IEEE802154_DW1000_SNIFF_ONT
|
||||
int "SNIFF on time"
|
||||
default 0
|
||||
range 0 15
|
||||
help
|
||||
SNIFF on time in unit of PAC. The minimum on time is the duration
|
||||
of two PACs. The SNIFF counter always adds 1 PAC unit to the on-time
|
||||
count. The SNIFF_ONT value should be in range of 1-15.
|
||||
Zero value disables SNIFF mode.
|
||||
|
||||
config IEEE802154_DW1000_SNIFF_OFFT
|
||||
int "SNIFF off time"
|
||||
default 16
|
||||
range 1 255
|
||||
help
|
||||
SNIFF off time in unit of approximate 1 microsecond.
|
||||
|
||||
config IEEE802154_DW1000_INIT_PRIO
|
||||
int "DW1000 initialization priority"
|
||||
default 80
|
||||
help
|
||||
Set the initialization priority number. Do not mess with it unless
|
||||
you know what you are doing. Beware DW1000 requires gpio and spi to
|
||||
be ready first (and sometime gpio should be the very first as spi
|
||||
might need it too). And of course it has to start before the net stack.
|
||||
|
||||
endif
|
1682
drivers/ieee802154/ieee802154_dw1000.c
Normal file
1682
drivers/ieee802154/ieee802154_dw1000.c
Normal file
File diff suppressed because it is too large
Load diff
2140
drivers/ieee802154/ieee802154_dw1000_regs.h
Normal file
2140
drivers/ieee802154/ieee802154_dw1000_regs.h
Normal file
File diff suppressed because it is too large
Load diff
37
dts/bindings/ieee802154/decawave,dw1000.yaml
Normal file
37
dts/bindings/ieee802154/decawave,dw1000.yaml
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Copyright (c) 2019, Phytec Messtechnik GmbH
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Decawave DW1000 802.15.4 UWB transceiver
|
||||
|
||||
compatible: "decawave,dw1000"
|
||||
|
||||
include: spi-device.yaml
|
||||
|
||||
properties:
|
||||
int-gpios:
|
||||
type: phandle-array
|
||||
required: true
|
||||
description: Interrupt pin.
|
||||
|
||||
The interrupt pin IRQ of DW1000 is active high output.
|
||||
If connected directly the MCU pin should be configured
|
||||
as active high.
|
||||
|
||||
reset-gpios:
|
||||
type: phandle-array
|
||||
required: true
|
||||
description: RESET pin.
|
||||
|
||||
The RESET pin of DW1000 is active low.
|
||||
If connected directly the MCU pin should be configured
|
||||
as active low.
|
||||
|
||||
tx-ant-delay:
|
||||
type: int
|
||||
required: false
|
||||
description: Transmitter antenna delay.
|
||||
|
||||
rx-ant-delay:
|
||||
type: int
|
||||
required: false
|
||||
description: Receiver antenna delay.
|
Loading…
Add table
Add a link
Reference in a new issue