Author Topic: Hack Zortrax Driver board? Port Klipper?  (Read 33193 times)

0 Members and 1 Guest are viewing this topic.

Offline harryzTopic starter

  • Contributor
  • Posts: 27
  • Country: se
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #50 on: December 06, 2025, 07:15:03 pm »
Olimex board is nowhere to be found anymore. BPI M2M does not have MIPI connector I don't think? I'll see if I can find m200+ on ebay or local marketplace.
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #51 on: December 07, 2025, 10:23:18 am »
I have seen 0,7V once on the i2c pins, it was wierd but it is the value of the GPIO_LDO regulator when not configured.
So I tried
Code: [Select]
&axp_gpio {
status = "disabled";
}

And I have my 3V on the i2C lines (on bookworm Armbian).
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #52 on: December 07, 2025, 11:02:29 pm »
The touchscreen is working. Now the LCD.

I recovered the static initialization values from the vendor lcd.ko driver module, they are different from sl698ph_720p.c found online. But I have "depency cycle" errors on my display pipeline. The only difference between what I have and a A33 tablet is the dsi output instead of using the lcd pins. I am investigating what it could be.
« Last Edit: December 09, 2025, 12:18:26 pm by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #53 on: December 12, 2025, 06:02:42 pm »
Just as you know, I have made progress on the dsi output but destroyed something in the process because the stock firmware does not show an image anymore. And my driver stops at the initialization process, the command write times out.
I have 2,5 or 5hom  on DSI0 and DSI1 lanes instead of more or less 60k. I do not know how I managed to do that, maybe with the oscilloscope. Those signals are directly BGA balls.

The SD card hack on the bricked board does not work, therefore I bough a couple EMMCs and a cheap programmer, and I will re-flash an image and solder the new chip on the board (given the equipment I have, it is cheaper than re-balling). And then test the screen on the currently bricked board, and if it works, replace the A33 on the damaged dsi board.

So it got complicated, as I wait for the parts, I will start the printing side.
« Last Edit: December 12, 2025, 06:23:27 pm by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #54 on: December 14, 2025, 10:50:38 pm »
Not a surprise, but disappointing, the connectors from the Android board do not use BOOT0 and RESET directly despite the BOOT and RESET naming.
Therefore, they have a proprietary boot-loader and they have written bullshit names here and there like LCD on a GPIO board...

Code: [Select]
Android board connector
Android side    MCU side

5V                   5V
GND                GND
GPIO               STM
ADOHC            MTS
LED                 BOOT
GPIOS             GPIO
RST                 RST
SLP
RX                   RX
TX                   TX

The bootloader is a 32Kb chunk and therefore is a big one. As specified in the Marlin port, overwriting the vendor bootloader will erase serial numbers and prohibit further vendor update.
There is a weird PWM signal on the pins, while we can read a serial dialog on the TX, RX pins.

The classic STM32 boot process is on the debug connector with the following pinout:

Code: [Select]
1 3.3V (square pin)
2 BOOT0
3 PA9      USART1_TX
4 PA10     USART1_RX
5 PA14     JTCK-SWCLK
6 PA13     JTMS-SWDIO
7 VSS/GND
8 RESET

I doubt that the vendor bootloader will upload the Klipper firmware. If anyone wants to intercept his dialog and reverse it, you are welcome.

I will connect to the Debug connector. I do not like that at all because it means soldering, and not a pure software conversion. I could also program my own bootloader and then use the vendor pins, it means no soldering, but making a sort of dual programmer/ linux serial console board.
I will look at what can be done with Katapult.

I do not know what the pins here are really for?
Code: [Select]
GPIO               STM
ADOHC            MTS
LED                 BOOT
GPIOS             GPIO
RST                 RST
SLP                 -----

RX    is PA3 USART2_RX
TX    is PA2 USART2_TX
BOOT  is PD3 USART2_CTS
RESET is PD4 USART2_RTS
STM   is PD2 TIM3_ETR/UART5_RX/SDIO_CMD
MTS   is PD1 OSC_OUT/FSMC_D3/CAN_TX
GPIO  is PD5 USART2_TX

TX and RX is obviously used to program the board, and because the others are connected to the STM32 pins, they can be used for signaling.

Edit:
STM, MTS, BOOT, GPIO are in fact SPI0 form the android board.
Reset is PF1, nothing special. It could be a keep alive signal.
I have seen them used in what seemed a regular RESET/BOOT0 sequence in a script from the vendor firmware, that's why I am disappointed.


« Last Edit: December 14, 2025, 11:54:00 pm by Patrick Areny »
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #55 on: January 03, 2026, 11:38:27 am »
Hi guys,

I have a m200 plus which I'd love to get klipper running on.

Let me know how I can help?

I'm not as good on the hardware side as you guys, but I can find my way around.

I was playing around with mine and I found a file called sysupdate/upd_bck.tar that I thought might be of some interest.

Trying to find a way to copy it off, I see developer mode is already active.  But if I plug a USB into the front A socket and into the C socket on my laptop it doesn't seem to register,  I suppose I need an A to A cable? Or potentially another socket on the board?

Alternatively they seem to have root explorer installed, I'm just trying to find a way to launch it at the moment. If I can I might be able to use that to copy it to the USB.

I seem to have a board revision of 5.3


« Last Edit: January 03, 2026, 11:46:44 am by spazzymoto »
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #56 on: January 04, 2026, 11:56:13 am »
I pulled the upd_bck.zip, it contains a firmware.bin I haven't managed to decipher yet, binwalk on that returns nothing.

I got adb working with the front usb and managed to pull boot.img and recovery.img if that would be useful let me know.
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #57 on: January 04, 2026, 04:01:23 pm »
So with the information you posted above and querying on my machine via adb shell, Gemini came up with the following so take it with a pinch of salt, I've never dug this deep into porting before. Maybe you guys with more knowledge can have a look and give feedback. Or I am happy to run any commands on my machine to verify

Code: [Select]
This is the finalized, comprehensive Device Tree Source (DTS) for your Zortrax M200 Plus. It incorporates the AXP223 PMIC voltages we verified from your live system, the 480x800 MIPI DSI timings from the FEX, and the specific UART1 and I2C pin assignments we confirmed via sunxidump.

Save this file as sun8i-a33-zortrax-m200plus.dts.

Code snippet

/dts-v1/;
#include "sun8i-a33.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/sun8i-a23-a33-ccu.h>

/ {
    model = "Zortrax M200 Plus";
    compatible = "zortrax,m200plus", "allwinner,sun8i-a33";

    aliases {
        serial0 = &uart0;
        serial1 = &uart1;
    };

    chosen {
        stdout-path = "serial0:115200n8";
    };

    backlight: backlight {
        compatible = "pwm-backlight";
        pwms = <&pwm 0 20000 0>;
        brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
        default-brightness-level = <8>;
        enable-gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>; /* PB6 */
    };

    leds {
        compatible = "gpio-leds";
        red {
            label = "zortrax:red:status";
            gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */
            linux,default-trigger = "heartbeat";
        };
    };
};

/* Camera Capture Engine (CSI) */
&csi {
    pinctrl-names = "default";
    pinctrl-0 = <&csi_pins>;
    status = "okay";

    port {
        csi_from_ov5640: endpoint {
            remote-endpoint = <&ov5640_to_csi>;
            bus-width = <8>;
            hsync-active = <1>;
            vsync-active = <1>;
            pclk-sample = <1>;
        };
    };
};

