| /* |
| * 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" |
| #include <zephyr/dt-bindings/input/input-event-codes.h> |
| |
| / { |
| 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-mcumgr = &uart0; |
| zephyr,uart-pipe = &uart0; |
| zephyr,flash-controller = &flash; |
| zephyr,bt_hci = &bt_hci_apollo; |
| zephyr,code-partition = &slot0_partition; |
| }; |
| |
| aliases { |
| watchdog0 = &wdt0; |
| led0 = &blue_led; |
| led1 = &green_led; |
| lora0 = &lora; |
| bootloader-led0 = &blue_led; |
| mcuboot-led0 = &blue_led; |
| }; |
| |
| 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>; |
| |
| internal_boot_partition: partition@0 { |
| label = "internal_bootloader"; |
| reg = <0x00000000 0xc000>; |
| }; |
| |
| boot_partition: partition@c000 { |
| label = "mcuboot"; |
| reg = <0x0000c000 0xc000>; |
| }; |
| slot0_partition: partition@18000 { |
| label = "image-0"; |
| reg = <0x00018000 0x72000>; |
| }; |
| slot1_partition: partition@8a000 { |
| label = "image-1"; |
| reg = <0x0008a000 0x72000>; |
| }; |
| |
| /* Set 16KB of storage at the end of the 1024KB of flash */ |
| storage_partition: partition@fc000 { |
| label = "storage"; |
| reg = <0x000fc000 0x4000>; |
| }; |
| }; |
| }; |
| |
| &stimer0 { |
| clk-source = <3>; |
| }; |
| |
| &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"; |
| }; |
| |
| &iom2 { |
| i2c2: i2c { |
| compatible = "ambiq,i2c"; |
| pinctrl-0 = <&i2c2_default>; |
| pinctrl-names = "default"; |
| clock-frequency = <I2C_BITRATE_STANDARD>; |
| status = "okay"; |
| }; |
| }; |
| |
| &iom0 { |
| spi0: spi { |
| 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"; |
| }; |
| }; |
| |
| &iom1 { |
| spi1: spi { |
| 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"; |
| }; |
| |
| &counter4 { |
| status = "okay"; |
| }; |
| |
| &counter5 { |
| status = "okay"; |
| }; |
| |
| &counter6 { |
| status = "okay"; |
| }; |
| |
| &counter7 { |
| status = "okay"; |
| }; |
| |
| &gpio0_31 { |
| status = "okay"; |
| }; |
| |
| &gpio32_63 { |
| status = "okay"; |
| }; |