Commit Graph

75341 Commits

Author SHA1 Message Date
e84f67ebb4 Fix: move watchdog feed more early 2025-03-05 20:38:10 +08:00
6067b3247b board:stm32mp1 feed gpio watchdog 2024-12-10 21:28:18 +08:00
22a8a3cdb6 config: add string to delay autoboot 2024-12-08 22:17:58 +08:00
d8d89f4de8 board: add peripheral gpio control 2024-04-06 15:07:26 +08:00
0fcbc297bf dts: add PanGuBoard with stm32mp157a soc 2024-04-06 15:07:07 +08:00
eca77a9766 board: setup watchdog wdi and enable gpio 2023-07-06 15:18:33 +08:00
f2edc5c545 dts: add stm32mp135 gateway board 2023-07-06 15:18:15 +08:00
3984366f69 Prepare v2021.10-stm32mp-r2
Update version in Makefile to prepare the label v2021.10-stm32mp-r2
for OpenSTLinux V4.1

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I235b2792161ab02f0eee2af19506eed828a8dc6e
v2021.10-stm32mp-r2
2022-10-17 10:48:26 +02:00
a46e065f82 cmd: pxe: support INITRD and FDT selection with FIT
Since the commit d5ba6188df ("cmd: pxe_utils: Check fdtcontroladdr
in label_boot") the FDT or the FDTDIR label is required in extlinux.conf
and the fallback done by bootm command for device tree present is no more
performed when FIT is used for kernel.

When the labels FDT or FDTDIR are absent or if the device tree file is
absent, the PXE command in U-Boot uses the default U-Boot device tree
selected by fdtcontroladdr = gd->fdt_blob, it is the "Scenario 3".

With this patch the bootm FIP fallback is no more possible with
the extlinux.conf when only "kernel" label is present and is a FIP:

  kernel <path>#<conf>[#<extra-conf[#...]]

As the U-Boot FDT is selected in the third bootm argument the device
tree from FIP is not used as it was done previously.

This patch adds a new field kernel_label to save the full kernel label.
The FDT bootm parameters use the kernel address (to avoid to load a
second time the same FIP) and the config when this full label is reused
for "fdt" or "initrd" label.

This FIP support in extlinux.conf is restored when the "FDT" label
can be found and select the same FIP (identical file and configuration):

  kernel <path>#<conf>[#<extra-conf[#...]]
  fdt <path>#<conf>[#<extra-conf[#...]]

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I4662774cdd525de1992f84f0ea97255e2e43d8c2
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/268490
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-17 10:48:26 +02:00
20db66cc65 cmd: pxe: reorder kernel treatment in label_boot
Reorder kernel treatment in label_boot at the beginning of the function.

This patch doesn't change the pxe command behavior, it is only a
preliminary step for next patch to build bootm_argv[1] before parsing
initrd and fdt to build the next bootm arguments.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: If04f25e393f3af8cd75af331ca2f432a7a1b88e8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/268489
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-17 10:48:26 +02: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
d8af9dc4ae i2c: stm32f7: fix clearing the control register
Bits should be set to 0, not 1.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I067f23215acfa4d468e86806d959d68654289473
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/265893
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Tested-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:26 +02:00
acb3eaf035 i2c: stm32: fix usage of rise/fall device tree properties
These two device tree properties were not being applied.

Change-Id: Iab376954a5af8f9a6f9b81f81c45c2c3fe6aa3ab
Fixes: 0c63ec6bbf ("i2c: stm32f7: move driver data of each instance in a privdata")
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/265849
Tested-by: Alain VOLMAT <alain.volmat@foss.st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@foss.st.com>
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:26 +02:00
648aff43b8 i2c: stm32: do not set the STOP condition on error
Current function stm32_i2c_message_xfer is sending a STOP
whatever the result of the transaction is.  This can cause issues
such as making the bus busy since the controller itself is already
sending automatically a STOP when a NACK is generated.

Thanks to Jorge Ramirez-Ortiz for diagnosing and proposing a first
fix for this. [1]

[1] https://lore.kernel.org/u-boot/20220815145211.31342-2-jorge@foundries.io/

Change-Id: I157b95a3b8e411e8591d76e148930cf00f682fc4
Reported-by: Jorge Ramirez-Ortiz, Foundries <jorge@foundries.io>
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/264955
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:26 +02:00
8fffa9e5cc i2c: stm32: remove unused stop parameter in start & reload handling
Functions stm32_i2c_message_start and stm32_i2c_handle_reload
both get a stop boolean indicating if the transfer should end with
a STOP or not.  However no specific handling is needed in those
functions hence remove the parameter.

Change-Id: I681def7666baa987116ee7391cfb7158ed768cb6
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/264954
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.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
5487d29128 i2c: stm32: fix comment and remove unused AUTOEND bit
Comment within stm32_i2c_message_start is misleading, indicating
that AUTOEND bit is setted while it is actually cleared.
Moreover, the bit is actually never setted so there is no need
to clear it hence get rid of this bit clear and the bit macro
as well.

Change-Id: Icbf734d98f127a9e2a52d0f3d138cc9e291cd579
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/264953
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.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
e2e80a4f56 sandbox: remove video test
The sandbox in U-Boot v2021.10 don't support the video test
introduced in commit 8657ad43f3 ("sandbox: video: Add BMP
tests for 32bpp and 8bpp modes"), merged in dm-pull-13jan22
v2022.04-rc1.

Revert the sandbox and test part of previous patch.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ia98e6d864635c901b8dda5f4d359a327082aec81
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/267408
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-17 10:48:26 +02:00
664b387431 video: theadorable: Use RGB565 for BMP blitting
At present this uses RGB555 format for blitting to a display. Sandbox uses
565 and that seems to be more normal for BMP as well. Update the code
accordingly and add a test.

Note that this likely breaks the theadorable board so we may need to
discuss supporting both formats.

[Backport of commit 4ea1548210 ("video: theadorable: Use RGB565 for
 BMP blitting")]

Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ifae9f08166f4c7c3f8a1aa41f6fc0c898c3be5b5
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/265323
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.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
834351a6e7 cmd: pxe_utils: Check fdtcontroladdr in label_boot
If using OF_CONTROL, fdtcontroladdr is set to the fdt used to configure
U-Boot. When using PXE, if no fdt is defined in the menu file, and
there is no fdt at fdt_addr, add fall back on fdtcontroladdr too.

We are developing board support for the Armv8r64 FVP using
config_distro_bootcmd. We are also using OF_BOARD and would like the
PXE boot option to default to the fdt provided by board_fdt_blob_setup.

[Backport of commit d5ba6188df ("cmd: pxe_utils: Check fdtcontroladdr
 in label_boot")]

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
Change-Id: Iad7341a89d9a31a2d58ee831b3808857a763cab5
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/261342
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.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
873d895ce3 board: st: stm32mp1: use of correct compatible string to add partitions
Current compatible string used to update SPI NAND and SPI NOR devices
can lead to a wrong partitions update (for example, SPI NAND partitions
added to SPI NOR node in the device tree). To avoid this wrong behavior,
use jedec,spi-nor compatible string for SPI NOR devices and spi-nand
compatible string for SPI NAND devices.

Change-Id: Iae28ab1a0be932b26f9cf8b17d870508efa88b79
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/260967
Reviewed-by: Christophe KERELLO <christophe.kerello@st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Tested-by: Christophe KERELLO <christophe.kerello@st.com>
2022-10-17 10:48:26 +02:00
44ae5a1cef clk: stm32-core: introduce multi gate management
Majority of IPs have a peripheral clock and a Kernel clocks.
These clocks are gated with same bit register. Then we have to manage
a counter at gate level.

This patch introduce a new clock "clk_stm32_gate", it will replace
"clk_stm32_setclr_gate".

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Change-Id: I6bb988cb0f7eab5cc8374bc3fe65b37cbcd9a5e0
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/256638
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:26 +02:00
5006f25ce4 clk: stm32-core: fix divider in stm32 composite clock
Divider ops is missing in composite clock.

Fixes: 58291d94e3 ("clk: stm32-core: introduce stm32-clk-core")
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Change-Id: I9f939e363d7d9e4024f5ae189ab6fcb6e8e0bde5
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/256637
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:26 +02:00
55dc4842a6 clk: stm32-core: rename parameter name in clk_stm32_register_composite()
Rename "pcfg" parameter into "mcfg" ('m' for mux).

Fixes: 58291d94e3 ("clk: stm32-core: introduce stm32-clk-core")
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Change-Id: Ia5effceb54b5b8f776d106f01cd89e6c323d19e4
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/256636
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.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
20e17e74b6 pinctrl: pinctrl_stm32: Populate uc_priv->name[] with pinmux node's name
Populate uc_priv->name[] with pinmux node's name in order to indicate
the pinmuxing's label in case GPIO is configured in alternate.

For example, for STM32 SoC's based platform, "gpio status" command
output :

  before
    Bank GPIOZ:
      GPIOZ0: unused : 0 [ ]
      GPIOZ1: unused : 0 [ ]
      GPIOZ2: unused : 0 [ ]
      GPIOZ3: unused : 0 [ ]
      GPIOZ4: func
      GPIOZ5: func
      GPIOZ6: unused : 0 [ ]
      GPIOZ7: unused : 0 [ ]
      GPIOZ8: unknown
      GPIOZ9: unknown
      GPIOZ10: unknown
      GPIOZ11: unknown
      GPIOZ12: unknown
      GPIOZ13: unknown
      GPIOZ14: unknown
      GPIOZ15: unknown

  After
    Bank GPIOZ:
      GPIOZ0: unused : 0 [ ]
      GPIOZ1: unused : 0 [ ]
      GPIOZ2: unused : 0 [ ]
      GPIOZ3: unused : 0 [ ]
      GPIOZ4: func i2c4-0
      GPIOZ5: func i2c4-0
      GPIOZ6: unused : 0 [ ]
      GPIOZ7: unused : 0 [ ]
      GPIOZ8: unknown
      GPIOZ9: unknown
      GPIOZ10: unknown
      GPIOZ11: unknown
      GPIOZ12: unknown
      GPIOZ13: unknown
      GPIOZ14: unknown
      GPIOZ15: unknown

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: Ib7563ed0d20cece9516e5c5523103990852b4d0f
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/255980
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Fabien DESSENNE <fabien.dessenne@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
f5798061ec gpio: Fix pin's status display for pin with GPIOF_UNUSED function
Even pin's with GPIOF_UNUSED function can have label.
The criteria to add or not a space character is linked to label not to
the used/unused status.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: Ic9e92420a339490be694d3eee4daaa348344b5d0
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/255979
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Fabien DESSENNE <fabien.dessenne@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
60371e490a gpio: Allow to print pin's label even for pin with GPIOF_FUNC function
Currently, if pin's function is GPIOF_FUNC, only "func" if displayed
without any other information. It would be interesting, if information is
available, to indicate which pin's label is used.

For example, for STM32 SoC's based platform, "gpio status" command
output :

   before
    Bank GPIOZ:
      GPIOZ0: unused : 0 [ ]
      GPIOZ1: unused : 0 [ ]
      GPIOZ2: unused : 0 [ ]
      GPIOZ3: unused : 0 [ ]
      GPIOZ4: func
      GPIOZ5: func
      GPIOZ6: unused : 0 [ ]
      GPIOZ7: unused : 0 [ ]
      GPIOZ8: unknown
      GPIOZ9: unknown
      GPIOZ10: unknown
      GPIOZ11: unknown
      GPIOZ12: unknown
      GPIOZ13: unknown
      GPIOZ14: unknown
      GPIOZ15: unknown

   After
    Bank GPIOZ:
      GPIOZ0: unused : 0 [ ]
      GPIOZ1: unused : 0 [ ]
      GPIOZ2: unused : 0 [ ]
      GPIOZ3: unused : 0 [ ]
      GPIOZ4: func i2c4-0
      GPIOZ5: func i2c4-0
      GPIOZ6: unused : 0 [ ]
      GPIOZ7: unused : 0 [ ]
      GPIOZ8: unknown
      GPIOZ9: unknown
      GPIOZ10: unknown
      GPIOZ11: unknown
      GPIOZ12: unknown
      GPIOZ13: unknown
      GPIOZ14: unknown
      GPIOZ15: unknown

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: Ia935ed2f340b6df1c439389a53e2c05489561983
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/255978
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Fabien DESSENNE <fabien.dessenne@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
b941fcea8a gpio: stm32_gpio: flag secured pin as protected
When a GPIO is secure-protected, it can't be accessed from U-Boot.
In that case, set its 'function' to GPIOF_PROTECTED.
This makes the "gpio status" command returning the "protected" status.

Example with GPIOA6 pin secure-protected

> gpio status -a
Bank GPIOA:
GPIOA0: unused: 0 [ ]
GPIOA1: func
...
GPIOA6: protected
...

Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Change-Id: If3297d920741a6a1b915503650de1cfb69c726f9
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/252040
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:25 +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
973461aa8d mmc: stm32_sdmmc2: protect against unsupported modes
The UHS modes for SD, HS200 and HS400 modes for eMMC are not supported
by the stm32_sdmmc2 driver.
Make it clear by removing the corresponding caps after parsing the DT.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I53c4e33906fa94a5cf3fafca2ce9e61e0ab65d0a
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/257471
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Christophe KERELLO <christophe.kerello@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
e2cf7fd677 mmc: stm32_sdmmc2: add dual data rate support
To support dual data rate with STM32 sdmmc2 driver, the dedicated bit
(DDR - BIT(18)) needs to be set in the CLKRC register. Clock bypass
(no divider) is not allowed in this case.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I7f7e6786c6ed43715d1147e5def412c9422910f4
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/257470
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Christophe KERELLO <christophe.kerello@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
8a46bc3005 mmc: stm32_sdmmc2: make reset property optional
Although not recommended, the reset property could be made optional.
This way the driver will probe even if no reset property is provided
in an sdmmc node in DT. This reset is already optional in Linux.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I39b69e8dc7b43b8e265e77388fb53f7c1fa2a007
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/250055
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Christophe KERELLO <christophe.kerello@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
ab40d97399 usb: host: ehci-generic: Make usage of clock/reset bulk() API
Make usage of clock and reset bulk API in order to simplify the code

[Backport of ba96176ab7 ("usb: host: ehci-generic: Make usage of
 clock/reset bulk() API")]

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: Ia5711b14a17cf1d042bdab9d3f28437d5c53272c
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/246747
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-10-17 10:48:25 +02:00
7a250cc251 clk: scmi: fix invalid clock name references
Fixes clock name references in scmi_clk driver. SCMI clock names are
retrieved from the SCMI firmware by invoking SCMI commands using the
stack for SCMI response message hence clocks names located in the
stack must be duplicated before being registered in the clock framework.

Change-Id: I4795469625d44c319ed9ba5673a8cdf560b7de6b
Fixes: 7c33f78983 ("clk: scmi: register scmi clocks with CCF")
Reported-by: scan-admin@coverity.com
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/249343
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Tested-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-10-17 10:48:25 +02:00
0af9d9c82c video: stm32: remove test on CONFIG_DM_REGULATOR
The tests on CONFIG_DM_REGULATOR, added to avoid compilation issues, can now
be removed, they are no more needed since the commit 16cc5ad0b4 ("power:
regulator: add dummy helper").

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I18e4ad5947e3b321573efe2085dd4c593cabbabe
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/250167
2022-10-17 10:48:25 +02:00
de7d8d6764 board: stm32mp1: remove test on CONFIG_DM_REGULATOR
The tests on CONFIG_DM_REGULATOR, added to avoid compilation issues, can now
be removed, they are no more needed since the commit 16cc5ad0b4 ("power:
regulator: add dummy helper").

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: If8c377a910cabf108ec14bc570c381126e1531e9
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/250098
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
ef9715e762 Prepare v2021.10-stm32mp-r1
Update version in Makefile to prepare the label v2021.10-stm32mp-r1
for OpenSTLinux V4.0

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ie3c8903d82a697e53c8dc711c024998d0833fa00
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/241645
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
v2021.10-stm32mp-r1
2022-05-25 16:01:02 +02:00
47611d9252 dt-bindings: rtc: stm32: add default value to output property
This patch adds a default config (RTC_NO_OUT)

It could be use to disable an output functionality.


Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ifd477c20c62e1b55b8d08bcfef95a9304047dbc7
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/252437
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2022-05-25 16:01:02 +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
5dc7c456a1 spi: stm32_qspi: Remove SR_BUSY bit check before sending command
Waiting for SR_BUSY bit when receiving a new command is not needed.
SR_BUSY bit is already managed in the previous command treatment.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: If15940fb19e9d2f9b9d9e67b117b1460c284e927
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/250833
Reviewed-by: Christophe KERELLO <christophe.kerello@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-25 16:01:02 +02:00
65a6c3beaa spi: stm32_qspi: Always check SR_TCF flags in stm32_qspi_wait_cmd()
Currently, SR_TCF flag is checked in case there is data, this criteria
is not correct.

SR_TCF flags is set when programmed number of bytes have been transferred
to the memory device ("bytes" comprised command and data send to the
SPI device).
So even if there is no data, we must check SR_TCF flag.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: Id4e8f33e11a972d985f29b7a4363b1622f4128c2
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/250832
Reviewed-by: Christophe KERELLO <christophe.kerello@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-25 16:01:02 +02:00
9cf2cc3c51 board: st: stm32mp1: panel detection for stm32mp15 ev1 board
Add panel detection for EV1.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Yannick FERTRE <yannick.fertre@foss.st.com>
Change-Id: I39ffca9b83525b7abd80fa1709bc5f75cd08a7e6
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/237577
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
3c48194ffa configs: stm32mp1: add panel Rocktech HX8394
Add a new panel based on chipset Himax HX8394.

Signed-off-by: Yannick FERTRE <yannick.fertre@foss.st.com>
Change-Id: I88fbd6bd8649de23373fb340cbce7cbed212b9a7
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/238896
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
2022-05-25 16:01:02 +02:00