linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support
@ 2020-04-24 15:12 Tero Kristo
  2020-04-24 15:12 ` [PATCH 01/17] ARM: dts: dra7: add timer_sys_ck entries for IPU/DSP timers Tero Kristo
                   ` (17 more replies)
  0 siblings, 18 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

Hi Tony,

This series adds the DT nodes necessary for remoteproc support, now that
the driver side changes are (mostly) in. Couple of things to note
though.

1) There is a new IOMMU issue, for which I posted a fix today [1]
2) The remoteproc core still has an issue for which there is ongoing
   discussion [2]

With these two issue taken care of, the omap remoteproc support is
functional. The question though is, whether we should just wait until
the above two issues are resolved and merge the DT patches post that, or
merge the DT patches with status = "disabled".

There aren't any boot failures without the mentioned two issues though,
as one needs to enable the RPMSG_VIRTIO support before the failures
really kick in (issue [2]), and this config is not enabled for OMAPs
yet. Also, multi-v7 config doesn't seem to enable omap remoteproc,
so that is safe also.

Another thing I was considering myself was to squash all the board
specific reserved-memory region patches into the
dra7-ipu-dsp-common.dtsi files. However Suman wants to have these
separate and as he is the actual author for these, I posted them in this
form. But anyway, just so you know it would be possible to merge them
together.

-Tero

[1] https://lore.kernel.org/linux-iommu/20200424145828.3159-1-t-kristo@ti.com/T/#u
[2] https://lkml.org/lkml/2020/4/20/1094



--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 01/17] ARM: dts: dra7: add timer_sys_ck entries for IPU/DSP timers
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 02/17] ARM: dts: DRA7: Add common IPU and DSP nodes Tero Kristo
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

With this, the clocksource driver can setup the timers properly.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra7-l4.dtsi | 50 ++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/dra7-l4.dtsi b/arch/arm/boot/dts/dra7-l4.dtsi
index 2119a78e9c15..1abd455cf15a 100644
--- a/arch/arm/boot/dts/dra7-l4.dtsi
+++ b/arch/arm/boot/dts/dra7-l4.dtsi
@@ -1163,8 +1163,8 @@
 			timer2: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER2_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER2_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -1191,8 +1191,8 @@
 			timer3: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER3_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER3_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -1210,8 +1210,9 @@
 					<SYSC_IDLE_SMART>,
 					<SYSC_IDLE_SMART_WKUP>;
 			/* Domains (P, C): l4per_pwrdm, l4per_clkdm */
-			clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 0>;
-			clock-names = "fck";
+			clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 0>,
+				 <&timer_sys_clk_div>;
+			clock-names = "fck", "timer_sys_ck";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0x0 0x36000 0x1000>;
@@ -1219,8 +1220,8 @@
 			timer4: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -1246,8 +1247,8 @@
 			timer9: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER9_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER9_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -1853,8 +1854,8 @@
 			timer10: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER10_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER10_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -1880,8 +1881,8 @@
 			timer11: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER11_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&l4per_clkctrl DRA7_L4PER_TIMER11_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -3354,8 +3355,8 @@
 					<SYSC_IDLE_SMART>,
 					<SYSC_IDLE_SMART_WKUP>;
 			/* Domains (P, C): ipu_pwrdm, ipu_clkdm */
-			clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 0>;
-			clock-names = "fck";
+			clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 0>, <&timer_sys_clk_div>;
+			clock-names = "fck", "timer_sys_ck";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0x0 0x20000 0x1000>;
@@ -3381,8 +3382,9 @@
 					<SYSC_IDLE_SMART>,
 					<SYSC_IDLE_SMART_WKUP>;
 			/* Domains (P, C): ipu_pwrdm, ipu_clkdm */
-			clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 0>;
-			clock-names = "fck";
+			clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 0>,
+				 <&timer_sys_clk_div>;
+			clock-names = "fck", "timer_sys_ck";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0x0 0x22000 0x1000>;
@@ -3417,8 +3419,8 @@
 			timer7: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&ipu_clkctrl DRA7_IPU_TIMER7_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&ipu_clkctrl DRA7_IPU_TIMER7_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -3444,8 +3446,8 @@
 			timer8: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&ipu_clkctrl DRA7_IPU_TIMER8_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&ipu_clkctrl DRA7_IPU_TIMER8_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};
@@ -3471,8 +3473,8 @@
 			timer13: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER13_CLKCTRL 24>;
