mbox series

[0/7] Add STM32MP13 SoCs and discovery board support

Message ID 20210723132810.25728-1-alexandre.torgue@foss.st.com
Headers show
Series Add STM32MP13 SoCs and discovery board support | expand

Message

Alexandre TORGUE July 23, 2021, 1:28 p.m. UTC
This series enhance the STM32 MPU family by adding STM32MP13 SoCs support.
It adds machine support and device tree diversity to support the whole
stm32mp13 family (STM32MP131/STM32MP133/STM32MP135, plus security feature
diversity).

Basically STM32MP13 SoCs embeds one Cortex A7, storage (SD/MMC/SDIO, QSPI FMC),
network (ETH, CAN), display (DCMIPP, LTDC, ...), audio(SAI, DFSDM, SPDIFRX),
com (USB EHCI/OHCI, USB OTG, I2C, SPI/I2S, U(S)ART).

This series also adds STM32MP135F Discovery board support (stm32mp135f-dk). It
embeds a STM32MP135f SOC with 512 MB of DDR3. Several connections are available
on this board:
 - 4*USB2.0, 1*USB2.0 typeC DRD, SDcard, 2*RJ45, HDMI, Combo Wifi/BT, ...

Only SD card, uart4 (console) and watchdog IPs are enabled in this commit.

Note that file stm32mp135.dtsi doesn't define nodes but I add it now to ease adding
of new nodes in a (close) future.

regards
Alex

Alexandre Torgue (7):
  dt-bindings: pinctrl: stm32: add new compatible for STM32MP135 SoC
  pinctrl: stm32: Add STM32MP135 SoC support
  docs: arm: stm32: introduce STM32MP13 SoCs
  ARM: stm32: add initial support for STM32MP13 family
  ARM: dts: stm32: add STM32MP13 SoCs support
  dt-bindings: stm32: document stm32mp135f-dk board
  ARM: dts: stm32: add initial support of stm32mp135f-dk board

 Documentation/arm/index.rst                   |    1 +
 .../arm/stm32/stm32mp13-overview.rst          |   37 +
 .../devicetree/bindings/arm/stm32/stm32.yaml  |    4 +
 .../bindings/pinctrl/st,stm32-pinctrl.yaml    |    1 +
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/stm32mp13-pinctrl.dtsi      |   64 +
 arch/arm/boot/dts/stm32mp131.dtsi             |  283 +++
 arch/arm/boot/dts/stm32mp133.dtsi             |   37 +
 arch/arm/boot/dts/stm32mp135.dtsi             |   12 +
 arch/arm/boot/dts/stm32mp135f-dk.dts          |   56 +
 arch/arm/boot/dts/stm32mp13xc.dtsi            |   17 +
 arch/arm/boot/dts/stm32mp13xf.dtsi            |   17 +
 arch/arm/mach-stm32/Kconfig                   |    8 +
 arch/arm/mach-stm32/board-dt.c                |    3 +
 drivers/pinctrl/stm32/Kconfig                 |    6 +
 drivers/pinctrl/stm32/Makefile                |    1 +
 drivers/pinctrl/stm32/pinctrl-stm32mp135.c    | 1679 +++++++++++++++++
 17 files changed, 2227 insertions(+)
 create mode 100644 Documentation/arm/stm32/stm32mp13-overview.rst
 create mode 100644 arch/arm/boot/dts/stm32mp13-pinctrl.dtsi
 create mode 100644 arch/arm/boot/dts/stm32mp131.dtsi
 create mode 100644 arch/arm/boot/dts/stm32mp133.dtsi
 create mode 100644 arch/arm/boot/dts/stm32mp135.dtsi
 create mode 100644 arch/arm/boot/dts/stm32mp135f-dk.dts
 create mode 100644 arch/arm/boot/dts/stm32mp13xc.dtsi
 create mode 100644 arch/arm/boot/dts/stm32mp13xf.dtsi
 create mode 100644 drivers/pinctrl/stm32/pinctrl-stm32mp135.c

Comments

Arnd Bergmann July 23, 2021, 1:46 p.m. UTC | #1
On Fri, Jul 23, 2021 at 3:28 PM Alexandre Torgue
<alexandre.torgue@foss.st.com> wrote:
>
> This series enhance the STM32 MPU family by adding STM32MP13 SoCs support.
> It adds machine support and device tree diversity to support the whole
> stm32mp13 family (STM32MP131/STM32MP133/STM32MP135, plus security feature
> diversity).
>
> Basically STM32MP13 SoCs embeds one Cortex A7, storage (SD/MMC/SDIO, QSPI FMC),
> network (ETH, CAN), display (DCMIPP, LTDC, ...), audio(SAI, DFSDM, SPDIFRX),
> com (USB EHCI/OHCI, USB OTG, I2C, SPI/I2S, U(S)ART).
>
> This series also adds STM32MP135F Discovery board support (stm32mp135f-dk). It
> embeds a STM32MP135f SOC with 512 MB of DDR3. Several connections are available
> on this board:
>  - 4*USB2.0, 1*USB2.0 typeC DRD, SDcard, 2*RJ45, HDMI, Combo Wifi/BT, ...
>
> Only SD card, uart4 (console) and watchdog IPs are enabled in this commit.
>
> Note that file stm32mp135.dtsi doesn't define nodes but I add it now to ease adding
> of new nodes in a (close) future.