/* Camera Control Bus (I2C1) */
&i2c1 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c1_ph_pins>;
    status = "okay";

    camera@3c {
        compatible = "ovti,ov5640";
        reg = <0x3c>;
        clocks = <&ccu CLK_CSI_MCLK>;
        clock-names = "xclk";
       
        /* Power and Reset from FEX/Live dump */
        DOVDD-supply = <&reg_dldo3>; /* 2.8V */
        reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* PE14 */
        powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
       
        port {
            ov5640_to_csi: endpoint {
                remote-endpoint = <&csi_from_ov5640>;
                bus-width = <8>;
            };
        };
    };
};

/* MIPI DSI Display */
&dsi {
    status = "okay";
    panel@0 {
        compatible = "sitronix,st7701s";
        reg = <0>;
        vcc-dsi-supply = <&reg_dc1sw>;
        vcc-io-supply = <&reg_eldo2>;
        reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>;    /* PH9 */
        enable-gpios = <&pio 3 17 GPIO_ACTIVE_HIGH>; /* PD17 */
        backlight = <&backlight>;

        panel-timing {
            clock-frequency = <31000000>;
            hactive = <480>;
            vactive = <800>;
            hfront-porch = <45>;
            hback-porch = <44>;
            hsync-len = <6>;
            vfront-porch = <79>;
            vback-porch = <16>;
            vsync-len = <1>;
        };
    };
};

&dphy {
    status = "okay";
};

/* Motion Board Link */
&uart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart1_pg_pins>;
    uart-has-rtscts;
    status = "okay";
};

/* Touchscreen */
&i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins>;
    status = "okay";

    touchscreen@38 {
        compatible = "edt,edt-ft5406";
        reg = <0x38>;
        interrupt-parent = <&pio>;
        interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
        wake-gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */
    };
};

/* PMIC & Regulators */
&axp223 {
    regulators {
        reg_dcdc1: dcdc1 {
            regulator-always-on;
            regulator-min-microvolt = <3000000>;
            regulator-max-microvolt = <3000000>;
            regulator-name = "vcc-3v0";
        };
        reg_dc1sw: dc1sw {
            regulator-name = "vcc-lcd-pwr";
        };
        reg_eldo2: eldo2 {
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-name = "vcc-lcd-io";
        };
        reg_dldo3: dldo3 {
            regulator-min-microvolt = <2800000>;
            regulator-max-microvolt = <2800000>;
            regulator-name = "vcc-csi";
        };
    };
};

/* Storage */
&mmc0 {
    pinctrl-names = "default";
    pinctrl-0 = <&mmc0_pins>;
    vmmc-supply = <&reg_dcdc1>;
    bus-width = <4>;
    cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>;
    status = "okay";
};

&mmc2 {
    pinctrl-names = "default";
    pinctrl-0 = <&mmc2_8bit_pins>;
    vmmc-supply = <&reg_dcdc1>;
    bus-width = <8>;
    non-removable;
    status = "okay";
};

&pwm {
    pinctrl-names = "default";
    pinctrl-0 = <&pwm0_pins>;
    status = "okay";
};

&uart0 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart0_pf_pins>;
    status = "okay";
};


Important Verification for your first boot:
DRAM Clock: Your FEX specified 552MHz. When you configure your bootloader (U-Boot), ensure the DRAM frequency is set to exactly 552. If it defaults to 480 or 600, the system may be unstable.

MIPI Lanes: The DTS defaults to the standard A33 DSI configuration. Since your FEX specifies lcd_dsi_lane = 2, the kernel driver should automatically negotiate this, but if the screen remains white, you may need to add data-lanes = <1 2>; inside the panel@0 node.
« Last Edit: January 04, 2026, 04:26:52 pm by spazzymoto »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #58 on: January 06, 2026, 11:49:07 am »
Hi, welcome spazzymoto. The dtb from Gemini is not quite that, but Gemini (which I never used) seems more efficient at understanding FEX files than GPT4 or 5.o from Github Copilot. I comes to my mind that being outsmarted by an IA on such dts composition would be such a bad feeling. But at the same time it would expand mainline linux to anything.

I have the same REV 5.3 MCU board.

I could not find the same tar file in my recovered data. You found out another entry point through android debug, I tried that for a couple days and did not succeed. Booting Armbian using FEL mode gives you also access to all the partitions.
Maybe that tar file with the firmware.bin is the STM32 firmware. However we also need the bootloader to be able to go back to the original printer. I am in the process of installing katapult and removing anything Zortrax (using the debug connector to install Katapult).
If you want to develop the Klipper port, at some point the quickest route is to fully commit to it, and overwrite the original bootloader and firmware. With no guaranty of the result at the moment. If someone wants to reverse engineer the zortrax bootloader protocol, it is also a solution, if it works, with the advantage of being able to go back to the Zortrax firmware.
Today I am reprogramming the old protected boot0 partition with the original Zortrax Boot0 data, but it is a shitty one unable to properly boot mainline u-boot. If someone has a proper up to date boot0 partition for the Allwinner A33, I will take it. But at the moment I am too scared to flash a non working Boot0, the uboot one killed my board. I will use the original to unbrick my board (see image below).


https://drive.google.com/file/d/1sTmYPEbGkFgrfsodw5iPEJgW1HB0zKtn/view?usp=sharing





« Last Edit: January 06, 2026, 12:39:42 pm by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #59 on: January 06, 2026, 01:26:40 pm »
Hey, I was thinking that maybe, the flash firmware executable from the vendor will flash the klipper firmware on the board. And this from Armbian.

We find things in the system partition in the "update/" folder, and an app to update the firmware could be somewhere.
I could not find an stm32 flash app name only an unknown ./system/bin/flash_image which does not seem to flash a microcontroller when reading his bowels using ghex editor.
The following script sets the boot and reset pins in regards to progmodeon and progmodeoff files (used as flags).
PF1 is the RESET pin, but not really THE reset when checked at the multimeter. Must be a software reset triggered by this pin
PC2 is the boot enable pin.
Those two control the bootloader.
Now, how is the Vendor MCU firmware flashed?  spazzymoto, you could try to find out?

Code: [Select]
images_zortrax/system/update/data$ cat gpio_manager_script.sh
ROOT_DIR=/data/local/gpiomgr

CMD_REBOOT=$ROOT_DIR/reboot
CMD_ENABLE_PROGRAMMING_MODE=$ROOT_DIR/progmodeon
CMD_DISABLE_PROGRAMMING_MODE=$ROOT_DIR/progmodeoff
CMD_INIT=$ROOT_DIR/init

GPIO_BASE=/sys/class/gpio_sw

GPIO_NRST_BASE=$GPIO_BASE/PF1;
GPIO_NRST_DATA=$GPIO_NRST_BASE/data;
GPIO_NRST_CONFIG=$GPIO_NRST_BASE/cfg;

GPIO_BOOT_BASE=$GPIO_BASE/PC2;
GPIO_BOOT_DATA=$GPIO_BOOT_BASE/data;
GPIO_BOOT_CONFIG=$GPIO_BOOT_BASE/cfg;

EXIT=0

cmdInit()
{
echo 1 > $GPIO_BOOT_CONFIG;
echo 1 > $GPIO_NRST_CONFIG;

echo 1 > $GPIO_NRST_DATA;
echo 1 > $GPIO_BOOT_DATA;
}

cmdProgModeOn()
{
echo 0 > $GPIO_BOOT_DATA;
}

cmdProgModeOff()
{
echo 1 > $GPIO_BOOT_DATA;
}

cmdReboot()
{
echo 0 > $GPIO_NRST_DATA;
sleep 0.5
echo 1 > $GPIO_NRST_DATA;
}

