Hi,
I am trying to connect SPI LCD with ads7846 touch controller. I managed to do that when boot from SD card but when I copy exact the same image into eMMC touch interrupt connected to GPIOAO_4 seems to not working. Number of interrupts in /proc/interrupts is zero all time.
Here is dts fragment for touch:
fragment@2 {
target-path = "/";
__overlay__ {
spi1_gpio {
compatible = "spi-gpio";
pinctrl-0 = <&spicc1_pins &spicc1_ss0_pins>;
pinctrl-names = "default";
status = "okay";
gpio-sck = <&gpio 23 0>;
gpio-mosi = <&gpio 20 0>;
gpio-miso = <&gpio 21 0>;
cs-gpios = <&gpio 22 0>;
num-chipselects = <1>;
#address-cells = <0x1>;
#size-cells = <0>;
touch@0 {
compatible = "ti,ads7846";
reg = <0>;
spi-max-frequency = <2000000>;
interrupt-parent = <&gpio_intc>;
interrupts = <58 2>;
pendown-gpio = <&gpio_ao 4 0>;
pendown-gpio-debounce = <0>;
ti,x-plate-ohms = [00 14];
ti,pressure-max = [00 ff];
ti,debounce-max = <2>;
wakeup-source;
};
};
};
};
I am using armbian image:
Armbian_22.08.0-trunk_Radxa-zero_bullseye_current_5.10.134_minimal.img.xz
Any ideas what the difference between boot from SD or eMMC?
eMMC boot: https://pastebin.com/DhvhdheZ
SD boot: https://pastebin.com/pNQ4UnQK
Thanks in advance
Edit:
Problem solved!
According to Table 8-34 of A311D datasheet GPIO interrupt source for gpioAO_4 is bit 4 so value for interrupts should be <4 2> and it is working for both SD and eMMC boot.
I am not sure why it worked with SD card but not with eMMC, possibly due to some PCB track interference that doesn’t occur if eMMC is not used.