mbox series

[v2,00/10] Add STM32MP25 support

Message ID 20230602132859.16442-1-alexandre.torgue@foss.st.com
Headers show
Series Add STM32MP25 support | expand

Message

Alexandre TORGUE June 2, 2023, 1:28 p.m. UTC
I'm pleased to announce extension of the STM32 MPU family with the addition of
the STM32MP25 Armv8 based SoCs.

STM32MP25 family is composed of 4 SoCs defined as following:

  -STM32MP251: common part composed of 1*Cortex-A35, common peripherals like
   SDMMC, UART, SPI, I2C, PCIe, USB3, parallel and DSI display, 1*ETH ...

  -STM32MP253: STM32MP251 + 1*Cortex-A35 (dual CPU), a second ETH, CAN-FD and
   LVDS display.

  -STM32MP255: STM32MP253 + GPU/AI and video encode/decode.
  -STM32MP257: STM32MP255 + ETH TSN switch (2+1 ports).

  A second diversity layer exists for security features/ A35 frequency:
  -STM32MP25xY, "Y" gives information:
    -Y = A means A35@1.2GHz + no cryp IP and no secure boot.
    -Y = C means A35@1.2GHz + cryp IP and secure boot.
    -Y = D means A35@1.5GHz + no cryp IP and no secure boot.
    -Y = F means A35@1.5GHz + cryp IP and secure boot.

This series adds the STM32MP257F EV1 board support. This board embeds a
STM32MP257FAI SoC, with 4GB of DDR4, TSN switch (2+1 ports), 2*USB typeA,
1*USB2 typeC, SNOR OctoSPI, mini PCIe, STPMIC2 for power distribution ...

Changes since v1:

-Add Conor "reviewed-by".
-Drop patch[4] of initial series to not define SoC without board in stm32,yaml.
-Add Krzysztof "Acked-by" after reordering enum in st,stm32-syscon.yaml

Thanks
Alex

Alexandre Torgue (9):
  dt-bindings: pinctrl: stm32: support for stm32mp257 and additional
    packages
  pinctrl: stm32: add stm32mp257 pinctrl support
  arm64: introduce STM32 family on Armv8 architecture
  arm64: dts: st: introduce stm32mp25 SoCs family
  arm64: dts: st: introduce stm32mp25 pinctrl files
  dt-bindings: stm32: document stm32mp257f-ev1 board
  arm64: dts: st: add stm32mp257f-ev1 board support
  arm64: defconfig: enable ARCH_STM32 and STM32 serial driver
  MAINTAINERS: add entry for ARM/STM32 ARCHITECTURE

Patrick Delaunay (1):
  dt-bindings: stm32: add st,stm32mp25-syscfg compatible for syscon

 .../bindings/arm/stm32/st,stm32-syscon.yaml   |    7 +-
 .../devicetree/bindings/arm/stm32/stm32.yaml  |    6 +
 .../bindings/pinctrl/st,stm32-pinctrl.yaml    |    4 +-
 MAINTAINERS                                   |    1 +
 arch/arm64/Kconfig.platforms                  |   14 +
 arch/arm64/boot/dts/Makefile                  |    1 +
 arch/arm64/boot/dts/st/Makefile               |    2 +
 arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi |   38 +
 arch/arm64/boot/dts/st/stm32mp251.dtsi        |  279 ++
 arch/arm64/boot/dts/st/stm32mp253.dtsi        |   23 +
 arch/arm64/boot/dts/st/stm32mp255.dtsi        |    9 +
 arch/arm64/boot/dts/st/stm32mp257.dtsi        |    9 +
 arch/arm64/boot/dts/st/stm32mp257f-ev1.dts    |   50 +
 arch/arm64/boot/dts/st/stm32mp25xc.dtsi       |    8 +
 arch/arm64/boot/dts/st/stm32mp25xf.dtsi       |    8 +
 .../boot/dts/st/stm32mp25xxai-pinctrl.dtsi    |   83 +
 .../boot/dts/st/stm32mp25xxak-pinctrl.dtsi    |   71 +
 .../boot/dts/st/stm32mp25xxal-pinctrl.dtsi    |   71 +
 arch/arm64/configs/defconfig                  |    3 +
 drivers/pinctrl/stm32/Kconfig                 |    6 +
 drivers/pinctrl/stm32/Makefile                |    1 +
 drivers/pinctrl/stm32/pinctrl-stm32.h         |    3 +
 drivers/pinctrl/stm32/pinctrl-stm32mp257.c    | 2581 +++++++++++++++++
 include/dt-bindings/pinctrl/stm32-pinfunc.h   |    3 +
 24 files changed, 3277 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm64/boot/dts/st/Makefile
 create mode 100644 arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp251.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp253.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp255.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp257.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
 create mode 100644 arch/arm64/boot/dts/st/stm32mp25xc.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp25xf.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp25xxai-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp25xxak-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/st/stm32mp25xxal-pinctrl.dtsi
 create mode 100644 drivers/pinctrl/stm32/pinctrl-stm32mp257.c

