| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- /*
- * Wire spi2 from to the Wio-S3 Sx1262 pins:
- * SPI CLK=4 MOSI=6 MISO=5
- * CS=21 RST=7 BUSY=8 DIO1=9
- */
- #include <zephyr/dt-bindings/lora/sx126x.h>
- &pinctrl {
- relay_spim2_default: relay_spim2_default {
- group1 {
- pinmux = <SPIM2_MISO_GPIO5>,
- <SPIM2_SCLK_GPIO4>;
- };
- group2 {
- pinmux = <SPIM2_MOSI_GPIO6>;
- output-low;
- };
- };
- };
- &spi2 {
- status = "okay";
- pinctrl-0 = <&relay_spim2_default>;
- pinctrl-names = "default";
- cs-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
- lora0: modem@0 {
- compatible = "semtech,sx1262";
- reg = <0>;
- reset-gpios = <&gpio0 7 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
- busy-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
- dio1-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
- /* DIO2 drives the board's RF switch, same as the ESPHome rf_switch:true. */
- dio2-tx-enable;
- dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V8>;
- tcxo-power-startup-delay-ms = <5>;
- spi-max-frequency = <4000000>;
- };
- };
- / {
- aliases {
- lora0 = &lora0;
- };
- };
- &flash0 {
- reg = <0x0 DT_SIZE_M(16)>;
- ranges = <0x0 0x0 DT_SIZE_M(16)>;
- };
- &psram0 {
- size = <DT_SIZE_M(8)>;
- };
- &flash0 {
- partitions {
- littlefs_partition: partition@400000 {
- compatible = "zephyr,mapped-partition";
- label = "littlefs";
- reg = <0x400000 DT_SIZE_K(1024)>;
- };
- };
- };
- /*
- * Mounts littlefs_partition at /lfs
- */
- / {
- lfs: lfs {
- compatible = "zephyr,fstab,littlefs";
- mount-point = "/lfs";
- partition = <&littlefs_partition>;
- automount;
- read-size = <16>;
- prog-size = <16>;
- cache-size = <64>;
- lookahead-size = <32>;
- block-cycles = <512>;
- };
- };
|