<div><div dir="auto">You understood correctly.</div><div dir="auto"><br></div><div dir="auto">Having software toggle a GPIO fast enough to effect PWM would be highly processor intensive. that would heat the package meaning running the fan faster, you’ll make yourself a nice feedback loop!</div><div dir="auto"><br></div><div dir="auto">There is a thermal diode and a way to calibrate and use it since U-Boot reports it and I can see the temp in sysfs (it reacts to the diode on my case fan speeding up the case fan and moving more air...).</div><div dir="auto"><br></div><div dir="auto">I’m just not sure you could do a lot with it just being a GPIO, the only clock-like function for that pin is the MDIO clock for one of the Ethernet PHYs - if you can prove that same clock is not exported, though, you could use clock management to do what you want. MDIO clocks aren’t fast though, so it may be the difference between full off, very slow rpm (if the fan supports that range of duty cycle) and full on, not a nice temperature-controlled swing.</div><div dir="auto"><br></div><div dir="auto">Ta,</div><div dir="auto">Matt</div><br><div class="gmail_quote"><div>On Fri, Apr 6, 2018 at 16:26 Duncan <<a href="mailto:dguthrie@posteo.net">dguthrie@posteo.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Matt,<br>
<br>
Matt Sealey:<br>
> According to the schematics it's on CP0_MPP48 which I do not believe<br>
> is touched by anything in EFI or Linux. There's no I2C to require,<br>
> just I assume an ability to multiplex something useful on that pin -<br>
> pinctrl driver remarks that it's got GPIO and I'm fairly sure the 8040<br>
> doesn't even have any PWM functionality (unless you count the TDM, you<br>
> could play with the frame sync..)<br>
><br>
> <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/mvebu/pinctrl-armada-cp110.c#n466" rel="noreferrer" target="_blank">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/mvebu/pinctrl-armada-cp110.c#n466</a><br>
><br>
<br>
So as far as I understand from your reply, the PWM pin is wired up, but<br>
that the SoC itself doesn't have native PWM functionality built-in?<br>
<br>
> But what you've got here is a potential for a GPIO - on or off - or<br>
> the MDIO clock for 'XG' which probably means losing an ethernet port<br>
> since you can't clock the PHY and use it for PWM.<br>
><br>
> You could write a driver that took a rapid firing timer event to<br>
> change the GPIO state, but that'd probably consume enough power and<br>
> reduce idle state residency enough to only make matters worse.<br>
<br>
Let's say I wrote a driver that could interface with this pin, and I was<br>
able to control fan speed this way (if this is possible). Does the<br>
Armada 8040 SoC have any infrastructure for detecting its temperature,<br>
and the temperature of other parts of the board?<br>
<br>
My main goal here is to allow me to vary the fan speed of the<br>
side-blowers in the case I'm using; it seems like a terrible waste of<br>
power to have them on at full speed, given the board is going to be idle<br>
quite a lot, and even at high load probably doesn't need the fans at<br>
full speed.<br>
<br>
All the best, and apologies in advance if I misunderstood your reply,<br>
Duncan<br>
<br>
_______________________________________________<br>
Macchiato mailing list<br>
<a href="mailto:Macchiato@lists.einval.com" target="_blank">Macchiato@lists.einval.com</a><br>
<a href="https://lists.einval.com/cgi-bin/mailman/listinfo/macchiato" rel="noreferrer" target="_blank">https://lists.einval.com/cgi-bin/mailman/listinfo/macchiato</a></blockquote></div></div>