-				clock-names = "fck";
+				clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER13_CLKCTRL 24>, <&timer_sys_clk_div>;
+				clock-names = "fck", "timer_sys_ck";
 				interrupts = <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>;
 				ti,timer-pwm;
 			};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 02/17] ARM: dts: DRA7: Add common IPU and DSP nodes
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
  2020-04-24 15:12 ` [PATCH 01/17] ARM: dts: dra7: add timer_sys_ck entries for IPU/DSP timers Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 03/17] ARM: dts: DRA74x: Add DSP2 processor device node Tero Kristo
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The DRA7xx family of SOCs have two IPUs and upto two DSP
processor subsystems in general. The IPU processor subsystem
contains dual-core ARM Cortex-M4 processors, while the DSP
processor subsystem is based on the TI's standard TMS320C66x
DSP CorePac core. The IPUs are very similar to those on OMAP5.

Two IPUs and one DSP processor subsystems is the most common
configuration. The processor device DT nodes have been added
for these processor subsystems, with the internal memories
added through 'reg' and 'reg-names' properties. The IPUs only
have an L2 RAM, whereas the DSPs have L1P, L1D and L2 RAM
memories.

NOTE:
1. The nodes do not have any mailboxes, timers or CMA regions
   assigned, they should be added in the respective board dts
   files.
2. The nodes haven been disabled by default and the enabling
   of these nodes is also left to the respective board dts
   files.

Signed-off-by: Suman Anna <s-anna@ti.com>
[t-kristo@ti.com: convert to ti-sysc support from legacy hwmod]
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra7.dtsi | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 4740989ed9c4..8f4e4941984f 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -410,6 +410,42 @@
 			ti,hwmods = "dmm";
 		};
 
+		ipu1: ipu@58820000 {
+			compatible = "ti,dra7-ipu";
+			reg = <0x58820000 0x10000>;
+			reg-names = "l2ram";
+			iommus = <&mmu_ipu1>;
+			status = "disabled";
+			resets = <&prm_ipu 0>, <&prm_ipu 1>;
+			clocks = <&ipu1_clkctrl DRA7_IPU1_MMU_IPU1_CLKCTRL 0>;
+			firmware-name = "dra7-ipu1-fw.xem4";
+		};
+
+		ipu2: ipu@55020000 {
+			compatible = "ti,dra7-ipu";
+			reg = <0x55020000 0x10000>;
+			reg-names = "l2ram";
+			iommus = <&mmu_ipu2>;
+			status = "disabled";
+			resets = <&prm_core 0>, <&prm_core 1>;
+			clocks = <&ipu2_clkctrl DRA7_IPU2_MMU_IPU2_CLKCTRL 0>;
+			firmware-name = "dra7-ipu2-fw.xem4";
+		};
+
+		dsp1: dsp@40800000 {
+			compatible = "ti,dra7-dsp";
+			reg = <0x40800000 0x48000>,
+			      <0x40e00000 0x8000>,
+			      <0x40f00000 0x8000>;
+			reg-names = "l2ram", "l1pram", "l1dram";
+			ti,bootreg = <&scm_conf 0x55c 10>;
+			iommus = <&mmu0_dsp1>, <&mmu1_dsp1>;
+			status = "disabled";
+			resets = <&prm_dsp1 0>;
+			clocks = <&dsp1_clkctrl DRA7_DSP1_MMU0_DSP1_CLKCTRL 0>;
+			firmware-name = "dra7-dsp1-fw.xe66";
+		};
+
 		target-module@40d01000 {
 			compatible = "ti,sysc-omap2", "ti,sysc";
 			reg = <0x40d01000 0x4>,
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 03/17] ARM: dts: DRA74x: Add DSP2 processor device node
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
  2020-04-24 15:12 ` [PATCH 01/17] ARM: dts: dra7: add timer_sys_ck entries for IPU/DSP timers Tero Kristo
  2020-04-24 15:12 ` [PATCH 02/17] ARM: dts: DRA7: Add common IPU and DSP nodes Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 04/17] ARM: dts: DRA74x: Add aliases for rproc nodes Tero Kristo
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The DRA7xx family of SoCs can contain upto two identical DSP
processor subsystems. The second DSP processor subsystem is
present only on the DRA74x/DRA76x variants. The processor
device DT node has therefore been added in disabled state for
this processor subsystem in the DRA74x specific DTS file.

NOTE:
1. The node does not have any mailboxes, timers or CMA region
   assigned, they should be added in the respective board dts
   files.
2. The node should also be enabled as per the individual product
   configuration in the corresponding board dts files.

Signed-off-by: Suman Anna <s-anna@ti.com>
[t-kristo@ti.com: converted to support ti-sysc from legacy hwmod]
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra74x.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
index 7b1c61298253..94ba80769001 100644
--- a/arch/arm/boot/dts/dra74x.dtsi
+++ b/arch/arm/boot/dts/dra74x.dtsi
@@ -124,6 +124,20 @@
 				ti,syscon-mmuconfig = <&dsp2_system 0x1>;
 			};
 		};
+
+		dsp2: dsp@41000000 {
+			compatible = "ti,dra7-dsp";
+			reg = <0x41000000 0x48000>,
+			      <0x41600000 0x8000>,
+			      <0x41700000 0x8000>;
+			reg-names = "l2ram", "l1pram", "l1dram";
+			ti,bootreg = <&scm_conf 0x560 10>;
+			iommus = <&mmu0_dsp2>, <&mmu1_dsp2>;
+			status = "disabled";
+			resets = <&prm_dsp2 0>;
+			clocks = <&dsp2_clkctrl DRA7_DSP2_MMU0_DSP2_CLKCTRL 0>;
+			firmware-name = "dra7-dsp2-fw.xe66";
+		};
 	};
 };
 
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 04/17] ARM: dts: DRA74x: Add aliases for rproc nodes
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (2 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 03/17] ARM: dts: DRA74x: Add DSP2 processor device node Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 05/17] ARM: dts: DRA72x: " Tero Kristo
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

Add aliases for all the IPU and DSP remoteproc processor
nodes common to all DRA74x/DRA76x/AM572x/AM574x boards.
The aliases uses the stem "rproc". The aliases are defined
in the order of the most common processors on the DRA74x
family.

The aliases can be overridden, if needed, in the respective
derivative board dts files.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra74x.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
index 94ba80769001..46d8e7615180 100644
--- a/arch/arm/boot/dts/dra74x.dtsi
+++ b/arch/arm/boot/dts/dra74x.dtsi
@@ -29,6 +29,13 @@
 		};
 	};
 
+	aliases {
+		rproc0 = &ipu1;
+		rproc1 = &ipu2;
+		rproc2 = &dsp1;
+		rproc3 = &dsp2;
+	};
+
 	pmu {
 		compatible = "arm,cortex-a15-pmu";
 		interrupt-parent = <&wakeupgen>;
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 05/17] ARM: dts: DRA72x: Add aliases for rproc nodes
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (3 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 04/17] ARM: dts: DRA74x: Add aliases for rproc nodes Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 06/17] ARM: dts: dra7-ipu-dsp-common: Move mailboxes into common files Tero Kristo
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

Add aliases for all the 3 remote processor nodes common to
all DRA72x/DRA71x/AM571x/AM570x boards. The aliases uses the
stem "rproc", and are defined in the order of the most common
processors on the DRA72x family. The ids are same as DRA74x
except for the missing DSP2.

The aliases can be overridden, if needed, in the respective
derivative board dts files.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra72x.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi
index da334489b18f..ae23ec14e8fa 100644
--- a/arch/arm/boot/dts/dra72x.dtsi
+++ b/arch/arm/boot/dts/dra72x.dtsi
@@ -10,6 +10,12 @@
 / {
 	compatible = "ti,dra722", "ti,dra72", "ti,dra7";
 
+	aliases {
+		rproc0 = &ipu1;
+		rproc1 = &ipu2;
+		rproc2 = &dsp1;
+	};
+
 	pmu {
 		compatible = "arm,cortex-a15-pmu";
 		interrupt-parent = <&wakeupgen>;
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 06/17] ARM: dts: dra7-ipu-dsp-common: Move mailboxes into common files
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (4 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 05/17] ARM: dts: DRA72x: " Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 07/17] ARM: dts: dra7-ipu-dsp-common: Add mailboxes to IPU and DSP nodes Tero Kristo
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The System Mailboxes 5 and 6 and their corresponding child sub-mailbox
(IPC 3.x) nodes are enabled in each of the DRA7xx and AM57xx board
dts files individually at present. These mailboxes enable the Remote
Processor Messaging (RPMsg) communication stack between the MPU host
processor and each of the IPU1, IPU2, DSP1 and DSP2 remote processors.

Move these nodes into two common dtsi files - dra7-ipu-dsp-common and
dra74-ipu-dsp-common files, which are then included in various board
dts files. These files can be used to add all the common configuration
properties (except memory data) required by remote processor nodes.
The memory pools and the remote processor nodes themselves are to be
enabled in the actual board dts files. The first file is to used by
platforms using DRA72x/DRA71x/AM571x/AM570x SoCs, and the second file
is to be used by platforms using DRA74x/DRA76x/AM572x/AM574x SoCs.
The second file includes the first file and contains additional data
only applicable for DSP2 remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/am571x-idk.dts              | 18 +---------------
 arch/arm/boot/dts/am572x-idk-common.dtsi      | 21 +------------------
 .../boot/dts/am57xx-beagle-x15-common.dtsi    | 21 +------------------
 arch/arm/boot/dts/dra7-evm-common.dtsi        |  1 +
 arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi    | 21 +++++++++++++++++++
 arch/arm/boot/dts/dra72-evm-common.dtsi       | 18 +---------------
 arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi   | 12 +++++++++++
 7 files changed, 38 insertions(+), 74 deletions(-)
 create mode 100644 arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
 create mode 100644 arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi

diff --git a/arch/arm/boot/dts/am571x-idk.dts b/arch/arm/boot/dts/am571x-idk.dts
index 669559c9c95b..98f12231728a 100644
--- a/arch/arm/boot/dts/am571x-idk.dts
+++ b/arch/arm/boot/dts/am571x-idk.dts
@@ -10,6 +10,7 @@
 #include "dra7-mmc-iodelay.dtsi"
 #include "dra72x-mmc-iodelay.dtsi"
 #include "am57xx-idk-common.dtsi"
+#include "dra7-ipu-dsp-common.dtsi"
 
 / {
 	model = "TI AM5718 IDK";
@@ -148,23 +149,6 @@
 	load-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
 };
 
-&mailbox5 {
-	status = "okay";
-	mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
-		status = "okay";
-	};
-	mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
-		status = "okay";
-	};
-};
-
-&mailbox6 {
-	status = "okay";
-	mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
-		status = "okay";
-	};
-};
-
 &pcie1_rc {
 	status = "okay";
 	gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm/boot/dts/am572x-idk-common.dtsi b/arch/arm/boot/dts/am572x-idk-common.dtsi
index ddf123620e96..06f51f5239f0 100644
--- a/arch/arm/boot/dts/am572x-idk-common.dtsi
+++ b/arch/arm/boot/dts/am572x-idk-common.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include "am57xx-idk-common.dtsi"
+#include "dra74-ipu-dsp-common.dtsi"
 
 / {
 	memory@0 {
@@ -146,23 +147,3 @@
 	status = "okay";
 	gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
 };
-
-&mailbox5 {
-	status = "okay";
-	mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
-		status = "okay";
-	};
-	mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
-		status = "okay";
-	};
-};
-
-&mailbox6 {
-	status = "okay";
-	mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
-		status = "okay";
-	};
-	mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
-		status = "okay";
-	};
-};
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
index a813a0cf3ff3..33bb89eee658 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
@@ -7,6 +7,7 @@
 #include "am5728.dtsi"
 #include "am57xx-commercial-grade.dtsi"
 #include "dra74x-mmc-iodelay.dtsi"
+#include "dra74-ipu-dsp-common.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
@@ -583,23 +584,3 @@
 	tx-num-evt = <32>;
 	rx-num-evt = <32>;
 };
-
-&mailbox5 {
-	status = "okay";
-	mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
-		status = "okay";
-	};
-	mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
-		status = "okay";
-	};
-};
-
-&mailbox6 {
-	status = "okay";
-	mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
-		status = "okay";
-	};
-	mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
-		status = "okay";
-	};
-};
diff --git a/arch/arm/boot/dts/dra7-evm-common.dtsi b/arch/arm/boot/dts/dra7-evm-common.dtsi
index 23244b5a9942..f89a64cbcd53 100644
--- a/arch/arm/boot/dts/dra7-evm-common.dtsi
+++ b/arch/arm/boot/dts/dra7-evm-common.dtsi
@@ -3,6 +3,7 @@
  * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
  */
 
+#include "dra74-ipu-dsp-common.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/clock/ti-dra7-atl.h>
 #include <dt-bindings/input/input.h>
diff --git a/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
new file mode 100644
index 000000000000..478a07e29538
--- /dev/null
+++ b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Common IPU and DSP data for TI DRA7xx/AM57xx platforms
+ */
+
+&mailbox5 {
+	status = "okay";
+	mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
+		status = "okay";
+	};
+	mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
+		status = "okay";
+	};
+};
+
+&mailbox6 {
+	status = "okay";
+	mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
+		status = "okay";
+	};
+};
diff --git a/arch/arm/boot/dts/dra72-evm-common.dtsi b/arch/arm/boot/dts/dra72-evm-common.dtsi
index 01558a86af82..c84b63bf0fc8 100644
--- a/arch/arm/boot/dts/dra72-evm-common.dtsi
+++ b/arch/arm/boot/dts/dra72-evm-common.dtsi
@@ -5,6 +5,7 @@
 /dts-v1/;
 
 #include "dra72x.dtsi"
+#include "dra7-ipu-dsp-common.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/clock/ti-dra7-atl.h>
 
@@ -583,23 +584,6 @@
 	rx-num-evt = <32>;
 };
 
-&mailbox5 {
-	status = "okay";
-	mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
-		status = "okay";
-	};
-	mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
-		status = "okay";
-	};
-};
-
-&mailbox6 {
-	status = "okay";
-	mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
-		status = "okay";
-	};
-};
-
 &pcie1_rc {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
new file mode 100644
index 000000000000..645063d0df13
--- /dev/null
+++ b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Common IPU and DSP data for TI DRA74x/DRA76x/AM572x/AM574x platforms
+ */
+
+#include "dra7-ipu-dsp-common.dtsi"
+
+&mailbox6 {
+	mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
+		status = "okay";
+	};
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 07/17] ARM: dts: dra7-ipu-dsp-common: Add mailboxes to IPU and DSP nodes
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (5 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 06/17] ARM: dts: dra7-ipu-dsp-common: Move mailboxes into common files Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 08/17] ARM: dts: dra7-ipu-dsp-common: Add timers " Tero Kristo
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

Add the required 'mboxes' property to all the IPU and DSP remote
processors (IPU1, IPU2, DSP1 and DSP2) in the two available common
dtsi files - dra7-ipu-dsp-common and dra74-ipu-dsp-common dtsi files.
The latter file is for platforms having DRA74x/DRA76x/AM572x/AM574x
SoCs which do have a DSP2 processor in addition to the other common
remote processors. The common data is added to the former file, and
the DSP2 only data is added to the latter file.

The mailboxes are required for running the Remote Processor Messaging
(RPMsg) stack between the host processor and each of the remote
processors. Each of the remote processors uses a single sub-mailbox
node, the IPUs are assumed to be running in SMP-mode. The chosen
sub-mailboxes match the values used in the current firmware images.
This can be changed, if needed, as per the system integration needs
after making appropriate changes on the firmware side as well.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi  | 12 ++++++++++++
 arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
index 478a07e29538..8a53da1c5f2e 100644
--- a/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
+++ b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
@@ -19,3 +19,15 @@
 		status = "okay";
 	};
 };
+
+&ipu2 {
+	mboxes = <&mailbox6 &mbox_ipu2_ipc3x>;
+};
+
+&ipu1 {
+	mboxes = <&mailbox5 &mbox_ipu1_ipc3x>;
+};
+
+&dsp1 {
+	mboxes = <&mailbox5 &mbox_dsp1_ipc3x>;
+};
diff --git a/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
index 645063d0df13..6e31c1c27fd4 100644
--- a/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
+++ b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
@@ -10,3 +10,7 @@
 		status = "okay";
 	};
 };
+
+&dsp2 {
+	mboxes = <&mailbox6 &mbox_dsp2_ipc3x>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 08/17] ARM: dts: dra7-ipu-dsp-common: Add timers to IPU and DSP nodes
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (6 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 07/17] ARM: dts: dra7-ipu-dsp-common: Add mailboxes to IPU and DSP nodes Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 09/17] ARM: dts: dra7-evm: Add CMA pools and enable IPU & DSP rprocs Tero Kristo
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The BIOS System Tick timers have been added for all the IPU and
DSP remoteproc devices in the DRA7 SoC family. The data is added
to the two common dra7-ipu-dsp-common and dra74-ipu-dsp-common
dtsi files that are included by all the desired board files. The
following timers are chosen, as per the timers used on the current
firmware images:
        IPU2: GPTimer 3
        IPU1: GPTimer 11
        DSP1: GPTimer 5
        DSP2: GPTimer 6

The timers are optional, but are mandatory to support advanced device
management features such as power management and watchdog support.
The above are added to successfully boot and execute firmware images
configured with the respective timers, images that use internal
processor subsystem timers are not affected. The timers can be
changed or removed as per the system integration needs, if needed.

Each of the IPUs has two Cortex-M4 processors, and is currently
expected to be running in SMP-mode, so only a single timer suffices
to provide the BIOS tick timer. An additional timer should be added
for the second processor in IPU if it were to be run in non-SMP mode.
The timer value also needs to be unique from the ones used by other
processors so that they can be run simultaneously.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi  | 3 +++
 arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi | 1 +
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
index 8a53da1c5f2e..23ce3b67faf7 100644
--- a/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
+++ b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
@@ -22,12 +22,15 @@
 
 &ipu2 {
 	mboxes = <&mailbox6 &mbox_ipu2_ipc3x>;
+	ti,timers = <&timer3>;
 };
 
 &ipu1 {
 	mboxes = <&mailbox5 &mbox_ipu1_ipc3x>;
+	ti,timers = <&timer11>;
 };
 
 &dsp1 {
 	mboxes = <&mailbox5 &mbox_dsp1_ipc3x>;
+	ti,timers = <&timer5>;
 };
diff --git a/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
index 6e31c1c27fd4..a546cf740365 100644
--- a/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
+++ b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
@@ -13,4 +13,5 @@
 
 &dsp2 {
 	mboxes = <&mailbox6 &mbox_dsp2_ipc3x>;
+	ti,timers = <&timer6>;
 };
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 09/17] ARM: dts: dra7-evm: Add CMA pools and enable IPU & DSP rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (7 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 08/17] ARM: dts: dra7-ipu-dsp-common: Add timers " Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 10/17] ARM: dts: dra72-evm: Add CMA pools and enable IPUs & DSP1 rprocs Tero Kristo
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for all the IPU and DSP
remoteproc devices on DRA7 EVM board. These nodes are assigned to the
respective rproc device nodes, and all the IPU and DSP remote processors
are enabled for this board.

The current CMA pools and sizes are defined statically for each device.
The CMA pools and sizes are defined using 64-bit values to support LPAE.
The starting addresses are fixed to meet current dependencies on the
remote processor firmwares, and this will go away when the remote-side
code has been improved to gather this information runtime during its
initialization.

An associated pair of the rproc node and its CMA node can be disabled
later on if there is no use-case defined to use that remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra7-evm.dts | 54 ++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index af06a55d1c5c..7aeb30daf3b8 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -35,6 +35,40 @@
 		regulator-max-microvolt = <1800000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_memory_region: ipu2-memory@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_memory_region: dsp1-memory@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_memory_region: ipu1-memory@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp2_memory_region: dsp2-memory@9f000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9f000000 0x0 0x800000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	evm_3v3_sd: fixedregulator-sd {
 		compatible = "regulator-fixed";
 		regulator-name = "evm_3v3_sd";
@@ -537,3 +571,23 @@
 	pinctrl-1 = <&dcan1_pins_sleep>;
 	pinctrl-2 = <&dcan1_pins_default>;
 };
+
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_memory_region>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_memory_region>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_memory_region>;
+};
+
+&dsp2 {
+	status = "okay";
+	memory-region = <&dsp2_memory_region>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 10/17] ARM: dts: dra72-evm: Add CMA pools and enable IPUs & DSP1 rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (8 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 09/17] ARM: dts: dra7-evm: Add CMA pools and enable IPU & DSP rprocs Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 11/17] ARM: dts: dra72-evm-revc: " Tero Kristo
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for both the IPUs and the
DSP1 remoteproc devices on DRA72 EVM board. These nodes are assigned to
the respective rproc device nodes, and both the IPUs and the DSP1 remote
processors are enabled for this board.

The current CMA pools and sizes are defined statically for each device.
The addresses chosen are the same as the respective processors on the
DRA7 EVM board to maintain firmware compatibility between the two boards.
The CMA pools and sizes are defined using 64-bit values to support LPAE.
The starting addresses are fixed to meet current dependencies on the
remote processor firmwares, and this will go away when the remote-side
code has been improved to gather this information runtime during its
initialization.

An associated pair of the rproc node and its CMA node can be disabled
later on if there is no use-case defined to use that remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra72-evm.dts | 42 +++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/dra72-evm.dts b/arch/arm/boot/dts/dra72-evm.dts
index 9adb77585ef1..951152fe206a 100644
--- a/arch/arm/boot/dts/dra72-evm.dts
+++ b/arch/arm/boot/dts/dra72-evm.dts
@@ -12,6 +12,33 @@
 		reg = <0x0 0x80000000 0x0 0x40000000>; /* 1024 MB */
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_memory_region: ipu2-memory@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_memory_region: dsp1-memory@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_memory_region: ipu1-memory@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	evm_1v8_sw: fixedregulator-evm_1v8 {
 		compatible = "regulator-fixed";
 		regulator-name = "evm_1v8";
@@ -78,3 +105,18 @@
 	pinctrl-3 = <&mmc2_pins_hs200 &mmc2_iodelay_hs200_rev10_conf>;
 	vmmc-supply = <&evm_1v8_sw>;
 };
+
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_memory_region>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_memory_region>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_memory_region>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 11/17] ARM: dts: dra72-evm-revc: Add CMA pools and enable IPUs & DSP1 rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (9 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 10/17] ARM: dts: dra72-evm: Add CMA pools and enable IPUs & DSP1 rprocs Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 12/17] ARM: dts: dra71-evm: " Tero Kristo
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for both the IPUs and
the DSP1 remoteproc devices on the DRA72 EVM rev C board, and assigned
to the respective rproc device nodes. These match the configuration
used on the DRA72 EVM board. Both the CMA nodes and the corresponding
rproc nodes are also enabled to enable these processors on the
DRA72 EVM rev C board.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra72-evm-revc.dts | 42 ++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/dra72-evm-revc.dts b/arch/arm/boot/dts/dra72-evm-revc.dts
index 2bb2e8be6276..6e70858f6313 100644
--- a/arch/arm/boot/dts/dra72-evm-revc.dts
+++ b/arch/arm/boot/dts/dra72-evm-revc.dts
@@ -14,6 +14,33 @@
 		reg = <0x0 0x80000000 0x0 0x80000000>; /* 2GB */
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_cma_pool: ipu2_cma@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_cma_pool: dsp1_cma@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_cma_pool: ipu1_cma@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	evm_1v8_sw: fixedregulator-evm_1v8 {
 		compatible = "regulator-fixed";
 		regulator-name = "evm_1v8";
@@ -113,3 +140,18 @@
 	pinctrl-3 = <&mmc2_pins_hs200 &mmc2_iodelay_hs200_rev20_conf>;
 	vmmc-supply = <&evm_1v8_sw>;
 };
+
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_cma_pool>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_cma_pool>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_cma_pool>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 12/17] ARM: dts: dra71-evm: Add CMA pools and enable IPUs & DSP1 rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (10 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 11/17] ARM: dts: dra72-evm-revc: " Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 13/17] ARM: dts: dra76-evm: Add CMA pools and enable IPU & DSP rprocs Tero Kristo
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for both the IPUs and the
DSP1 remoteproc devices on DRA71 EVM board. These nodes are assigned to
the respective rproc device nodes, and both the IPUs and the DSP1 remote
processors are enabled for this board.

The current CMA pools and sizes are defined statically for each device.
The addresses chosen are the same as the respective processors on the
DRA72 EVM board to maintain firmware compatibility between the two boards.
The CMA pools and sizes are defined using 64-bit values to support LPAE.
The starting addresses are fixed to meet current dependencies on the
remote processor firmwares, and this will go away when the remote-side
code has been improved to gather this information runtime during its
initialization.

An associated pair of the rproc node and its CMA node can be disabled
later on if there is no use-case defined to use that remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra71-evm.dts | 42 +++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/dra71-evm.dts b/arch/arm/boot/dts/dra71-evm.dts
index fabeb7704753..a5d275ea7bd3 100644
--- a/arch/arm/boot/dts/dra71-evm.dts
+++ b/arch/arm/boot/dts/dra71-evm.dts
@@ -17,6 +17,33 @@
 		reg = <0x0 0x80000000 0x0 0x80000000>; /* 2GB */
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_memory_region: ipu2-memory@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_memory_region: dsp1-memory@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_memory_region: ipu1-memory@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	vpo_sd_1v8_3v3: gpio-regulator-TPS74801 {
 		compatible = "regulator-gpio";
 
@@ -270,3 +297,18 @@
 &extcon_usb2 {
 	vbus-gpio = <&pcf_lcd 15 GPIO_ACTIVE_HIGH>;
 };
+
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_memory_region>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_memory_region>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_memory_region>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 13/17] ARM: dts: dra76-evm: Add CMA pools and enable IPU & DSP rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (11 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 12/17] ARM: dts: dra71-evm: " Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 14/17] ARM: dts: beagle-x15-common: " Tero Kristo
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for all the IPU and
the DSP remoteproc devices on the DRA76 EVM board, and assigned to
the respective rproc device nodes. These match the configuration
used on the DRA7 EVM board. Both the CMA nodes and the corresponding
rproc nodes are also enabled to enable these processors on the
DRA76 EVM board.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra76-evm.dts | 54 +++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/dra76-evm.dts b/arch/arm/boot/dts/dra76-evm.dts
index e958cb3d1b31..820a0ece20d4 100644
--- a/arch/arm/boot/dts/dra76-evm.dts
+++ b/arch/arm/boot/dts/dra76-evm.dts
@@ -25,6 +25,40 @@
 		reg = <0x0 0x80000000 0x0 0x80000000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_cma_pool: ipu2_cma@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_cma_pool: dsp1_cma@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_cma_pool: ipu1_cma@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp2_cma_pool: dsp2_cma@9f000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9f000000 0x0 0x800000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	vsys_12v0: fixedregulator-vsys12v0 {
 		/* main supply */
 		compatible = "regulator-fixed";
@@ -548,3 +582,23 @@
 		data-lanes = <1 2>;
 	};
 };
+
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_cma_pool>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_cma_pool>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_cma_pool>;
+};
+
+&dsp2 {
+	status = "okay";
+	memory-region = <&dsp2_cma_pool>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 14/17] ARM: dts: beagle-x15-common: Add CMA pools and enable IPU & DSP rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (12 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 13/17] ARM: dts: dra76-evm: Add CMA pools and enable IPU & DSP rprocs Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 15/17] ARM: dts: am572x-idk-common: " Tero Kristo
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for all the IPU and DSP
remoteproc devices on all the AM57xx BeagleBoard-X15 boards. These nodes
are assigned to the respective rproc device nodes, and all the IPU and
DSP remote processors are enabled for all these boards.

The current CMA pools and sizes are defined statically for each device.
The addresses chosen are the same as the respective processors on the
DRA7 EVM board to maintain firmware compatibility between the two boards.
The CMA pools and sizes are defined using 64-bit values to support LPAE.
The starting addresses are fixed to meet current dependencies on the
remote processor firmwares, and this will go away when the remote-side
code has been improved to gather this information runtime during its
initialization.

An associated pair of the rproc node and its CMA node can be disabled
later on if there is no use-case defined to use that remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 .../boot/dts/am57xx-beagle-x15-common.dtsi    | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
index 33bb89eee658..9cfdc29c283d 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
@@ -51,6 +51,40 @@
 		regulator-boot-on;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_memory_region: ipu2-memory@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_memory_region: dsp1-memory@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_memory_region: ipu1-memory@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp2_memory_region: dsp2-memory@9f000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9f000000 0x0 0x800000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	vdd_3v3: fixedregulator-vdd_3v3 {
 		compatible = "regulator-fixed";
 		regulator-name = "vdd_3v3";
@@ -584,3 +618,23 @@
 	tx-num-evt = <32>;
 	rx-num-evt = <32>;
 };
+
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_memory_region>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_memory_region>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_memory_region>;
+};
+
+&dsp2 {
+	status = "okay";
+	memory-region = <&dsp2_memory_region>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 15/17] ARM: dts: am572x-idk-common: Add CMA pools and enable IPU & DSP rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (13 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 14/17] ARM: dts: beagle-x15-common: " Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 16/17] ARM: dts: am571x-idk: Add CMA pools and enable IPUs & DSP1 rprocs Tero Kristo
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for all the IPU and DSP
remoteproc devices in the am572x-idk-common.dtsi file that is common to
both the AM572x and AM574x IDK boards. These nodes are assigned to the
respective rproc device nodes, and all the IPU and DSP remote processors
are enabled.

The current CMA pools and sizes are defined statically for each device.
The addresses chosen are the same as the respective processors on
the AM57xx EVM board to maintain firmware compatibility between the
two boards. The CMA pools and sizes are defined using 64-bit values
to support LPAE. The starting addresses are fixed to meet current
dependencies on the remote processor firmwares, and this will go
away when the remote-side code has been improved to gather this
information runtime during its initialization.

An associated pair of the rproc node and its CMA node can be disabled
later on if there is no use-case defined to use that remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/am572x-idk-common.dtsi | 54 ++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/am572x-idk-common.dtsi b/arch/arm/boot/dts/am572x-idk-common.dtsi
index 06f51f5239f0..37ce2d7c4173 100644
--- a/arch/arm/boot/dts/am572x-idk-common.dtsi
+++ b/arch/arm/boot/dts/am572x-idk-common.dtsi
@@ -14,6 +14,40 @@
 		reg = <0x0 0x80000000 0x0 0x80000000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_memory_region: ipu2-memory@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_memory_region: dsp1-memory@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_memory_region: ipu1-memory@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp2_memory_region: dsp2-memory@9f000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9f000000 0x0 0x800000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	status-leds {
 		compatible = "gpio-leds";
 		cpu0-led {
@@ -147,3 +181,23 @@
 	status = "okay";
 	gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
 };
+
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_memory_region>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_memory_region>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_memory_region>;
+};
+
+&dsp2 {
+	status = "okay";
+	memory-region = <&dsp2_memory_region>;
+};
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 16/17] ARM: dts: am571x-idk: Add CMA pools and enable IPUs & DSP1 rprocs
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (14 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 15/17] ARM: dts: am572x-idk-common: " Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:12 ` [PATCH 17/17] ARM: dts: dra7-ipu-dsp-common: Add watchdog timers to IPU and DSP nodes Tero Kristo
  2020-04-24 15:51 ` [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tony Lindgren
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel

From: Suman Anna <s-anna@ti.com>

The CMA reserved memory nodes have been added for both the IPUs and the
DSP1 remoteproc devices on the AM571x IDK board. These nodes are assigned
to the respective rproc device nodes, and both the IPUs and the DSP1
remote processors are enabled for this board.

The current CMA pools and sizes are defined statically for each device.
The addresses chosen are the same as the respective processors on the
DRA72 EVM board to maintain firmware compatibility between the two boards.
The CMA pools and sizes are defined using 64-bit values to support LPAE.
The starting addresses are fixed to meet current dependencies on the
remote processor firmwares, and this will go away when the remote-side
code has been improved to gather this information runtime during its
initialization.

An associated pair of the rproc node and its CMA node can be disabled
later on if there is no use-case defined to use that remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/am571x-idk.dts | 42 ++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/am571x-idk.dts b/arch/arm/boot/dts/am571x-idk.dts
index 98f12231728a..62eb2b6ff10b 100644
--- a/arch/arm/boot/dts/am571x-idk.dts
+++ b/arch/arm/boot/dts/am571x-idk.dts
@@ -21,6 +21,33 @@
 		reg = <0x0 0x80000000 0x0 0x40000000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ipu2_memory_region: ipu2-memory@95800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x95800000 0x0 0x3800000>;
+			reusable;
+			status = "okay";
+		};
+
+		dsp1_memory_region: dsp1-memory@99000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x99000000 0x0 0x4000000>;
+			reusable;
+			status = "okay";
+		};
+
+		ipu1_memory_region: ipu1-memory@9d000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x9d000000 0x0 0x2000000>;
+			reusable;
+			status = "okay";
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		cpu0-led {
@@ -149,6 +176,21 @@
 	load-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
 };
 
+&ipu2 {
+	status = "okay";
+	memory-region = <&ipu2_memory_region>;
+};
+
+&ipu1 {
+	status = "okay";
+	memory-region = <&ipu1_memory_region>;
+};
+
+&dsp1 {
+	status = "okay";
+	memory-region = <&dsp1_memory_region>;
+};
+
 &pcie1_rc {
 	status = "okay";
 	gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 17/17] ARM: dts: dra7-ipu-dsp-common: Add watchdog timers to IPU and DSP nodes
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (15 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 16/17] ARM: dts: am571x-idk: Add CMA pools and enable IPUs & DSP1 rprocs Tero Kristo
@ 2020-04-24 15:12 ` Tero Kristo
  2020-04-24 15:51 ` [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tony Lindgren
  17 siblings, 0 replies; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:12 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: s-anna, linux-arm-kernel, Angela Stegmaier

From: Suman Anna <s-anna@ti.com>

The watchdog timer information has been added to all the IPU and DSP
remote processor device nodes in the DRA7xx/AM57xx SoC families. The
data has been added to the two common dra7-ipu-dsp-common and
dra74-ipu-dsp-common dtsi files that can be included by all the
desired board files. The following timers are chosen as the watchdog
timers, as per the usage on the current firmware images:
        IPU2: GPTimers 4 & 9 (one for each Cortex-M4 core)
        IPU1: GPTimers 7 & 8 (one for each Cortex-M4 core)
        DSP1: GPTimer 10
        DSP2: GPTimer 13

Each of the IPUs has two Cortex-M4 processors and so uses a timer
each for providing watchdog support on that processor irrespective of
whether the IPU is running in SMP-mode or non-SMP node. The chosen
timers also need to be unique from the ones used by other processors
(regular timers or watchdog timers) so that they can be supported
simultaneously.

The MPU-side drivers will use this data to initialize the watchdog
timer(s), and listen for any watchdog triggers. The BIOS-side code on
these processors needs to configure/refresh the corresponding timer
properly to not throw a watchdog error.

The watchdog timers are optional in general, but are mandatory to
be added to support watchdog error recovery on a particular processor.
These timers can be changed or removed as per the system integration
needs, alongside appropriate equivalent changes on the firmware side.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi  | 3 +++
 arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi | 1 +
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
index 23ce3b67faf7..a25749a1c365 100644
--- a/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
+++ b/arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi
@@ -23,14 +23,17 @@
 &ipu2 {
 	mboxes = <&mailbox6 &mbox_ipu2_ipc3x>;
 	ti,timers = <&timer3>;
+	ti,watchdog-timers = <&timer4>, <&timer9>;
 };
 
 &ipu1 {
 	mboxes = <&mailbox5 &mbox_ipu1_ipc3x>;
 	ti,timers = <&timer11>;
+	ti,watchdog-timers = <&timer7>, <&timer8>;
 };
 
 &dsp1 {
 	mboxes = <&mailbox5 &mbox_dsp1_ipc3x>;
 	ti,timers = <&timer5>;
+	ti,watchdog-timers = <&timer10>;
 };
diff --git a/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
index a546cf740365..b1147a4b77f9 100644
--- a/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
+++ b/arch/arm/boot/dts/dra74-ipu-dsp-common.dtsi
@@ -14,4 +14,5 @@
 &dsp2 {
 	mboxes = <&mailbox6 &mbox_dsp2_ipc3x>;
 	ti,timers = <&timer6>;
+	ti,watchdog-timers = <&timer13>;
 };
-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support
  2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
                   ` (16 preceding siblings ...)
  2020-04-24 15:12 ` [PATCH 17/17] ARM: dts: dra7-ipu-dsp-common: Add watchdog timers to IPU and DSP nodes Tero Kristo
@ 2020-04-24 15:51 ` Tony Lindgren
  2020-04-24 15:54   ` Tero Kristo
  17 siblings, 1 reply; 21+ messages in thread
From: Tony Lindgren @ 2020-04-24 15:51 UTC (permalink / raw)
  To: Tero Kristo; +Cc: linux-omap, s-anna, linux-arm-kernel

* Tero Kristo <t-kristo@ti.com> [200424 08:13]:
> Hi Tony,
> 
> This series adds the DT nodes necessary for remoteproc support, now that
> the driver side changes are (mostly) in. Couple of things to note
> though.
> 
> 1) There is a new IOMMU issue, for which I posted a fix today [1]
> 2) The remoteproc core still has an issue for which there is ongoing
>    discussion [2]
> 
> With these two issue taken care of, the omap remoteproc support is
> functional. The question though is, whether we should just wait until
> the above two issues are resolved and merge the DT patches post that, or
> merge the DT patches with status = "disabled".

If there are no dependencies between the pending driver fixes and
the dts changes I see no reason to not merge the dts changes.

> There aren't any boot failures without the mentioned two issues though,
> as one needs to enable the RPMSG_VIRTIO support before the failures
> really kick in (issue [2]), and this config is not enabled for OMAPs
> yet. Also, multi-v7 config doesn't seem to enable omap remoteproc,
> so that is safe also.

OK thanks for checking that.

> Another thing I was considering myself was to squash all the board
> specific reserved-memory region patches into the
> dra7-ipu-dsp-common.dtsi files. However Suman wants to have these
> separate and as he is the actual author for these, I posted them in this
> form. But anyway, just so you know it would be possible to merge them
> together.

OK. The combining of common features can be done in later patches
too.

Regards,

Tony

> [1] https://lore.kernel.org/linux-iommu/20200424145828.3159-1-t-kristo@ti.com/T/#u
> [2] https://lkml.org/lkml/2020/4/20/1094

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support
  2020-04-24 15:51 ` [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tony Lindgren
@ 2020-04-24 15:54   ` Tero Kristo
  2020-05-05 18:14     ` Tony Lindgren
  0 siblings, 1 reply; 21+ messages in thread
From: Tero Kristo @ 2020-04-24 15:54 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, s-anna, linux-arm-kernel

On 24/04/2020 18:51, Tony Lindgren wrote:
> * Tero Kristo <t-kristo@ti.com> [200424 08:13]:
>> Hi Tony,
>>
>> This series adds the DT nodes necessary for remoteproc support, now that
>> the driver side changes are (mostly) in. Couple of things to note
>> though.
>>
>> 1) There is a new IOMMU issue, for which I posted a fix today [1]
>> 2) The remoteproc core still has an issue for which there is ongoing
>>     discussion [2]
>>
>> With these two issue taken care of, the omap remoteproc support is
>> functional. The question though is, whether we should just wait until
>> the above two issues are resolved and merge the DT patches post that, or
>> merge the DT patches with status = "disabled".
> 
> If there are no dependencies between the pending driver fixes and
> the dts changes I see no reason to not merge the dts changes.

