|
| 1 | +/* |
| 2 | + * Copyright (c) 2021 Argentum Systems Ltd. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +/dts-v1/; |
| 8 | +#include <atmel/samr34.dtsi> |
| 9 | +#include "atsamr34_xpro-pinctrl.dtsi" |
| 10 | + |
| 11 | +/ { |
| 12 | + model = "SAM R34 Xplained Pro"; |
| 13 | + compatible = "atsamr34,xpro", "atmel,samr34j18b", "atmel,samr34"; |
| 14 | + |
| 15 | + chosen { |
| 16 | + zephyr,console = &sercom0; |
| 17 | + zephyr,shell-uart = &sercom0; |
| 18 | + zephyr,sram = &sram0; |
| 19 | + zephyr,flash = &flash0; |
| 20 | + }; |
| 21 | + |
| 22 | + /* These aliases are provided for compatibility with samples */ |
| 23 | + aliases { |
| 24 | + led0 = &led0; |
| 25 | + pwm-led0 = &pwm_led0; |
| 26 | + sw0 = &user_button; |
| 27 | + }; |
| 28 | + |
| 29 | + leds { |
| 30 | + compatible = "gpio-leds"; |
| 31 | + led0: led_0 { |
| 32 | + gpios = <&porta 19 GPIO_ACTIVE_LOW>; |
| 33 | + label = "Yellow LED"; |
| 34 | + }; |
| 35 | + }; |
| 36 | + |
| 37 | + pwmleds { |
| 38 | + compatible = "pwm-leds"; |
| 39 | + pwm_led0: pwm_led_0 { |
| 40 | + pwms = <&tcc0 3 PWM_MSEC(20)>; |
| 41 | + }; |
| 42 | + }; |
| 43 | + |
| 44 | + buttons { |
| 45 | + compatible = "gpio-keys"; |
| 46 | + user_button: button_0 { |
| 47 | + gpios = <&porta 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; |
| 48 | + label = "SW0"; |
| 49 | + }; |
| 50 | + }; |
| 51 | +}; |
| 52 | + |
| 53 | +&cpu0 { |
| 54 | + clock-frequency = <48000000>; |
| 55 | +}; |
| 56 | + |
| 57 | +&adc { |
| 58 | + status = "okay"; |
| 59 | +}; |
| 60 | + |
| 61 | +&tcc0 { |
| 62 | + status = "okay"; |
| 63 | + compatible = "atmel,sam0-tcc-pwm"; |
| 64 | + /* Gives a maximum period of 1.4s */ |
| 65 | + prescaler = <4>; |
| 66 | + #pwm-cells = <2>; |
| 67 | + |
| 68 | + pinctrl-0 = <&tcc0_default>; |
| 69 | + pinctrl-names = "default"; |
| 70 | +}; |
| 71 | + |
| 72 | +&sercom0 { |
| 73 | + status = "okay"; |
| 74 | + compatible = "atmel,sam0-uart"; |
| 75 | + current-speed = <115200>; |
| 76 | + rxpo = <1>; |
| 77 | + txpo = <0>; |
| 78 | + |
| 79 | + pinctrl-0 = <&sercom0_default>; |
| 80 | + pinctrl-names = "default"; |
| 81 | +}; |
| 82 | + |
| 83 | +&sercom1 { |
| 84 | + status = "okay"; |
| 85 | + compatible = "atmel,sam0-i2c"; |
| 86 | + clock-frequency = <I2C_BITRATE_FAST>; |
| 87 | + #address-cells = <1>; |
| 88 | + #size-cells = <0>; |
| 89 | + |
| 90 | + pinctrl-0 = <&sercom1_default>; |
| 91 | + pinctrl-names = "default"; |
| 92 | +}; |
| 93 | + |
| 94 | +/* SERCOM4 is used for the internal LoRa radio */ |
| 95 | +&sercom4 { |
| 96 | + status = "okay"; |
| 97 | + |
| 98 | + pinctrl-0 = <&sercom4_default>; |
| 99 | + pinctrl-names = "default"; |
| 100 | +}; |
| 101 | +&lora { |
| 102 | + tcxo-power-gpios = <&porta 9 GPIO_ACTIVE_HIGH>; /* TCXO_PWR */ |
| 103 | + tcxo-power-startup-delay-ms = <5>; |
| 104 | + rfi-enable-gpios = <&porta 13 GPIO_ACTIVE_HIGH>; /* BAND_SEL */ |
| 105 | + rfo-enable-gpios = <&porta 13 GPIO_ACTIVE_HIGH>; /* BAND_SEL */ |
| 106 | +}; |
| 107 | + |
| 108 | +&sercom5 { |
| 109 | + status = "okay"; |
| 110 | + compatible = "atmel,sam0-spi"; |
| 111 | + dipo = <0>; |
| 112 | + dopo = <1>; |
| 113 | + #address-cells = <1>; |
| 114 | + #size-cells = <0>; |
| 115 | + |
| 116 | + pinctrl-0 = <&sercom5_default>; |
| 117 | + pinctrl-names = "default"; |
| 118 | +}; |
| 119 | + |
| 120 | +zephyr_udc0: &usb0 { |
| 121 | + status = "okay"; |
| 122 | +}; |
0 commit comments