Skip to content

Device Tree Files

mgong98 edited this page Oct 31, 2024 · 4 revisions

The device tree source and associated include files describe the hardware platform being used and have been modified to provide support for the touch device.

These files are included in the maXTouch_linux kernel repository and are located located in the arch/arm/boot/dts directory:

  • at91-sama5d3_xplained_dm_pda4.dtsi – Main device tree include file

  • at91-sama5d3_xplained_pda4.dts – Main device tree source file

The following sections describe the modifications that have been made to these files.

The at91-sama5d3_xplained_pda4.dts is included in the compile when listed in the Makefile located at the arch/arm/boot/dts root directory.

dtb-$(CONFIG_SOC_SAMV7) += \
  <...>
  at91-sama5d3_xplained_pda4.dtb\
  <...>

The at91-sama5d3_xplained_dm_pda4.dtsi file has been modified to contain the following lines:

atmel_mxt_ts@4a {
compatible = “atmel,atmel_mxt_ts”;
reg = <0x4a>;
reset-gpios = <&pioE 6 GPIO_ACTIVE_LOW>;
interrupt-parent = <&pioE>;
interrupts = <7 0x2>; /* Falling edge only */
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_mxt_ts>;
};

The device default address is 0x4A. Two of the SAMA5D3 GPIO lines are used for the maXTouch controller’s RESET and CHG lines (GPIO 6 and GPIO 7 respectively). The RESET line is assigned to be active low and the CHG interrupt line is a falling edge-triggered GPIO.

The only modification to the at91-sama5d3_xplained_pda4.dts file is the addition of the device tree include file.

#include "at91-sama5d3_xplained_dm_pda4.dtsi"
Clone this wiki locally