Yeah, no hard dependencies as such, just that things won't work properly 
before they are in.

-Tero

> 
>> There aren't any boot failures without the mentioned two issues though,
>> as one needs to enable the RPMSG_VIRTIO support before the failures
>> really kick in (issue [2]), and this config is not enabled for OMAPs
>> yet. Also, multi-v7 config doesn't seem to enable omap remoteproc,
>> so that is safe also.
> 
> OK thanks for checking that.
> 
>> Another thing I was considering myself was to squash all the board
>> specific reserved-memory region patches into the
>> dra7-ipu-dsp-common.dtsi files. However Suman wants to have these
>> separate and as he is the actual author for these, I posted them in this
>> form. But anyway, just so you know it would be possible to merge them
>> together.
> 
> OK. The combining of common features can be done in later patches
> too.
> 
> Regards,
> 
> Tony
> 
>> [1] https://lore.kernel.org/linux-iommu/20200424145828.3159-1-t-kristo@ti.com/T/#u
>> [2] https://lkml.org/lkml/2020/4/20/1094

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support
  2020-04-24 15:54   ` Tero Kristo
@ 2020-05-05 18:14     ` Tony Lindgren
  0 siblings, 0 replies; 21+ messages in thread
From: Tony Lindgren @ 2020-05-05 18:14 UTC (permalink / raw)
  To: Tero Kristo; +Cc: linux-omap, s-anna, linux-arm-kernel

