linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers
@ 2018-10-03 15:11 Fabrice Gasnier
  2018-10-03 15:11 ` [PATCH 1/3] ARM: dts: stm32: Add dmas to timer on stm32mp157c Fabrice Gasnier
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Fabrice Gasnier @ 2018-10-03 15:11 UTC (permalink / raw)
  To: alexandre.torgue
  Cc: robh+dt, mcoquelin.stm32, mark.rutland, linux-arm-kernel,
	devicetree, linux-kernel, linux-stm32, fabrice.gasnier

This series adds dmas description to stm32mp157c device tree file.
But dmas are kept disabled by default on all boards. They are only
necessary for PWM capture. So, spare them for other usage by default.

Fabrice Gasnier (3):
  ARM: dts: stm32: Add dmas to timer on stm32mp157c
  ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1
  ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1

 arch/arm/boot/dts/stm32mp157c-ed1.dts |  3 ++
 arch/arm/boot/dts/stm32mp157c-ev1.dts |  7 +++++
 arch/arm/boot/dts/stm32mp157c.dtsi    | 58 +++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)

-- 
1.9.1


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

* [PATCH 1/3] ARM: dts: stm32: Add dmas to timer on stm32mp157c
  2018-10-03 15:11 [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Fabrice Gasnier
@ 2018-10-03 15:11 ` Fabrice Gasnier
  2018-10-03 15:11 ` [PATCH 2/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1 Fabrice Gasnier
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Fabrice Gasnier @ 2018-10-03 15:11 UTC (permalink / raw)
  To: alexandre.torgue
  Cc: robh+dt, mcoquelin.stm32, mark.rutland, linux-arm-kernel,
	devicetree, linux-kernel, linux-stm32, fabrice.gasnier

Add DMAs to enable PWM input capture using STM32 timers on stm32mp157c.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
 arch/arm/boot/dts/stm32mp157c.dtsi | 58 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index 661be94..17a748f 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -98,6 +98,12 @@
 			reg = <0x40000000 0x400>;
 			clocks = <&rcc TIM2_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 18 0x400 0x1>,
+			       <&dmamux1 19 0x400 0x1>,
+			       <&dmamux1 20 0x400 0x1>,
+			       <&dmamux1 21 0x400 0x1>,
+			       <&dmamux1 22 0x400 0x1>;
+			dma-names = "ch1", "ch2", "ch3", "ch4", "up";
 			status = "disabled";
 
 			pwm {
@@ -119,6 +125,13 @@
 			reg = <0x40001000 0x400>;
 			clocks = <&rcc TIM3_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 23 0x400 0x1>,
+			       <&dmamux1 24 0x400 0x1>,
+			       <&dmamux1 25 0x400 0x1>,
+			       <&dmamux1 26 0x400 0x1>,
+			       <&dmamux1 27 0x400 0x1>,
+			       <&dmamux1 28 0x400 0x1>;
+			dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig";
 			status = "disabled";
 
 			pwm {
@@ -140,6 +153,11 @@
 			reg = <0x40002000 0x400>;
 			clocks = <&rcc TIM4_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 29 0x400 0x1>,
+			       <&dmamux1 30 0x400 0x1>,
+			       <&dmamux1 31 0x400 0x1>,
+			       <&dmamux1 32 0x400 0x1>;
+			dma-names = "ch1", "ch2", "ch3", "ch4";
 			status = "disabled";
 
 			pwm {
@@ -161,6 +179,13 @@
 			reg = <0x40003000 0x400>;
 			clocks = <&rcc TIM5_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 55 0x400 0x1>,
+			       <&dmamux1 56 0x400 0x1>,
+			       <&dmamux1 57 0x400 0x1>,
+			       <&dmamux1 58 0x400 0x1>,
+			       <&dmamux1 59 0x400 0x1>,
+			       <&dmamux1 60 0x400 0x1>;
+			dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig";
 			status = "disabled";
 
 			pwm {
@@ -182,6 +207,8 @@
 			reg = <0x40004000 0x400>;
 			clocks = <&rcc TIM6_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 69 0x400 0x1>;
+			dma-names = "up";
 			status = "disabled";
 
 			timer@5 {
@@ -198,6 +225,8 @@
 			reg = <0x40005000 0x400>;
 			clocks = <&rcc TIM7_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 70 0x400 0x1>;
+			dma-names = "up";
 			status = "disabled";
 
 			timer@6 {
@@ -465,6 +494,15 @@
 			reg = <0x44000000 0x400>;
 			clocks = <&rcc TIM1_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 11 0x400 0x1>,
+			       <&dmamux1 12 0x400 0x1>,
+			       <&dmamux1 13 0x400 0x1>,
+			       <&dmamux1 14 0x400 0x1>,
+			       <&dmamux1 15 0x400 0x1>,
+			       <&dmamux1 16 0x400 0x1>,
+			       <&dmamux1 17 0x400 0x1>;
+			dma-names = "ch1", "ch2", "ch3", "ch4",
+				    "up", "trig", "com";
 			status = "disabled";
 
 			pwm {
@@ -486,6 +524,15 @@
 			reg = <0x44001000 0x400>;
 			clocks = <&rcc TIM8_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 47 0x400 0x1>,
+			       <&dmamux1 48 0x400 0x1>,
+			       <&dmamux1 49 0x400 0x1>,
+			       <&dmamux1 50 0x400 0x1>,
+			       <&dmamux1 51 0x400 0x1>,
+			       <&dmamux1 52 0x400 0x1>,
+			       <&dmamux1 53 0x400 0x1>;
+			dma-names = "ch1", "ch2", "ch3", "ch4",
+				    "up", "trig", "com";
 			status = "disabled";
 
 			pwm {
@@ -543,6 +590,11 @@
 			reg = <0x44006000 0x400>;
 			clocks = <&rcc TIM15_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 105 0x400 0x1>,
+			       <&dmamux1 106 0x400 0x1>,
+			       <&dmamux1 107 0x400 0x1>,
+			       <&dmamux1 108 0x400 0x1>;
+			dma-names = "ch1", "up", "trig", "com";
 			status = "disabled";
 
 			pwm {
@@ -564,6 +616,9 @@
 			reg = <0x44007000 0x400>;
 			clocks = <&rcc TIM16_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 109 0x400 0x1>,
+			       <&dmamux1 110 0x400 0x1>;
+			dma-names = "ch1", "up";
 			status = "disabled";
 
 			pwm {
@@ -584,6 +639,9 @@
 			reg = <0x44008000 0x400>;
 			clocks = <&rcc TIM17_K>;
 			clock-names = "int";
+			dmas = <&dmamux1 111 0x400 0x1>,
+			       <&dmamux1 112 0x400 0x1>;
+			dma-names = "ch1", "up";
 			status = "disabled";
 
 			pwm {
-- 
1.9.1


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

* [PATCH 2/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1
  2018-10-03 15:11 [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Fabrice Gasnier
  2018-10-03 15:11 ` [PATCH 1/3] ARM: dts: stm32: Add dmas to timer on stm32mp157c Fabrice Gasnier
@ 2018-10-03 15:11 ` Fabrice Gasnier
  2018-10-03 15:11 ` [PATCH 3/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1 Fabrice Gasnier
  2018-11-12  9:10 ` [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Alexandre Torgue
  3 siblings, 0 replies; 5+ messages in thread
From: Fabrice Gasnier @ 2018-10-03 15:11 UTC (permalink / raw)
  To: alexandre.torgue
  Cc: robh+dt, mcoquelin.stm32, mark.rutland, linux-arm-kernel,
	devicetree, linux-kernel, linux-stm32, fabrice.gasnier

Spare dmas when using timer6 on stm32mp157c-ed1.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
 arch/arm/boot/dts/stm32mp157c-ed1.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts
index f77bea4..c3ecb1e 100644
--- a/arch/arm/boot/dts/stm32mp157c-ed1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts
@@ -72,6 +72,9 @@
 
 &timers6 {
 	status = "okay";
+	/* spare dmas for other usage */
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	timer@5 {
 		status = "okay";
 	};
-- 
1.9.1


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

* [PATCH 3/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1
  2018-10-03 15:11 [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Fabrice Gasnier
  2018-10-03 15:11 ` [PATCH 1/3] ARM: dts: stm32: Add dmas to timer on stm32mp157c Fabrice Gasnier
  2018-10-03 15:11 ` [PATCH 2/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1 Fabrice Gasnier
@ 2018-10-03 15:11 ` Fabrice Gasnier
  2018-11-12  9:10 ` [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Alexandre Torgue
  3 siblings, 0 replies; 5+ messages in thread
From: Fabrice Gasnier @ 2018-10-03 15:11 UTC (permalink / raw)
  To: alexandre.torgue
  Cc: robh+dt, mcoquelin.stm32, mark.rutland, linux-arm-kernel,
	devicetree, linux-kernel, linux-stm32, fabrice.gasnier

Spare dmas when using timers on stm32mp157c-ev1.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
 arch/arm/boot/dts/stm32mp157c-ev1.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/stm32mp157c-ev1.dts b/arch/arm/boot/dts/stm32mp157c-ev1.dts
index 372bc2e..89bb35d 100644
--- a/arch/arm/boot/dts/stm32mp157c-ev1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-ev1.dts
@@ -100,6 +100,9 @@
 };
 
 &timers2 {
+	/* spare dmas for other usage (un-delete to enable pwm capture) */
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "disabled";
 	pwm {
 		pinctrl-0 = <&pwm2_pins_a>;
@@ -112,6 +115,8 @@
 };
 
 &timers8 {
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "disabled";
 	pwm {
 		pinctrl-0 = <&pwm8_pins_a>;
@@ -124,6 +129,8 @@
 };
 
 &timers12 {
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "disabled";
 	pwm {
 		pinctrl-0 = <&pwm12_pins_a>;
-- 
1.9.1


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

* Re: [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers
  2018-10-03 15:11 [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Fabrice Gasnier
                   ` (2 preceding siblings ...)
  2018-10-03 15:11 ` [PATCH 3/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1 Fabrice Gasnier
@ 2018-11-12  9:10 ` Alexandre Torgue
  3 siblings, 0 replies; 5+ messages in thread
From: Alexandre Torgue @ 2018-11-12  9:10 UTC (permalink / raw)
  To: Fabrice Gasnier
  Cc: robh+dt, mcoquelin.stm32, mark.rutland, linux-arm-kernel,
	devicetree, linux-kernel, linux-stm32

Hi Fabrice

On 10/3/18 5:11 PM, Fabrice Gasnier wrote:
> This series adds dmas description to stm32mp157c device tree file.
> But dmas are kept disabled by default on all boards. They are only
> necessary for PWM capture. So, spare them for other usage by default.
> 
> Fabrice Gasnier (3):
>    ARM: dts: stm32: Add dmas to timer on stm32mp157c
>    ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1
>    ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1
> 
>   arch/arm/boot/dts/stm32mp157c-ed1.dts |  3 ++
>   arch/arm/boot/dts/stm32mp157c-ev1.dts |  7 +++++
>   arch/arm/boot/dts/stm32mp157c.dtsi    | 58 +++++++++++++++++++++++++++++++++++
>   3 files changed, 68 insertions(+)
> 

Series applied on stm32-next.

Thanks!

Alex

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

end of thread, other threads:[~2018-11-12  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 15:11 [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Fabrice Gasnier
2018-10-03 15:11 ` [PATCH 1/3] ARM: dts: stm32: Add dmas to timer on stm32mp157c Fabrice Gasnier
2018-10-03 15:11 ` [PATCH 2/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1 Fabrice Gasnier
2018-10-03 15:11 ` [PATCH 3/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1 Fabrice Gasnier
2018-11-12  9:10 ` [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers Alexandre Torgue

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).