Skip to content

Commit

Permalink
dts/bindings: add TI CC13xx/CC26xx flash controller bindings
Browse files Browse the repository at this point in the history
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 <pepe2k@gmail.com>
  • Loading branch information
pepe2k authored and mbolivar-nordic committed Jun 6, 2022
1 parent a9b3c93 commit cd66c9f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 30 deletions.
26 changes: 13 additions & 13 deletions dts/arm/ti/cc1352r.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(80)>;
};
};

flash0: serial-flash@0 {
reg = <0x0 DT_SIZE_K(352)>;
&flash0 {
reg = <0x0 DT_SIZE_K(352)>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* CCFG registers occupy the last 88 bytes of flash */
ti_ccfg_partition: partition@57fa8 {
compatible = "zephyr,memory-region";
label = "ti_ccfg";
reg = <0x57fa8 88>;
zephyr,memory-region = "FLASH_CCFG";
};
/* CCFG registers occupy the last 88 bytes of flash */
ti_ccfg_partition: partition@57fa8 {
compatible = "zephyr,memory-region";
label = "ti_ccfg";
reg = <0x57fa8 88>;
zephyr,memory-region = "FLASH_CCFG";
};
};
};
20 changes: 16 additions & 4 deletions dts/arm/ti/cc13x2_cc26x2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/ {
chosen {
zephyr,entropy = &trng;
zephyr,flash-controller = &flash_controller;
};

cpus {
Expand All @@ -35,10 +36,6 @@
zephyr,memory-region = "SRAM1";
};

flash0: serial-flash@0 {
compatible = "serial-flash";
};

sysclk: system-clock {
compatible = "fixed-clock";
clock-frequency = <48000000>;
Expand Down Expand Up @@ -69,6 +66,21 @@
label = "TRNG";
};

flash_controller: flash-controller@40030000 {
compatible = "ti,cc13xx-cc26xx-flash-controller";
reg = <0x40030000 0x4000>;
label="FLASH_CTRL";

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

flash0: flash@0 {
compatible = "soc-nv-flash";
erase-block-size = <DT_SIZE_K(8)>;
write-block-size = <1>;
};
};

uart0: uart@40001000 {
compatible = "ti,cc13xx-cc26xx-uart";
reg = <0x40001000 0x1000>;
Expand Down
26 changes: 13 additions & 13 deletions dts/arm/ti/cc2652r.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(80)>;
};
};

flash0: serial-flash@0 {
reg = <0x0 DT_SIZE_K(352)>;
&flash0 {
reg = <0x0 DT_SIZE_K(352)>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* CCFG registers occupy the last 88 bytes of flash */
ti_ccfg_partition: partition@57fa8 {
compatible = "zephyr,memory-region";
label = "ti_ccfg";
reg = <0x57fa8 88>;
zephyr,memory-region = "FLASH_CCFG";
};
/* CCFG registers occupy the last 88 bytes of flash */
ti_ccfg_partition: partition@57fa8 {
compatible = "zephyr,memory-region";
label = "ti_ccfg";
reg = <0x57fa8 88>;
zephyr,memory-region = "FLASH_CCFG";
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Texas Instruments CC13xx/CC26xx flash controller

compatible: "ti,cc13xx-cc26xx-flash-controller"

include: flash-controller.yaml

0 comments on commit cd66c9f

Please sign in to comment.