while [ $EXIT -eq 0 ]
do
if [ -a $CMD_INIT ]; then
cmdInit
sleep 0.2
rm $CMD_INIT
fi

if [ -a $CMD_ENABLE_PROGRAMMING_MODE ]; then
cmdProgModeOn
sleep 0.2
rm $CMD_ENABLE_PROGRAMMING_MODE
fi

if [ -a $CMD_DISABLE_PROGRAMMING_MODE ]; then
cmdProgModeOff
sleep 0.2
rm $CMD_DISABLE_PROGRAMMING_MODE
fi

if [ -a $CMD_REBOOT ]; then
cmdReboot
sleep 0.2
rm $CMD_REBOOT
fi

sleep 0.2
done

Edit: things seem to be in ./update/data/printergui.apk

I cannot execute apps from the system partition on Armbian:
Code: [Select]
root@lime-a33:/mnt/system/bin# ./ls
-bash: ./ls: cannot execute: required file not found
« Last Edit: January 06, 2026, 01:58:04 pm by Patrick Areny »
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #60 on: January 06, 2026, 03:29:42 pm »
Hey Patrick,

Thanks for the replies, I will admit I am a bit out of my depth with where I am at the moment haha.

This is what I have managed

I can get to the printer via adb shell and I am able to do abd reboot efex to enter FEL mode. I initially used that to try pull the script.fex unsuccessfully.

I have now manage to pull it using sunxi-script_extractor from the sunxi-tools repo and I will give Gemini another bash at building a dts with this version.

I investigated the printergui.apk and the firmware.bin a bit and it is the firmware for the stm32, I reversed the protocol from the apk but looking at the payload it looks encrypted and potentially signed judging by some of the errors it returns. I was hoping to be able to use their firmware update protocol to flash it. Gemini recommended an approach but I need to test somethings over the serial connection once I can boot armbian.

The next thing I wanted to try was to make a dts from this fex, compile armbian and see if I can boot it from the usb FEL mode without having to write it to a usb/sdcard.

script.fex
Code: [Select]
[product]
version = "A33-Tablet"
machine = "U708HC"

[platform]
eraseflag = 1
next_work = 2

[target]
boot_clock = 1008
storage_type = 2
burn_key = 1

[key_detect_en]
keyen_flag = 1

[power_sply]
dcdc1_vol = 3000
dcdc2_vol = 1100
dcdc3_vol = 1200
dcdc4_vol = 0
dcdc5_vol = 1500
aldo2_vol = 2500
aldo3_vol = 3000
eldo1_vol = 1800
dldo2_vol = 1800

[card_boot]
logical_start = 40960
sprite_gpio0 =
next_work = 3

[card0_boot_para]
card_ctrl = 0
card_high_speed = 1
card_line = 4
sdc_d1 = port:PF00<2><1><2><default>
sdc_d0 = port:PF01<2><1><2><default>
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>
sdc_d3 = port:PF04<2><1><2><default>
sdc_d2 = port:PF05<2><1><2><default>

[card2_boot_para]
card_ctrl = 2
card_high_speed = 1
card_line = 4
sdc_2xmode = 1
sdc_clk = port:PC05<3><1><2><default>
sdc_cmd = port:PC06<3><1><2><default>
sdc_d0 = port:PC08<3><1><2><default>
sdc_d1 = port:PC09<3><1><2><default>
sdc_d2 = port:PC10<3><1><2><default>
sdc_d3 = port:PC11<3><1><2><default>

[twi_para]
twi_port = 0
twi_scl = port:PH02<2><default><default><default>
twi_sda = port:PH03<2><default><default><default>

[uart_para]
uart_debug_port = 0
uart_debug_tx = port:PF02<3><1><default><default>
uart_debug_rx = port:PF04<3><1><default><default>

[force_uart_para]
force_uart_port = 0
force_uart_tx = port:PF02<3><1><default><default>
force_uart_rx = port:PF04<3><1><default><default>

[jtag_para]
jtag_enable = 0
jtag_ms = port:PF00<3><default><default><default>
jtag_ck = port:PF05<3><default><default><default>
jtag_do = port:PF03<3><default><default><default>
jtag_di = port:PF01<3><default><default><default>

[clock]
pll3 = 297
pll4 = 300
pll6 = 600
pll8 = 408
pll9 = 480
pll10 = 297
pll_cpupat = 0
pll_gpupat = -1002379674
pll_videopat = 0
pll_vepat = 0
pll_hsicpat = 0
pll_depat = 0
pll_mipipat = 0
pll_mipitun = -1979703288
pll_mipibias = -133168128

[pm_para]
standby_mode = 1

[dram_para]
dram_clk = 552
dram_type = 3
dram_zq = 0x3bbb
dram_odt_en = 1
dram_para1 = 284296192
dram_para2 = 4096
dram_mr0 = 7280
dram_mr1 = 64
dram_mr2 = 24
dram_mr3 = 0
dram_tpr0 = 0x47214f
dram_tpr1 = 0x1c2294b
dram_tpr2 = 0x61043
dram_tpr3 = 0x0
dram_tpr4 = 0x0
dram_tpr5 = 0x0
dram_tpr6 = 0x0
dram_tpr7 = 0x0
dram_tpr8 = 0x0
dram_tpr9 = 0x0
dram_tpr10 = 0x0
dram_tpr11 = 0x0
dram_tpr12 = 0xa8
dram_tpr13 = 0x10901

[pm_para]
standby_mode = 1

[wakeup_src_para]
cpu_en = 0
cpu_freq = 48
pll_ratio = 273
dram_selfresh_en = 1
dram_freq = 36
wakeup_src_wl = port:PL07<4><default><default><0>
wakeup_src_bt = port:PL09<4><default><default><0>

[twi0]
twi_used = 1
twi_scl = port:PH02<2><default><default><default>
twi_sda = port:PH03<2><default><default><default>

[twi1]
twi_used = 1
twi_scl = port:PH04<2><default><default><default>
twi_sda = port:PH05<2><default><default><default>

[twi2]
twi_used = 1
twi_scl = port:PE12<3><default><default><default>
twi_sda = port:PE13<3><default><default><default>

[uart0]
uart_used = 1
uart_port = 0
uart_type = 2
uart_tx = port:PF02<3><1><default><default>
uart_rx = port:PF04<3><1><default><default>

[uart1]
uart_used = 1
uart_port = 1
uart_type = 4
uart_tx = port:PG06<2><1><default><default>
uart_rx = port:PG07<2><1><default><default>
uart_rts = port:PG08<2><1><default><default>
uart_cts = port:PG09<2><1><default><default>

[uart2]
uart_used = 1
uart_type = 2
uart_tx = port:PB00<2><1><default><default>
uart_rx = port:PB01<2><1><default><default>

[uart3]
uart_used = 1
uart_type = 2
uart_tx = port:PH06<3><1><default><default>
uart_rx = port:PH07<3><1><default><default>

[uart4]
uart_used = 0
uart_port = 4
uart_type = 2
uart_tx = port:PA04<2><1><default><default>
uart_rx = port:PA05<2><1><default><default>
uart_rts = port:PA06<2><1><default><default>
uart_cts = port:PA07<2><1><default><default>

[spi0]
spi_used = 0
spi_cs_bitmap = 1
spi_mosi = port:PC00<3><default><default><default>
spi_miso = port:PC01<3><default><default><default>
spi_sclk = port:PC02<3><default><default><default>
spi_cs0 = port:PC03<3><1><default><default>

[spi1]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PA00<2><1><default><default>
spi_sclk = port:PA01<2><default><default><default>
spi_mosi = port:PA02<2><default><default><default>
spi_miso = port:PA03<2><default><default><default>

