Skip to content

Commit 4c0413f

Browse files
committed
Add mp13x rcc hal to support hal SD Card
1 parent 2df912a commit 4c0413f

File tree

5 files changed

+6427
-4
lines changed

5 files changed

+6427
-4
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ INCLUDES = -I. \
5050

5151
ifeq ($(SERIES),stm32mp13x)
5252
SOURCES += $(HALDIR)/Src/stm32mp13xx_hal_ddr.c
53-
53+
SOURCES += $(HALDIR)/Src/stm32mp13xx_hal_rcc.c
54+
SOURCES += $(HALDIR)/Src/stm32mp13xx_hal_rcc_ex.c # Required only for HAL_SD_InitCard to get SDMMC clock speed
5455
else
55-
SOURCES += $(SRCDIR)/drivers/mp15x/drivers/ddr/stm32mp1_ddr.cc \
56-
$(SRCDIR)/drivers/mp15x/drivers/ddr/stm32mp1_ram.cc
56+
SOURCES += $(SERIESDIR)/drivers/ddr/stm32mp1_ddr.cc \
57+
$(SERIESDIR)/drivers/ddr/stm32mp1_ram.cc
5758
endif
5859

5960

@@ -147,6 +148,8 @@ OBJDIR = $(BUILDDIR)/obj/obj
147148
all: Makefile $(ELF) $(UIMAGENAME) image
148149
@:
149150

151+
mp13x:
152+
$(MAKE) SERIES=stm32mp13x BOARD_CONF=brainboard-mp13_conf.hh
150153

151154
$(OBJDIR)/%.o: %.s
152155
@mkdir -p $(dir $@)

src/drivers/mp13x/stm32mp13xx_hal_conf.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ extern "C" {
2727

2828
/* Exported types ------------------------------------------------------------*/
2929
/* Exported constants --------------------------------------------------------*/
30+
#define DDR_TYPE_DDR3_4Gb
3031

3132
/* ########################## Module Selection ############################## */
3233
/**
3334
* @brief This is the list of modules to be used in the HAL driver
3435
*/
36+
3537
#define HAL_MODULE_ENABLED
3638
// #define HAL_ADC_MODULE_ENABLED
3739
// #define HAL_BSEC_MODULE_ENABLED
@@ -58,7 +60,7 @@ extern "C" {
5860
// #define HAL_PKA_MODULE_ENABLED
5961
// #define HAL_PWR_MODULE_ENABLED
6062
// #define HAL_XSPI_MODULE_ENABLED
61-
// #define HAL_RCC_MODULE_ENABLED
63+
#define HAL_RCC_MODULE_ENABLED
6264
// #define HAL_RNG_MODULE_ENABLED
6365
// #define HAL_RTC_MODULE_ENABLED
6466
// #define HAL_SAI_MODULE_ENABLED

third-party/STM32MP13x_HAL_Driver/Src/stm32mp1xx_hal_ddr.c renamed to third-party/STM32MP13x_HAL_Driver/Src/stm32mp13xx_hal_ddr.c

File renamed without changes.

0 commit comments

Comments
 (0)