mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 00/13] ARM: stm32mp: add full STM32MP13 support with OP-TEE
Date: Tue, 5 Dec 2023 08:35:25 +0100	[thread overview]
Message-ID: <20231205073525.GE1057032@pengutronix.de> (raw)
In-Reply-To: <20231127064947.2207726-1-a.fatoum@pengutronix.de>

On Mon, Nov 27, 2023 at 07:49:34AM +0100, Ahmad Fatoum wrote:
> We only had rudimentary STM32MP13 support, because proper control of the
> clocks and resets required communicating with OP-TEE as the RCC
> peripheral was restricted to the secure world on that SoC.
> 
> Back when STM32MP13 support was added, this limitation was worked around
> by defining placeholder fixed clocks and skipping resets for the MMC and
> other hardware that was known to be initialized by previous boot stages.
> 
> When the upstream kernel device tree dropped the fixed clocks in favor
> of describing the actual setup with SCMI-over-OPTEE providing access to
> the root clocks, barebox support for the STM32MP13 was broken.
> 
> This series restores barebox compatibility with the Linux device tree,
> so barebox can once again startup and Linux can be booted.
> 
> Notably missing is Ethernet support, which doesn't yet exist in the
> mainline kernel. USB on the DK also uses a STM32 MCU as Type C
> controller and I haven't investigated how much of this barebox needs to
> know about to get OTG working. USB host works fine however.
> 
> Once enabled, it's possible to use the same barebox binary for both
> STM32MP13 and STM32MP15 and only changing the BL32 device tree in the
> FIP. STM32MP13 support is not yet enabled in the device tree as setting
> CONFIG_OPTEE_SIZE to 48M as expected by the STM32MP13-DK firmware will
> take away 48M of memory from Linux, even on the STM32MP15 board.
> 
> We'll want to fix that before enabling it in the defconfig, but this
> shouldn't keep us from fixing STM32MP13 support in general.
> 
> This series depends on enabling use of OP-TEE as SCMI transport, added
> in <20231127064034.2206788-2-a.fatoum@pengutronix.de>
> 
> Ahmad Fatoum (13):
>   clk: stm32mp1: build only when STM32MP15 support is enabled
>   clk: factor out clk_hw_get_parent_index
>   include: add initial <linux/clk-provider.h>
>   clk: divider: implement CLK_DIVIDER_ALLOW_ZERO
>   clk: divider: implement divider_[ro_]round_rate_parent
>   clk: implement clk clk_hw_get_parent_by_index
>   clk: add struct clk_init_data::parent_hws
>   clk: implement clk_hw_reparent
>   clk: add STM32MP13 clock and reset drivers
>   pinctrl: stm32: match st,stm32mp135-pinctrl DT compatible
>   aiodev: stm32: add STM32MP13x support
>   ARM: stm32mp: 135-DK: enable environment, bbu handler and deep probe
>   ARM: stm32mp: remove STM32MP13 .stm32 image

Applied, thanks

Sascha

> 
>  arch/arm/boards/stm32mp13xx-dk/Makefile   |    2 +-
>  arch/arm/boards/stm32mp13xx-dk/board.c    |   25 +
>  arch/arm/boards/stm32mp13xx-dk/lowlevel.c |   19 -
>  arch/arm/dts/stm32mp135f-dk.dts           |    9 +
>  drivers/aiodev/stm32-adc.c                |   14 +
>  drivers/clk/Kconfig                       |   10 +
>  drivers/clk/Makefile                      |    3 +-
>  drivers/clk/clk-divider.c                 |   41 +-
>  drivers/clk/clk.c                         |  139 +-
>  drivers/clk/stm32/Makefile                |    1 +
>  drivers/clk/stm32/clk-stm32-core.c        |  680 ++++++++
>  drivers/clk/stm32/clk-stm32-core.h        |  188 +++
>  drivers/clk/stm32/clk-stm32mp13.c         | 1611 +++++++++++++++++++
>  drivers/clk/stm32/reset-stm32.c           |  122 ++
>  drivers/clk/stm32/reset-stm32.h           |    8 +
>  drivers/clk/stm32/stm32mp13_rcc.h         | 1748 +++++++++++++++++++++
>  drivers/pinctrl/pinctrl-stm32.c           |    1 +
>  images/Makefile.stm32mp                   |    1 -
>  include/linux/clk-provider.h              |  185 +++
>  include/linux/clk.h                       |   21 +
>  20 files changed, 4776 insertions(+), 52 deletions(-)
>  create mode 100644 arch/arm/boards/stm32mp13xx-dk/board.c
>  delete mode 100644 arch/arm/boards/stm32mp13xx-dk/lowlevel.c
>  create mode 100644 drivers/clk/stm32/Makefile
>  create mode 100644 drivers/clk/stm32/clk-stm32-core.c
>  create mode 100644 drivers/clk/stm32/clk-stm32-core.h
>  create mode 100644 drivers/clk/stm32/clk-stm32mp13.c
>  create mode 100644 drivers/clk/stm32/reset-stm32.c
>  create mode 100644 drivers/clk/stm32/reset-stm32.h
>  create mode 100644 drivers/clk/stm32/stm32mp13_rcc.h
>  create mode 100644 include/linux/clk-provider.h
> 
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2023-12-05  7:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27  6:49 Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 01/13] clk: stm32mp1: build only when STM32MP15 support is enabled Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 02/13] clk: factor out clk_hw_get_parent_index Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 03/13] include: add initial <linux/clk-provider.h> Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 04/13] clk: divider: implement CLK_DIVIDER_ALLOW_ZERO Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 05/13] clk: divider: implement divider_[ro_]round_rate_parent Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 06/13] clk: implement clk clk_hw_get_parent_by_index Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 07/13] clk: add struct clk_init_data::parent_hws Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 08/13] clk: implement clk_hw_reparent Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 09/13] clk: add STM32MP13 clock and reset drivers Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 10/13] pinctrl: stm32: match st,stm32mp135-pinctrl DT compatible Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 11/13] aiodev: stm32: add STM32MP13x support Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 12/13] ARM: stm32mp: 135-DK: enable environment, bbu handler and deep probe Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 13/13] ARM: stm32mp: remove STM32MP13 .stm32 image Ahmad Fatoum
2023-12-05  7:35 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231205073525.GE1057032@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox