2018-10-03 15:12:26

by Fabrice Gasnier

[permalink] [raw]
Subject: [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers

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



2018-10-03 15:12:38

by Fabrice Gasnier

[permalink] [raw]
Subject: [PATCH 3/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1

Spare dmas when using timers on stm32mp157c-ev1.

Signed-off-by: Fabrice Gasnier <[email protected]>
---
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


2018-10-03 15:13:02

by Fabrice Gasnier

[permalink] [raw]
Subject: [PATCH 2/3] ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1

Spare dmas when using timer6 on stm32mp157c-ed1.

Signed-off-by: Fabrice Gasnier <[email protected]>
---
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


2018-10-03 15:13:33

by Fabrice Gasnier

[permalink] [raw]
Subject: [PATCH 1/3] ARM: dts: stm32: Add dmas to timer on stm32mp157c

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

Signed-off-by: Fabrice Gasnier <[email protected]>
---
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


2018-11-12 09:11:56

by Alexandre Torgue

[permalink] [raw]
Subject: Re: [PATCH 0/3] ARM: dts: stm32: add dmas to stm32mp157c timers

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