Commit Graph

21355 Commits

Author SHA1 Message Date
0fcbc297bf dts: add PanGuBoard with stm32mp157a soc 2024-04-06 15:07:07 +08:00
f2edc5c545 dts: add stm32mp135 gateway board 2023-07-06 15:18:15 +08:00
16b09539dc ARM: dts: stm32mp13: remove the stm32mp135d-dk board
Remove the STM32MP135D-DK Discovery Board support; the board
variant without crypto support is canceled and only the crypto
version of this board STM32MP135F-DK will be available.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I258f2c39e93d6e1a52df1d944c91591e5053fff0
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/266791
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-17 10:48:26 +02:00
7f4912de92 stm32mp: stm32prog: support empty flashlayout
When the STM32CubeProgrammer sent a empty flashlayout.tsv
file, the command stm32prog correctly parse the file
but data->dev_nb = 0 and the stm32prog_devices_init
treatments can be skipped.

Also remove the trace "partition: Done" when GPT partitioning
is not done.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I9928b88f3a453611043b484158b02efe9b0c06bf
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/260198
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
2022-10-17 10:48:26 +02:00
89fae04a71 ARM: dts: add wakeup pin for stm32g0 typec controller in stm32mp135f-dk
USB Type-c controller (stm32g0) has an interrupt pin wired to a
STM32MP13 PWR wakeup pin on DK board. It can be used as a wakeup source,
to wakeup the system from standby mode, when changes are identified on the
Type-c connector.
All is configured in OPTEE, adopt it. This will avoid attempt to configure
a secure GPIO

Change-Id: Id2391286462fa394a5dd4d05b0c7666c5ea61ce1
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/260818
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:26 +02:00
fd7254c628 stm32mp: stm32prog: correctly handle OTP when SMC is not supported
As the SMC is only supported in SP-MIN for STM32MP15x, the associated
partition should be absent when the TA NVMEM is not available in OPT-TEE
in STM32MP13x.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I7f5dcb6d058c600d6f67432864c5051d29ba8d7b
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/255734
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-10-17 10:48:26 +02:00
a33d8e2f83 dm: gpio: Add GPIOF_PROTECTED flag
Declare the GPIOF_PROTECTED flag, to identify a GPIO which can't be used
because it has a protected access.
This can be used to flag a GPIO that can be accessed only from the Secure
world.

Add a test and support in the gpio sandbox.

Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Change-Id: Ic990ca6a02f9cc6f9e84bd94732ea62cfbafb301
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/252039
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
975f629eb4 stpmic1: remove the debug unit request by debugger
Depending on backup register value, U-Boot SPL maintains the debug unit
powered-on for debugging purpose; only BUCK1 is required for powering
the debug unit, so revert the setting for all the other power lanes,
except BUCK3 that has to be always on.

To be functional this patch requires a modification in the debugger
,openocd for example, to update the STM32MP15 backup register when it is
required to debug SPL after reset. After deeper analysis this behavior
will be never supported in tools so the associated code, will be never
used and the associated code can be removed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I50f3ce7fb4a4bb3169f40cf4bab0ec75936e5c03
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/254231
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
2022-10-17 10:48:25 +02:00
7687a1afaf ARM: dts: stm32mp: allignment with v5.15-stm32mp-r2
Device tree alignment with Linux kernel v5.15-stm32mp-r2

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I497736e0f7416d68d56ac559e4a821ea888ede85
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/254720
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/258865
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/266860
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/271024
2022-10-17 10:48:09 +02:00
9fdc0f208b ARM: dts: stm32: Synchronize DHCOM DTs with Linux 5.15.12
Synchronize DH DHCOM DTs with Linux commit 25960cafa06e ("Linux 5.15.12").
There is no functional change to the resulting DTs. The eeprom0 alias and
PHY reset GPIO are now reinstated in SoM u-boot dtsi.

