Turing Pi 2 - Retrofitting an EMC2301 Fancontroller

The Turing Pi 2 (v.2.4) has actually some secrets that just start to get uncovered. Looking closely at the board, you will find the red marked area with what seems to be an unpopulated 4-pin fan header (J16) and an unpopulated IC spot (U109).

These spots were, as found out by Sam Edwards (CFSworks) actually a place to install Molex 47053-1000 4-pin fan connector and a Microchip EMC2301 fan controller. It is not clear why they were left out of the production model, probably for cost savings, but without that the Turing Pi 2 lost a nice smooth fan controller. However, thanks to Sam Edwards work, the chip is now supported by the Turing Pi 2 BMC, so that after retrofitting, this will just work out of the box!

To do this little hack you just need to order an Microchip EMC2301 in its MSOP-8 / standard packaging. If you don't find the specific molex conenctor its also fine if you "just" use an male 2.54mm header pin. Yes, you will not have the locking feature of that connector and you will need to watch out for the correct orientation when plugging in fans - but it still works in a pinch.

When soldering I would advise to solder the EMC2301 first onto its spot, the orientation is as shown in the second picture. Afterwards you can solder the fan header.

Make sure the circle matches up as shown so that you got the chip in the correct orientation.

After the installation, update your Turing Pi 2 BMC to the latest firmware 2.0.5. Please make sure to read the comments on the repo, if you're updating from a BMC version < 2.0.0 you will need to make a first flash via a Micro SD card to get to version 2.0.0 and update further afterwards.

When everything is done and you log into your Turing Pi 2 BMC, you will see this nice slider to set the speed of your EMC2301 connected fan.

Currently there are still some things up for debate and configuration with the latest kernel release which changed naming of components but overall its already working and a nice and easy mod to get a better fan controller installed - instead of just the "on/off" as soon as one Turing node gets activated - or all deactivated.

Again, thanks a lot to Sam Edwards who had the idea and came towards with the PRs and implementation - thank you! 🙂

Install a bootloader onto Turing RK1 eMMC memory

