diff mbox

[1/7] ARM: stih407: Add DT nodes for for PWM

Message ID 1403103172-19856-1-git-send-email-lee.jones@linaro.org
State Not Applicable
Headers show

Commit Message

Lee Jones June 18, 2014, 2:52 p.m. UTC
Supply top level nodes for the STiH407 based development boards.
The Pinctrl configuration has already been applied, so the only
missing piece of the DT puzzle is for a board's DTB to enable
the nodes.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/stih407.dtsi | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Gabriel Fernandez June 18, 2014, 3:07 p.m. UTC | #1
Hi Lee,
minor remark below..

On 18 June 2014 16:52, Lee Jones <lee.jones@linaro.org> wrote:
> Supply top level nodes for the STiH407 based development boards.
> The Pinctrl configuration has already been applied, so the only
> missing piece of the DT puzzle is for a board's DTB to enable
> the nodes.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  arch/arm/boot/dts/stih407.dtsi | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi
> index 4f9024f..6b43ba2 100644
> --- a/arch/arm/boot/dts/stih407.dtsi
> +++ b/arch/arm/boot/dts/stih407.dtsi
> @@ -259,5 +259,32 @@
>
>                         status = "disabled";
>                 };
> +
> +               /* COMMS PWM Module */
> +               pwm0: pwm@9810000 {
> +                       compatible      = "st,sti-pwm";
> +                       status          = "disabled";
> +                       #pwm-cells      = <2>;
> +                       reg             = <0x9810000 0x68>;
> +                       pinctrl-names   = "default";
> +                        pinctrl-0      = <&pinctrl_pwm0_chan0_default>;
del space

> +                       clock-names     = "pwm";
> +                       clocks          = <&clk_sysin>;
> +               };
> +
> +               /* SBC PWM Module */
> +               pwm1: pwm@9510000 {
> +                       compatible      = "st,sti-pwm";
> +                       status          = "disabled";
> +                       #pwm-cells      = <2>;
> +                       reg             = <0x9510000 0x68>;
> +                       pinctrl-names   = "default";
> +                       pinctrl-0       = <&pinctrl_pwm1_chan0_default
> +                                       &pinctrl_pwm1_chan1_default
> +                                       &pinctrl_pwm1_chan2_default
> +                                       &pinctrl_pwm1_chan3_default>;
> +                       clock-names     = "pwm";
> +                       clocks          = <&clk_sysin>;
> +               };
>         };
>  };
> --
> 1.8.3.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones June 18, 2014, 3:16 p.m. UTC | #2
On Wed, 18 Jun 2014, Gabriel Fernandez wrote:

> Hi Lee,
> minor remark below..
> 
> On 18 June 2014 16:52, Lee Jones <lee.jones@linaro.org> wrote:
> > Supply top level nodes for the STiH407 based development boards.
> > The Pinctrl configuration has already been applied, so the only
> > missing piece of the DT puzzle is for a board's DTB to enable
> > the nodes.
> >
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  arch/arm/boot/dts/stih407.dtsi | 27 +++++++++++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi
> > index 4f9024f..6b43ba2 100644
> > --- a/arch/arm/boot/dts/stih407.dtsi
> > +++ b/arch/arm/boot/dts/stih407.dtsi
> > @@ -259,5 +259,32 @@
> >
> >                         status = "disabled";
> >                 };
> > +
> > +               /* COMMS PWM Module */
> > +               pwm0: pwm@9810000 {
> > +                       compatible      = "st,sti-pwm";
> > +                       status          = "disabled";
> > +                       #pwm-cells      = <2>;
> > +                       reg             = <0x9810000 0x68>;
> > +                       pinctrl-names   = "default";
> > +                        pinctrl-0      = <&pinctrl_pwm0_chan0_default>;
> del space

Fixing, thanks.

> > +                       clock-names     = "pwm";
> > +                       clocks          = <&clk_sysin>;
> > +               };
> > +
> > +               /* SBC PWM Module */
> > +               pwm1: pwm@9510000 {
> > +                       compatible      = "st,sti-pwm";
> > +                       status          = "disabled";
> > +                       #pwm-cells      = <2>;
> > +                       reg             = <0x9510000 0x68>;
> > +                       pinctrl-names   = "default";
> > +                       pinctrl-0       = <&pinctrl_pwm1_chan0_default
> > +                                       &pinctrl_pwm1_chan1_default
> > +                                       &pinctrl_pwm1_chan2_default
> > +                                       &pinctrl_pwm1_chan3_default>;
> > +                       clock-names     = "pwm";
> > +                       clocks          = <&clk_sysin>;
> > +               };
> >         };
> >  };
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Peter Griffin June 19, 2014, 8:38 a.m. UTC | #3
Hi Lee,

> +		/* SBC PWM Module */
> +		pwm1: pwm@9510000 {
> +			compatible	= "st,sti-pwm";
> +			status		= "disabled";
> +			#pwm-cells	= <2>;
> +			reg		= <0x9510000 0x68>;
> +			pinctrl-names	= "default";
> +		        pinctrl-0	= <&pinctrl_pwm1_chan0_default
> +					&pinctrl_pwm1_chan1_default
> +					&pinctrl_pwm1_chan2_default
> +					&pinctrl_pwm1_chan3_default>;

If you're passing pin config for 4 channels, I think you should also be using the 
'st,pwm-num-chan = <4>' property like the doc example in patch 7.

After that: 
Acked-by: Peter Griffin <peter.griffin@linaro.org>

regards,

Peter. 

--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi
index 4f9024f..6b43ba2 100644
--- a/arch/arm/boot/dts/stih407.dtsi
+++ b/arch/arm/boot/dts/stih407.dtsi
@@ -259,5 +259,32 @@ 
 
 			status = "disabled";
 		};
+
+		/* COMMS PWM Module */
+		pwm0: pwm@9810000 {
+			compatible      = "st,sti-pwm";
+			status		= "disabled";
+			#pwm-cells	= <2>;
+			reg		= <0x9810000 0x68>;
+			pinctrl-names	= "default";
+                        pinctrl-0	= <&pinctrl_pwm0_chan0_default>;
+			clock-names	= "pwm";
+			clocks          = <&clk_sysin>;
+		};
+
+		/* SBC PWM Module */
+		pwm1: pwm@9510000 {
+			compatible	= "st,sti-pwm";
+			status		= "disabled";
+			#pwm-cells	= <2>;
+			reg		= <0x9510000 0x68>;
+			pinctrl-names	= "default";
+		        pinctrl-0	= <&pinctrl_pwm1_chan0_default
+					&pinctrl_pwm1_chan1_default
+					&pinctrl_pwm1_chan2_default
+					&pinctrl_pwm1_chan3_default>;
+			clock-names	= "pwm";
+			clocks          = <&clk_sysin>;
+		};
 	};
 };