Comments

Linus Walleij June 8, 2023, 1:49 p.m. UTC | #1
On Fri, Jun 2, 2023 at 3:29 PM Alexandre Torgue
<alexandre.torgue@foss.st.com> wrote:

> Add stm32mp257 pinctrl support.
>
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Please merge the whole series through ARM SoC with my ACK.

Yours,
Linus Walleij
Alexandre TORGUE June 8, 2023, 3:01 p.m. UTC | #2
Hi

On 6/2/23 15:28, Alexandre Torgue wrote:
> I'm pleased to announce extension of the STM32 MPU family with the addition of
> the STM32MP25 Armv8 based SoCs.
> 
> STM32MP25 family is composed of 4 SoCs defined as following:
> 
>    -STM32MP251: common part composed of 1*Cortex-A35, common peripherals like
>     SDMMC, UART, SPI, I2C, PCIe, USB3, parallel and DSI display, 1*ETH ...
> 
>    -STM32MP253: STM32MP251 + 1*Cortex-A35 (dual CPU), a second ETH, CAN-FD and
>     LVDS display.
> 
>    -STM32MP255: STM32MP253 + GPU/AI and video encode/decode.
>    -STM32MP257: STM32MP255 + ETH TSN switch (2+1 ports).
> 
>    A second diversity layer exists for security features/ A35 frequency:
>    -STM32MP25xY, "Y" gives information:
>      -Y = A means A35@1.2GHz + no cryp IP and no secure boot.
>      -Y = C means A35@1.2GHz + cryp IP and secure boot.
>      -Y = D means A35@1.5GHz + no cryp IP and no secure boot.
>      -Y = F means A35@1.5GHz + cryp IP and secure boot.
> 
> This series adds the STM32MP257F EV1 board support. This board embeds a
> STM32MP257FAI SoC, with 4GB of DDR4, TSN switch (2+1 ports), 2*USB typeA,
> 1*USB2 typeC, SNOR OctoSPI, mini PCIe, STPMIC2 for power distribution ...
> 
> Changes since v1:
> 
> -Add Conor "reviewed-by".
> -Drop patch[4] of initial series to not define SoC without board in stm32,yaml.
> -Add Krzysztof "Acked-by" after reordering enum in st,stm32-syscon.yaml
> 
> Thanks
> Alex
> 
> Alexandre Torgue (9):
>    dt-bindings: pinctrl: stm32: support for stm32mp257 and additional
>      packages
>    pinctrl: stm32: add stm32mp257 pinctrl support
>    arm64: introduce STM32 family on Armv8 architecture
>    arm64: dts: st: introduce stm32mp25 SoCs family
>    arm64: dts: st: introduce stm32mp25 pinctrl files
>    dt-bindings: stm32: document stm32mp257f-ev1 board
>    arm64: dts: st: add stm32mp257f-ev1 board support
>    arm64: defconfig: enable ARCH_STM32 and STM32 serial driver
>    MAINTAINERS: add entry for ARM/STM32 ARCHITECTURE
> 
> Patrick Delaunay (1):
>    dt-bindings: stm32: add st,stm32mp25-syscfg compatible for syscon
> 

Series applied on stm32-next.

Regards
Alex
Guenter Roeck June 22, 2023, 12:57 a.m. UTC | #3
Hi,

On Fri, Jun 02, 2023 at 03:28:53PM +0200, Alexandre Torgue wrote:
> Add a dedicated ARCH_STM32 for STM32 SoCs config. First STM32 Armv8 SoC
> family is the STM32MP25 which is composed of STM32MP251, STM32MP253,
> STM32MP255, STM32MP257 SoCs.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 

This patch (or patch series) results in the following build error when
trying to build arm64:allmodconfig.

Building arm64:allmodconfig ... failed
--------------
Error log:
In file included from include/linux/printk.h:564,
                 from include/asm-generic/bug.h:22,
                 from arch/arm64/include/asm/bug.h:26,
                 from include/linux/bug.h:5,
                 from include/linux/fortify-string.h:5,
                 from include/linux/string.h:254,
                 from include/linux/dma-mapping.h:7,
                 from drivers/remoteproc/stm32_rproc.c:9:
drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_mem_alloc':
drivers/remoteproc/stm32_rproc.c:122:22: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t'

Bisect log attached.

Guenter