[spi_devices]
spi_dev_num = 1

[spi_board0]
modalias = "at25df641"
max_speed_hz = 50000000
bus_num = 0
chip_select = 0
mode = 0

[ctp_para]
ctp_used = 1
ctp_name = "ft5x_ts"
ctp_twi_id = 0
ctp_twi_addr = 0x38
ctp_screen_max_x = 480
ctp_screen_max_y = 800
ctp_revert_x_flag = 0
ctp_revert_y_flag = 1
ctp_exchange_x_y_flag = 0
ctp_int_port = port:PB05<4><default><default><default>
ctp_wakeup = port:PG10<1><default><default><1>

[ctp_list_para]
ctp_det_used = 0
ft5x_ts = 1
gt82x = 1
gslX680 = 1
gslX680new = 0
gt9xx_ts = 1
gt9xxf_ts = 0
tu_ts = 0
gt818_ts = 1
zet622x = 1
aw5306_ts = 1
icn83xx_ts = 0

[tkey_para]
tkey_used = 0
tkey_twi_id =
tkey_twi_addr =
tkey_int =

[motor_para]
motor_used = 0
motor_shake = port:power3<1><default><default><1>
motor_ldo = ""
motor_ldo_voltage = 3300

[ths_para]
ths_used = 1
ths_trip1_count = 3
ths_trip1_0 = 75
ths_trip1_1 = 90
ths_trip1_2 = 110
ths_trip1_0_min = 0
ths_trip1_0_max = 1
ths_trip1_1_min = 1
ths_trip1_1_max = 3
ths_trip1_2_min = 0
ths_trip1_2_max = 0

[cooler_table]
cooler_count = 4
cooler0 = "1344000 4 4294967295 0"
cooler1 = "1200000 4 4294967295 0"
cooler2 = "1008000 4 4294967295 0"
cooler3 = "648000 4 4294967295 0"

[nand0_para]
nand_support_2ch = 0
nand0_used = 0
nand0_we = port:PC00<2><default><2><default>
nand0_ale = port:PC01<2><default><2><default>
nand0_cle = port:PC02<2><default><2><default>
nand0_ce1 = port:PC03<2><default><2><default>
nand0_ce0 = port:PC04<2><default><2><default>
nand0_nre = port:PC05<2><default><2><default>
nand0_rb0 = port:PC06<2><default><2><default>
nand0_rb1 = port:PC07<2><default><2><default>
nand0_d0 = port:PC08<2><default><2><default>
nand0_d1 = port:PC09<2><default><2><default>
nand0_d2 = port:PC10<2><default><2><default>
nand0_d3 = port:PC11<2><default><2><default>
nand0_d4 = port:PC12<2><default><2><default>
nand0_d5 = port:PC13<2><default><2><default>
nand0_d6 = port:PC14<2><default><2><default>
nand0_d7 = port:PC15<2><default><2><default>
nand0_ndqs = port:PC16<2><default><2><default>
nand0_ce2 = port:PC17<2><default><2><default>
nand0_ce3 = port:PC18<2><default><2><default>
id_number_ctl = 2
nand_p1 = 131094

[disp_init]
disp_init_enable = 1
disp_mode = 0
screen0_output_type = 1
screen0_output_mode = 4
screen1_output_type = 1
screen1_output_mode = 4
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 0
fb0_width = 0
fb0_height = 0
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 0
fb1_width = 0
fb1_height = 0
lcd0_backlight = 197
lcd1_backlight = 197
lcd0_bright = 50
lcd0_contrast = 50
lcd0_saturation = 57
lcd0_hue = 50
lcd1_bright = 50
lcd1_contrast = 50
lcd1_saturation = 57
lcd1_hue = 50

[lcd0_para]
lcd_used = 1
lcd_driver_name = "sl698ph_720p"
lcd_if = 4
lcd_x = 480
lcd_y = 800
lcd_width = 51
lcd_height = 86
lcd_dclk_freq = 31
lcd_pwm_used = 1
lcd_pwm_ch = 0
lcd_pwm_freq = 50000
lcd_pwm_pol = 1
lcd_hbp = 44
lcd_ht = 575
lcd_hspw = 6
lcd_vbp = 16
lcd_vt = 896
lcd_vspw = 1
lcd_dsi_if = 0
lcd_dsi_lane = 2
lcd_dsi_format = 0
lcd_dsi_eotp = 0
lcd_dsi_vc = 0
lcd_dsi_te = 0
lcd_frm = 1
lcd_gamma_en = 0
lcd_bright_curve_en = 0
lcd_cmap_en = 0
deu_mode = 0
lcdgamma4iep = 22
smart_color = 90
lcd_bl_en = port:PB06<1><0><default><1>
lcd_power = "axp22_dc1sw"
lcd_power1 = "axp22_eldo2"
lcd_gpio_0 = port:PH09<1><0><default><0>

[pwm0_para]
pwm_used = 1
pwm_positive = port:PH00<2><0><default><default>

[pwm1_para]
pwm_used = 0
pwm_positive = port:PH00<2><0><default><default>

[csi0]
vip_used = 1
vip_mode = 0
vip_dev_qty = 1
vip_define_sensor_list = 1
vip_csi_pck = port:PE00<2><default><default><default>
vip_csi_mck = port:PE01<2><default><default><default>
vip_csi_hsync = port:PE02<2><default><default><default>
vip_csi_vsync = port:PE03<2><default><default><default>
vip_csi_d0 = port:PE04<2><default><default><default>
vip_csi_d1 = port:PE05<2><default><default><default>
vip_csi_d2 = port:PE06<2><default><default><default>
vip_csi_d3 = port:PE07<2><default><default><default>
vip_csi_d4 = port:PE08<2><default><default><default>
vip_csi_d5 = port:PE09<2><default><default><default>
vip_csi_d6 = port:PE10<2><default><default><default>
vip_csi_d7 = port:PE11<2><default><default><default>
vip_dev0_mname = "gc2145"
vip_dev0_pos = "rear"
vip_dev0_lane = 1
vip_dev0_twi_id = 1
vip_dev0_twi_addr = 120
vip_dev0_isp_used = 0
vip_dev0_fmt = 0
vip_dev0_stby_mode = 0
vip_dev0_vflip = 0
vip_dev0_hflip = 0
vip_dev0_iovdd = "axp22_dldo3"
vip_dev0_iovdd_vol = 2800000
vip_dev0_avdd = ""
vip_dev0_avdd_vol =
vip_dev0_dvdd = ""
vip_dev0_dvdd_vol = 1500000
vip_dev0_afvdd =
vip_dev0_afvdd_vol =
vip_dev0_power_en =
vip_dev0_reset = port:PE14<1><default><default><0>
vip_dev0_pwdn = port:PE15<1><default><default><1>
vip_dev0_flash_en =
vip_dev0_flash_mode =
vip_dev0_af_pwdn =
vip_dev1_mname = "gc0308"
vip_dev1_pos = "front"
vip_dev1_lane = 1
vip_dev1_twi_id = 2
vip_dev1_twi_addr = 66
vip_dev1_isp_used = 0
vip_dev1_fmt = 0
vip_dev1_stby_mode = 1
vip_dev1_vflip = 0
vip_dev1_hflip = 0
vip_dev1_iovdd = "axp22_dldo3"
vip_dev1_iovdd_vol = 2800000
vip_dev1_avdd = "axp22_ldoio0"
vip_dev1_avdd_vol = 2800000
vip_dev1_dvdd = "axp22_eldo2"
vip_dev1_dvdd_vol = 1800000
vip_dev1_afvdd = "axp22_eldo3"
vip_dev1_afvdd_vol = 2800000
vip_dev1_power_en =
vip_dev1_reset = port:PE16<1><default><default><0>
vip_dev1_pwdn = port:PE15<1><default><default><1>
vip_dev1_flash_en =
vip_dev1_flash_mode =
vip_dev1_af_pwdn =

[mmc0_para]
sdc_used = 1
sdc_detmode = 2
sdc_buswidth = 4
sdc_d1 = port:PF00<2><1><2><default>
sdc_d0 = port:PF01<2><1><2><default>
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>
sdc_d3 = port:PF04<2><1><2><default>
sdc_d2 = port:PF05<2><1><2><default>
sdc_det = port:PB04<4><1><2><default>
sdc_power_supply = "axp22_dcdc1"
sdc_use_wp = 0
sdc_wp =
sdc_isio = 0
sdc_regulator = "none"

[mmc1_para]
sdc_used = 1
sdc_detmode = 4
sdc_buswidth = 4
sdc_clk = port:PG00<2><1><1><default>
sdc_cmd = port:PG01<2><1><1><default>
sdc_d0 = port:PG02<2><1><1><default>
sdc_d1 = port:PG03<2><1><1><default>
sdc_d2 = port:PG04<2><1><1><default>
sdc_d3 = port:PG05<2><1><1><default>
sdc_det =
sdc_use_wp = 0
sdc_wp =
sdc_isio = 1
sdc_regulator = "none"

[mmc2_para]
sdc_used = 1
sdc_detmode = 3
sdc_buswidth = 8
sdc_2xmode = 1
sdc_clk = port:PC05<3><1><2><default>
sdc_cmd = port:PC06<3><1><2><default>
sdc_d0 = port:PC08<3><1><2><default>
sdc_d1 = port:PC09<3><1><2><default>
sdc_d2 = port:PC10<3><1><2><default>
sdc_d3 = port:PC11<3><1><2><default>
sdc_d4 = port:PC12<3><1><2><default>
sdc_d5 = port:PC13<3><1><2><default>
sdc_d6 = port:PC14<3><1><2><default>
sdc_d7 = port:PC15<3><1><2><default>
emmc_rst = port:PC16<3><1><2><default>
sdc_power_supply = "axp22_dcdc1"
sdc_det =
sdc_use_wp = 0
sdc_wp =
sdc_isio = 0
sdc_regulator = "none"

[usbc0]
usb_used = 1
usb_port_type = 2
usb_detect_type = 1
usb_id_gpio = port:PH08<0><1><default><default>
usb_det_vbus_gpio = "axp_ctrl"
usb_drv_vbus_gpio = port:power4<1><0><default><0>
usb_restrict_gpio =
usb_host_init_state = 0
usb_restric_flag = 0
usb_restric_voltage = 3550000
usb_restric_capacity = 5
usb_regulator_io = "nocare"
usb_regulator_vol = 0
usb_regulator_id_vbus = "axp22_dcdc1"
usb_regulator_id_vbus_vol = 3000000

[usbc1]
usb_used = 1
usb_drv_vbus_gpio =
usb_restrict_gpio =
usb_host_init_state = 1
usb_restric_flag = 0
usb_regulator_io = "nocare"
usb_regulator_vol = 0
usb_not_suspend = 0

[usb_feature]
vendor_id = 7994
mass_storage_id = 4096
adb_id = 4097
manufacturer_name = "USB Developer"
product_name = "Android"
serial_number = "20080411"

[msc_feature]
vendor_name = "USB 2.0"
product_name = "USB Flash Driver"
release = 100
luns = 2

[serial_feature]
serial_unique = 1
sn_filename = "sn.txt"

[gsensor_para]
gsensor_used = 0
gsensor_twi_id = 1
gsensor_twi_addr = 0x18
gsensor_int1 =
gsensor_int2 =

[gsensor_list_para]
gsensor_det_used = 0
bma250 = 1
stk831x = 0
mma8452 = 1
mma7660 = 1
mma865x = 1
mc32x0 = 0
afa750 = 1
lis3de_acc = 1
lis3dh_acc = 1
kxtik = 1
dmard10 = 0
dmard06 = 1
mxc622x = 1
fxos8700 = 1
lsm303d = 1

[rf_para]
module_num = 2
module_power1 = "axp22_dldo1"
module_power1_vol = 3300000
module_power2 = ""
module_power2_vol =
module_power3 = ""
module_power3_vol =
power_switch = port:power0<1><0><default><0>
chip_en =
lpo_use_apclk = "losc_out"

[wifi_para]
wifi_used = 1
wifi_sdc_id = 1
wifi_usbc_id = 1
wifi_usbc_type = 1
wifi_mod_sel = 2
wifi_power = "axp22_dldo1"
wifi_power_ext1 = ""
wifi_power_ext2 = ""
wifi_power_switch = port:power0<1><0><default><0>
ap6xxx_wl_regon = port:PL06<1><default><default><0>
ap6xxx_wl_host_wake = port:PL07<4><default><default><0>
ap6xxx_bt_regon = port:PL08<1><default><default><0>
ap6xxx_bt_wake = port:PL10<1><default><default><0>
ap6xxx_bt_host_wake = port:PL09<4><default><default><0>
ap6xxx_lpo_use_apclk = 1
usb_net_power_ctrl = port:PL11<1><default><default><0>

[bt_para]
bt_used = 1
bt_uart_id = 1
bt_rst_n = port:PL08<1><default><default><0>
bt_wake = port:PL10<1><default><default><0>
bt_host_wake = port:PL09<4><default><default><0>
bt_wake_invert = 0
bt_host_wake_invert = 0

[3g_para]
3g_used = 0
3g_usbc_num = 1
3g_uart_num = 2
bb_name = "em66"
bb_vbat =
bb_on =
bb_pwr_on = port:PL03<1><default><default><0>
bb_wake = port:PL04<1><default><default><0>
bb_rf_dis = port:PL11<1><default><default><0>
bb_rst = port:PL05<1><default><default><0>
bb_dldo = "axp22_aldo1"
bb_dldo_min_uV = 2800000
bb_dldo_max_uV = 2800000

[gy_para]
gy_used = 0
gy_twi_id = 1
gy_twi_addr = 106
gy_int1 =
gy_int2 =

[gy_list_para]
gy_det_used = 0
l3gd20_gyr = 1

[ls_para]
ls_used = 0
ls_twi_id = 1
ls_twi_addr = 35
ls_int = port:PB07<4><1><default><default>

[ls_list_para]
ls_det_used = 0
ltr_501als = 0
jsa1212 = 0

[compass_para]
compass_used = 0
compass_twi_id = 1
compass_twi_addr = 13
compass_int =

[gpio_para]
gpio_used = 1
gpio_pin_1 = port:PB02<1><default><default><0>
gpio_pin_2 = port:PB03<1><default><default><0>
gpio_pin_3 = port:PE17<1><default><default><1>
gpio_pin_4 = port:PH01<1><default><default><0>
gpio_pin_5 = port:PC01<1><default><default><0>
gpio_pin_6 = port:PC00<1><default><default><0>
gpio_pin_7 = port:PC02<1><default><default><1>
gpio_pin_8 = port:PC03<0><1><default><0>
gpio_pin_9 = port:PF01<1><default><default><0>
gpio_pin_10 = port:PF00<1><default><default><0>

