Skip to content

Commit

Permalink
samd2x: separate RAM/Flash sizes by model.
Browse files Browse the repository at this point in the history
This creates separate dtsi files for the various memory density codes of
SAM D20 and D21 families (they are the same where the specific size
exists.)

All of the boards with the exclusion of EV11L78A use the same density
model of 18 (32KiB RAM and 256KiB flash) which is what the samd2x.dtsi
include specified for all of them previously.

Signed-off-by: Diego Elio Pettenò <[email protected]>
  • Loading branch information
Flameeyes committed Sep 10, 2023
1 parent bc695c6 commit 1b57a45
Show file tree
Hide file tree
Showing 18 changed files with 98 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "adafruit_feather_m0_basic_proto-pinctrl.dtsi"
#include "feather_connector.dtsi"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "adafruit_feather_m0_lora-pinctrl.dtsi"
#include "feather_connector.dtsi"

Expand Down
1 change: 1 addition & 0 deletions boards/arm/adafruit_trinket_m0/adafruit_trinket_m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "adafruit_trinket_m0-pinctrl.dtsi"

/ {
Expand Down
1 change: 1 addition & 0 deletions boards/arm/arduino_mkrzero/arduino_mkrzero.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "arduino_mkrzero-pinctrl.dtsi"
#include "arduino_mkr_connector.dtsi"

Expand Down
1 change: 1 addition & 0 deletions boards/arm/arduino_nano_33_iot/arduino_nano_33_iot.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "arduino_nano_33_iot-pinctrl.dtsi"
#include "arduino_nano_r3_connector.dtsi"

Expand Down
1 change: 1 addition & 0 deletions boards/arm/arduino_zero/arduino_zero.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "arduino_zero-pinctrl.dtsi"

/ {
Expand Down
1 change: 1 addition & 0 deletions boards/arm/atsamd20_xpro/atsamd20_xpro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/dts-v1/;
#include <freq.h>
#include <atmel/samd20.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "atsamd20_xpro-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>

Expand Down
1 change: 1 addition & 0 deletions boards/arm/atsamd21_xpro/atsamd21_xpro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/dts-v1/;
#include <freq.h>
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "atsamd21_xpro-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>

Expand Down
9 changes: 9 additions & 0 deletions boards/arm/atsamr21_xpro/atsamr21_xpro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

/dts-v1/;
#include <mem.h>
#include <atmel/samr21.dtsi>
#include "atsamr21_xpro-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
Expand Down Expand Up @@ -104,6 +105,14 @@
clock-frequency = <48000000>;
};

&sram0 {
reg = <0x20000000 DT_SIZE_K(32)>;
};

&flash0 {
reg = <0 DT_SIZE_K(256)>;
};

&tcc0 {
status = "okay";
compatible = "atmel,sam0-tcc-pwm";
Expand Down
6 changes: 4 additions & 2 deletions boards/arm/ev11l78a/ev11l78a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

/dts-v1/;
#include <freq.h>
#include <mem.h>
#include <atmel/samd20.dtsi>
#include <atmel/samd2xx16.dtsi>
#include "ev11l78a-pinctrl.dtsi"

/ {
Expand Down Expand Up @@ -94,9 +96,9 @@
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@3c000 {
storage_partition: partition@c000 {
label = "storage";
reg = <0x0003c000 0x00004000>;
reg = <DT_SIZE_K(64-16) DT_SIZE_K(16)>;
};
};
};
Expand Down
1 change: 1 addition & 0 deletions boards/arm/seeeduino_xiao/seeeduino_xiao.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "seeeduino_xiao-pinctrl.dtsi"
#include "seeed_xiao_connector.dtsi"

Expand Down
1 change: 1 addition & 0 deletions boards/arm/serpente/serpente.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <atmel/samd21.dtsi>
#include <atmel/samd2xx18.dtsi>
#include "serpente-pinctrl.dtsi"

/ {
Expand Down
2 changes: 0 additions & 2 deletions dts/arm/atmel/samd2x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

sram0: memory@20000000 {
compatible = "mmio-sram";
reg = <0x20000000 0x8000>;
};

id: device_id@80a00c {
Expand Down Expand Up @@ -71,7 +70,6 @@

flash0: flash@0 {
compatible = "soc-nv-flash";
reg = <0 0x40000>;
write-block-size = <4>;
};
};
Expand Down
15 changes: 15 additions & 0 deletions dts/arm/atmel/samd2xx14.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2023, Meta Platforms, Inc. and its affiliates.
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>

&sram0 {
reg = <0x20000000 DT_SIZE_K(2)>;
};

&flash0 {
reg = <0 DT_SIZE_K(16)>;
};
15 changes: 15 additions & 0 deletions dts/arm/atmel/samd2xx15.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2023, Meta Platforms, Inc. and its affiliates.
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>

&sram0 {
reg = <0x20000000 DT_SIZE_K(4)>;
};

&flash0 {
reg = <0 DT_SIZE_K(32)>;
};
15 changes: 15 additions & 0 deletions dts/arm/atmel/samd2xx16.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2023, Meta Platforms, Inc. and its affiliates.
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>

&sram0 {
reg = <0x20000000 DT_SIZE_K(8)>;
};

&flash0 {
reg = <0 DT_SIZE_K(64)>;
};
15 changes: 15 additions & 0 deletions dts/arm/atmel/samd2xx17.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2023, Meta Platforms, Inc. and its affiliates.
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>

&sram0 {
reg = <0x20000000 DT_SIZE_K(16)>;
};

&flash0 {
reg = <0 DT_SIZE_K(128)>;
};
15 changes: 15 additions & 0 deletions dts/arm/atmel/samd2xx18.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2023, Meta Platforms, Inc. and its affiliates.
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>

&sram0 {
reg = <0x20000000 DT_SIZE_K(32)>;
};

&flash0 {
reg = <0 DT_SIZE_K(256)>;
};

0 comments on commit 1b57a45

Please sign in to comment.