I have recently purchased a raspberry pi 4. I have a small DC cooling fan for it, but I am limited to it being constantly on, which is annoying. I have seen (but do not need, or personally have access to) the PoE hat, which has a cooling fan built-in.
From what I have been able to tell, it has an Atmel Attiny84 that pretends to be the ID EEPROM and also controls the fan. Does anyone know where I can find the source code for this processor? (I happen to have a few of them lying around from a prior project, though I'd hope to use an Attiny85 instead, if possible)
I'd like to reverse-engineer (or just duplicate, assuming it doesn't cause weird behavior) the code to one of my own chips so that I can rig up a fan controller that doesn't require a userspace Python script that polls and requires reinstallation every time I flash the box.
I've found the kernel-side driver here: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/hwmon/rpi-poe-fan.c
I can't read the above code (my C knowledge is nowhere near that good), but perhaps it would help to start looking?