dts: arm: stm32: Add ccm address and size configurations
Configure ccm size and address via dts. According to the DT specification, the unit-address of a node must match the first address specified in the reg property of the node. Signed-off-by: Erwin Rol <erwin@erwinrol.com>
This commit is contained in:
parent
1dc41d19b3
commit
eaf74f71ed
|
@ -32,9 +32,11 @@
|
|||
#elif defined(CONFIG_SOC_STM32F303XC)
|
||||
#define DT_FLASH_SIZE __SIZE_K(256)
|
||||
#define DT_SRAM_SIZE __SIZE_K(40)
|
||||
#define DT_CCM_SIZE __SIZE_K(8)
|
||||
#elif defined(CONFIG_SOC_STM32F334X8)
|
||||
#define DT_FLASH_SIZE __SIZE_K(64)
|
||||
#define DT_SRAM_SIZE __SIZE_K(12)
|
||||
#define DT_CCM_SIZE __SIZE_K(4)
|
||||
#elif defined(CONFIG_SOC_STM32F373XC)
|
||||
#define DT_FLASH_SIZE __SIZE_K(256)
|
||||
#define DT_SRAM_SIZE __SIZE_K(32)
|
||||
|
@ -44,9 +46,11 @@
|
|||
#elif defined(CONFIG_SOC_STM32F405XG)
|
||||
#define DT_FLASH_SIZE __SIZE_K(1024)
|
||||
#define DT_SRAM_SIZE __SIZE_K(192)
|
||||
#define DT_CCM_SIZE __SIZE_K(64)
|
||||
#elif defined(CONFIG_SOC_STM32F407XG)
|
||||
#define DT_FLASH_SIZE __SIZE_K(1024)
|
||||
#define DT_SRAM_SIZE __SIZE_K(192)
|
||||
#define DT_CCM_SIZE __SIZE_K(64)
|
||||
#elif defined(CONFIG_SOC_STM32F411XE)
|
||||
#define DT_FLASH_SIZE __SIZE_K(512)
|
||||
#define DT_SRAM_SIZE __SIZE_K(128)
|
||||
|
@ -59,15 +63,19 @@
|
|||
#elif defined(CONFIG_SOC_STM32F417XE)
|
||||
#define DT_FLASH_SIZE __SIZE_K(512)
|
||||
#define DT_SRAM_SIZE __SIZE_K(192)
|
||||
#define DT_CCM_SIZE __SIZE_K(64)
|
||||
#elif defined(CONFIG_SOC_STM32F417XG)
|
||||
#define DT_FLASH_SIZE __SIZE_K(1024)
|
||||
#define DT_SRAM_SIZE __SIZE_K(192)
|
||||
#define DT_CCM_SIZE __SIZE_K(64)
|
||||
#elif defined(CONFIG_SOC_STM32F429XI)
|
||||
#define DT_FLASH_SIZE __SIZE_K(2048)
|
||||
#define DT_SRAM_SIZE __SIZE_K(256)
|
||||
#define DT_CCM_SIZE __SIZE_K(64)
|
||||
#elif defined(CONFIG_SOC_STM32F469XI)
|
||||
#define DT_FLASH_SIZE __SIZE_K(2048)
|
||||
#define DT_SRAM_SIZE __SIZE_K(384)
|
||||
#define DT_CCM_SIZE __SIZE_K(64)
|
||||
#elif defined(CONFIG_SOC_STM32L475XG)
|
||||
#define DT_FLASH_SIZE __SIZE_K(1024)
|
||||
#define DT_SRAM_SIZE __SIZE_K(96)
|
||||
|
@ -81,7 +89,7 @@
|
|||
#define DT_FLASH_SIZE __SIZE_K(256)
|
||||
#define DT_SRAM_SIZE __SIZE_K(64)
|
||||
#else
|
||||
#error "Flash and RAM sizes not defined for this chip"
|
||||
#error "Flash, RAM, and CCM sizes not defined for this chip"
|
||||
#endif
|
||||
|
||||
#endif /* __DT_BINDING_ST_MEM_H */
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
#include <st/stm32f3.dtsi>
|
||||
|
||||
/ {
|
||||
ccm0: memory@10000000 {
|
||||
compatible = "st,stm32-ccm";
|
||||
reg = <0x10000000 DT_CCM_SIZE>;
|
||||
};
|
||||
|
||||
soc {
|
||||
i2c2: i2c@40005800 {
|
||||
compatible = "st,stm32-i2c-v2";
|
||||
|
|
|
@ -8,6 +8,11 @@
|
|||
#include <st/stm32f411.dtsi>
|
||||
|
||||
/ {
|
||||
ccm0: memory@10000000 {
|
||||
compatible = "st,stm32-ccm";
|
||||
reg = <0x10000000 DT_CCM_SIZE>;
|
||||
};
|
||||
|
||||
soc {
|
||||
pinctrl: pin-controller {
|
||||
reg = <0x40020000 0x2800>;
|
||||
|
|
26
dts/bindings/arm/st,stm32-ccm.yaml
Normal file
26
dts/bindings/arm/st,stm32-ccm.yaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
title: STM32 CCM
|
||||
id: st,stm32-ccm
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This binding gives a base representation of the STM32 CCM (Core Coupled Memory)
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
type: string
|
||||
category: required
|
||||
constraint: "st,stm32-ccm"
|
||||
|
||||
reg:
|
||||
type: int
|
||||
description: mmio register space
|
||||
generation: define
|
||||
category: required
|
||||
|
||||
base_label: CCM
|
||||
use-property-label: yes
|
||||
|
||||
...
|
||||
|
Loading…
Reference in a new issue