feat(stm32mp1): remove unsupported features on STM32MP13
* GPIO: On STM32MP13, there are no banks GPIOJ, GPIOK and GPIOZ.
* STM32MP13 is a single Cortex-A7 CPU: remove reset from MPU1
and reset from MCU traces
* There is no MCU on STM32MP13. Put MCU security management
under STM32MP15 flag.
* The authentication feature is not supported yet on STM32MP13,
put the code under SPM32MP15 flag.
* On STM32MP13, the monotonic counter is managed in ROM code, keep
the monotonic counter update just for STM32MP15.
* SYSCFG: put registers not present on STM32MP13 under STM32MP15
flag, as the code that manages them.
* PMIC: use ldo3 during DDR configuration only for STM32MP15
* Reset UART pins on USB boot is no more required.
Change-Id: Iceba59484a9bb02828fe7e99f3ecafe69c837bc7
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
diff --git a/drivers/st/pmic/stm32mp_pmic.c b/drivers/st/pmic/stm32mp_pmic.c
index 7030cf5..a1031fd 100644
--- a/drivers/st/pmic/stm32mp_pmic.c
+++ b/drivers/st/pmic/stm32mp_pmic.c
@@ -219,17 +219,20 @@
{
int status;
uint16_t buck3_min_mv;
- struct rdev *buck2, *buck3, *ldo3, *vref;
+ struct rdev *buck2, *buck3, *vref;
+ struct rdev *ldo3 __unused;
buck2 = regulator_get_by_name("buck2");
if (buck2 == NULL) {
return -ENOENT;
}
+#if STM32MP15
ldo3 = regulator_get_by_name("ldo3");
if (ldo3 == NULL) {
return -ENOENT;
}
+#endif
vref = regulator_get_by_name("vref_ddr");
if (vref == NULL) {
@@ -238,10 +241,12 @@
switch (ddr_type) {
case STM32MP_DDR3:
+#if STM32MP15
status = regulator_set_flag(ldo3, REGUL_SINK_SOURCE);
if (status != 0) {
return status;
}
+#endif
status = regulator_set_min_voltage(buck2);
if (status != 0) {
@@ -258,10 +263,12 @@
return status;
}
+#if STM32MP15
status = regulator_enable(ldo3);
if (status != 0) {
return status;
}
+#endif
break;
case STM32MP_LPDDR2:
@@ -278,6 +285,7 @@
regulator_get_range(buck3, &buck3_min_mv, NULL);
+#if STM32MP15
if (buck3_min_mv != 1800) {
status = regulator_set_min_voltage(ldo3);
if (status != 0) {
@@ -289,16 +297,19 @@
return status;
}
}
+#endif
status = regulator_set_min_voltage(buck2);
if (status != 0) {
return status;
}
+#if STM32MP15
status = regulator_enable(ldo3);
if (status != 0) {
return status;
}
+#endif
status = regulator_enable(buck2);
if (status != 0) {