I had a brief look and it seems all fine to me, nice work!

The only (very minor) thing I noticed is that the crypto engine device node
has an unusual name 'cryp@' instead of the usual 'crypto@', but this is already
the case on stm32mp157.

With this changed,

Acked-by: Arnd Bergmann <arnd@arndb.de
Ahmad Fatoum July 23, 2021, 2:10 p.m. UTC | #2
Hello Alex,

On 23.07.21 15:28, Alexandre Torgue wrote:
> Add initial support of STM32MP13 family. The STM32MP13 SoC diversity is
> composed by:
> -STM32MP131:
>   -core: 1*CA7, 17*TIMERS, 5*LPTIMERS, DMA/MDMA/DMAMUX
>   -storage: 3*SDMCC, 1*QSPI, FMC
>   -com: USB (OHCI/EHCI, OTG), 5*I2C, 5*SPI/I2S, 8*U(S)ART
>   -audio: 2*SAI
>   -network: 1*ETH(GMAC)
> -STM32MP133: STM32MP131 + 2*CAN, ETH2(GMAC), ADC1
> -STM32MP135: STM32MP133 + DCMIPP, LTDC
> 
> A second diversity layer exists for security features:
> -STM32MP13xY, "Y" gives information:
>  -Y = A/D means no cryp IP and no secure boot.
>  -Y = C/F means cryp IP + secure boot.
> 
> This commit adds basic peripheral.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/arch/arm/boot/dts/stm32mp131.dtsi b/arch/arm/boot/dts/stm32mp131.dtsi
> new file mode 100644
> index 000000000000..86126dc0d898
> --- /dev/null
> +++ b/arch/arm/boot/dts/stm32mp131.dtsi
> @@ -0,0 +1,283 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
> +/*
> + * Copyright (C) STMicroelectronics 2021 - All Rights Reserved
> + * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
> + */
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +/ {

Could you add aliases for mmc0-2?
That way /dev/mmcblk* numbering is fixed from the start and
doesn't depend on which devices are enabled.

Cheers,
Ahmad
Alexandre TORGUE July 23, 2021, 2:36 p.m. UTC | #3
On 7/23/21 3:46 PM, Arnd Bergmann wrote:
> On Fri, Jul 23, 2021 at 3:28 PM Alexandre Torgue
> <alexandre.torgue@foss.st.com> wrote:
>>
>> This series enhance the STM32 MPU family by adding STM32MP13 SoCs support.
>> It adds machine support and device tree diversity to support the whole
>> stm32mp13 family (STM32MP131/STM32MP133/STM32MP135, plus security feature
>> diversity).
>>
>> Basically STM32MP13 SoCs embeds one Cortex A7, storage (SD/MMC/SDIO, QSPI FMC),
>> network (ETH, CAN), display (DCMIPP, LTDC, ...), audio(SAI, DFSDM, SPDIFRX),
>> com (USB EHCI/OHCI, USB OTG, I2C, SPI/I2S, U(S)ART).
>>
>> This series also adds STM32MP135F Discovery board support (stm32mp135f-dk). It
>> embeds a STM32MP135f SOC with 512 MB of DDR3. Several connections are available
>> on this board:
>>   - 4*USB2.0, 1*USB2.0 typeC DRD, SDcard, 2*RJ45, HDMI, Combo Wifi/BT, ...
>>
>> Only SD card, uart4 (console) and watchdog IPs are enabled in this commit.
>>
>> Note that file stm32mp135.dtsi doesn't define nodes but I add it now to ease adding
>> of new nodes in a (close) future.
> 
> I had a brief look and it seems all fine to me, nice work!
> 
> The only (very minor) thing I noticed is that the crypto engine device node
> has an unusual name 'cryp@' instead of the usual 'crypto@', but this is already
> the case on stm32mp157.
> 
> With this changed,
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de
> 

Thanks Arnd. I'll change "cryp: cryp@" by "cryp: crypto@" (either in V2 
or directly during the merge).

