Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v4.0-branch] dts: atmel: sam0: Clean up devicetree #83135

Merged
merged 6 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion boards/atmel/sam0/samd20_xpro/samd20_xpro.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0

identifier: samd20_xpro
name: SAM D20 Xplained Pro
type: mcu
Expand All @@ -9,7 +12,6 @@ toolchain:
flash: 256
ram: 32
supported:
- adc
- flash
- gpio
- i2c
Expand Down
2 changes: 1 addition & 1 deletion boards/atmel/sam0/samd21_xpro/samd21_xpro.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2018 Bryan O'Donoghue
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0

identifier: samd21_xpro
name: SAM D21 Xplained Pro
type: mcu
Expand All @@ -12,7 +13,6 @@ toolchain:
flash: 256
ram: 32
supported:
- adc
- counter
- dma
- gpio
Expand Down
8 changes: 7 additions & 1 deletion boards/atmel/sam0/samr21_xpro/samr21_xpro-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
/*
* Copyright (c) 2022, Gerson Fernando Budke <nandojve@gmail.com>
* Copyright (c) 2022-2024, Gerson Fernando Budke <nandojve@gmail.com>
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/samr21g-pinctrl.h>

&pinctrl {
adc_default: adc_default {
group1 {
pinmux = <PA6B_ADC_AIN6>;
};
};

pwm_default: pwm_default {
group1 {
pinmux = <PA19F_TCC0_WO3>;
Expand Down
6 changes: 6 additions & 0 deletions boards/atmel/sam0/samr21_xpro/samr21_xpro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
clock-frequency = <48000000>;
};

&adc {
status = "okay";
pinctrl-0 = <&adc_default>;
pinctrl-names = "default";
};

&tcc0 {
status = "okay";
compatible = "atmel,sam0-tcc-pwm";
Expand Down
3 changes: 2 additions & 1 deletion boards/atmel/sam0/samr21_xpro/samr21_xpro.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2019 Benjamin Valentin
# Copyright (c) 2019-2024 Gerson Fernando Budke
# Copyright (c) 2019-2024 Gerson Fernando Budke <nandojve@gmail.com>
# SPDX-License-Identifier: Apache-2.0

identifier: samr21_xpro
name: SAM R21 Xplained Pro
type: mcu
Expand Down
14 changes: 10 additions & 4 deletions dts/arm/atmel/samc21.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,26 @@

/ {
aliases {
adc-1 = &adc1;

sercom-4 = &sercom4;
sercom-5 = &sercom5;
};

soc {
adc1: adc@42004800 {
compatible = "atmel,sam0-adc";
status = "disabled";
reg = <0x42004800 0x30>;
interrupts = <26 0>;
interrupt-names = "resrdy";
clocks = <&gclk 34>, <&mclk 0x1c 18>;
clock-names = "GCLK", "MCLK";
status = "disabled";

#io-channel-cells = <1>;

gclk = <0>;
prescaler = <4>;
#io-channel-cells = <1>;
};

sercom4: sercom@42001400 {
Expand Down Expand Up @@ -51,9 +55,10 @@
interrupt-names = "int0";
clocks = <&gclk 26>, <&mclk 0x10 8>;
clock-names = "GCLK", "MCLK";
status = "disabled";

bosch,mram-cfg = <0x0 28 8 3 3 0 1 1>;
divider = <12>;
status = "disabled";
};

can1: can@42002000 {
Expand All @@ -63,9 +68,10 @@
interrupt-names = "int0";
clocks = <&gclk 27>, <&mclk 0x10 9>;
clock-names = "GCLK", "MCLK";
status = "disabled";

bosch,mram-cfg = <0x0 28 8 3 3 0 1 1>;
divider = <12>;
status = "disabled";
};
};
};
74 changes: 47 additions & 27 deletions dts/arm/atmel/samc2x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@

/ {
aliases {
adc-0 = &adc0;

port-a = &porta;
port-b = &portb;
port-c = &portc;

sercom-0 = &sercom0;
sercom-1 = &sercom1;
sercom-2 = &sercom2;
sercom-3 = &sercom3;

tcc-0 = &tcc0;
tcc-1 = &tcc1;
tcc-2 = &tcc2;

watchdog0 = &wdog;
};

Expand All @@ -25,9 +40,10 @@
#size-cells = <0>;

cpu0: cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-m0+";
reg = <0>;

device_type = "cpu";
};
};

Expand All @@ -43,46 +59,35 @@
<0x0080A048 0x4>;
};

aliases {
port-a = &porta;
port-b = &portb;
port-c = &portc;

sercom-0 = &sercom0;
sercom-1 = &sercom1;
sercom-2 = &sercom2;
sercom-3 = &sercom3;

tcc-0 = &tcc0;
tcc-1 = &tcc1;
tcc-2 = &tcc2;
};

soc {
nvmctrl: nvmctrl@41004000 {
compatible = "atmel,sam0-nvmctrl";
reg = <0x41004000 0x22>;
interrupts = <6 0>;
lock-regions = <16>;

#address-cells = <1>;
#size-cells = <1>;

lock-regions = <16>;

flash0: flash@0 {
compatible = "soc-nv-flash";

write-block-size = <4>;
};
};

mclk: mclk@40000800 {
compatible = "atmel,samc2x-mclk";
reg = <0x40000800 0x400>;

#clock-cells = <2>;
};

gclk: gclk@40001c00 {
compatible = "atmel,samc2x-gclk";
reg = <0x40001c00 0x400>;

#clock-cells = <1>;
};

Expand All @@ -107,20 +112,24 @@
compatible = "atmel,sam0-dmac";
reg = <0x41006000 0x50>;
interrupts = <7 0>;
status = "disabled";

#dma-cells = <2>;
};

adc0: adc@42004400 {
compatible = "atmel,sam0-adc";
status = "disabled";
reg = <0x42004400 0x30>;
interrupts = <25 0>;
interrupt-names = "resrdy";
clocks = <&gclk 33>, <&mclk 0x1c 17>;
clock-names = "GCLK", "MCLK";
status = "disabled";

#io-channel-cells = <1>;

gclk = <0>;
prescaler = <4>;
#io-channel-cells = <1>;
};

sercom0: sercom@42000400 {
Expand Down Expand Up @@ -165,6 +174,7 @@
interrupts = <17 0>;
clocks = <&gclk 28>, <&mclk 0x1c 9>;
clock-names = "GCLK", "MCLK";
status = "disabled";

channels = <4>;
counter-size = <24>;
Expand All @@ -176,6 +186,7 @@
interrupts = <18 0>;
clocks = <&gclk 28>, <&mclk 0x1c 10>;
clock-names = "GCLK", "MCLK";
status = "disabled";

channels = <4>;
counter-size = <24>;
Expand All @@ -187,48 +198,57 @@
interrupts = <19 0>;
clocks = <&gclk 29>, <&mclk 0x1c 11>;
clock-names = "GCLK", "MCLK";
status = "disabled";

channels = <2>;
counter-size = <16>;
};

pinctrl: pinctrl@41000000 {
compatible = "atmel,sam0-pinctrl";
ranges = <0x41000000 0x41000000 0x180>;

#address-cells = <1>;
#size-cells = <1>;
ranges = <0x41000000 0x41000000 0x180>;

porta: gpio@41000000 {
compatible = "atmel,sam0-gpio";
reg = <0x41000000 0x80>;
gpio-controller;
#gpio-cells = <2>;

#atmel,pin-cells = <2>;
#gpio-cells = <2>;

gpio-controller;
};

portb: gpio@41000080 {
compatible = "atmel,sam0-gpio";
reg = <0x41000080 0x80>;
gpio-controller;
#gpio-cells = <2>;

#atmel,pin-cells = <2>;
#gpio-cells = <2>;

gpio-controller;
};

portc: gpio@41000100 {
compatible = "atmel,sam0-gpio";
reg = <0x41000100 0x80>;
gpio-controller;
#gpio-cells = <2>;

#atmel,pin-cells = <2>;
#gpio-cells = <2>;

gpio-controller;
};
};

rtc: rtc@40002400 {
compatible = "atmel,sam0-rtc";
reg = <0x40002400 0x1C>;
interrupts = <3 0>;
clock-generator = <0>;
status = "disabled";

clock-generator = <0>;
};
};
};
Expand Down
3 changes: 3 additions & 0 deletions dts/arm/atmel/samd20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
interrupts = <13 0>;
clocks = <&gclk 0x13>, <&pm 0x20 8>;
clock-names = "GCLK", "PM";
status = "disabled";
};

tc2: tc@42002800 {
Expand All @@ -28,6 +29,7 @@
interrupts = <15 0>;
clocks = <&gclk 0x14>, <&pm 0x20 10>;
clock-names = "GCLK", "PM";
status = "disabled";
};

tc6: tc@42003800 {
Expand All @@ -36,6 +38,7 @@
interrupts = <19 0>;
clocks = <&gclk 0x16>, <&pm 0x20 14>;
clock-names = "GCLK", "PM";
status = "disabled";
};
};
};
Expand Down
Loading
Loading