dts: bindings: Add bindings for Semtech SX126x
Add device tree bindings for the Semtech SX1261 and SX1262 radios. These will be used by Zephyr's LoRa drivers. Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
This commit is contained in:
parent
ba330ec765
commit
3d1fa70e80
4 changed files with 90 additions and 0 deletions
8
dts/bindings/lora/semtech,sx1261.yaml
Normal file
8
dts/bindings/lora/semtech,sx1261.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2020 Andreas Sandberg
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
description: Semtech SX1261 LoRa Modem
|
||||||
|
|
||||||
|
compatible: "semtech,sx1261"
|
||||||
|
|
||||||
|
include: semtech,sx126x-base.yaml
|
8
dts/bindings/lora/semtech,sx1262.yaml
Normal file
8
dts/bindings/lora/semtech,sx1262.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2020 Andreas Sandberg
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
description: Semtech SX1262 LoRa Modem
|
||||||
|
|
||||||
|
compatible: "semtech,sx1262"
|
||||||
|
|
||||||
|
include: semtech,sx126x-base.yaml
|
56
dts/bindings/lora/semtech,sx126x-base.yaml
Normal file
56
dts/bindings/lora/semtech,sx126x-base.yaml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
# Copyright (c) 2019 Manivannan Sadhasivam
|
||||||
|
# Copyright (c) 2020 Andreas Sandberg
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
include: spi-device.yaml
|
||||||
|
|
||||||
|
properties:
|
||||||
|
reset-gpios:
|
||||||
|
type: phandle-array
|
||||||
|
required: true
|
||||||
|
description: |
|
||||||
|
GPIO connected to the modem's NRST signal.
|
||||||
|
|
||||||
|
This signal is open-drain, active-low as interpreted by the
|
||||||
|
modem.
|
||||||
|
|
||||||
|
busy-gpios:
|
||||||
|
type: phandle-array
|
||||||
|
required: true
|
||||||
|
description: |
|
||||||
|
GPIO connected to the modem's BUSY signal.
|
||||||
|
|
||||||
|
antenna-enable-gpios:
|
||||||
|
type: phandle-array
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
Antenna power enable pin.
|
||||||
|
|
||||||
|
dio1-gpios:
|
||||||
|
type: phandle-array
|
||||||
|
required: true
|
||||||
|
description: |
|
||||||
|
GPIO connected to DIO1. This GPIO will be used as a generic
|
||||||
|
IRQ line from the chip.
|
||||||
|
|
||||||
|
dio2-tx-enable:
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
Use DIO2 to drive an RF switch selecting between the TX and RX
|
||||||
|
paths. When enabled, DIO2 goes high when the chip is
|
||||||
|
transmitting.
|
||||||
|
|
||||||
|
dio3-tcxo-voltage:
|
||||||
|
type: int
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
TCXO supply voltage controlled by DIO3 if present.
|
||||||
|
|
||||||
|
See constants in dt-bindings/lora/sx126x.h.
|
||||||
|
|
||||||
|
tcxo-power-startup-delay-ms:
|
||||||
|
type: int
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
Startup delay to let the TCXO stabilize after TCXO power on.
|
18
include/dt-bindings/lora/sx126x.h
Normal file
18
include/dt-bindings/lora/sx126x.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Andreas Sandberg
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_LORA_SX126X_H_
|
||||||
|
#define ZEPHYR_INCLUDE_DT_BINDINGS_LORA_SX126X_H_
|
||||||
|
|
||||||
|
#define SX126X_DIO3_TCXO_1V6 0x00
|
||||||
|
#define SX126X_DIO3_TCXO_1V7 0x01
|
||||||
|
#define SX126X_DIO3_TCXO_1V8 0x02
|
||||||
|
#define SX126X_DIO3_TCXO_2V2 0x03
|
||||||
|
#define SX126X_DIO3_TCXO_2V4 0x04
|
||||||
|
#define SX126X_DIO3_TCXO_2V7 0x05
|
||||||
|
#define SX126X_DIO3_TCXO_3V0 0x06
|
||||||
|
#define SX126X_DIO3_TCXO_3V3 0x07
|
||||||
|
|
||||||
|
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_LORA_SX126X_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue