All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add PWM-2 channel support for Salvator-X
@ 2018-08-29  9:33 Nguyen An Hoan
  2018-08-29  9:33 ` [PATCH] arm64: dts: salvator-common: Add PWM-2 channel Nguyen An Hoan
  0 siblings, 1 reply; 5+ messages in thread
From: Nguyen An Hoan @ 2018-08-29  9:33 UTC (permalink / raw
  To: broonie, linux-renesas-soc, geert+renesas
  Cc: yoshihiro.shimoda.uh, magnus.damm, kuninori.morimoto.gx,
	h-inayoshi, nv-dung, cv-dong, na-hoan

From: Hoan Nguyen An <na-hoan@jinso.co.jp>

Since the Salvator-X boards have 2 PWM channels, this patch adds the PWM-2 channel, I tested by measuring the output signal at CN28-pin30.

Hoan Nguyen An (1):
  arm64: dts: salvator-common: Add PWM-2 channel

 arch/arm64/boot/dts/renesas/salvator-common.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
2.7.4

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

* [PATCH] arm64: dts: salvator-common: Add PWM-2 channel
  2018-08-29  9:33 [PATCH] Add PWM-2 channel support for Salvator-X Nguyen An Hoan
@ 2018-08-29  9:33 ` Nguyen An Hoan
  2018-08-30  7:58   ` Geert Uytterhoeven
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nguyen An Hoan @ 2018-08-29  9:33 UTC (permalink / raw
  To: broonie, linux-renesas-soc, geert+renesas
  Cc: yoshihiro.shimoda.uh, magnus.damm, kuninori.morimoto.gx,
	h-inayoshi, nv-dung, cv-dong, na-hoan

From: Hoan Nguyen An <na-hoan@jinso.co.jp>

Add PWM-2 channel(CN28 - pin30) support for Salvator-X

Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
---
 arch/arm64/boot/dts/renesas/salvator-common.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
index 7d3d866..1234f91 100644
--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
@@ -572,6 +572,11 @@
 		function = "pwm1";
 	};
 
+	pwm2_pins: pwm2 {
+		groups = "pwm2_a";
+		function = "pwm2";
+	};	
+	
 	scif1_pins: scif1 {
 		groups = "scif1_data_a", "scif1_ctrl";
 		function = "scif1";
@@ -669,6 +674,12 @@
 	status = "okay";
 };
 
+&pwm2 {
+	pinctrl-0 = <&pwm2_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &rcar_sound {
 	pinctrl-0 = <&sound_pins &sound_clk_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* Re: [PATCH] arm64: dts: salvator-common: Add PWM-2 channel
  2018-08-29  9:33 ` [PATCH] arm64: dts: salvator-common: Add PWM-2 channel Nguyen An Hoan