The Turing RK1 is a new Compute Module, made for the Turing Pi 2 board and with compability to the Nvidia Jetson cards in mind. While the board has some impressive specs ( https://docs.turingpi.com/docs/turing-rk1-specs-and-io-ports ) it had one small issue: The used Rockchip RK3588 needed a bootloader on its eMMC to be able to boot from an attached NVMe drive. As no isolated bootloader was available, most people flashed a whole OS onto the eMMC - just to be able to use the attched NVMe drive. This process can take quite a while via the Turing Pi 2 board ( e.g. 60 - 90 minutes: https://docs.turingpi.com/docs/turing-rk1-flashing-os ) it was never a good option.

Now there is finally a solution brought up by Mister gregordinary from the DietPi Forums - who deserves all the credit ( https://dietpi.com/forum/t/new-turingpi-rk1/19142/9 ):

On your local machine:

  • Make yourself a working directory and open a terminal in that location.
  • Download the u-boot apk: https://alpine-rk1.cfs.works/packages/main/aarch64/u-boot-turing-2024.04-r0.apk
  • Open it with an archive utility and extract the following files into your working directory:
    a. idbloader.img
    b. u-boot.itb
  • Create an .img file we’ll use later to flash the RK1: touch turing-rk1-uboot-only.img
  • You should now have the idbloader.img, u-boot.itb, and turing-rk1-uboot-only.img in your working directory. From there, use dd to create our combined image:
    a. dd if=idbloader.img of=turing-rk1-uboot-only.img bs=512 seek=64
    b. dd if=u-boot.itb of=turing-rk1-uboot-only.img bs=512 seek=16384
  • The resulting .img file can be used to flash the RK1 device through the Web UI or tpi utility.
  • Once generated, this .img can be used "as is" to flash the other nodes after moving them to NVME.

With that generated file you can directly flash the eMMC and use any NVMe to boot from.

... and here is already a prepared file if you want to use it directly: turing-rk1-uboot-only.zip

After that, the RK1 will be able to directly boot from an NVMe, given the fact a suitable ARM64 image has been installed on it.

And to install the operating system image onto the NVMe, you can use balenaEtcher with e.g. your Linux, Mac or Windows computer and an USB to NVMe adapter. But please be careful not accidently overwrite one of your interal disks and ruin your computer - I don't take any responsibilty, just in case.

Repairing a Turing Pi 2

Intro

In April 2023 I finally got my Turing Pi 2 - happy to finally got it into my hands I plugged it in, headed over to the Turing Pi 2 Github ( https://github.com/turing-machines/BMC-Firmware ) got myself the latest BMC firmware and started to flash it. Thats when things got wrong: The power supply coils started to screech - and seconds later I was greeted with blue smoke and a dead Turing Pi 2. The firmware update actually flashed the board into a paper weight.

The one green led was still on, the BMC led was off and the board did not react - also the networking LEDs were off. To be honest, this was the first time a firmware update actually physically bricked hardware / got it up into smoke.

Luckily, Turing Machines, the company behind Turing Pi 2 did send me another board, thinking that the (also ordered at Turing Machines) small form factor power supply could have been the culprit - thanks a lot guys for that tremendous help!

The new board was working without an issue and did wait for quite some time until I updated it - horrified the same thing could happen again. I think I updated it to 1.1.0 and things were ok back then.

However, with half a year passed and still the dead board lying around I thought, maybe I could fix it?

The incident

What happened was a short circuit - but how? The only thing I could think of was an error in the firmware upgrade - and the BMC processor - a dual core Allwinner T113-S3 - shortcircuiting something as it did not have its initialization correctly. While this should never be possible (e.g. that a board is layouted in such a way that a processor would short-circuit if it has no program available), I had no other explanation. But how to find out what was broken? The incident actually burned the 5A SMD fuse for the 3v3 line - meaning the board was now powering up ok-ish, but without any of the 3v3 components (e.g. the BMC). Short-circuiting the fuse directly lead to warmth and a bad stench - something was still short-circuiting. So I build myself a Thermal Camera. I was quite sure that the T113-S3 was toast by now, so I removed it.

After that, I tried bridging the blown fuse again - this time with an ampere meter. About 6 Watts were going somewhere I did not know. The Thermal Camera showcased an SMD capacitor glowing red - that poor thing got mangled so badly that it decided to become conductive for DC - not good. I removed that capacitor as well - no excess power was drawn anymore after that.

The repair

I ordered two new Allwinner T113-S3 ( T113-S3 ELQFP-128, position 2 on the picture below ) as well as some spare 5A SMD fuses ( LF5A - 10PCS/LOT 1808 SMD fuse 125V fast 5A, position 1 on the picture below ) from the web. The capacitor with 570uF was replaced by a 12.2uF for testing ( position 3 on the picture below).

As soon as I had everything in place, I got the latest firmware image, 2.0.5 from the Turing Pi Website ( https://firmware.turingpi.com/turing-pi2/v2.0.5/tp2-firmware-sdcard-v2.0.5.img ). I flashed it onto a MicroSD Card with balenaEtcher and inserted the MicroSD Card into the appropriate slot on the backside of the Turing Pi 2. With everything in place, I hooked everything up, got myself a flathead screwdriver and shortend the MOSI and SCLK/Clock lines of the flash module on-board of the Turing Pi 2 as mentioned in this issue ticket: https://github.com/turing-machines/BMC-Firmware/issues/134 ( see position 4 in green, the left bottom two legs of the chip ). You can also see the both legs better on the picture below:

With my screwdriver still shorting both legs of the flash module, I applied power to the Turing Pi 2. After some seconds, the LEDs came on and the 4 LEDs of the ethernet ports started blinking slowly. I removed the short-circuit on the flash module, pressed KEY1 3 times rapidly and the ethernet ports started turning on one LED at a time. After about 30 seconds, the LEDs stopped the animation and all LEDs blinked twice (again and again) to show the flash was a success. I powered down the Turing Pi 2, removed the MicroSD card and powered it up again - and it was fixed! 🙂
( Usual procedure for update from a MicroSD Card can be found here: https://docs.turingpi.com/docs/turing-pi2-bmc-v1x-to-v2x )

Good ending

With that, the Turing Pi 2 was fixed - BMC is answering my calls, all four nodes are working. It was not an easy fix by all means, but using a microscope, loads of flux and patience made it work again. And the Thermal Camera! That less than 40 Euro thing really helped a lot, otherwise I would have not found the issue without turning the whole board into a burning mess.