---
# bad: [15e71592dbae49a674429c618a10401d7f992ac3] Add linux-next specific files for 20230621
# good: [45a3e24f65e90a047bef86f927ebdc4c710edaa1] Linux 6.4-rc7
git bisect start 'HEAD' 'v6.4-rc7'
# bad: [e867e67cd55ae460c860ffd896c7fc96add2821c] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
git bisect bad e867e67cd55ae460c860ffd896c7fc96add2821c
# bad: [57b289d5b1005a9c39d6d6567e0ef6115bd59cea] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
git bisect bad 57b289d5b1005a9c39d6d6567e0ef6115bd59cea
# good: [dc6399fc9ae6d2530fc38fb3ae96bcc8393bd66f] Merge branch 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git
git bisect good dc6399fc9ae6d2530fc38fb3ae96bcc8393bd66f
# good: [5bfea833dd8f972ce3435359f12f61bdbf01b147] Merge tag 'v6.4-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/dt
git bisect good 5bfea833dd8f972ce3435359f12f61bdbf01b147
# bad: [6f8f9120fd588b28edb0a9c6b9ae9ca6c261d9f6] Merge branch 'for-linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git
git bisect bad 6f8f9120fd588b28edb0a9c6b9ae9ca6c261d9f6
# bad: [fe16e4b5e7fa1badc2fa69d85f7b13926cce8fe2] Merge branch 'at91-next' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
git bisect bad fe16e4b5e7fa1badc2fa69d85f7b13926cce8fe2
# good: [0e4ad579ef10d4e9eca86eb33fb4cd87de7c05c4] soc: document merges
git bisect good 0e4ad579ef10d4e9eca86eb33fb4cd87de7c05c4
# good: [d704f1fe9f4a4ae9c9f1f9fac1e4194c34dd035b] Merge tag 'arm-soc/for-6.5/devicetree-arm64' of https://github.com/Broadcom/stblinux into soc/dt
git bisect good d704f1fe9f4a4ae9c9f1f9fac1e4194c34dd035b
# bad: [26588df4e5a385e5b7751997d48bdeef042cf736] Merge branch 'soc/newsoc' into for-next
git bisect bad 26588df4e5a385e5b7751997d48bdeef042cf736
# good: [6bce45197c25c99612a3c5e0cf041d18aa28fbf3] Merge branch 'soc/dt' into for-next
git bisect good 6bce45197c25c99612a3c5e0cf041d18aa28fbf3
# bad: [3b170e1653c05b067ea6ef616ece961b07714f48] arm64: dts: st: introduce stm32mp25 pinctrl files
git bisect bad 3b170e1653c05b067ea6ef616ece961b07714f48
# good: [c3053382574a5a829c93fb5ab0bb52d20456e745] dt-bindings: stm32: add st,stm32mp25-syscfg compatible for syscon
git bisect good c3053382574a5a829c93fb5ab0bb52d20456e745
# bad: [5d30d03aaf78586c37100006ba271d045f730bb5] arm64: dts: st: introduce stm32mp25 SoCs family
git bisect bad 5d30d03aaf78586c37100006ba271d045f730bb5
# bad: [9e4e24414cc6b45bd887d746a59691e295431ddf] arm64: introduce STM32 family on Armv8 architecture
git bisect bad 9e4e24414cc6b45bd887d746a59691e295431ddf
# first bad commit: [9e4e24414cc6b45bd887d746a59691e295431ddf] arm64: introduce STM32 family on Armv8 architecture
Alexandre TORGUE June 22, 2023, 7:50 a.m. UTC | #4
Hi Guenter

On 6/22/23 02:57, Guenter Roeck wrote:
> Hi,
> 
> On Fri, Jun 02, 2023 at 03:28:53PM +0200, Alexandre Torgue wrote:
>> Add a dedicated ARCH_STM32 for STM32 SoCs config. First STM32 Armv8 SoC
>> family is the STM32MP25 which is composed of STM32MP251, STM32MP253,
>> STM32MP255, STM32MP257 SoCs.
>>
>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>
> 
> This patch (or patch series) results in the following build error when
> trying to build arm64:allmodconfig.
> 
> Building arm64:allmodconfig ... failed

Should be fixed by this patch:

https://lore.kernel.org/linux-arm-kernel/9ebb9a5a-7bc8-da67-529f-5193b9352b23@infradead.org/T/

regards
Alex


