|
| 1 | +/* |
| 2 | + * Copyright (c) 2021 Argentum Systems Ltd. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +/dts-v1/; |
| 8 | +#include <atmel/saml21.dtsi> |
| 9 | +#include "atsaml21_xpro-pinctrl.dtsi" |
| 10 | + |
| 11 | +/ { |
| 12 | + model = "SAM L21 Xplained Pro"; |
| 13 | + compatible = "atsaml21,xpro", "atmel,saml21j18b", "atmel,saml21"; |
| 14 | + |
| 15 | + chosen { |
| 16 | + zephyr,console = &sercom3; |
| 17 | + zephyr,shell-uart = &sercom3; |
| 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 = <&portb 10 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 0 PWM_MSEC(20)>; |
| 41 | + }; |
| 42 | + }; |
| 43 | + |
| 44 | + buttons { |
| 45 | + compatible = "gpio-keys"; |
| 46 | + user_button: button_0 { |
| 47 | + gpios = <&porta 2 (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-spi"; |
| 75 | + dipo = <0>; |
| 76 | + dopo = <1>; |
| 77 | + #address-cells = <1>; |
| 78 | + #size-cells = <0>; |
| 79 | + |
| 80 | + pinctrl-0 = <&sercom0_default>; |
| 81 | + pinctrl-names = "default"; |
| 82 | +}; |
| 83 | + |
| 84 | +&sercom1 { |
| 85 | + status = "okay"; |
| 86 | + compatible = "atmel,sam0-uart"; |
| 87 | + current-speed = <115200>; |
| 88 | + rxpo = <3>; |
| 89 | + txpo = <0>; |
| 90 | + |
| 91 | + pinctrl-0 = <&sercom1_default>; |
| 92 | + pinctrl-names = "default"; |
| 93 | +}; |
| 94 | + |
| 95 | +&sercom2 { |
| 96 | + status = "okay"; |
| 97 | + compatible = "atmel,sam0-i2c"; |
| 98 | + clock-frequency = <I2C_BITRATE_FAST>; |
| 99 | + #address-cells = <1>; |
| 100 | + #size-cells = <0>; |
| 101 | + |
| 102 | + pinctrl-0 = <&sercom2_default>; |
| 103 | + pinctrl-names = "default"; |
| 104 | +}; |
| 105 | + |
| 106 | +&sercom3 { |
| 107 | + status = "okay"; |
| 108 | + compatible = "atmel,sam0-uart"; |
| 109 | + current-speed = <115200>; |
| 110 | + rxpo = <1>; |
| 111 | + txpo = <0>; |
| 112 | + |
| 113 | + pinctrl-0 = <&sercom3_default>; |
| 114 | + pinctrl-names = "default"; |
| 115 | +}; |
| 116 | + |
| 117 | +&sercom4 { |
| 118 | + status = "okay"; |
| 119 | + compatible = "atmel,sam0-uart"; |
| 120 | + current-speed = <115200>; |
| 121 | + rxpo = <1>; |
| 122 | + txpo = <0>; |
| 123 | + |
| 124 | + pinctrl-0 = <&sercom4_default>; |
| 125 | + pinctrl-names = "default"; |
| 126 | +}; |
| 127 | + |
| 128 | +&sercom5 { |
| 129 | + status = "okay"; |
| 130 | + compatible = "atmel,sam0-spi"; |
| 131 | + dipo = <0>; |
| 132 | + dopo = <1>; |
| 133 | + #address-cells = <1>; |
| 134 | + #size-cells = <0>; |
| 135 | + |
| 136 | + pinctrl-0 = <&sercom5_default>; |
| 137 | + pinctrl-names = "default"; |
| 138 | +}; |
| 139 | + |
| 140 | +zephyr_udc0: &usb0 { |
| 141 | + status = "okay"; |
| 142 | +}; |
0 commit comments