feat(st-ddr): add STM32MP2 driver

Add driver to support DDR on STM32MP2 platform. It drives the DDR PHY
and its firmware, as well as the DDR controller.

Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: I93de2db1b9378d5654e76b3bf6f3407d80bc4ca5
This commit is contained in:
Nicolas Le Bayon 2021-07-01 14:44:22 +02:00 committed by Maxime Méré
parent d596023bff
commit 79629b1a79
41 changed files with 18361 additions and 31 deletions

View file

@ -0,0 +1,37 @@
/*
* Copyright (C) 2021-2024, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef DDRPHY_PHYINIT_H
#define DDRPHY_PHYINIT_H
#include <stdbool.h>
#include <ddrphy_phyinit_usercustom.h>
enum message_block_field {
MB_FIELD_PSTATE,
MB_FIELD_PLLBYPASSEN,
MB_FIELD_DRAMFREQ,
MB_FIELD_DFIFREQRATIO,
MB_FIELD_BPZNRESVAL,
MB_FIELD_PHYODTIMPEDANCE,
MB_FIELD_PHYDRVIMPEDANCE,
MB_FIELD_DRAMTYPE,
MB_FIELD_DISABLEDDBYTE,
MB_FIELD_ENABLEDDQS,
MB_FIELD_PHYCFG,
MB_FIELD_X16PRESENT,
MB_FIELD_ENABLEDDQSCHA,
MB_FIELD_CSPRESENTCHA,
MB_FIELD_ENABLEDDQSCHB,
MB_FIELD_CSPRESENTCHB,
};
/* Function definitions */
int ddrphy_phyinit_softsetmb(struct pmu_smb_ddr_1d *mb_ddr_1d, enum message_block_field field,
uint32_t value);
void ddrphy_phyinit_initstruct(struct stm32mp_ddr_config *config, struct pmu_smb_ddr_1d *mb_ddr_1d);
#endif /* DDRPHY_PHYINIT_H */