> --------------
> Error log:
> In file included from include/linux/printk.h:564,
>                   from include/asm-generic/bug.h:22,
>                   from arch/arm64/include/asm/bug.h:26,
>                   from include/linux/bug.h:5,
>                   from include/linux/fortify-string.h:5,
>                   from include/linux/string.h:254,
>                   from include/linux/dma-mapping.h:7,
>                   from drivers/remoteproc/stm32_rproc.c:9:
> drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_mem_alloc':
> drivers/remoteproc/stm32_rproc.c:122:22: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t'
> 
> Bisect log attached.
> 
> Guenter
> 
> ---
> # bad: [15e71592dbae49a674429c618a10401d7f992ac3] Add linux-next specific files for 20230621
> # good: [45a3e24f65e90a047bef86f927ebdc4c710edaa1] Linux 6.4-rc7
> git bisect start 'HEAD' 'v6.4-rc7'
> # bad: [e867e67cd55ae460c860ffd896c7fc96add2821c] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
> git bisect bad e867e67cd55ae460c860ffd896c7fc96add2821c
> # bad: [57b289d5b1005a9c39d6d6567e0ef6115bd59cea] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
> git bisect bad 57b289d5b1005a9c39d6d6567e0ef6115bd59cea
> # good: [dc6399fc9ae6d2530fc38fb3ae96bcc8393bd66f] Merge branch 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git
> git bisect good dc6399fc9ae6d2530fc38fb3ae96bcc8393bd66f
> # good: [5bfea833dd8f972ce3435359f12f61bdbf01b147] Merge tag 'v6.4-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/dt
> git bisect good 5bfea833dd8f972ce3435359f12f61bdbf01b147
> # bad: [6f8f9120fd588b28edb0a9c6b9ae9ca6c261d9f6] Merge branch 'for-linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git
> git bisect bad 6f8f9120fd588b28edb0a9c6b9ae9ca6c261d9f6
> # bad: [fe16e4b5e7fa1badc2fa69d85f7b13926cce8fe2] Merge branch 'at91-next' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
> git bisect bad fe16e4b5e7fa1badc2fa69d85f7b13926cce8fe2
> # good: [0e4ad579ef10d4e9eca86eb33fb4cd87de7c05c4] soc: document merges
> git bisect good 0e4ad579ef10d4e9eca86eb33fb4cd87de7c05c4
> # good: [d704f1fe9f4a4ae9c9f1f9fac1e4194c34dd035b] Merge tag 'arm-soc/for-6.5/devicetree-arm64' of https://github.com/Broadcom/stblinux into soc/dt
> git bisect good d704f1fe9f4a4ae9c9f1f9fac1e4194c34dd035b
> # bad: [26588df4e5a385e5b7751997d48bdeef042cf736] Merge branch 'soc/newsoc' into for-next
> git bisect bad 26588df4e5a385e5b7751997d48bdeef042cf736
> # good: [6bce45197c25c99612a3c5e0cf041d18aa28fbf3] Merge branch 'soc/dt' into for-next
> git bisect good 6bce45197c25c99612a3c5e0cf041d18aa28fbf3
> # bad: [3b170e1653c05b067ea6ef616ece961b07714f48] arm64: dts: st: introduce stm32mp25 pinctrl files
> git bisect bad 3b170e1653c05b067ea6ef616ece961b07714f48
> # good: [c3053382574a5a829c93fb5ab0bb52d20456e745] dt-bindings: stm32: add st,stm32mp25-syscfg compatible for syscon
> git bisect good c3053382574a5a829c93fb5ab0bb52d20456e745
> # bad: [5d30d03aaf78586c37100006ba271d045f730bb5] arm64: dts: st: introduce stm32mp25 SoCs family
> git bisect bad 5d30d03aaf78586c37100006ba271d045f730bb5
> # bad: [9e4e24414cc6b45bd887d746a59691e295431ddf] arm64: introduce STM32 family on Armv8 architecture
> git bisect bad 9e4e24414cc6b45bd887d746a59691e295431ddf
> # first bad commit: [9e4e24414cc6b45bd887d746a59691e295431ddf] arm64: introduce STM32 family on Armv8 architecture
Arnd Bergmann June 22, 2023, 7:57 a.m. UTC | #5
On Thu, Jun 22, 2023, at 09:50, Alexandre TORGUE wrote:
> On 6/22/23 02:57, Guenter Roeck wrote:
>> 
>> On Fri, Jun 02, 2023 at 03:28:53PM +0200, Alexandre Torgue wrote:
>>> Add a dedicated ARCH_STM32 for STM32 SoCs config. First STM32 Armv8 SoC
>>> family is the STM32MP25 which is composed of STM32MP251, STM32MP253,
>>> STM32MP255, STM32MP257 SoCs.
>>>
>>> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
>>>
>> 
>> This patch (or patch series) results in the following build error when
>> trying to build arm64:allmodconfig.
>> 
>> Building arm64:allmodconfig ... failed
>
> Should be fixed by this patch:
>
> https://lore.kernel.org/linux-arm-kernel/9ebb9a5a-7bc8-da67-529f-5193b9352b23@infradead.org/T/

I added that patch to my the soc/newsoc branch now.

    Arnd