/* * 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 &pinctrl { relay_spim2_default: relay_spim2_default { group1 { pinmux = , ; }; group2 { pinmux = ; 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 = ; 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 = ; }; &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>; }; };