Skip to content

Commit cd66c9f

Browse files
pepe2kmbolivar-nordic
authored andcommitted
dts/bindings: add TI CC13xx/CC26xx flash controller bindings
This includes DTS bindings for the Texas Instruments CC13xx/CC26xx flash controller driver and adds support for it in CC1352R and CC2652R SoCs DTS files. Signed-off-by: Piotr Dymacz <[email protected]>
1 parent a9b3c93 commit cd66c9f

File tree

4 files changed

+47
-30
lines changed

4 files changed

+47
-30
lines changed

dts/arm/ti/cc1352r.dtsi

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
sram0: memory@20000000 {
1212
reg = <0x20000000 DT_SIZE_K(80)>;
1313
};
14+
};
1415

15-
flash0: serial-flash@0 {
16-
reg = <0x0 DT_SIZE_K(352)>;
16+
&flash0 {
17+
reg = <0x0 DT_SIZE_K(352)>;
1718

18-
partitions {
19-
compatible = "fixed-partitions";
20-
#address-cells = <1>;
21-
#size-cells = <1>;
19+
partitions {
20+
compatible = "fixed-partitions";
21+
#address-cells = <1>;
22+
#size-cells = <1>;
2223

23-
/* CCFG registers occupy the last 88 bytes of flash */
24-
ti_ccfg_partition: partition@57fa8 {
25-
compatible = "zephyr,memory-region";
26-
label = "ti_ccfg";
27-
reg = <0x57fa8 88>;
28-
zephyr,memory-region = "FLASH_CCFG";
29-
};
24+
/* CCFG registers occupy the last 88 bytes of flash */
25+
ti_ccfg_partition: partition@57fa8 {
26+
compatible = "zephyr,memory-region";
27+
label = "ti_ccfg";
28+
reg = <0x57fa8 88>;
29+
zephyr,memory-region = "FLASH_CCFG";
3030
};
3131
};
3232
};

dts/arm/ti/cc13x2_cc26x2.dtsi

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/ {
1212
chosen {
1313
zephyr,entropy = &trng;
14+
zephyr,flash-controller = &flash_controller;
1415
};
1516

1617
cpus {
@@ -35,10 +36,6 @@
3536
zephyr,memory-region = "SRAM1";
3637
};
3738

38-
flash0: serial-flash@0 {
39-
compatible = "serial-flash";
40-
};
41-
4239
sysclk: system-clock {
4340
compatible = "fixed-clock";
4441
clock-frequency = <48000000>;
@@ -69,6 +66,21 @@
6966
label = "TRNG";
7067
};
7168

69+
flash_controller: flash-controller@40030000 {
70+
compatible = "ti,cc13xx-cc26xx-flash-controller";
71+
reg = <0x40030000 0x4000>;
72+
label="FLASH_CTRL";
73+
74+
#address-cells = <1>;
75+
#size-cells = <1>;
76+
77+
flash0: flash@0 {
78+
compatible = "soc-nv-flash";
79+
erase-block-size = <DT_SIZE_K(8)>;
80+
write-block-size = <1>;
81+
};
82+
};
83+
7284
uart0: uart@40001000 {
7385
compatible = "ti,cc13xx-cc26xx-uart";
7486
reg = <0x40001000 0x1000>;

dts/arm/ti/cc2652r.dtsi

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
sram0: memory@20000000 {
1212
reg = <0x20000000 DT_SIZE_K(80)>;
1313
};
14+
};
1415

15-
flash0: serial-flash@0 {
16-
reg = <0x0 DT_SIZE_K(352)>;
16+
&flash0 {
17+
reg = <0x0 DT_SIZE_K(352)>;
1718

18-
partitions {
19-
compatible = "fixed-partitions";
20-
#address-cells = <1>;
21-
#size-cells = <1>;
19+
partitions {
20+
compatible = "fixed-partitions";
21+
#address-cells = <1>;
22+
#size-cells = <1>;
2223

23-
/* CCFG registers occupy the last 88 bytes of flash */
24-
ti_ccfg_partition: partition@57fa8 {
25-
compatible = "zephyr,memory-region";
26-
label = "ti_ccfg";
27-
reg = <0x57fa8 88>;
28-
zephyr,memory-region = "FLASH_CCFG";
29-
};
24+
/* CCFG registers occupy the last 88 bytes of flash */
25+
ti_ccfg_partition: partition@57fa8 {
26+
compatible = "zephyr,memory-region";
27+
label = "ti_ccfg";
28+
reg = <0x57fa8 88>;
29+
zephyr,memory-region = "FLASH_CCFG";
3030
};
3131
};
3232
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: Texas Instruments CC13xx/CC26xx flash controller
2+
3+
compatible: "ti,cc13xx-cc26xx-flash-controller"
4+
5+
include: flash-controller.yaml

0 commit comments

Comments
 (0)