Skip to content

Commit b96477d

Browse files
alexanderwachtercarlescufi
authored andcommitted
SoC: SAM3x and SAM4: Add the Flash Controller to the DT
This commit adds Device-Tree instances of the Flash controller to the SAM3X, SAM4E and SAM4S series. The Flash-Controller is used to get the unique device identifier. Signed-off-by: Alexander Wachter <[email protected]>
1 parent a22f0ac commit b96477d

File tree

6 files changed

+42
-0
lines changed

6 files changed

+42
-0
lines changed

dts/arm/atmel/sam3x.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
};
3636

3737
soc {
38+
/* Only used for HWINFO device ID */
39+
flash-controller@400e0a00 {
40+
compatible = "atmel,sam-flash-controller";
41+
label = "FLASH_CTRL";
42+
reg = <0x400e0a00 0x200>;
43+
peripheral-id = <6>;
44+
45+
#address-cells = <1>;
46+
#size-cells = <1>;
47+
};
48+
3849
wdog: watchdog@400e1a50 {
3950
compatible = "atmel,sam-watchdog";
4051
reg = <0x400e1a50 0xc>;

dts/arm/atmel/sam4e.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@
3434
};
3535

3636
soc {
37+
/* Only used for HWINFO device ID */
38+
flash-controller@400e0a00 {
39+
compatible = "atmel,sam-flash-controller";
40+
label = "FLASH_CTRL";
41+
reg = <0x400e0a00 0x200>;
42+
peripheral-id = <6>;
43+
44+
#address-cells = <1>;
45+
#size-cells = <1>;
46+
};
47+
3748
wdog: watchdog@400e1850 {
3849
compatible = "atmel,sam-watchdog";
3950
reg = <0x400e1850 0x10>;

dts/arm/atmel/sam4s.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
};
3636

3737
soc {
38+
/* Only used for HWINFO device ID */
39+
flash-controller@400e0a00 {
40+
compatible = "atmel,sam-flash-controller";
41+
label = "FLASH_CTRL";
42+
reg = <0x400e0a00 0x200>;
43+
peripheral-id = <6>;
44+
45+
#address-cells = <1>;
46+
#size-cells = <1>;
47+
};
48+
3849
wdog: watchdog@400e1450 {
3950
compatible = "atmel,sam-watchdog";
4051
reg = <0x400e1450 0xc>;

soc/arm/atmel_sam/sam3x/dts_fixup.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@
6868
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1A50_LABEL
6969
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1A50_BASE_ADDRESS
7070

71+
#define DT_FLASH_DEV_BASE_ADDRESS DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_BASE_ADDRESS
72+
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_LABEL
73+
7174
/* End of SoC Level DTS fixup file */

soc/arm/atmel_sam/sam4e/dts_fixup.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,7 @@
8282
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1850_IRQ_0_PRIORITY
8383
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1850_LABEL
8484
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1850_BASE_ADDRESS
85+
86+
#define DT_FLASH_DEV_BASE_ADDRESS DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_BASE_ADDRESS
87+
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_LABEL
8588
/* End of SoC Level DTS fixup file */

soc/arm/atmel_sam/sam4s/dts_fixup.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,7 @@
6666
#define DT_WDT_SAM_IRQ_PRIORITY DT_ATMEL_SAM_WATCHDOG_400E1450_IRQ_0_PRIORITY
6767
#define DT_WDT_SAM_LABEL DT_ATMEL_SAM_WATCHDOG_400E1450_LABEL
6868
#define DT_WDT_SAM_BASE_ADDRESS DT_ATMEL_SAM_WATCHDOG_400E1450_BASE_ADDRESS
69+
70+
#define DT_FLASH_DEV_BASE_ADDRESS DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_BASE_ADDRESS
71+
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM_FLASH_CONTROLLER_400E0A00_LABEL
6972
/* End of SoC Level DTS fixup file */

0 commit comments

Comments
 (0)