[i2s0]
i2s0_used = 0
i2s0_channel = 2
i2s0_master = 4
i2s0_select = 1
audio_format = 1
signal_inversion = 1
over_sample_rate = 512
sample_resolution = 16
word_select_size = 32
pcm_sync_period = 256
msb_lsb_first = 0
sign_extend = 0
slot_index = 0
slot_width = 16
frame_width = 1
tx_data_mode = 1
rx_data_mode = 1
i2s0_mclk =
i2s0_bclk = port:PB04<2><1><default><default>
i2s0_lrclk = port:PB05<2><1><default><default>
i2s0_dout0 = port:PB06<2><1><default><default>
i2s0_dout1 =
i2s0_dout2 =
i2s0_dout3 =
i2s0_din = port:PB07<2><1><default><default>

[i2s1]
i2s1_used = 0
i2s1_channel = 2
i2s1_master = 4
i2s1_select = 1
audio_format = 1
signal_inversion = 1
over_sample_rate = 512
sample_resolution = 16
word_select_size = 32
pcm_sync_period = 64
msb_lsb_first = 0
sign_extend = 0
slot_index = 0
slot_width = 16
frame_width = 1
tx_data_mode = 0
rx_data_mode = 0
i2s1_mclk =
i2s1_bclk = port:PG11<2><1><default><default>
i2s1_lrclk = port:PG10<2><1><default><default>
i2s1_dout = port:PG12<2><1><default><default>
i2s1_din = port:PG13<2><1><default><default>

[audio0]
audio_used = 0
headphone_vol = 59
earpiece_vol = 59
cap_vol = 5
pa_single_vol = 62
pa_double_used = 0
pa_double_vol = 62
headphone_direct_used = 1
headset_mic_vol = 3
main_mic_vol = 1
audio_hp_ldo = "none"
audio_pa_ctrl = port:PL02<1><default><default><0>
aif2_used = 0
aif3_used = 0
headphone_mute_used = 0
DAC_VOL_CTRL_SPK = 41120
DAC_VOL_CTRL_HEADPHONE = 41120
agc_used = 0
drc_used = 0

[pmu1_para]
pmu_used = 1
pmu_twi_addr = 52
pmu_twi_id = 1
pmu_irq_id = 0
pmu_battery_rdc = 112
pmu_battery_cap = 2510
pmu_batdeten = 1
pmu_chg_ic_temp = 0
pmu_runtime_chgcur = 500
pmu_earlysuspend_chgcur = 1200
pmu_suspend_chgcur = 1300
pmu_shutdown_chgcur = 1300
pmu_init_chgvol = 4200
pmu_init_chgend_rate = 15
pmu_init_chg_enabled = 1
pmu_init_adc_freq = 800
pmu_init_adcts_freq = 800
pmu_init_chg_pretime = 70
pmu_init_chg_csttime = 720
pmu_batt_cap_correct = 1
pmu_bat_regu_en = 0
pmu_bat_para1 = 0
pmu_bat_para2 = 0
pmu_bat_para3 = 0
pmu_bat_para4 = 0
pmu_bat_para5 = 0
pmu_bat_para6 = 0
pmu_bat_para7 = 0
pmu_bat_para8 = 0
pmu_bat_para9 = 1
pmu_bat_para10 = 1
pmu_bat_para11 = 2
pmu_bat_para12 = 2
pmu_bat_para13 = 3
pmu_bat_para14 = 9
pmu_bat_para15 = 16
pmu_bat_para16 = 24
pmu_bat_para17 = 29
pmu_bat_para18 = 37
pmu_bat_para19 = 43
pmu_bat_para20 = 48
pmu_bat_para21 = 53
pmu_bat_para22 = 57
pmu_bat_para23 = 64
pmu_bat_para24 = 72
pmu_bat_para25 = 81
pmu_bat_para26 = 84
pmu_bat_para27 = 88
pmu_bat_para28 = 93
pmu_bat_para29 = 95
pmu_bat_para30 = 97
pmu_bat_para31 = 99
pmu_bat_para32 = 100
pmu_usbvol_limit = 0
pmu_usbcur_limit = 0
pmu_usbvol = 4000
pmu_usbcur = 0
pmu_usbvol_pc = 4400
pmu_usbcur_pc = 500
pmu_pwroff_vol = 3300
pmu_pwron_vol = 2600
pmu_pekoff_time = 6000
pmu_pekoff_func = 0
pmu_pekoff_en = 1
pmu_peklong_time = 1500
pmu_pekon_time = 1000
pmu_pwrok_time = 64
pmu_battery_warning_level1 = 15
pmu_battery_warning_level2 = 0
pmu_restvol_adjust_time = 60
pmu_ocv_cou_adjust_time = 60
pmu_chgled_func = 0
pmu_chgled_type = 0
pmu_vbusen_func = 1
pmu_reset = 0
pmu_IRQ_wakeup = 0
pmu_hot_shutdowm = 1
pmu_inshort = 0
power_start = 0
pmu_temp_enable = 1
pmu_charge_ltf = 2261
pmu_charge_htf = 388
pmu_discharge_ltf = 3200
pmu_discharge_htf = 237
pmu_temp_para1 = 7466
pmu_temp_para2 = 4480
pmu_temp_para3 = 3518
pmu_temp_para4 = 2786
pmu_temp_para5 = 2223
pmu_temp_para6 = 1788
pmu_temp_para7 = 1448
pmu_temp_para8 = 969
pmu_temp_para9 = 664
pmu_temp_para10 = 466
pmu_temp_para11 = 393
pmu_temp_para12 = 333
pmu_temp_para13 = 283
pmu_temp_para14 = 242
pmu_temp_para15 = 179
pmu_temp_para16 = 134

[pmu2_para]
pmu_used = 0
pmu_twi_addr = 52
pmu_twi_id = 1
pmu_irq_id = 0

[recovery_key]
key_min = 2
key_max = 100

[dvfs_table]
extremity_freq = 1344000000
max_freq = 1200000000
min_freq = 480000000
LV_count = 8
LV1_freq = 1536000000
LV1_volt = 1500
LV2_freq = 1344000000
LV2_volt = 1460
LV3_freq = 1200000000
LV3_volt = 1320
LV4_freq = 1008000000
LV4_volt = 1200
LV5_freq = 816000000
LV5_volt = 1100
LV6_freq = 648000000
LV6_volt = 1040
LV7_freq = 0
LV7_volt = 1040
LV8_freq = 0
LV8_volt = 1040

[Vdevice]
Vdevice_used = 1
Vdevice_0 = port:PA01<5><1><2><default>
Vdevice_1 = port:PA02<5><1><2><default>

[s_uart0]
s_uart_used = 0
s_uart_tx = port:PL02<2><default><default><default>
s_uart_rx = port:PL03<2><default><default><default>

[s_rsb0]
s_rsb_used = 1
s_rsb_sck = port:PL00<2><1><2><default>
s_rsb_sda = port:PL01<2><1><2><default>

[s_jtag0]
s_jtag_used = 0
s_jtag_tms = port:PL04<2><1><2><default>
s_jtag_tck = port:PL05<2><1><2><default>
s_jtag_tdo = port:PL06<2><1><2><default>
s_jtag_tdi = port:PL07<2><1><2><default>

[s_powchk]
s_powchk_used = -2147483648
s_power_reg = 32865
s_system_power = 50

[mali_para]
mali_used = 1
mali_clkdiv = 1
mali_extreme_freq = 408
mali_extreme_vol = 1100

[dram_dvfs_table]
LV_count = 3
LV1_freq = 552000000
LV1_volt = 1100
LV2_freq = 360000000
LV2_volt = 1100
LV3_freq = 0
LV3_volt = 1100

[charging_type]
charging_type = 1

[dram_scene_table]
LV_count = 3
LV1_scene = 1
LV1_freq = 360000000
LV2_scene = 2
LV2_freq = 240000000
LV3_scene = 3
LV3_freq = 168000000

