Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | /*
* Copyright (c) 2019 Benjamin Valentin
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <atmel/samr21.dtsi>
/ {
model = "SAM R21 Xplained Pro";
compatible = "atsamr21,xpro", "atmel,samr21g18a", "atmel,samr21";
chosen {
zephyr,console = &sercom0;
zephyr,shell-uart = &sercom0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
pwm-led0 = &pwm_led0;
sw0 = &user_button;
i2c-0 = &sercom1;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&porta 19 GPIO_ACTIVE_LOW>;
label = "Yellow LED";
};
};
pwmleds {
compatible = "pwm-leds";
pwm_led0: pwm_led_0 {
pwms = <&tcc0 3>;
};
};
buttons {
compatible = "gpio-keys";
user_button: button_0 {
gpios = <&porta 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "SW0";
};
};
ext1_header: xplained-pro-connector1 {
compatible = "atmel-xplained-pro-header";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; /* Shared */
gpio-map = <0 0 &porta 6 0>, /* ADC6 */
<1 0 &porta 7 0>, /* ADC7 */
<2 0 &porta 13 0>, /* GPIO */
<3 0 &porta 28 0>, /* GPIO */
<4 0 &porta 18 0>, /* PWM_T0_W2 */
<5 0 &porta 19 0>, /* PWM_T0_W3 */
<6 0 &porta 22 0>, /* GPIO */
<7 0 &porta 23 0>, /* GPIO */
<8 0 &porta 16 0>, /* TWD1 EXT2 */
<9 0 &porta 17 0>, /* TWCK1 EXT2 */
<10 0 &porta 5 0>, /* RXD0 */
<11 0 &porta 4 0>, /* TXD0 */
<12 0 &portb 3 0>, /* SPI5(SS) */
<13 0 &portb 22 0>, /* SPI5(MOSI) EXTx */
<14 0 &portb 2 0>, /* SPI5(MISO) EXTx */
<15 0 &portb 23 0>; /* SPI5(SCK) EXTx */
};
ext2_header: xplained-pro-connector2 {
compatible = "atmel-xplained-pro-header";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; /* Shared */
gpio-map = /*<0 0 - - 0>, - */
/*<1 0 - - 0>, - */
<2 0 &porta 15 0>, /* GPIO */
/*<3 0 - - 0>, - */
/*<4 0 - - 0>, - */
/*<5 0 - - 0>, - */
/*<6 0 - - 0>, - */
<7 0 &porta 8 0>, /* GPIO */
<8 0 &porta 16 0>, /* TWD1 EXT1 */
<9 0 &porta 17 0>, /* TWCK1 EXT1 */
/*<11 0 - - 0>, - */
/*<12 0 - - 0>, - */
<12 0 &porta 14 0>, /* GPIO */
<13 0 &portb 22 0>, /* SPI5(MOSI) EXTx */
<14 0 &portb 2 0>, /* SPI5(MISO) EXTx */
<15 0 &portb 23 0>; /* SPI5(SCK) EXTx */
};
};
&cpu0 {
clock-frequency = <48000000>;
};
&tcc0 {
status = "okay";
compatible = "atmel,sam0-tcc-pwm";
prescaler = <4>;
#pwm-cells = <1>;
};
&sercom0 {
status = "okay";
compatible = "atmel,sam0-uart";
current-speed = <115200>;
rxpo = <1>;
txpo = <0>;
};
&sercom1 {
status = "okay";
compatible = "atmel,sam0-i2c";
clock-frequency = <I2C_BITRATE_FAST>;
label = "I2C_0";
#address-cells = <1>;
#size-cells = <0>;
};
&sercom4 {
status = "okay";
compatible = "atmel,sam0-spi";
/*
* CS-PB31; MOSI-PB30; MISO-PC19; SCLK-PC18
* PAD[1]; PAD[2]; PAD[0]; PAD[3]
*/
dipo = <0>;
dopo = <1>;
label = "SPI_RF2XX";
#address-cells = <1>;
#size-cells = <0>;
cs-gpios = <&portb 31 GPIO_ACTIVE_LOW>;
rf2xx@0 {
compatible = "atmel,rf2xx";
reg = <0x0>;
label = "RF2XX_0";
spi-max-frequency = <6000000>;
irq-gpios = <&portb 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
reset-gpios = <&portb 15 GPIO_ACTIVE_LOW>;
slptr-gpios = <&porta 20 GPIO_ACTIVE_HIGH>;
dig2-gpios = <&portb 17 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
status = "okay";
};
};
&sercom5 {
status = "okay";
compatible = "atmel,sam0-spi";
dipo = <0>;
dopo = <2>;
label = "SPI_0";
#address-cells = <1>;
#size-cells = <0>;
};
&usb0 {
status = "okay";
};
&rtc {
status = "okay";
};
ext1_spi: &sercom5 {
};
ext1_i2c: &sercom1 {
};
ext1_serial: &sercom0 {
};
ext2_spi: &sercom5 {
};
ext2_i2c: &sercom1 {
};
|