devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * [PATCH 2/4] mvebu: xp: Add pwm properties to .dtsi files
           [not found] <20170316064218.9169-1-ralph.sennhauser@gmail.com>
           [not found] ` <20170316064218.9169-1-ralph.sennhauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
    @ 2017-03-16  6:42 ` Ralph Sennhauser
      2017-03-16  6:42 ` [PATCH 4/4] mvebu: wrt1900ac: Use pwm-fan rather than gpio-fan Ralph Sennhauser
      2 siblings, 0 replies; 15+ messages in thread
    From: Ralph Sennhauser @ 2017-03-16  6:42 UTC (permalink / raw)
      To: linux-gpio
      Cc: Mark Rutland, Andrew Lunn, Jason Cooper, Alexandre Courbot,
    	Linus Walleij, Russell King, open list:PWM SUBSYSTEM, open list,
    	Gregory Clement,
    	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
    	Rob Herring, Thierry Reding, Ralph Sennhauser, Imre Kaloz,
    	moderated list:ARM/Marvell Kirkwood and Armada 370, 375, 38x, ...,
    	Sebastian Hesselbarth
    
    From: Andrew Lunn <andrew@lunn.ch>
    
    Add properties to the gpio nodes to allow them to be also used as pwm
    lines.
    
    Signed-off-by: Andrew Lunn <andrew@lunn.ch>
    URL: https://patchwork.ozlabs.org/patch/427294/
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
    ---
     arch/arm/boot/dts/armada-370.dtsi        | 10 ++++++++--
     arch/arm/boot/dts/armada-xp-mv78230.dtsi | 10 ++++++++--
     arch/arm/boot/dts/armada-xp-mv78260.dtsi |  8 ++++++--
     arch/arm/boot/dts/armada-xp-mv78460.dtsi | 10 ++++++++--
     4 files changed, 30 insertions(+), 8 deletions(-)
    
    diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
    index cc011c8..aa9fe72 100644
    --- a/arch/arm/boot/dts/armada-370.dtsi
    +++ b/arch/arm/boot/dts/armada-370.dtsi
    @@ -138,24 +138,30 @@
     
     			gpio0: gpio@18100 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18100 0x40>;
    +				reg = <0x18100 0x40>, <0x181c0 0x08>;
    +				reg-names = "gpio", "pwm";
     				ngpios = <32>;
     				gpio-controller;
     				#gpio-cells = <2>;
    +				#pwm-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <82>, <83>, <84>, <85>;
    +				clocks = <&coreclk 0>;
     			};
     
     			gpio1: gpio@18140 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18140 0x40>;
    +				reg = <0x18140 0x40>, <0x181c8 0x08>;
    +				reg-names = "gpio", "pwm";
     				ngpios = <32>;
     				gpio-controller;
     				#gpio-cells = <2>;
    +				#pwm-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <87>, <88>, <89>, <90>;
    +				clocks = <&coreclk 0>;
     			};
     
     			gpio2: gpio@18180 {
    diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
    index 07c5090..fc3934f 100644
    --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
    +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
    @@ -203,24 +203,30 @@
     		internal-regs {
     			gpio0: gpio@18100 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18100 0x40>;
    +				reg = <0x18100 0x40>, <0x181c0 0x08>;
    +				reg-names = "gpio", "pwm";
     				ngpios = <32>;
     				gpio-controller;
     				#gpio-cells = <2>;
    +				#pwm-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <82>, <83>, <84>, <85>;
    +				clocks = <&coreclk 0>;
     			};
     
     			gpio1: gpio@18140 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18140 0x40>;
    +				reg = <0x18140 0x40>, <0x181c8 0x08>;
    +				reg-names = "gpio", "pwm";
     				ngpios = <17>;
     				gpio-controller;
     				#gpio-cells = <2>;
    +				#pwm-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <87>, <88>, <89>;
    +				clocks = <&coreclk 0>;
     			};
     		};
     	};
    diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
    index 64e936a..04dda6a 100644
    --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
    +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
    @@ -286,24 +286,28 @@
     		internal-regs {
     			gpio0: gpio@18100 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18100 0x40>;
    +				reg = <0x18100 0x40>, <0x181c0 0x08>;
    +				reg-names = "gpio", "pwm";
     				ngpios = <32>;
     				gpio-controller;
     				#gpio-cells = <2>;
    +				#pwm-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <82>, <83>, <84>, <85>;
    +				clocks = <&coreclk 0>;
     			};
     
     			gpio1: gpio@18140 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18140 0x40>;
    +				reg = <0x18140 0x40>, <0x181c8 0x08>;
     				ngpios = <32>;
     				gpio-controller;
     				#gpio-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <87>, <88>, <89>, <90>;
    +				clocks = <&coreclk 0>;
     			};
     
     			gpio2: gpio@18180 {
    diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
    index d1383dd..fb6d28a 100644
    --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
    +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
    @@ -324,24 +324,30 @@
     		internal-regs {
     			gpio0: gpio@18100 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18100 0x40>;
    +				reg = <0x18100 0x40>, <0x181c0 0x08>;
    +				reg-names = "gpio", "pwm";
     				ngpios = <32>;
     				gpio-controller;
     				#gpio-cells = <2>;
    +				#pwm-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <82>, <83>, <84>, <85>;
    +				clocks = <&coreclk 0>;
     			};
     
     			gpio1: gpio@18140 {
     				compatible = "marvell,orion-gpio";
    -				reg = <0x18140 0x40>;
    +				reg = <0x18140 0x40>, <0x181c8 0x08>;
    +				reg-names = "gpio", "pwm";
     				ngpios = <32>;
     				gpio-controller;
     				#gpio-cells = <2>;
    +				#pwm-cells = <2>;
     				interrupt-controller;
     				#interrupt-cells = <2>;
     				interrupts = <87>, <88>, <89>, <90>;
    +				clocks = <&coreclk 0>;
     			};
     
     			gpio2: gpio@18180 {
    -- 
    2.10.2
    
    ^ permalink raw reply related	[flat|nested] 15+ messages in thread
  • * [PATCH 4/4] mvebu: wrt1900ac: Use pwm-fan rather than gpio-fan
           [not found] <20170316064218.9169-1-ralph.sennhauser@gmail.com>
           [not found] ` <20170316064218.9169-1-ralph.sennhauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
      2017-03-16  6:42 ` [PATCH 2/4] mvebu: xp: Add pwm properties to .dtsi files Ralph Sennhauser
    @ 2017-03-16  6:42 ` Ralph Sennhauser
      2 siblings, 0 replies; 15+ messages in thread
    From: Ralph Sennhauser @ 2017-03-16  6:42 UTC (permalink / raw)
      To: linux-gpio
      Cc: Mark Rutland, Andrew Lunn, Jason Cooper, Alexandre Courbot,
    	Linus Walleij, Russell King, open list:PWM SUBSYSTEM, open list,
    	Gregory Clement,
    	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
    	Rob Herring, Thierry Reding, Ralph Sennhauser, Imre Kaloz,
    	moderated list:ARM/Marvell Kirkwood and Armada 370, 375, 38x, ...,
    	Sebastian Hesselbarth
    
    From: Andrew Lunn <andrew@lunn.ch>
    
    The mvebu gpio driver can also perform PWM on some pins. Us the pwm-fan
    driver to control the fan of the WRT1900AC, giving us finer grained
    control over its speed and hence noise.
    
    Signed-off-by: Andrew Lunn <andrew@lunn.ch>
    URL: https://patchwork.ozlabs.org/patch/427291/
    Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
    ---
     arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 8 +++-----
     1 file changed, 3 insertions(+), 5 deletions(-)
    
    diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
    index 3744ba3..836b275e 100644
    --- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
    +++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
    @@ -293,13 +293,11 @@
     		};
     	};
     
    -	gpio_fan {
    +	pwm_fan {
     		/* SUNON HA4010V4-0000-C99 */
    -		compatible = "gpio-fan";
    -		gpios = <&gpio0 24 0>;
     
    -		gpio-fan,speed-map = <0    0
    -				      4500 1>;
    +		compatible = "pwm-fan";
    +		pwms = <&gpio0 24 4000 0>;
     	};
     
     	dsa {
    -- 
    2.10.2
    
    ^ permalink raw reply related	[flat|nested] 15+ messages in thread

  • end of thread, other threads:[~2017-03-23 10:35 UTC | newest]
    
    Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20170316064218.9169-1-ralph.sennhauser@gmail.com>
         [not found] ` <20170316064218.9169-1-ralph.sennhauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
    2017-03-16  6:42   ` [PATCH 1/4] gpio: mvebu: Add limited PWM support Ralph Sennhauser
         [not found]     ` <20170316064218.9169-2-ralph.sennhauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
    2017-03-16 16:03       ` Linus Walleij
    2017-03-17  9:17         ` Ralph Sennhauser
    2017-03-20 13:51           ` Thierry Reding
    2017-03-21  6:31             ` Ralph Sennhauser
    2017-03-23 10:11             ` Linus Walleij
    2017-03-23 10:35               ` Ralph Sennhauser
    2017-03-18 15:37         ` Andrew Lunn
    2017-03-20 13:49           ` Thierry Reding
    2017-03-20 13:44         ` Thierry Reding
    2017-03-20 13:42     ` Thierry Reding
    2017-03-21  6:36       ` Ralph Sennhauser
    2017-03-21 14:50         ` Andrew Lunn
    2017-03-16  6:42 ` [PATCH 2/4] mvebu: xp: Add pwm properties to .dtsi files Ralph Sennhauser
    2017-03-16  6:42 ` [PATCH 4/4] mvebu: wrt1900ac: Use pwm-fan rather than gpio-fan Ralph Sennhauser
    

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