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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





ST Restricted

> -----Original Message-----
> From: Linux-stm32 <linux-stm32-bounces@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> On Behalf Of Marek Vasut
> Sent: Thursday, May 18, 2023 3:13 AM
> To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Cc: Marek Vasut <marex@xxxxxxx>; devicetree@xxxxxxxxxxxxxxx; Conor
> Dooley <conor+dt@xxxxxxxxxx>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@xxxxxxxxxx>; Richard Cochran
> <richardcochran@xxxxxxxxx>; Rob Herring <robh+dt@xxxxxxxxxx>; Maxime
> Coquelin <mcoquelin.stm32@xxxxxxxxx>; linux-stm32@st-md-
> mailman.stormreply.com; kernel@xxxxxxxxxxxxxxxxxx
> 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@xxxxxxx>
> ---
> Cc: Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>
> Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>
> Cc: Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>
> Cc: Richard Cochran <richardcochran@xxxxxxxxx>
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: devicetree@xxxxxxxxxxxxxxx
> Cc: kernel@xxxxxxxxxxxxxxxxxx
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Cc: linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> ---
>  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@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@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@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> https://st-md-mailman.stormreply.com/mailman/listinfo/linux-stm32




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux