Hello, in this thread I’ll introduce my touchscreen mod for the DevTerm.
This was one year in the making, and I want to share my findings with the community here.
This mod has one constraint: do not use the EXT IO.
With the wonderful work already done in The booby-trapped DevTerm GPIO I managed to use the PMU I2C and interrupt to attach a GPIO expander giving me the additional inputs and outputs to attach a Goodix GT911 driven touchscreen.
With an initial prototype working, I designed a flex PCB which connects the touchscreen to the forbidden connector.
To tie it together, I created a device tree overlay which ties the touchscreen to the expander, and the expander to the CPU’s GPIO.
/dts-v1/;
/plugin/;
#include <dt-bindings/clock/rk3399-cru.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/rk3399-power.h>
/{
/*compatible = "brcm,bcm2835";*/
compatible = "rockchip,rk3399";
fragment@1 {
target = <&i2c5>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
touchgpio:touchio@20 {
compatible = "microchip,mcp23008";
reg = <0x20>;
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&gpio3>;
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells=<2>;
//microchip,irq-mirror;
drive-open-drain;
};
gt911@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
interrupt-parent = <&touchgpio>;
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
irq-gpios = <&touchgpio 1 0>;
reset-gpios = <&touchgpio 2 0>;
//goodix,int-sync = <1>;
touchscreen-size-x = <1280>;
touchscreen-size-y = <480>;
touchscreen-inverted-x = <1>;
touchscreen-inverted-y = <1>;
};
};
};
};
With any distro allowing for device tree overlays, this is easy to install.
I am using yatli’s Clockworkpi Arch Linux.
Lastly, as the touchscreen needs some room I slightly increased the vertical size of the top shell and cut out some room for the touchscreen internally.
You can tell by how the keys and buttons are a bit more recessed, but that does impact usability only slightly if not at all.
I know with the uConsole and the PicoCalc the DevTerm isn’t the hot thing anymore, but I hope this is somewhat interesting to people who still use it occasionally.