regards
Alex
Linus Walleij Aug. 10, 2021, 12:45 p.m. UTC | #4
On Fri, Jul 23, 2021 at 3:28 PM Alexandre Torgue
<alexandre.torgue@foss.st.com> wrote:

> STM32MP135 SoC embeds 9 GPIO banks of 16 gpios each. Those GPIO
> banks contain same features as STM32MP157 GPIO banks except that
> each GPIO line of the STM32MP135 can be secured.
>
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

Patch applied!

Yours,
Linus Walleij
Alexandre TORGUE Sept. 20, 2021, 7:37 a.m. UTC | #5
On 7/23/21 3:28 PM, Alexandre Torgue wrote:
> This series enhance the STM32 MPU family by adding STM32MP13 SoCs support.
> It adds machine support and device tree diversity to support the whole
> stm32mp13 family (STM32MP131/STM32MP133/STM32MP135, plus security feature
> diversity).
> 
> Basically STM32MP13 SoCs embeds one Cortex A7, storage (SD/MMC/SDIO, QSPI FMC),
> network (ETH, CAN), display (DCMIPP, LTDC, ...), audio(SAI, DFSDM, SPDIFRX),
> com (USB EHCI/OHCI, USB OTG, I2C, SPI/I2S, U(S)ART).
> 
> This series also adds STM32MP135F Discovery board support (stm32mp135f-dk). It
> embeds a STM32MP135f SOC with 512 MB of DDR3. Several connections are available
> on this board:
>   - 4*USB2.0, 1*USB2.0 typeC DRD, SDcard, 2*RJ45, HDMI, Combo Wifi/BT, ...
> 
> Only SD card, uart4 (console) and watchdog IPs are enabled in this commit.
> 
> Note that file stm32mp135.dtsi doesn't define nodes but I add it now to ease adding
> of new nodes in a (close) future.
> 
> regards
> Alex
> 
> Alexandre Torgue (7):
>    dt-bindings: pinctrl: stm32: add new compatible for STM32MP135 SoC
>    pinctrl: stm32: Add STM32MP135 SoC support
>    docs: arm: stm32: introduce STM32MP13 SoCs
>    ARM: stm32: add initial support for STM32MP13 family
>    ARM: dts: stm32: add STM32MP13 SoCs support
>    dt-bindings: stm32: document stm32mp135f-dk board
>    ARM: dts: stm32: add initial support of stm32mp135f-dk board
> 
>   Documentation/arm/index.rst                   |    1 +
>   .../arm/stm32/stm32mp13-overview.rst          |   37 +
>   .../devicetree/bindings/arm/stm32/stm32.yaml  |    4 +
>   .../bindings/pinctrl/st,stm32-pinctrl.yaml    |    1 +
>   arch/arm/boot/dts/Makefile                    |    1 +
>   arch/arm/boot/dts/stm32mp13-pinctrl.dtsi      |   64 +
>   arch/arm/boot/dts/stm32mp131.dtsi             |  283 +++
>   arch/arm/boot/dts/stm32mp133.dtsi             |   37 +
>   arch/arm/boot/dts/stm32mp135.dtsi             |   12 +
>   arch/arm/boot/dts/stm32mp135f-dk.dts          |   56 +
>   arch/arm/boot/dts/stm32mp13xc.dtsi            |   17 +
>   arch/arm/boot/dts/stm32mp13xf.dtsi            |   17 +
>   arch/arm/mach-stm32/Kconfig                   |    8 +
>   arch/arm/mach-stm32/board-dt.c                |    3 +
>   drivers/pinctrl/stm32/Kconfig                 |    6 +
>   drivers/pinctrl/stm32/Makefile                |    1 +
>   drivers/pinctrl/stm32/pinctrl-stm32mp135.c    | 1679 +++++++++++++++++
>   17 files changed, 2227 insertions(+)
>   create mode 100644 Documentation/arm/stm32/stm32mp13-overview.rst
>   create mode 100644 arch/arm/boot/dts/stm32mp13-pinctrl.dtsi
>   create mode 100644 arch/arm/boot/dts/stm32mp131.dtsi
>   create mode 100644 arch/arm/boot/dts/stm32mp133.dtsi
>   create mode 100644 arch/arm/boot/dts/stm32mp135.dtsi
>   create mode 100644 arch/arm/boot/dts/stm32mp135f-dk.dts
>   create mode 100644 arch/arm/boot/dts/stm32mp13xc.dtsi
>   create mode 100644 arch/arm/boot/dts/stm32mp13xf.dtsi
>   create mode 100644 drivers/pinctrl/stm32/pinctrl-stm32mp135.c
> 

With minor changes (cryp@ to crypto@), patches 3 to 7 applied on stm32-next.

Regards
Alex