* [PATCH V3] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node
@ 2015-01-03 18:30 Nishanth Menon
2015-01-03 23:39 ` Sebastian Reichel
0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Menon @ 2015-01-03 18:30 UTC (permalink / raw)
To: Tony Lindgren, Benoît Cousson
Cc: linux-kernel, linux-arm-kernel, devicetree, linux-omap,
Nishanth Menon
TPS gpio now controls a 5v 500mA TL5209 regulator which may be supply
a fan (such as AFB02505HHB) over J1 connector for various purposes.
Provide device tree node to enable the same.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
V3: Rebased to v3.19-rc1, added label for GPIO fan (for future cooling device
reference)
V2: https://patchwork.kernel.org/patch/5445111/
V1: https://patchwork.kernel.org/patch/5444911/
Enable and disable can be controlled by (post the RPM, it finds
closest match - even a 1 will do)
echo '13000' > /sys/class/hwmon/hwmon0/fan1_target
and
echo '0' > /sys/class/hwmon/hwmon0/fan1_target
Test log: http://slexy.org/view/s2T0ajh46z
requires CONFIG_GPIO_PALMAS and CONFIG_SENSORS_GPIO_FAN to be operational
Applies on v3.19-rc1
arch/arm/boot/dts/am57xx-beagle-x15.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 6c2e8e4..c171720 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -80,6 +80,14 @@
default-state = "off";
};
};
+
+ gpio_fan: gpio_fan {
+ /* Based on 5v 500mA AFB02505HHB */
+ compatible = "gpio-fan";
+ gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>;
+ gpio-fan,speed-map = <0 0
+ 13000 1>;
+ };
};
&dra7_pmx_core {
@@ -394,6 +402,12 @@
wakeup-source;
ti,palmas-long-press-seconds = <12>;
};
+
+ tps659038_gpio: tps659038_gpio {
+ compatible = "ti,palmas-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
};
tmp102: tmp102@48 {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V3] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node
2015-01-03 18:30 [PATCH V3] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node Nishanth Menon
@ 2015-01-03 23:39 ` Sebastian Reichel
2015-01-05 12:47 ` Nishanth Menon
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Reichel @ 2015-01-03 23:39 UTC (permalink / raw)
To: Nishanth Menon
Cc: Tony Lindgren, Benoît Cousson, linux-kernel,
linux-arm-kernel, devicetree, linux-omap
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
Hi Nishanth,
On Sat, Jan 03, 2015 at 12:30:26PM -0600, Nishanth Menon wrote:
> [...]
> + gpio-fan,speed-map = <0 0
> + 13000 1>;
> [...]
iirc DT maintainers prefer this format:
gpio-fan,speed-map = <0 0>,
<13000 1>;
This should result in the same .dtb, but is a bit easier to read.
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V3] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node
2015-01-03 23:39 ` Sebastian Reichel
@ 2015-01-05 12:47 ` Nishanth Menon
0 siblings, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2015-01-05 12:47 UTC (permalink / raw)
To: Sebastian Reichel
Cc: devicetree, Tony Lindgren, linux-kernel, Benoît Cousson,
linux-omap, linux-arm-kernel
On 01/03/2015 05:39 PM, Sebastian Reichel wrote:
> On Sat, Jan 03, 2015 at 12:30:26PM -0600, Nishanth Menon wrote:
>> [...]
>> + gpio-fan,speed-map = <0 0
>> + 13000 1>;
>> [...]
>
> iirc DT maintainers prefer this format:
>
> gpio-fan,speed-map = <0 0>,
> <13000 1>;
>
> This should result in the same .dtb, but is a bit easier to read.
>
yes indeed.. :( Thanks for catching it. will repost.
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-05 12:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-03 18:30 [PATCH V3] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node Nishanth Menon
2015-01-03 23:39 ` Sebastian Reichel
2015-01-05 12:47 ` Nishanth Menon
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).