<div><div dir="auto">That’s an interesting idea, I was kicking about the same sort of thing with an RPi 2 - after I found that all the good fan/temp controllers lmsensors supports on so-called “gaming motherboards” these days are actually a Cortex-M0, I figured why not put a quad core A7 to the task? :)</div><div dir="auto"><br></div><div dir="auto">It does have the irony of being able to boot the same kernel as the macchiatobin if I swap in an RPi3.. I use one for ser2net at work, and I doubt it would be too difficult to wire it to the TDM SPI or I2C port, flip some boot switches and basically make it a $30 PROMjet as well :)</div><div dir="auto"><br></div><div dir="auto">Most of the “good” infrastructure IC’s have a Cortex-M doing power management and the 88F8040 is no exception - I wonder if PWM is actually a function of setting the CP pin to GPIO and routing a CM3 local/PPB peripheral to it - having it do even software PWM would be fantastic.</div><div dir="auto"><br></div><div dir="auto">It’s a damn shame the best docs we have are Linux drivers/FDT source.</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 18:39 Stuart Monteith <<a href="mailto:stoo@stoo.me.uk">stoo@stoo.me.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div>Hi,</div><span class="m_899969054834072538Apple-tab-span" style="white-space:pre-wrap"> </span>I’m in the process of experimenting with a microcontroller to turn the bin on and off. I was quite pleased to find that the TDM port’s I2C lines would recognise my Teensy-LC micro-controller speaking I2C. I’m currently studying the IPMI protocol as I’d like to drive and configure the microcontroller that way too. I was also thinking of hooking up the case fans to it too, but I haven’t come to any conclusion as to what to base the fan speeds.<div><br></div><div>The microcontroller, so far, would be connected to the ATX power supply (GND, +5VSB, PSON), power switch, power LED, reset switch (in parallel with case switch), USB-serial to my server, TDM for I2C control from the system itself. I reckon with a 5V line from ATX a fan or two could be connected. The reason why I’ve been wanting to do this was so that machine could shut itself down when my UPS was off the mains.<br><div><br></div><div>BR,</div><div> Stuart</div><div><br><div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><div><br><div>
<span class="m_899969054834072538Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><div>Stuart Monteith</div><div><a href="mailto:stoo@stoo.me.uk" target="_blank">stoo@stoo.me.uk</a></div><div><br></div></div></span><br class="m_899969054834072538Apple-interchange-newline"><br class="m_899969054834072538Apple-interchange-newline">
</div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><div>
<div><br><blockquote type="cite"><div>On 6 Apr 2018, at 23:39, Matt Sealey <<a href="mailto:neko@bakuhatsu.net" target="_blank">neko@bakuhatsu.net</a>> wrote:</div><br class="m_899969054834072538Apple-interchange-newline"><div><div dir="auto" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_899969054834072538Apple-interchange-newline">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" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div dir="auto" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">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" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div dir="auto" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">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><br class="m_899969054834072538Apple-interchange-newline"></div></blockquote></div><br></div></div></div></div></blockquote></div></div>