makerbase-mks / MKS-PI

As we all know, the Klipper firmware has the advantages of high printing speed, high precision, and the ability to use the web page to control the printer, etc. MKS PI is a high-end microcomputer board designed by makerbase to replace the Raspberry Pi for the convenience of 3D printing users to use the Klipper firmware. In terms of hardware, MKS PI has a powerful 4-core 64-bit SOC onboard, with 1GBytes of DDR3 memory, supports HDMI screen interface and PI-TS35 screen interface, provides Ethernet port, 3-channel USB interfaces (can be connected to a 3D printer main board, USB Wireless network card, USB camera, U disk, USB keyboard and mouse, etc.); In terms of software, Makerbase provides a complete Klipper firmware transplanted based on the Armbian desktop system, and directly supports klipperScreen. Users only need to download the image file provided by Makerbase, burn it to the TF card, without a lot of construction work, use the usb port or serial port to connect your main board, configure the parameters on the webpage, and you can use the Klipper firmware happily!
GNU General Public License v3.0
111 stars 8 forks source link

Support MKS PI-TS35 by newest Armbian Kernel #26

Open redrathnure opened 1 year ago

redrathnure commented 1 year ago

Newest Armbian use 6.x kernel and MKS PI-TS35 does not works anymore. Any plans to update MKS-PI-Armbian image? And it would be nice to publish instructions how to enable MKS PI-TS35 screen with new Armbian (or other distro).

attilabody commented 1 year ago

They will not. How they hacked their SPI TFT to the Linux kernel is a complete mess. They took the ili9431 (which is a fixed, 240x320 pixel resolution TFT driver circuit) kernel driver from fbtft, changed the WIDTH and HEIGHT macro according to their resolution (320x480) and released the binary kernel module. I am in the process of reverse engineering and solving the whole mess correctly but the time I can spend on it is limited. The ILI9341 driver is still in the staging section of the 6.0 kernel so I don't see any obstacle in making it available in the same (disgusting) way they did, but I yet have to find a correct solution.

majekw commented 1 year ago

I think you could find MKS patches to Armbian and kernel here: https://github.com/makerbase-mks/armbian-build LCD changes are in userpatches/kernel/rockchip64-legacy/kernel-rockchip64-legacy.patch

attilabody commented 1 year ago

Thanks, @majekw, this closes the GPL violation bug

redrathnure commented 1 year ago

Thanks for the info. However, I expect more support from a supplier who makes money from this hardware.

redrathnure commented 1 year ago

@compihu, @majekw I tried to apply patches to the current and edge kernels. https://github.com/redrathnure/armbian-mkspi/tree/custom/mkspi_23.02.0-trunk.0073. The same not really nice way to patch ILI9341 driver, however it works.

attilabody commented 1 year ago

@redrathnure, The tft is an fb_ili9481, not a 9341. It works out of the box as soon as I modify the device tree accordingly. (Don't ask why they messed with a driver for a similar chip with a different resolution instead of using the proper one...)

redrathnure commented 1 year ago

oh, this great news! Could you share example of proper device tree declaration?

attilabody commented 1 year ago

@redrathnure, As far as I can see from your commits, you've already figured it out...

redrathnure commented 1 year ago

Yes, it works, thank you for the hint.