[Backport of commit 332facce6f ("ARM: dts: stm32: Synchronize DHCOM DTs
 with Linux 5.15.12")]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I170332856869eae93703b5f10c8038046b2b47a8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/258864
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Tested-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-07-06 15:54:27 +02:00
09f8182c94 ARM: dts: stm32: Synchronize DHCOR DTs with Linux 5.15.12
Synchronize DH DHCOR DTs with Linux commit 25960cafa06e ("Linux 5.15.12").
There is no functional change to the resulting DTs. The eeprom0 alias is
now reinstated in SoM u-boot dtsi, the PHY reset GPIO is reinstated in AV96
u-boot dtsi.

[Backport of commit 6b8bd70904 ("ARM: dts: stm32: Synchronize DHCOR DTs
 with Linux 5.15.12")]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ib1e56f72b77435691c65093eff0c20609e5f719f
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/258863
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Tested-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-07-06 15:53:03 +02:00
5e7c6582cc stm32mp: fix support of STM32MP13x Rev.Y
Fix support of STM32MP13x Rev.Y for the Silicon revision REV_ID = 0x1003.

Fixes: a28201176d ("stm32mp: add support of STM32MP13x Rev.Y")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I9e5e52a3c12cbfbdb5334d0f74d253bb09f66518
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/256996
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-07-06 15:53:03 +02:00
a28201176d stm32mp: add support of STM32MP13x Rev.Y
Add support of STM32MP13x Rev.Y for the Silicon revision REV_ID = 0x1002.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I09a7e6bd976c0720cef2de21e3acd62ff8a7b846
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/251439
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-05-25 16:01:02 +02:00
c92351ea00 stm32mp: stm32prog: handle flashlayout without STM32 image header
Accept flashlayout without header in alternate 0, to simplify
the support of stm32prog command with dfu-util.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I8052625ddd2a94516d82b9b7472a34ba52fbc2fa
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/240548
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
2022-05-25 16:01:02 +02:00
f4037f75b6 stm32mp: stm32prog: handle U-Boot script in flashlayout alternate
Update the stm32prog command to allow the reception of U-Boot script in
the FlashLayout alternate during the first USB enumeration.

This patch is aligned with the last TF-A behavior: the Flashlayout
is now loaded by U-Boot; it is no more present at STM32_DDR_BASE when
the stm32prog is launched after a serial boot, on UART or on USB.

The received script must be a U-Boot legacy image, no more need to add
a stm32image header.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I08598ebf2b427ac25eaf56e05799ac8d2dc42947
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/240544
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
2022-05-25 16:01:02 +02:00
4e4356e9c5 stm32mp: stm32prog: handle interruption during the first enumeration
When a interruption is received during the first USB enumeration
used to received the FlashLayout, with handle ctrl-c, the second
enumeration is not needed and the result for stm32prog_usb_loop
is false (reset is not needed).

This patch avoid the need of a second ctrl to interrupt the command
stm32prog.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ie76b6efe731c9d721b794d9ad6b394b38492a4df
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/240543
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
2022-05-25 16:01:02 +02:00
ef28f3f0a6 ARM: stm32mp: skip ft_system_setup when the soc node is absent
The function ft_system_setup should don't return an error when the
/soc node is absent in the provided device tree but just skip the
updates.

This patch solves an issue when the U-Boot pytests is executed on board.

Signed-off-by: Sebastien Pasdeloup <sebastien.pasdeloup-ext@st.com>
Change-Id: Ic7fcf7558ba1c08e031b54acd7b9f3544addb1d8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/234562
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Tested-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-25 16:01:02 +02:00
699d8964ba dts: stm32mp1: use a specific GPT partition for environment
As the fip partition is duplicated in eMCC/SDCard for the firmware
update support in TF-A: "fip-a" and "fip-b",  the U-Boot use a dedicated
partition named "u-boot-env" to avoid issue when the FIP is updated by
the update agent.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I1fa341f578929363fb0f0194600009f6c6c9e8a8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/238557
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-25 16:01:02 +02:00
2f74425e8b stm32mp: stm32prog: add support of UUID for FIP partition
Add support of UUID for FIP parttion, required by Firmware update
support in TF-A:
- UUID TYPE for FIP partition: 19d5df83-11b0-457b-be2c-7559c13142a5
- "fip-a" partition UUID: 4fd84c93-54ef-463f-a7ef-ae25ff887087
- "fip-b" partition UUID: 09c54952-d5bf-45af-acee-335303766fb3

This check is done with a new partition type "FIP" associated
at the FIP UUID.

The A/B partition UUID is detected by the partition name:
"fip-a", "fip-b".

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I94e74b521fd55dcc68ab8d000cb93ef48fc12f14
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/238555
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-25 16:01:02 +02:00
d8c511144a ARM: dts: stm32mp15: remove addon for st,stm32-sdmmc2 compatible
Remove the U-Boot specific add-on for SDMMCv2 IP used in the STM32MP15
as this compatible "st,stm32-sdmmc2" is present in kernel device
tree v5.15-stm32mp-r1.

This patch reduces the device tree difference with kernel device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I1c465a221cb3da2c7b54cbf8467a0f97ba6f397e
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/195269
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-25 16:01:01 +02:00
b1575c9704 ARM: dts: stm32: Remove u-boot,force-b-session-valid property for stm32mp157a-dk1-u-boot.dtsi
The property u-boot,force-b-session-valid becomes useless, remove it.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: I1cc0013b51bd9a0ace665ebc1825edc654c7ca7a
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/232356
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-25 16:01:01 +02:00
796429d01e ARM: dts: stm32: Remove u-boot,force-b-session-valid property for stm32mp135f-dk-u-boot.dtsi
The property u-boot,force-b-session-valid becomes useless, remove it.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: Ic21ce52024e4fe98f90332ebbd635fd080d81d6e
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/232355
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-25 16:01:01 +02:00
04f2753854 arm: stm32mp: adapt the command stm32key for STM32MP13x
Change the mask of OTP0 used to close the device on STM32MP
- STM32MP15x: bit 6 of OPT0
- STM32MP13x: 0b111111 = 0x3F for OTP_SECURED closed device

And support the 2 keys for STM32MP13x
- PKHTH : Hash of the 8 ECC Public Keys Hashes Table
          (ECDSA is the authentication algorithm)
- EDMK : Encryption/Decryption Master Key

Change-Id: I1431827b62d294343069ff0aa7e59abaacb8bdd5
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/230109
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/242599
2022-05-25 16:01:01 +02:00
0a1a77dd91 arm: stm32mp: support several key in command stm32key
Update the command stm32key to support several keys selected by
key name and managed by the new sub-command:

stm32key list
stm32key select [<key>]
stm32key read -a

This patch don't change the STM32MP15 behavior, only PKH is supported,
but it is a preliminary patch for STM32MP13 support.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ic9d9cb1cf9d05b9e305f158b26076cf908d7c0b8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/230108
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-25 16:01:01 +02:00
51932b5bf2 arm: stm32mp: introduced read_close_status function in stm32key command
Split the read_hash_otp function and introduce the helper function
read_close_status to read the close status in OTP separately of the PKH.

This patch is a preliminary step for STM32MP13 support.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ibbcbcbc3b4bf97f9761600ec5ce36f8b40c3c161
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/230107
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-25 16:01:01 +02:00
530e7bfb2b stm32mp: simplify the package parsing code
Simplify the package parsing code for STM32MP15X as package can be
affected with get_cpu_package() result.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I4d177d06061a5973e5cd25d2b61e74fdb2861a2a
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/225097
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-25 16:01:01 +02:00
0b43c21748 arm: dts: stm32: update panel node of DK for U-Boot
Update panel node of Disco board due to specific part of driver simple-panel.

Change-Id: I3ac5e0e66c98426c37868fd2298f58088560cf8c
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/198382
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-25 16:01:01 +02:00
71a2139af6 arm: dts: stm32mp: add stm32mp13 device tree for U-Boot
Compile the device tree of STM32MP13x boards and add the needed
U-Boot add-on.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I8f3aebcc95b60f45691cc7aa918ef5efece05887
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/168740
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/212229
2022-05-25 16:01:01 +02:00
1009730a30 stm32mp: bsec: add support of STM32MP13x
Add support for "st,stm32mp13-bsec" for STM32MP13x

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I5265730f7438c864c93089754fad0f2217da3e51
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/223330
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-05-25 16:01:00 +02:00
8b92965b88 stm32mp: fdt: update etpzc for STM32MP13x
Add support of STM32MP13x the ETPZC part of fdt.c

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I3679840747612f44044942f225f344af9a26dcfd
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/169335
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
2022-05-25 16:01:00 +02:00
0b2a568156 stm32mp: fdt: update etpzc for STM32MP15x
Introduce STM32MP15 function and defines to prepare
STM32MP13 introduction.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: Ie4f29021d76802af1c22e1df1a6a55ae6a5f55d9
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/169333
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/169334
2022-05-25 16:01:00 +02:00
b5bbc02ae5 arm: dts: stm32mp: add support of STM32MP13x
Add kernel device tree for stm32mp13 Soc and
STMicroelectronics boards

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/236375
Change-Id: Ibe5031074c3fdf88bc8aac74a772c03e55962de5
2022-05-25 16:01:00 +02:00
600ae9915d arm: stm32mp: add support of STM32MP13x
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I48a2a2211b9cf24a69030c1499ddeb0a507025d2
2022-05-19 09:21:15 +02:00
4743b6c59d arm: stm32mp: add CONFIG_STM32MP15_PWR
Add config CONFIG_STM32MP15_PWR to handle the
access on regulators managed by the PWR driver defined in
pwr_regulator.c

This driver is only used in U-Boot by STM32MP15x family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ifb968953516a3d73a38718892a7c58726bf641ae
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/196369
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-05-19 09:21:15 +02:00
d6a54e7dff arm: stm32mp: Add sub config Kconfig.15x
Add sub Kconfig for each SOC in the STM32 CPU family.

It is a preliminary step to introduce a new SOC in the STM32MP family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I90e6955a55b1eea31e8a17d216eb9bdd76332f5d

# Conflicts:
#	arch/arm/mach-stm32mp/Kconfig
2022-05-19 09:21:15 +02:00
3930ba7caf arm: stm32mp: add choice for STM32MP SOC family
Add mandatory choice for SOC support in ARCH_STM32MP.

This patch is a preliminary step for new SOC introduction
in STM32MP family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Id34b18d3ce5c7d33defb18c3c6e545f22190372d
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/189947
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-19 09:21:15 +02:00
789f950180 stm32mp: correctly handle Silicon revision
Handle correctly the silicon revision = REV_ID[15:0] of Device Version
and the associated device marking, A to Z on STMicroelectronics MPU.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I46d09f298319fd632eaee4cd8888d751b908f0e6
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/225091
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-19 09:21:15 +02:00
5ce98f7445 arm: stm32mp: move code for STM32MP15x
Move code and defines only needed for CONFIG_STM32MP15x in stm32mp15x.c
when low level init without TFABOOT is supported.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: Ia90133663740dcf00ee2799a01f92f2acee683da
2022-05-19 09:21:15 +02:00
a0874404b3 configs: stm32mp1: move SUPPORT_SPL in STM32MP15x
The SPL is only supported by STM32MP15x not by all the
SOC with STM32MP arch.
Only TFABOOT is supported in next products.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: Iea6a315c629bbbb6cbc18889a2207a465acb9bcc
2022-05-19 09:21:15 +02:00
c2c185aa12 dts: stm32mp1: update DDR node
Remove unnecessary nodes for TFABOOT and move the mandatory part
in SOC dtsi. This patch allow to include stm32mp15-ddr.dtsi only if
it is needed, when TFABOOT is not defined

Change-Id: I1dd8baddc1f804ccab03ffa99bb5b33c924ab07a
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2022-05-19 09:21:15 +02:00
e0408bf8e7 stm32mp: stm32prog: add support of STM32IMAGE version 2
Add support of new header for the STM32IMAGE version V2
in command stm32prog command for sTM32MP13x family.

Change-Id: I23385079e2fd8a2cab3b25e5883b94a25898736d
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/198796
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-05-19 09:21:15 +02:00
48e9be99dc regulator: scmi: scmi regulator supports supply regulator
Add property regulator-supply for SCMI regulator nodes to define
a supply needed by the related SCMI regulator. On regulator enable, the
supply is enabled but on regulator disable, the supply is left as is
since U-Boot regulator class does not make any reference counting on
enable/disable requests.

Add sandbox test for scmi voltage regulators supply regulator
dependencies.

Change-Id: Ica4baa246dd49c3a0d9fa0951ff19dc2b1894f5a
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/194456
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Tested-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-19 09:21:15 +02:00
887b4b40f1 regulator: scmi regulators can bind with scmi voltage domain names
Allow DT to define the voltage domain name (new string property
voltd-name) instead of the voltage domain ID from property reg.
This change makes SCMI regulators binding more flexible between
SCMI server and U-Boot SCMI agent.

Change-Id: I8e1cbd0745bf61d00238eb1d13ff73ff99920b38
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/194453
2022-05-19 09:21:15 +02:00
75ea9e7593 stm32mp: stm32prog: add TEE support in stm32prog command
When OP-TEE is used, the SMC for BSEC management are not
available and the PTA provisioning for OTP must be used.

U-Boot opens the session to this PTA and use it for OTP
access.

Change-Id: Ic62ab0b22b898fc5dfae530e3560849cd33d5902
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/215405
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-19 09:21:15 +02:00
d57c9df2ec stm32mp: add TEE support in bsec driver
When OP-TEE is used, the SMC for BSEC management are not available and
the PTA BSEC must be used.

The BSEC driver try to open the session to the PTA BSEC at probe,
and when it is detected use it for OTP read or write access
fuse or shadow.

This patch also adapts the command stm32key to handle the BSEC_LOCK_PERM
lock value instead of 1.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I1ce5f38d7d31c1cf1429ca1b29ef202a1f5b78c6
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/215404
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/224135
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/220091
2022-05-19 09:21:15 +02:00
1745850e87 dts: reduce device tree for trusted boot
Remove the SPL only nodes for trusted boot chain with TFABOOT enable.
Prepare the removal of basic defconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I784b62187091557c8b05161b70b578824e549195
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/152522
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
2022-05-19 09:21:15 +02:00
897d27ce00 dts: stm32mp1: alignment with v5.15-stm32mp-r1
Device tree alignment with Linux kernel v5.15-stm32mp-r1

Change-Id: I3eb16a41c799a90081f8d97122fdf6f0c9f45295
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/192682
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/194405
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/194422
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/203329
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/234362
2022-05-19 09:21:15 +02:00
5f6ada1f1e stm32mp1: pwr: use SMC to access secure resources
For trusted boot, STM32MP1 need  to use SMC to access PWR secure
resources.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I65c85d36be51d381c6b95a795f4d589986c01cb3
2022-05-19 09:21:15 +02:00
5df0e43b06 stm32mp1: Add STMicroelectronics proprietary SMC
Add proprietary SMC to access to secure resource provided
or protected by STMicroelectronics TF-A.

Change-Id: I9f54d8f1e560b3a7077f515d0f0f28bd3c346e6d
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/173696
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-19 09:21:15 +02:00
03ecc33869 arm: dts: stm32mp15: alignment with v5.17
Device tree alignment with Linux kernel v5.17-rc1
- ARM: dts: stm32: add pull-up to USART3 and UART7 RX pins
  on STM32MP15 DKx boards
- ARM: dts: stm32: clean uart4_idle_pins_a node for stm32mp15
- ARM: dts: stm32: tune the HS USB PHYs on stm32mp15xx-dkx
- ARM: dts: stm32: tune the HS USB PHYs on stm32mp157c-ev1
- ARM: dts: stm32: fix stusb1600 pinctrl used on stm32mp157c-dk

[Backport of commit 182738fe2f ("arm: dts: stm32mp15: alignment
 with v5.17")]

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: I31f8fb35304486855af3da479195f839c83f195d
2022-05-19 09:21:15 +02:00