For now, I have fixed almost everything except vibration. But it still needs more tests including usb otg, flashing packages, and backup/restore. There might be some issues in flashing, because Xiaomi uses the EROFS filesystem on Mix 4. So I had to modify TWRP sources and now it can mount EROFS, but not sure about flashing.
I will release the dt very soon, and anyone who wants can work with it.