Hi, I have set up Jetson Nano with FocalTech edt-ft5x06 touch controller, build kernel module for it and now I need to add device tree entry for this controller. It was configured before with raspberry pi 3 successfully, but I can’t find information how to work with Jetsons device tree. So on raspberry pi there was dts overlay:
// Definitions for FocalTech System Touchcontroller by I2C bus.
/dts-v1/;
/plugin/;
/{
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&i2c1>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
edt_ft5x06_pins: edt_ft5x06_pins {
brcm,pins = <17>; /* GPIO */
brcm,function = <0>; /* in */
brcm,pull = <2>; /* up */
};
};
};
fragment@2 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
edt_ft5x06: edt_ft5x06@38 {
compatible = "edt,edt-ft5x06";
reg = <0x38>;
pinctrl-names = "default";
interrupt-parent = <&gpio>;
interrupts = <17 0x8>;
touchscreen-size-x = <600>;
touchscreen-size-y = <800>;
touchscreen-inverted-x;
touchscreen-inverted-y;
touchscreen-swapped-x-y;
};
};
};
__overrides__ {
addr = <&edt_ft5x06>, "reg:0";
};
};
but in jetson I can’t find such feature as overlay, I have found only full device tree file in kernel source hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-a02.dts
where probably I need to make changes…
What I have figured out is I will need this:
i2c@7000c000 {
tegra_nct72: temp-sensor@4c {
status = "disabled";
};
replaced with this:
i2c@7000c000 {
tegra_nct72: temp-sensor@4c {
status = "disabled";
};
#address-cells = <1>;
#size-cells = <0>;
edt_ft5x06@38 {
status = "okay";
compatible = "edt,edt-ft5x06";
reg = <0x38>;
pinctrl-names = "default";
interrupt-parent = <&gpio>;
interrupts = <17 0x8>;
touchscreen-size-x = <600>;
touchscreen-size-y = <800>;
touchscreen-inverted-x;
touchscreen-inverted-y;
touchscreen-swapped-x-y;
};
};
but it will probably not work as this part is incorect:
interrupt-parent = <&gpio>;
interrupts = <17 0x8>;
Hope someone can show me how to fix it.