[leds_para]
leds_used = 1
red_led = port:PE16<1><default><default><0>
red_led_active_low = 1

[gpu_mali400_0]
normal_freq = 384
scene_ctrl_status = 0
temp_ctrl_status = 1
tf0_temp = 85
tf0_freq = 240
tf1_temp = 95
tf1_freq = 144
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #61 on: January 06, 2026, 03:45:00 pm »
This is the new dts that Gemini Pro came up with

Code: [Select]
/dts-v1/;
#include "sun8i-a33.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pwm/pwm.h>

/ {
model = "Allwinner A33 Tablet U708HC";
compatible = "allwinner,u708hc", "allwinner,sun8i-a33";

aliases {
serial0 = &uart0;
mmc0 = &mmc0;
mmc1 = &mmc1;
mmc2 = &mmc2;
};

chosen {
stdout-path = "serial0:115200n8";
};

leds {
compatible = "gpio-leds";

/* FEX: [leds_para] red_led = port:PE16... */
led-0 {
label = "u708hc:red:usr";
gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */
};
};

/* FEX: [wifi_para] ap6xxx_wl_regon = port:PL06 */
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL06 */
/* host_wake = PL07 */
};

/* FEX: [lcd0_para] */
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 50000 0>; /* Channel 0, 50kHz */
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
default-brightness-level = <8>;
/* FEX: lcd_bl_en = port:PB06 */
enable-gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>;
power-supply = <&reg_dc1sw>; /* FEX: lcd_power = "axp22_dc1sw" */
};
};

/* CRITICAL: Link CPU to Regulator for DVFS */
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};

/* FEX: [uart0] Console */
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pf_pins>;
status = "okay";
};

/* FEX: [mmc0_para] SD Card */
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
vmmc-supply = <&reg_dcdc1>;
bus-width = <4>;
cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB04 */
status = "okay";
};

/* FEX: [wifi_para] WiFi */
&mmc1 {
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pg_pins>;
vmmc-supply = <&reg_dldo1>;
mmc-pwrseq = <&wifi_pwrseq>;
bus-width = <4>;
non-removable;
status = "okay";
};

/* FEX: [mmc2_para] eMMC */
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
vmmc-supply = <&reg_dcdc1>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
status = "okay";
};

/* FEX: [twi0] Touchscreen */
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";

touchscreen@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB05 */
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
};
};

/* FEX: [twi1] + [csi0] Rear Camera Control */
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
status = "okay";

gc2145: camera@3c {
compatible = "galaxycore,gc2145";
reg = <0x3c>;

clocks = <&ccu CLK_CSI_MCLK>;
clock-names = "xclk";
assigned-clocks = <&ccu CLK_CSI_MCLK>;
assigned-clock-rates = <24000000>;

iovdd-supply = <&reg_dldo3>;
avdd-supply = <&reg_dldo3>;
dvdd-supply = <&reg_dldo3>;

reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>;  /* PE14 */
enable-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */

port {
gc2145_ep: endpoint {
remote-endpoint = <&csi_ep>;
bus-width = <8>;
hsync-active = <1>;
vsync-active = <1>;
data-active = <1>;
pclk-sample = <1>;
};
};
};
};

/* Camera Interface */
&csi {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&csi_pins>;
port {
csi_ep: endpoint {
remote-endpoint = <&gc2145_ep>;
bus-width = <8>;
};
};
};

/* Power Management via RSB */
&r_rsb {
status = "okay";

axp22x: pmic@3a3 {
compatible = "x-powers,axp223";
reg = <0x3a3>;
interrupt-parent = <&r_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
eldoin-supply = <&reg_dcdc1>;
x-powers,drive-vbus-en;
};
};

#include "axp22x.dtsi"

&reg_aldo1 { };

&reg_aldo2 {
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <2500000>;
regulator-name = "vcc-algo2";
};

&reg_aldo3 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-aldo3";
};

&reg_dc1sw {
regulator-name = "vcc-lcd";
};

&reg_dcdc1 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-3v0";
};

&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-cpux";
};

&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-name = "vcc-dcdc3";
};

&reg_dcdc5 {
regulator-always-on;
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-name = "vcc-dram";
};

&reg_dldo1 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-wifi";
};

&reg_dldo2 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-dldo2";
};

&reg_dldo3 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-name = "vcc-cam-io";
};

&reg_eldo1 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-eldo1";
};

&reg_eldo2 {
    /* FEX: lcd_power1 = "axp22_eldo2" (1.8V for DSI usually) */
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-dsi-1v8";
};

&reg_drivevbus {
regulator-name = "usb0-vbus";
status = "okay";
};

/* USB Configuration */
&usb_otg {
dr_mode = "otg";
status = "okay";
};

&usbphy {
usb0_id_det-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH08 */
usb0_vbus-supply = <&reg_drivevbus>;
status = "okay";
};

&ehci0 {
status = "okay";
};

&ohci0 {
status = "okay";
};

/* DISPLAY CONFIGURATION */
&de {
status = "okay";
};

&tcon0 {
status = "okay";
};

&dphy {
status = "okay";
};

&dsi {
status = "okay";
vcc-dsi-supply = <&reg_dldo1>;

panel {
compatible = "panel-dsi-cm";
dsi-lanes = <2>;

iovcc-supply = <&reg_dc1sw>;
vcc-supply = <&reg_eldo2>;   

reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH09 */
backlight = <&backlight>;

panel-timing {
clock-frequency = <31000000>;
hactive = <480>;
vactive = <800>;

hback-porch = <44>;
hsync-len = <6>;
hfront-porch = <45>;

vback-porch = <16>;
vsync-len = <1>;
vfront-porch = <79>;
};

port {
panel_in_dsi: endpoint {
remote-endpoint = <&dsi_out_panel>;
};
};
};

ports {
port@1 {
reg = <1>;
dsi_out_panel: endpoint {
remote-endpoint = <&panel_in_dsi>;
};
};
};
};

&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm0_pin>;
status = "okay";
};

Important Kernel Config
For this to work, you must ensure your Linux kernel has the drivers enabled. Standard sunxi_defconfig often misses the specific sensors.

Run make menuconfig and check:

Device Drivers -> Multimedia support -> V4L2 sensor drivers: Look for GalaxyCore GC2145 (if available in your kernel version) or generic camera support.

Device Drivers -> Multimedia support -> Allwinner V3s/A33/H3 Camera Sensor Interface driver: This is the sun6i-csi driver.

If you are using a strictly mainline kernel (6.1+), the gc2145 driver might not be in the main tree yet. You may need to patch it in from a "sunxi-next" branch or similar community repo.
« Last Edit: January 06, 2026, 03:51:26 pm by spazzymoto »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #62 on: January 09, 2026, 09:52:23 am »
It is really nice that you were able to gather info about their boot loader. I am making a custom board to flash katapult, but I am still working on details and fixing things up.

You will find a working dts in my u-boot fork https://github.com/mandraga/u-boot Checkout the zortrax-m200plus branch.
I stopped working on the camera because the mainline driver seems unstable, I mean it is not made for A33. However the hardware seems the same but I did not find an example. Plus the i2c bus detection could not find a thing. However I have written something in the device tree.

Is it difficult to enter FEL mode using adb?

I use a USBA - USBA cable without VBUS and sunxi-tools to enter FEL mode.

« Last Edit: January 23, 2026, 05:42:01 pm by Patrick Areny »
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #63 on: January 09, 2026, 12:05:16 pm »
Ive been looking at your u-boot branch thank you.

