|
| 1 | +/* |
| 2 | + * Copyright (c) 2024 Semtech Corporation |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#include <zephyr/dt-bindings/lora_lbm/lr11xx.h> |
| 8 | + |
| 9 | +/ { |
| 10 | + chosen { |
| 11 | + zephyr,lora-transceiver = &lora_semtech_lr11xxmb1xxs; |
| 12 | + }; |
| 13 | + aliases { |
| 14 | + lora-transceiver = &lora_semtech_lr11xxmb1xxs; |
| 15 | + }; |
| 16 | +}; |
| 17 | + |
| 18 | +// FIXME: Is there a way to reassign the node label arduino_spi from spi2 to spi3 ? |
| 19 | +// spi2 draws way less current than spi3. |
| 20 | +&arduino_spi { |
| 21 | + status = "okay"; |
| 22 | + |
| 23 | + cs-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; |
| 24 | + |
| 25 | + lora_semtech_lr11xxmb1xxs: lora@0 { |
| 26 | + reg = <0>; |
| 27 | + spi-max-frequency = <DT_FREQ_M(8)>; |
| 28 | + |
| 29 | + reset-gpios = <&arduino_header 0 GPIO_ACTIVE_LOW>; |
| 30 | + |
| 31 | + busy-gpios = <&arduino_header 9 GPIO_ACTIVE_HIGH>; |
| 32 | + |
| 33 | + event-gpios = <&arduino_header 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; |
| 34 | + |
| 35 | + lf-tx-path = <LR11XX_TX_PATH_LF_LP_HP>; |
| 36 | + |
| 37 | + lf-clk = <LR11XX_LFCLK_XTAL>; |
| 38 | + reg-mode = <LR11XX_REG_MODE_DCDC>; |
| 39 | + |
| 40 | + rf-sw-enable = <(LR11XX_DIO5 | LR11XX_DIO6 | LR11XX_DIO7)>; |
| 41 | + rf-sw-rx-mode = <LR11XX_DIO5>; |
| 42 | + rf-sw-tx-mode = <(LR11XX_DIO5 | LR11XX_DIO6)>; |
| 43 | + rf-sw-tx-hp-mode = <LR11XX_DIO6>; |
| 44 | + rf-sw-gnss-mode = <LR11XX_DIO7>; |
| 45 | + |
| 46 | + tcxo-voltage = <LR11XX_TCXO_SUPPLY_1_8V>; |
| 47 | + /* Default to XTAL board */ |
| 48 | + tcxo-wakeup-time = <0>; |
| 49 | + |
| 50 | + tx-power-cfg-lf-lp = |
| 51 | + // power, pa_duty_cycle, pa_hp_sel |
| 52 | + < (-15) 0x00 0x00>, // Expected output power = -17dBm |
| 53 | + < (-14) 0x00 0x00>, // Expected output power = -16dBm |
| 54 | + < (-13) 0x00 0x00>, // Expected output power = -15dBm |
| 55 | + < (-12) 0x00 0x00>, // Expected output power = -14dBm |
| 56 | + < (-11) 0x00 0x00>, // Expected output power = -13dBm |
| 57 | + < (-9) 0x00 0x00>, // Expected output power = -12dBm |
| 58 | + < (-8) 0x00 0x00>, // Expected output power = -11dBm |
| 59 | + < (-7) 0x00 0x00>, // Expected output power = -10dBm |
| 60 | + < (-6) 0x00 0x00>, // Expected output power = -9dBm |
| 61 | + < (-5) 0x00 0x00>, // Expected output power = -8dBm |
| 62 | + < (-4) 0x00 0x00>, // Expected output power = -7dBm |
| 63 | + < (-3) 0x00 0x00>, // Expected output power = -6dBm |
| 64 | + < (-2) 0x00 0x00>, // Expected output power = -5dBm |
| 65 | + < (-1) 0x00 0x00>, // Expected output power = -4dBm |
| 66 | + < ( 0) 0x00 0x00>, // Expected output power = -3dBm |
| 67 | + < ( 1) 0x00 0x00>, // Expected output power = -2dBm |
| 68 | + < ( 2) 0x00 0x00>, // Expected output power = -1dBm |
| 69 | + < ( 3) 0x00 0x00>, // Expected output power = 0dBm |
| 70 | + < ( 3) 0x01 0x00>, // Expected output power = 1dBm |
| 71 | + < ( 4) 0x01 0x00>, // Expected output power = 2dBm |
| 72 | + < ( 7) 0x00 0x00>, // Expected output power = 3dBm |
| 73 | + < ( 8) 0x00 0x00>, // Expected output power = 4dBm |
| 74 | + < ( 9) 0x00 0x00>, // Expected output power = 5dBm |
| 75 | + < ( 10) 0x00 0x00>, // Expected output power = 6dBm |
| 76 | + < ( 12) 0x00 0x00>, // Expected output power = 7dBm |
| 77 | + < ( 13) 0x00 0x00>, // Expected output power = 8dBm |
| 78 | + < ( 14) 0x00 0x00>, // Expected output power = 9dBm |
| 79 | + < ( 13) 0x01 0x00>, // Expected output power = 10dBm |
| 80 | + < ( 13) 0x02 0x00>, // Expected output power = 11dBm |
| 81 | + < ( 14) 0x02 0x00>, // Expected output power = 12dBm |
| 82 | + < ( 14) 0x03 0x00>, // Expected output power = 13dBm |
| 83 | + < ( 14) 0x04 0x00>, // Expected output power = 14dBm |
| 84 | + < ( 14) 0x07 0x00>; // Expected output power = 15dBm |
| 85 | + |
| 86 | + tx-power-cfg-lf-hp = |
| 87 | + // power, pa_duty_cycle, pa_hp_sel |
| 88 | + < ( 9) 0x00 0x00>, // Expected output power = -9dBm |
| 89 | + < ( 10) 0x00 0x00>, // Expected output power = -8dBm |
| 90 | + < ( 11) 0x00 0x00>, // Expected output power = -7dBm |
| 91 | + < ( 12) 0x00 0x00>, // Expected output power = -6dBm |
| 92 | + < ( 13) 0x00 0x00>, // Expected output power = -5dBm |
| 93 | + < ( 13) 0x01 0x00>, // Expected output power = -4dBm |
| 94 | + < ( 13) 0x02 0x00>, // Expected output power = -3dBm |
| 95 | + < ( 17) 0x02 0x00>, // Expected output power = -2dBm |
| 96 | + < ( 14) 0x04 0x00>, // Expected output power = -1dBm |
| 97 | + < ( 12) 0x00 0x01>, // Expected output power = 0dBm |
| 98 | + < ( 13) 0x00 0x01>, // Expected output power = 1dBm |
| 99 | + < ( 13) 0x01 0x01>, // Expected output power = 2dBm |
| 100 | + < ( 13) 0x02 0x01>, // Expected output power = 3dBm |
| 101 | + < ( 15) 0x00 0x02>, // Expected output power = 4dBm |
| 102 | + < ( 15) 0x04 0x01>, // Expected output power = 5dBm |
| 103 | + < ( 14) 0x02 0x02>, // Expected output power = 6dBm |
| 104 | + < ( 14) 0x01 0x03>, // Expected output power = 7dBm |
| 105 | + < ( 17) 0x04 0x02>, // Expected output power = 8dBm |
| 106 | + < ( 22) 0x00 0x01>, // Expected output power = 9dBm |
| 107 | + < ( 22) 0x01 0x01>, // Expected output power = 10dBm |
| 108 | + < ( 22) 0x02 0x01>, // Expected output power = 11dBm |
| 109 | + < ( 22) 0x03 0x01>, // Expected output power = 12dBm |
| 110 | + < ( 22) 0x00 0x03>, // Expected output power = 13dBm |
| 111 | + < ( 22) 0x01 0x03>, // Expected output power = 14dBm |
| 112 | + < ( 22) 0x04 0x02>, // Expected output power = 15dBm |
| 113 | + < ( 22) 0x01 0x04>, // Expected output power = 16dBm |
| 114 | + < ( 22) 0x02 0x04>, // Expected output power = 17dBm |
| 115 | + < ( 22) 0x01 0x06>, // Expected output power = 18dBm |
| 116 | + < ( 22) 0x03 0x05>, // Expected output power = 19dBm |
| 117 | + < ( 22) 0x03 0x07>, // Expected output power = 20dBm |
| 118 | + < ( 22) 0x04 0x06>, // Expected output power = 21dBm |
| 119 | + < ( 22) 0x04 0x07>; // Expected output power = 22dBm |
| 120 | + |
| 121 | + tx-power-cfg-hf = |
| 122 | + // power, pa_duty_cycle, pa_hp_sel |
| 123 | + < (-18) 0x04 0x00>, //Expected output power = -18dBm |
| 124 | + < (-18) 0x04 0x00>, // Expected output power = -17dBm |
| 125 | + < (-17) 0x04 0x00>, // Expected output power = -16dBm |
| 126 | + < (-16) 0x04 0x00>, // Expected output power = -15dBm |
| 127 | + < (-15) 0x04 0x00>, // Expected output power = -14dBm |
| 128 | + < (-14) 0x04 0x00>, // Expected output power = -13dBm |
| 129 | + < (-14) 0x04 0x00>, // Expected output power = -12dBm |
| 130 | + < (-12) 0x04 0x00>, // Expected output power = -11dBm |
| 131 | + < (-10) 0x04 0x00>, // Expected output power = -10dBm |
| 132 | + < ( -9) 0x04 0x00>, // Expected output power = -9dBm |
| 133 | + < ( -8) 0x04 0x00>, // Expected output power = -8dBm |
| 134 | + < ( -7) 0x04 0x00>, // Expected output power = -7dBm |
| 135 | + < ( -6) 0x04 0x00>, // Expected output power = -6dBm |
| 136 | + < ( -5) 0x04 0x00>, // Expected output power = -5dBm |
| 137 | + < ( -4) 0x04 0x00>, // Expected output power = -4dBm |
| 138 | + < ( -3) 0x04 0x00>, // Expected output power = -3dBm |
| 139 | + < ( -2) 0x03 0x00>, // Expected output power = -2dBm |
| 140 | + < ( -1) 0x04 0x00>, // Expected output power = -1dBm |
| 141 | + < ( 0) 0x04 0x00>, // Expected output power = 0dBm |
| 142 | + < ( 1) 0x00 0x00>, // Expected output power = 1dBm |
| 143 | + < ( 2) 0x00 0x00>, // Expected output power = 2dBm |
| 144 | + < ( 4) 0x04 0x00>, // Expected output power = 3dBm |
| 145 | + < ( 5) 0x04 0x00>, // Expected output power = 4dBm |
| 146 | + < ( 6) 0x04 0x00>, // Expected output power = 5dBm |
| 147 | + < ( 7) 0x04 0x00>, // Expected output power = 6dBm |
| 148 | + < ( 8) 0x04 0x00>, // Expected output power = 7dBm |
| 149 | + < ( 9) 0x04 0x00>, // Expected output power = 8dBm |
| 150 | + < ( 10) 0x04 0x00>, // Expected output power = 9dBm |
| 151 | + < ( 11) 0x04 0x00>, // Expected output power = 10dBm |
| 152 | + < ( 12) 0x03 0x00>, // Expected output power = 11dBm |
| 153 | + < ( 13) 0x04 0x00>, // Expected output power = 12dBm |
| 154 | + < ( 13) 0x00 0x00>; // Expected output power = 13dBm |
| 155 | + |
| 156 | + |
| 157 | + /* Tune is G4 G5 G6 G7 G8 G9 G10 G11 G12 G13 G13hp1 G13hp2 G13hp3 G13hp4 G13hp5 G13hp6 G13hp7 */ |
| 158 | + rssi-calibration-lf-offset = <0>; |
| 159 | + rssi-calibration-lf-tune = <12 12 14 0 1 3 4 4 3 6 6 6 6 6 6 6 6>; |
| 160 | + |
| 161 | + rssi-calibration-mf-offset = <0>; |
| 162 | + rssi-calibration-mf-tune = <2 2 2 3 3 4 5 4 4 6 5 5 6 6 6 7 6>; |
| 163 | + |
| 164 | + rssi-calibration-hf-offset = <2030>; |
| 165 | + rssi-calibration-hf-tune = <6 7 6 4 3 4 14 12 14 12 12 12 12 8 8 9 9>; |
| 166 | + |
| 167 | + }; |
| 168 | +}; |
0 commit comments