* Tero Kristo <t-kristo@ti.com> [200424 15:55]:
> On 24/04/2020 18:51, Tony Lindgren wrote:
> > * Tero Kristo <t-kristo@ti.com> [200424 08:13]:
> > > Hi Tony,
> > > 
> > > This series adds the DT nodes necessary for remoteproc support, now that
> > > the driver side changes are (mostly) in. Couple of things to note
> > > though.
> > > 
> > > 1) There is a new IOMMU issue, for which I posted a fix today [1]
> > > 2) The remoteproc core still has an issue for which there is ongoing
> > >     discussion [2]
> > > 
> > > With these two issue taken care of, the omap remoteproc support is
> > > functional. The question though is, whether we should just wait until
> > > the above two issues are resolved and merge the DT patches post that, or
> > > merge the DT patches with status = "disabled".
> > 
> > If there are no dependencies between the pending driver fixes and
> > the dts changes I see no reason to not merge the dts changes.
> 
> Yeah, no hard dependencies as such, just that things won't work properly
> before they are in.

Applying these all into omap-for-v5.8/dt thanks.

Tony

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-05-05 18:14 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 15:12 [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tero Kristo
2020-04-24 15:12 ` [PATCH 01/17] ARM: dts: dra7: add timer_sys_ck entries for IPU/DSP timers Tero Kristo
2020-04-24 15:12 ` [PATCH 02/17] ARM: dts: DRA7: Add common IPU and DSP nodes Tero Kristo
2020-04-24 15:12 ` [PATCH 03/17] ARM: dts: DRA74x: Add DSP2 processor device node Tero Kristo
2020-04-24 15:12 ` [PATCH 04/17] ARM: dts: DRA74x: Add aliases for rproc nodes Tero Kristo
2020-04-24 15:12 ` [PATCH 05/17] ARM: dts: DRA72x: " Tero Kristo
2020-04-24 15:12 ` [PATCH 06/17] ARM: dts: dra7-ipu-dsp-common: Move mailboxes into common files Tero Kristo
2020-04-24 15:12 ` [PATCH 07/17] ARM: dts: dra7-ipu-dsp-common: Add mailboxes to IPU and DSP nodes Tero Kristo
2020-04-24 15:12 ` [PATCH 08/17] ARM: dts: dra7-ipu-dsp-common: Add timers " Tero Kristo
2020-04-24 15:12 ` [PATCH 09/17] ARM: dts: dra7-evm: Add CMA pools and enable IPU & DSP rprocs Tero Kristo
2020-04-24 15:12 ` [PATCH 10/17] ARM: dts: dra72-evm: Add CMA pools and enable IPUs & DSP1 rprocs Tero Kristo
2020-04-24 15:12 ` [PATCH 11/17] ARM: dts: dra72-evm-revc: " Tero Kristo
2020-04-24 15:12 ` [PATCH 12/17] ARM: dts: dra71-evm: " Tero Kristo
2020-04-24 15:12 ` [PATCH 13/17] ARM: dts: dra76-evm: Add CMA pools and enable IPU & DSP rprocs Tero Kristo
2020-04-24 15:12 ` [PATCH 14/17] ARM: dts: beagle-x15-common: " Tero Kristo
2020-04-24 15:12 ` [PATCH 15/17] ARM: dts: am572x-idk-common: " Tero Kristo
2020-04-24 15:12 ` [PATCH 16/17] ARM: dts: am571x-idk: Add CMA pools and enable IPUs & DSP1 rprocs Tero Kristo
2020-04-24 15:12 ` [PATCH 17/17] ARM: dts: dra7-ipu-dsp-common: Add watchdog timers to IPU and DSP nodes Tero Kristo
2020-04-24 15:51 ` [PATCH 00/17] ARM: dts: dra7/am57xx: remoteproc support Tony Lindgren
2020-04-24 15:54   ` Tero Kristo
2020-05-05 18:14     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).