esp32s3_devkitc_esp32s3_procpu.overlay 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Wire spi2 from to the Wio-S3 Sx1262 pins:
  3. * SPI CLK=4 MOSI=6 MISO=5
  4. * CS=21 RST=7 BUSY=8 DIO1=9
  5. */
  6. #include <zephyr/dt-bindings/lora/sx126x.h>
  7. &pinctrl {
  8. relay_spim2_default: relay_spim2_default {
  9. group1 {
  10. pinmux = <SPIM2_MISO_GPIO5>,
  11. <SPIM2_SCLK_GPIO4>;
  12. };
  13. group2 {
  14. pinmux = <SPIM2_MOSI_GPIO6>;
  15. output-low;
  16. };
  17. };
  18. };
  19. &spi2 {
  20. status = "okay";
  21. pinctrl-0 = <&relay_spim2_default>;
  22. pinctrl-names = "default";
  23. cs-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
  24. lora0: modem@0 {
  25. compatible = "semtech,sx1262";
  26. reg = <0>;
  27. reset-gpios = <&gpio0 7 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
  28. busy-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
  29. dio1-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  30. /* DIO2 drives the board's RF switch, same as the ESPHome rf_switch:true. */
  31. dio2-tx-enable;
  32. dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V8>;
  33. tcxo-power-startup-delay-ms = <5>;
  34. spi-max-frequency = <4000000>;
  35. };
  36. };
  37. / {
  38. aliases {
  39. lora0 = &lora0;
  40. };
  41. };
  42. &flash0 {
  43. reg = <0x0 DT_SIZE_M(16)>;
  44. ranges = <0x0 0x0 DT_SIZE_M(16)>;
  45. };
  46. &psram0 {
  47. size = <DT_SIZE_M(8)>;
  48. };
  49. &flash0 {
  50. partitions {
  51. littlefs_partition: partition@400000 {
  52. compatible = "zephyr,mapped-partition";
  53. label = "littlefs";
  54. reg = <0x400000 DT_SIZE_K(1024)>;
  55. };
  56. };
  57. };
  58. /*
  59. * Mounts littlefs_partition at /lfs
  60. */
  61. / {
  62. lfs: lfs {
  63. compatible = "zephyr,fstab,littlefs";
  64. mount-point = "/lfs";
  65. partition = <&littlefs_partition>;
  66. automount;
  67. read-size = <16>;
  68. prog-size = <16>;
  69. cache-size = <64>;
  70. lookahead-size = <32>;
  71. block-cycles = <512>;
  72. };
  73. };