@ 2018-08-30  7:58   ` Geert Uytterhoeven
  2018-09-07  9:04   ` Nguyen An Hoan
  2018-09-07  9:11   ` Nguyen An Hoan
  2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2018-08-30  7:58 UTC (permalink / raw
  To: Hoan Nguyen An
  Cc: Mark Brown, Linux-Renesas, Geert Uytterhoeven, Yoshihiro Shimoda,
	Magnus Damm, Kuninori Morimoto, 稲吉,
	Dung:人ソ,
	カオ・ヴァン・ドン

Hi Hoan,

On Wed, Aug 29, 2018 at 11:33 AM Nguyen An Hoan <na-hoan@jinso.co.jp> wrote:
> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
>
> Add PWM-2 channel(CN28 - pin30) support for Salvator-X

Thanks for your patch!

Please explain why this is useful. Usually we do not enable random functionality
on expansion connectors.

In this case, this even has an (undocumented) impact on on-board devices,
as the signal is also connected to the BD9571MWV PMIC.
(Perhaps that was the actual intention of this patch? ;-) If yes,
please explain)

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: arm64: dts: salvator-common: Add PWM-2 channel
  2018-08-29  9:33 ` [PATCH] arm64: dts: salvator-common: Add PWM-2 channel Nguyen An Hoan
  2018-08-30  7:58   ` Geert Uytterhoeven
@ 2018-09-07  9:04   ` Nguyen An Hoan
  2018-09-07  9:11   ` Nguyen An Hoan
  2 siblings, 0 replies; 5+ messages in thread
From: Nguyen An Hoan @ 2018-09-07  9:04 UTC (permalink / raw
  To: broonie, linux-renesas-soc


Dear Geert-san, Thank you very much for your comments!
CC: Simon-san

> Hi Hoan,
> 
> On Wed, Aug 29, 2018 at 11:33 AM Nguyen An Hoan <na-hoan@jinso.co.jp> wrote:
> > From: Hoan Nguyen An <na-hoan@jinso.co.jp>
> >
> > Add PWM-2 channel(CN28 - pin30) support for Salvator-X
> 
> Thanks for your patch!
> 
> Please explain why this is useful. Usually we do not enable random functionality
> on expansion connectors.

> In this case, this even has an (undocumented) impact on on-board devices,
> as the signal is also connected to the BD9571MWV PMIC.
> (Perhaps that was the actual intention of this patch? ;-) If yes,
> please explain)

> Thanks!

> Gr{oetje,eeting}s,

>                         Geert
> 


On this issue, with H3/M3 SoC there are 7 PWM channels but only 2 channels are supported: PWM1, PWM2. While PWM1 is connected to CN19 for LVDS service. So only remaining PWM2, I think simple, if you want to generate a signal with variable frequency and pulse width using M3/H3 (I used for testting Addition Tasks) then forced to use PWM2. Although I'm not sure the H3/M3 boards are not purposeful to use the PWM functions.

Thanks you!
Hoan

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

* Re: arm64: dts: salvator-common: Add PWM-2 channel
  2018-08-29  9:33 ` [PATCH] arm64: dts: salvator-common: Add PWM-2 channel Nguyen An Hoan
  2018-08-30  7:58   ` Geert Uytterhoeven
  2018-09-07  9:04   ` Nguyen An Hoan
@ 2018-09-07  9:11   ` Nguyen An Hoan
  2 siblings, 0 replies; 5+ messages in thread
From: Nguyen An Hoan @ 2018-09-07  9:11 UTC (permalink / raw
  To: broonie, linux-renesas-soc


Dear Geert-san, Thank you very much for your comments!
CC: Simon-san

> Hi Hoan,
> 
> On Wed, Aug 29, 2018 at 11:33 AM Nguyen An Hoan <na-hoan@jinso.co.jp> wrote:
> > From: Hoan Nguyen An <na-hoan@jinso.co.jp>
> >
> > Add PWM-2 channel(CN28 - pin30) support for Salvator-X
> 
> Thanks for your patch!
> 
> Please explain why this is useful. Usually we do not enable random functionality
> on expansion connectors.

> In this case, this even has an (undocumented) impact on on-board devices,
> as the signal is also connected to the BD9571MWV PMIC.
> (Perhaps that was the actual intention of this patch? ;-) If yes,
> please explain)

> Thanks!

> Gr{oetje,eeting}s,

>                         Geert
> 


On this issue, with H3/M3 SoC there are 7 PWM channels but only 2 channels are supported: PWM1, PWM2. 
While PWM1 is connected to CN19 for LVDS service. So only remaining PWM2, 
I think simple, if you want to generate a signal with variable frequency and pulse width using M3/H3 (I used for testting Addition Tasks) 
then forced to use PWM2. Although I'm not sure the H3/M3 boards are not purposeful to use the PWM functions.

Thanks you!
Hoan

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

end of thread, other threads:[~2018-09-07 13:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-29  9:33 [PATCH] Add PWM-2 channel support for Salvator-X Nguyen An Hoan
2018-08-29  9:33 ` [PATCH] arm64: dts: salvator-common: Add PWM-2 channel Nguyen An Hoan
2018-08-30  7:58   ` Geert Uytterhoeven
2018-09-07  9:04   ` Nguyen An Hoan
2018-09-07  9:11   ` Nguyen An Hoan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.