[Linux-stm32] [PATCH 5/5] ARM: dts: stm32: Deduplicate rproc mboxes and IRQs

Arnaud POULIQUEN arnaud.pouliquen at st.com
Tue May 30 01:51:02 PDT 2023




ST Restricted

> -----Original Message-----
> From: Linux-stm32 <linux-stm32-bounces at st-md-mailman.stormreply.com>
> On Behalf Of Marek Vasut
> Sent: Thursday, May 18, 2023 3:13 AM
> To: linux-arm-kernel at lists.infradead.org
> Cc: Marek Vasut <marex at denx.de>; devicetree at vger.kernel.org; Conor
> Dooley <conor+dt at kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt at linaro.org>; Richard Cochran
> <richardcochran at gmail.com>; Rob Herring <robh+dt at kernel.org>; Maxime
> Coquelin <mcoquelin.stm32 at gmail.com>; linux-stm32 at st-md-
> mailman.stormreply.com; kernel at dh-electronics.com
> Subject: [Linux-stm32] [PATCH 5/5] ARM: dts: stm32: Deduplicate rproc
> mboxes and IRQs
> 
> Pull mboxes, mbox-names, interrupt-parent, interrupts properties of the
> m4_rproc into stm32mp151.dtsi to deduplicate multiple copies of the same
> in multiple board files. Worse, those copies were starting to get out of sync,
> so this should prevent any such issues in the future.


Theses declarations depend on the coprocessor firmware more than the board itself.
All are optional:
- The IRQ is used for the Coprocessor Watchdog
- The mailboxes for the RPMsg communication and a graceful shutdown of the
coprocessor

So, except for the "detach" mailbox this proposal seems reasonable to me.

Thanks,
Arnaud


> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> ---
> Cc: Alexandre Torgue <alexandre.torgue at foss.st.com>
> Cc: Conor Dooley <conor+dt at kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>
> Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
> Cc: Richard Cochran <richardcochran at gmail.com>
> Cc: Rob Herring <robh+dt at kernel.org>
> Cc: devicetree at vger.kernel.org
> Cc: kernel at dh-electronics.com
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-stm32 at st-md-mailman.stormreply.com
> ---
>  arch/arm/boot/dts/stm32mp151.dtsi                        | 4 ++++
>  arch/arm/boot/dts/stm32mp157c-ed1.dts                    | 4 ----
>  arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi         | 4 ----
>  arch/arm/boot/dts/stm32mp157c-odyssey-som.dtsi           | 4 ----
>  arch/arm/boot/dts/stm32mp157c-phycore-stm32mp15-som.dtsi | 4 ----
>  arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi             | 4 ----
>  arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi             | 4 ----
>  arch/arm/boot/dts/stm32mp15xx-dkx.dtsi                   | 4 ----
>  arch/arm/boot/dts/stm32mp15xx-osd32.dtsi                 | 4 ----
>  9 files changed, 4 insertions(+), 32 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/stm32mp151.dtsi
> b/arch/arm/boot/dts/stm32mp151.dtsi
> index accbeef4df6da..97d54bf0dcc30 100644
> --- a/arch/arm/boot/dts/stm32mp151.dtsi
> +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> @@ -1824,6 +1824,10 @@ m4_rproc: m4 at 10000000 {
>  			reg = <0x10000000 0x40000>,
>  			      <0x30000000 0x40000>,
>  			      <0x38000000 0x10000>;
> +			interrupt-parent = <&exti>;
> +			interrupts = <68 IRQ_TYPE_EDGE_RISING>;
> +			mbox-names = "vq0", "vq1", "shutdown", "detach";
> +			mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc
> 3>;
>  			resets = <&rcc MCU_R>;
>  			st,syscfg-holdboot = <&rcc 0x10C 0x1>;
>  			st,syscfg-tz = <&rcc 0x000 0x1>;
> diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts
> b/arch/arm/boot/dts/stm32mp157c-ed1.dts
> index 8beb901be5065..3b40c2d8c3d9e 100644
> --- a/arch/arm/boot/dts/stm32mp157c-ed1.dts
> +++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts
> @@ -304,10 +304,6 @@ &iwdg2 {
>  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	status = "okay";
>  };
> 
> diff --git a/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
> b/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
> index 82061c9186338..a5c86bba46aea 100644
> --- a/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
> +++ b/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
> @@ -366,10 +366,6 @@ &iwdg2 {
>  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	interrupt-names = "wdg";
>  	recovery;
>  	status = "okay";
> diff --git a/arch/arm/boot/dts/stm32mp157c-odyssey-som.dtsi
> b/arch/arm/boot/dts/stm32mp157c-odyssey-som.dtsi
> index cf74852514906..31d7bfe8bf8c9 100644
> --- a/arch/arm/boot/dts/stm32mp157c-odyssey-som.dtsi
> +++ b/arch/arm/boot/dts/stm32mp157c-odyssey-som.dtsi
> @@ -230,10 +230,6 @@ &iwdg2 {
>  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	status = "okay";
>  };
> 
> diff --git a/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp15-som.dtsi
> b/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp15-som.dtsi
> index 4e8b2d2b30c7a..f68aaf6aa9fb5 100644
> --- a/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp15-som.dtsi
> +++ b/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp15-som.dtsi
> @@ -405,10 +405,6 @@ &m_can2 {
>  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	status = "okay";
>  };
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> index 7bf13183437c5..a38009f8456b8 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> @@ -414,10 +414,6 @@ &iwdg2 {
>  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	status = "okay";
>  };
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi
> b/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi
> index f0351f599a508..8c30cecacaf86 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi
> @@ -227,10 +227,6 @@ &iwdg2 {
>  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	status = "okay";
>  };
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
> b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
> index 0f1110e42c939..cc3eb755663fd 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
> @@ -467,10 +467,6 @@ ltdc_ep0_out: endpoint at 0 {  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	status = "okay";
>  };
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-osd32.dtsi
> b/arch/arm/boot/dts/stm32mp15xx-osd32.dtsi
> index a43965c86fe8b..6532726502c32 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-osd32.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-osd32.dtsi
> @@ -210,10 +210,6 @@ &ipcc {
>  &m4_rproc {
>  	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
> <&vdev0vring0>,
>  			<&vdev0vring1>, <&vdev0buffer>;
> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
> -	mbox-names = "vq0", "vq1", "shutdown", "detach";
> -	interrupt-parent = <&exti>;
> -	interrupts = <68 1>;
>  	status = "okay";
>  };
> 
> --
> 2.39.2
> 
> _______________________________________________
> Linux-stm32 mailing list
> Linux-stm32 at st-md-mailman.stormreply.com
> https://st-md-mailman.stormreply.com/mailman/listinfo/linux-stm32



More information about the linux-arm-kernel mailing list