Commit 986800d1 authored by Stoyan Bogdanov's avatar Stoyan Bogdanov Committed by Benjamin Cabé
Browse files

dts: arm: ti: cc23x0: Add flash support



Add support for flash to cc23x0 SoC.

Signed-off-by: default avatarLars Thalian Morstad <l-morstad@ti.com>
Signed-off-by: default avatarVebjorn Myklebust <v.myklebust@ti.com>
Signed-off-by: default avatarStoyan Bogdanov <sbogdanov@baylibre.com>
Signed-off-by: default avatarJulien Panis <jpanis@baylibre.com>
parent 1cc9a569
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -13,3 +13,47 @@
		reg = <0x20000000 DT_SIZE_K(36)>;
	};
};

/* Main flash */
&flash0 {
	reg = <0x0 DT_SIZE_K(512)>;
	#address-cells = <1>;
	#size-cells = <1>;

	slot0_partition: partition@0 {
		label = "image-0";
		reg = <0x0 DT_SIZE_K(512)>;
	};
};

/* CCFG */
&flash1 {
	reg = <0x4e020000 DT_SIZE_K(2)>;
	ti,bldr-vtor-flash = <0>;
	ti,serial-io-cfg-index = <0>;
	ti,debug-port;
	ti,energy-trace;
	ti,flash-verify;
	ti,flash-program;
	ti,chip-erase;
	ti,ret-to-factory;
	ti,wr-er-prot-sect0-31 = <0xffffffff>;
	ti,wr-er-prot-sect32-255 = <0xffffffff>;
	ti,wr-er-prot-ccfg-sect = <0>;
	ti,wr-er-prot-fcfg-sect = <0>;
	ti,wr-er-prot-engr-sect = <0>;
	ti,chip-er-retain-sect0-31 = <0>;
	ti,chip-er-retain-sect32-255 = <0>;

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

		ti_ccfg_partition: partition@4e020000 {
			compatible = "zephyr,memory-region";
			reg = <0x4e020000 0x800>;
			zephyr,memory-region = "FLASH_CCFG";
		};
	};
};
+27 −0
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@
#include <freq.h>

/ {
	chosen {
		zephyr,flash-controller = &flash_controller;
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
@@ -30,6 +34,29 @@
		clock-frequency = <DT_FREQ_M(48)>;
		#clock-cells = <0>;
	};

	soc {
		flash_controller: flash-controller@40021000 {
			compatible = "ti,cc23x0-flash-controller";
			reg = <0x40021000 0x408>;
			#address-cells = <1>;
			#size-cells = <1>;

			/* Main flash sector */
			flash0: flash@0 {
				compatible = "soc-nv-flash";
				erase-block-size = <DT_SIZE_K(2)>;
				write-block-size = <0x10>;
			};

			/* CCFG flash sector */
			flash1: flash@4e020000 {
				compatible = "ti,cc23x0-ccfg-flash", "soc-nv-flash";
				erase-block-size = <DT_SIZE_K(2)>;
				write-block-size = <0x10>;
			};
		};
	};
};

&nvic {