1/* 2 * Copyright (c) 2021 Argentum Systems Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <freq.h> 8#include <atmel/saml21.dtsi> 9#include <zephyr/dt-bindings/lora/sx126x.h> 10 11#include "saml21.dtsi" 12#include "samr34-pinctrl.dtsi" 13 14/ { 15 aliases { 16 lora0 = &lora; 17 }; 18 19 soc { 20 pinctrl@40002800 { 21 ranges = <0x40002800 0x40002800 0x180>; 22 23 portc: gpio@40002900 { 24 compatible = "atmel,sam0-gpio"; 25 reg = <0x40002900 0x80>; 26 gpio-controller; 27 #gpio-cells = <2>; 28 #atmel,pin-cells = <2>; 29 }; 30 }; 31 }; 32}; 33 34/delete-node/ &dac; 35 36&sercom4 { 37 /* SERCOM4 is used to interface with the internal LoRa radio */ 38 compatible = "atmel,sam0-spi"; 39 status = "disabled"; 40 dipo = <0>; 41 dopo = <1>; 42 cs-gpios = <&portb 31 GPIO_ACTIVE_LOW>; 43 #address-cells = <1>; 44 #size-cells = <0>; 45 46 pinctrl-0 = <&sercom4_default>; 47 pinctrl-names = "default"; 48 49 lora: sx1276@0 { 50 compatible = "semtech,sx1276"; 51 status = "disabled"; 52 reg = <0>; 53 reset-gpios = <&portb 15 GPIO_ACTIVE_LOW>; /* nRST */ 54 dio-gpios = 55 <&portb 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, /* DIO0 */ 56 <&porta 11 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, /* DIO1 */ 57 <&porta 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, /* DIO2 */ 58 <&portb 17 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, /* DIO3 */ 59 <&porta 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, /* DIO4 */ 60 <&portb 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; /* DIO5 */ 61 spi-max-frequency = <DT_FREQ_M(10)>; 62 }; 63}; 64