I've been trying to compile the kernel with the required drivers statically linked so it will boot with them for sunxi-fel uboot ...... write zImage from ram. Its been a learning experience haha.

With regards to flashing the STM board, this is what google gemini was wanting me to try to by-pass zortrax bootloader that handles their encrypted firmware, I havent been able to try chat to it as Im still working on the usb fel to armbian leg.

Code: [Select]
1. Install the Flashing Tools
On Armbian, the most reliable tool for this is stm32flash. It is open-source and specifically designed for the STM32 serial bootloader.

Bash

sudo apt update
sudo apt install stm32flash
2. Identify the UART Port
You need to know which /dev/ttyS* device corresponds to the pins connected to the STM32.

ttyS0 is usually the debug console (don't use this).

ttyS1 or ttyS2 are the most common internal links.

You can list available ports with:

Bash

ls /dev/ttyS*
3. Trigger the STM32 Bootloader
The STM32 will only accept a new firmware via UART if it is in System Memory Boot Mode.

Hardware Method: You must pull the BOOT0 pin HIGH and then Reset the STM32.

Zortrax Note: On these boards, the Allwinner A33 often has GPIOs connected directly to the STM32's RESET and BOOT0 pins. You can toggle them via sysfs:

Bash

# Example: If BOOT0 is connected to A33 GPIO 123
echo 123 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio123/direction
echo 1 > /sys/class/gpio/gpio123/value  # Set BOOT0 High
4. Flash the Firmware
Once the STM32 is in bootloader mode, run the following command to verify the connection:

Bash

sudo stm32flash /dev/ttyS1
If it identifies the chip (e.g., "Device ID: 0x414"), proceed to flash your .bin file:

Bash

sudo stm32flash -w your_firmware.bin -v -g 0x0 /dev/ttyS1
-w: Write the file.

-v: Verify after writing.

-g 0x0: Start execution after flashing.
« Last Edit: January 09, 2026, 12:10:41 pm by spazzymoto »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #64 on: January 11, 2026, 07:46:49 pm »
Code: [Select]
llwinner A33 often has GPIOs connected directly to the STM32's RESET and BOOT0 pins. This is not true on the Zortrax, the real RESET and BOOT0 pins are on the debug header.

All the needed pins are in the dts, the STM32 is on uart2 but with a twist: without the dts, uart2 would be mixed with uart0.

Edit: I was able to replace the EMMC of my brick, it works again. I am so happy with that. However I used the original obsolete boot0 partition.

« Last Edit: January 11, 2026, 08:00:25 pm by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #65 on: January 16, 2026, 08:25:45 pm »
Spazzymoto has managed to get some MCU programming information. I am trying to program a tool to upload code to the MCU without using Katapult.
If it works, it would spare the step of flashing katapult.

Just to inform you, I tried to replace my A33 with the burnt LCD output with a new one, but it does not boot. Surely his fuses are not configured for EMMC2.
I will re-ball my other board in an attempt to make it work again (-> without the LCD).
Anyway, my LCD driver initializes but nothing on screen, maybe I should use something other than Armbian minimal image. A proper version for graphic interface usage.
« Last Edit: January 17, 2026, 10:09:42 am by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #66 on: January 16, 2026, 11:30:46 pm »
With a bit of luck, a logic analyser, an oscilloscope, and github copilot I managed to get the Bootloader answering. It is obfuscated but it works.
« Last Edit: January 17, 2026, 10:10:27 am by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #67 on: January 17, 2026, 08:55:31 pm »
The firmware seems encrypted, because of the 512 first bytes of the file and his data. Plus there is no string in the encountered vendor firmware, no arm code. The bootloader stops at the first packet. I have played enough with that, I am getting upset.
I will flash Katapult and finish the job.
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #68 on: January 23, 2026, 12:32:05 pm »
Did you make any progress on the display?

I've got some text rendering, but the alignment is a bit off and it is a bit jittery, will investigate those issues and let you know when they are sorted.
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #69 on: January 23, 2026, 04:21:17 pm »
I managed to make the screen work today  ;D It was such a struggle to get that running. Using a custom driver on Armbian (not a minimal image). Kmscube runs, I will retry on the minimal image to double check.
I received an STLINK pogrammer this afternoon. I am installing Klipper and Katapult now. I will try to get the klipper touchscreen interface working now.
I also cleaned up my repo to share it soon.

Is it your custom driver?
« Last Edit: January 23, 2026, 05:23:51 pm by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #70 on: January 24, 2026, 11:42:47 am »
I have the same effect.




This screen is a bit broken BTW, it happened when I separated it from the chassis.

The offset may have to do with the screen timings in the device tree or the driver setup.
Try to look at the fex file, but the fex and dts formats are not the same.
« Last Edit: January 24, 2026, 11:56:52 am by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #71 on: January 25, 2026, 12:16:59 am »
Katapult works on /dev/ttyS2 just after reset by shorting NRST to GND on the debug pin. I successfully flash klipper using it.
Klipper only starts when I flash it, not after a reset.
Despite that, I cleaned up the configuration, and managed to spin the extruder FAN, light up the green and red leds, and move the printing head.
« Last Edit: January 25, 2026, 09:53:37 am by Patrick Areny »
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #72 on: January 25, 2026, 08:20:09 pm »
I have made some progress today, the following is working:

Bed heater + temperature sensor (not an EPCOS, I have made a pull request on zmxxxp-re, sorry again, I missed the invitation)
Nozzle heater + temperature sensor (not an EPCOS).
RGB leds
X axis with stop
Y axis with stop
Extruder motor
Fans

It turns out that my Z driver is toasted and the current adjust was not on 1V but on 0,4V like if it was the extruder. I will replace the IC this week.

I have some problems with katapult. This morning I could not start klipper. It only started right after I flashed it. Now after programming katapult using STMCubeProgrammer instead of OpenOcd, Klipper boots all the time but I can't use Katapult, the flashtool times out. Plus I see no solution to restart the MCU firmware from Mainsail, I have to reset the MCU by shorting the RESET and GND pin holes on the debug port.
« Last Edit: January 25, 2026, 11:23:26 pm by Patrick Areny »
 

Offline spazzymoto

  • Contributor
  • Posts: 12
  • Country: za
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #73 on: January 26, 2026, 07:34:06 am »
Wow you have made incredible progress, well done!

I worked a bit more on the screen and have got things stable.

I have attached my driver & dts in case you find anything interesting there, although yours is probably further along.

Next for me would be looking at doing klipper like you but I have no idea where to start on that so will need to do some reading.
 

Offline Patrick Areny

  • Regular Contributor
  • *
  • Posts: 58
  • Country: fr
Re: Hack Zortrax Driver board? Port Klipper?
« Reply #74 on: January 27, 2026, 02:36:11 pm »
That beautiful screen. How did you manage to to turn the image at 90°? And as I understand you compiled it into the Armbian kernel? How to do that? Because my kernel changes in the Armbian build repo where reverted before compilation.

I checked your lcd driver and while it looks a lot like my driver, if I paste the init part and/or the timings into the mine it crashes.
Where did you find the init parameters? They are slightly different from mine taken from lcd.ko
Thanks for the dts, I still add a missing regulator in the dts, I fixed this.
My lcd driver does not offset anymore, I just removed the VIDEO BURST mode.

The source code for the printer conversion is here: https://github.com/mandraga/klipper4m200.git
Be careful, it is work in progress, and the Z stepper and Z stop configuration are untested and could result in a printing head plunging into the table.
But if you take the risk, you may print a banshee before I do.

Have fun.
« Last Edit: January 27, 2026, 04:24:35 pm by Patrick Areny »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->