| /* |
| * Copyright (c) 2024 RAKwireless Technology Co., Ltd. <www.rakwireless.com> |
| * Sercan Erat <sercanerat@gmail.com> |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| /dts-v1/; |
| #include <ambiq/ambiq_apollo3_blue.dtsi> |
| #include <zephyr/dt-bindings/lora/sx126x.h> |
| #include "rak11720_apollo3-pinctrl.dtsi" |
| |
| / { |
| model = "RAKwireless RAK11720 WisBlock LPWAN Module"; |
| compatible = "ambiq,rak11720"; |
| |
| chosen { |
| zephyr,itcm = &tcm; |
| zephyr,sram = &sram0; |
| zephyr,flash = &flash0; |
| zephyr,console = &uart0; |
| zephyr,shell-uart = &uart0; |
| zephyr,uart-pipe = &uart0; |
| zephyr,flash-controller = &flash; |
| zephyr,bt_hci = &bt_hci_apollo; |
| }; |
| |
| aliases { |
| watchdog0 = &wdt0; |
| led0 = &blue_led; |
| led1 = &green_led; |
| lora0 = &lora; |
| }; |
| |
| leds { |
| compatible = "gpio-leds"; |
| blue_led: led_2 { |
| gpios = <&gpio32_63 13 GPIO_ACTIVE_HIGH>; |
| label = "Blue LED"; |
| }; |
| green_led: led_1 { |
| gpios = <&gpio32_63 12 GPIO_ACTIVE_HIGH>; |
| label = "Green LED"; |
| }; |
| }; |
| }; |
| |
| &flash0 { |
| erase-block-size = <8192>; |
| write-block-size = <4>; |
| |
| partitions { |
| compatible = "fixed-partitions"; |
| #address-cells = <1>; |
| #size-cells = <1>; |
| |
| /* Set 16KB of storage at the end of the 976KB of flash */ |
| storage_partition: partition@f0000 { |
| label = "storage"; |
| reg = <0x000f0000 0x4000>; |
| }; |
| }; |
| }; |
| |
| &bleif { |
| pinctrl-0 = <&bleif_default>; |
| pinctrl-names = "default"; |
| status = "okay"; |
| }; |
| |
| &uart0 { |
| current-speed = <115200>; |
| pinctrl-0 = <&uart0_default>; |
| pinctrl-names = "default"; |
| status = "okay"; |
| }; |
| |
| &wdt0 { |
| status = "okay"; |
| }; |
| |
| &i2c2 { |
| compatible = "ambiq,i2c"; |
| pinctrl-0 = <&i2c2_default>; |
| pinctrl-names = "default"; |
| clock-frequency = <I2C_BITRATE_STANDARD>; |
| status = "okay"; |
| }; |
| |
| &spi0 { |
| compatible = "ambiq,spi"; |
| pinctrl-0 = <&spi0_default>; |
| pinctrl-names = "default"; |
| cs-gpios = <&gpio0_31 1 GPIO_ACTIVE_LOW>; |
| clock-frequency = <DT_FREQ_M(1)>; |
| status = "okay"; |
| }; |
| |
| &spi1 { |
| compatible = "ambiq,spi"; |
| status = "okay"; |
| pinctrl-0 = <&spi1_default>; |
| pinctrl-names = "default"; |
| clock-frequency = <DT_FREQ_M(1)>; |
| cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>; |
| |
| lora: lora@0 { |
| compatible = "semtech,sx1262"; |
| reg = <0>; |
| reset-gpios = <&gpio0_31 17 GPIO_ACTIVE_LOW>; |
| busy-gpios = <&gpio0_31 16 GPIO_ACTIVE_HIGH>; |
| dio1-gpios = <&gpio0_31 15 GPIO_ACTIVE_HIGH>; |
| antenna-enable-gpios = <&gpio0_31 18 GPIO_ACTIVE_LOW>; |
| dio2-tx-enable; |
| dio3-tcxo-voltage = <SX126X_DIO3_TCXO_3V3>; |
| tcxo-power-startup-delay-ms = <5>; |
| spi-max-frequency = <DT_FREQ_M(1)>; |
| }; |
| }; |
| |
| &counter0 { |
| status = "okay"; |
| }; |
| |
| &counter1 { |
| status = "okay"; |
| }; |
| |
| &counter2 { |
| status = "okay"; |
| }; |
| |
| &counter3 { |
| status = "okay"; |
| }; |
| |
| &counter4 { |
| status = "okay"; |
| }; |
| |
| &counter5 { |
| status = "okay"; |
| }; |
| |
| &counter6 { |
| status = "okay"; |
| }; |
| |
| &counter7 { |
| status = "okay"; |
| }; |
| |
| &gpio0_31 { |
| status = "okay"; |
| }; |
| |
| &gpio32_63 { |
| status = "okay"; |
| }; |