Beaglebone Black and the 4D Systems gen4-4DCAPE-50T resistive touchscreen touch input not working

Hi I am working with a Beaglebone Black and the 4D Systems gen4-4DCAPE-50T resistive touchscreen. The screen display works however I do not receive any touch events. I don’t really have an option of flashing an image that we know works as this is part of a larger project that has been developed for years so I boot it from an image of the beagle that I have on a SD card. I know that this should work as it has worked before but I broke the system and had to reboot from the SD card image that we have however when doing this I don’t get touch events. As this is the resistive touchscreen I am using the ar1021 driver and I can confirm that it is loaded as it is in the list of lsmod. In dmesg I get things like input: ar1021 I2C Touchscreen as /devices/platform/ocp/4802a000.i2c/i2c-1/1-004d/input/input0 so it seems to bind correctly on i2c-1. However running i2cdetect on 1 I get nothing:
KaGsa
Running i2cdetect on 2 I get:
U9c6e
Which I can confirm is my EEprom of my touchscreen. Should the ar1021 chip and EEprom of touchscreen be on different i2c busses? My boot folder has the contents of:
XITED
So I am assuming the i2c-1 is set up correctly according to bbb-gen4-4dcape50t.dtb.

I have tried things like cat /dev/input/event0, evtest and many other cat’s but nothing responds to a touch event. Any suggestions would be greatly appreciated as I can’t even see what could be wrong other than nothing being return by sudo i2cdetect -y 1. Any more clarification let me know and I will get the information for you.

1 Like

In this specific TechForum post, there are some details about the 5 and 7-inch displays. It may prove valuable.

Seth

Please retest with:

https://forum.beagleboard.org/tag/latest-images

I’m pretty sure that model just works.

If it does not, please share the output of:

sudo beagle-version

Regards,

1 Like

The SD card we need to boot from has: Debian 9, Kernel: 4.19.94, Architecture: armv7l

Hey Robert thanks for responding, we will give those images a try. However, as mentioned in the question it is quite important for us to use the image we already have as there has been much development already done on this project. Is there anything else you can recommend other than flashing a brand new image? Reiterating on what was said before, we know this image can work, as the touch input has worked before it was broken and we needed to go back to where our SD card was backed up most recently. Thanks for your suggestions, we are out of ideas.

Okay, please run:

sudo /opt/scripts/tools/version.sh

So i can take a look at it…

Regards,

Hi Robert,

The output of the version.sh script is pasted below. Since our image has been stripped down, I had to manually download your boot scripts (GitHub - RobertCNelson/boot-scripts: Just a bunch of useful scripts placed under /opt/scripts/) and then create the file: ‘/var/lib/dpkg/status’ in order for it to work.

/opt/boot-scripts-master/tools$ sudo ./version.sh
eeprom:[A335BNLTEIA04618BBBK07D7]
model:[TI_AM335x_BeagleBone_Black]
./version.sh: line 20: warning: command substitution: ignored null byte in input
./version.sh: line 44: warning: command substitution: ignored null byte in input
kernel:[4.19.94]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
WARNING:pkg:[bb-cape-overlays]:[NOT_INSTALLED]
WARNING:pkg:[bb-customizations]:[NOT_INSTALLED]
WARNING:pkg:[bb-usb-gadgets]:[NOT_INSTALLED]
WARNING:pkg:[bb-wl18xx-firmware]:[NOT_INSTALLED]
WARNING:pkg:[kmod]:[NOT_INSTALLED]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
cmdline:[console=ttyS0,115200n8 root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait consoleblank=0 vt.global_cursor_default=0 coherent_pool=1M]
dmesg | grep remote
[    4.570970] remoteproc remoteproc0: wkup_m3 is available
[    4.648027] remoteproc remoteproc0: powering up wkup_m3
[    4.691664] remoteproc remoteproc0: Direct firmware load for am335x-pm-firmware.elf failed with error -2
[    4.779666] remoteproc remoteproc0: request_firmware failed: -2
[    5.923994] remoteproc remoteproc1: 4a334000.pru is available
[    5.953910] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[    5.923994] remoteproc remoteproc1: 4a334000.pru is available
[    5.937963] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[    5.953910] remoteproc remoteproc2: 4a338000.pru is available
[    5.960442] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[    0.700649] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

Here is the output of my dmesg for more information:
dmesg.txt (15.3 KB)
and lsmod:
lsmod.txt (2.1 KB)

Another question I have, that may help is:

  • What are the steps required or what would you look for in order to debug/setup a touchscreen device/get resistive touch input working?

Thank you.

Hello,

I have a smaller resistive touch display from 4D Systems. I will plug it in and give you my ideas.

Do you have EEPROM on it? If so, maybe hexdump some items.

If you have time, please type up these commands. It will help me better understand what is going on:

uname -a:

cat /etc/dogtag:

I am sure you have your own model of a FS already. So, I do not want to say what has already been said.

I found this command to get the EEPROM data:

hexdump -C /sys/bus/i2c/devices/2-0054/eeprom but this is considering if the bus is really located at 2-0054. I have no way to tell but I can still test w/ my other Cape from 4D Systems.

Seth

P.S. Like @RobertCNelson said, it just works. I remember there was a quirk but mostly flawless graphics. Hmm. I will search the ole inventory and find it. This way, I can almost be on the same page and relay.

Update

Um, is it that the Cape shows nothing? For instance, a blank screen is all there is showing? I am guessing so far. I noticed that w/out the OS and just using a server, simplistic approach here, the screen just shows the server terminal or it used to do just that at one point.

Hi silver2row,

Here is the output of the following:

  • uname -a: Linux TATA4WPU00 4.19.94 #1 PREEMPT Tue Oct 13 03:43:00 UTC 2020 armv7l GNU/Linux
  • cat /etc/dogtag: was removed
  • hexdump:
    hexdump.txt (3.7 KB)

The screen is not blank as we are displaying a custom boot logo and a can display a QT GUI once booted but no touch input.

Is it strange that our EEPROM ID of the touchscreen (0x54) is on the output of "i2cdetect -y 2" as in dmesg “input: ar1021 I2C Touchscreen as /devices/platform/ocp/4802a000.i2c/i2c-1/1-004d/input/input0” looks like it should be on the i2c-1 bus.

We believe that this DTB file: bbb-gen4-4dcape50t.dtb (meta-bbb/bbb-gen4-4dcape50t.dts at dunfell · jumpnow/meta-bbb · GitHub) is being loaded. Is this sufficient? It looks like from the dts file linked, I should see the ar1021 touch controller chip on i2c-1 but as linked in the original question, I see nothing.

Thank you

Hello,

I will be searching the differences here in these two files:

From the BeagleBoard-DeviceTrees repo.

/*
 * Copyright (C) 2020 Deepak Khatri <deepaklorkhatri7@gmail.com>
 * https://lorforlinux.github.io/GSoC2020_BeagleBoard.org/
 *
 * See Cape Interface Spec page for more info on Bone Buses
 * https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec
 *
 * BBBAI Overlay for 4D Systems GEN4-4DCAPE-43CT-CLB Cape and similar Displays
 *
 * Based on older BB-BONE-4D4C-01-00A1.dts from TI for kernel < 4.14
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
 
/dts-v1/;
/plugin/;
 
&{/chosen} {
	overlays {
		BBAI-4D4C-00A1 = __TIMESTAMP__;
	};
};
 
/*
 * Update the default pinmux of the pins.
 * See these files for the phandles (&P9_* & &P8_*)
 * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am335x-bone-common-univ.dtsi
 * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi
 */
&ocp {
	P8_45_pinmux { pinctrl-0 = <&P8_45_lcd_pin>;};	/* lcd: lcd_data0 */
	P8_46_pinmux { pinctrl-0 = <&P8_46_lcd_pin>;};	/* lcd: lcd_data1 */
	P8_43_pinmux { pinctrl-0 = <&P8_43_lcd_pin>;};	/* lcd: lcd_data2 */
	P8_44_pinmux { pinctrl-0 = <&P8_44_lcd_pin>;};	/* lcd: lcd_data3 */
	P8_41_pinmux { pinctrl-0 = <&P8_41_lcd_pin>;};	/* lcd: lcd_data4 */
	P8_42_pinmux { pinctrl-0 = <&P8_42_lcd_pin>;};	/* lcd: lcd_data5 */
	P8_39_pinmux { pinctrl-0 = <&P8_39_lcd_pin>;};	/* lcd: lcd_data6 */
	P8_40_pinmux { pinctrl-0 = <&P8_40_lcd_pin>;};	/* lcd: lcd_data7 */
	P8_37_pinmux { pinctrl-0 = <&P8_37_lcd_pin>;};	/* lcd: lcd_data8 */
	P8_38_pinmux { pinctrl-0 = <&P8_38_lcd_pin>;};	/* lcd: lcd_data9 */
	P8_36_pinmux { pinctrl-0 = <&P8_36_lcd_pin>;};	/* lcd: lcd_data10 */
	P8_34_pinmux { pinctrl-0 = <&P8_34_lcd_pin>;};	/* lcd: lcd_data11 */
	P8_35_pinmux { pinctrl-0 = <&P8_35_lcd_pin>;};	/* lcd: lcd_data12 */
	P8_33_pinmux { pinctrl-0 = <&P8_33_lcd_pin>;};	/* lcd: lcd_data13 */
	P8_31_pinmux { pinctrl-0 = <&P8_31_lcd_pin>;};	/* lcd: lcd_data14 */
	P8_32_pinmux { pinctrl-0 = <&P8_32_lcd_pin>;};	/* lcd: lcd_data15 */
 
	P8_27_pinmux { pinctrl-0 = <&P8_27_lcd_pin>;};	/* lcd: lcd_vsync */
	P8_29_pinmux { pinctrl-0 = <&P8_29_lcd_pin>;};	/* lcd: lcd_hsync */
	P8_28_pinmux { pinctrl-0 = <&P8_28_lcd_pin>;};	/* lcd: lcd_pclk */
	P8_30_pinmux { pinctrl-0 = <&P8_30_lcd_pin>;};	/* lcd: lcd_ac_bias_en */
 
	P9_27_pinmux { pinctrl-0 = <&P9_27_gpio_pin>;};	/* lcd: gpio4_15 DISPEN */
 
	P9_14_pinmux { pinctrl-0 = <&P9_14_pwm_pin>;};	/* pwm: ehrpwm1a PWM_BL */
 
	P9_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>;};	/* i2c1_sda */
	P9_17_pinmux { pinctrl-0 = <&P9_17_i2c_pin>;};	/* i2c1_scl */
	P9_26_pinmux { pinctrl-0 = <&P9_26_gpio_pin>;};	/* touch interrupt on gpio6_14 */
};

/*
 * See these files for the phandles (&bone_*) and other bone bus nodes
 * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/bbai-bone-buses.dtsi
 * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/bbb-bone-buses.dtsi
 */

// PWM Backlight
&bone_pwm_1{
	status = "okay";
};

// Touch Controller
&bone_i2c_1 {
	status = "okay";
	clock-frequency = <100000>;
	#address-cells = <1>;
	#size-cells = <0>;

	polytouch: edt-ft5x06@38 {
		compatible = "edt,edt-ft5x06";
		reg = <0x38>;
		interrupt-parent = <&gpio6>;
		interrupts = <14 2>;
		touchscreen-size-y = <480>;
		touchscreen-size-x = <272>;
		touchscreen-swapped-x-y;
	};
};

// Display Sub System (DSS)
&dss {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port {
			reg = <0>;

			dpi_out: endpoint {
				data-lines = <16>;
				remote-endpoint = <&lcd_in>;
			};
		};
	};
};

&{/} {
	aliases {
		display0 = &lcd0;
	};
	
	// Backlight
	lcd_bl: backlight {
		status = "okay";
		compatible = "pwm-backlight";
		pwms = <&bone_pwm_1 0 500000 0>;
		brightness-levels = <
			0  1  2  3  4  5  6  7  8  9
			10 11 12 13 14 15 16 17 18 19
			20 21 22 23 24 25 26 27 28 29
			30 31 32 33 34 35 36 37 38 39
			40 41 42 43 44 45 46 47 48 49
			50 51 52 53 54 55 56 57 58 59
			60 61 62 63 64 65 66 67 68 69
			70 71 72 73 74 75 76 77 78 79
			80 81 82 83 84 85 86 87 88 89
			90 91 92 93 94 95 96 97 98 99
			100
		>;
		default-brightness-level = <100>;
	};

	// Display
	lcd0: display {
		compatible = "qiaodian,qd43003c0-40", "panel-dpi";
		backlight = <&lcd_bl>;
		enable-gpios = <&gpio2 5 0>;
		label = "lcd";

		panel-info {
			ac-bias           = <255>;
			ac-bias-intrpt    = <0>;
			dma-burst-sz      = <16>;
			bpp               = <16>;
			fdd               = <0x80>;
			sync-edge         = <0>;
			sync-ctrl         = <1>;
			raster-order      = <0>;
			fifo-th           = <0>;
		};

		panel-timing {
			clock-frequency = <9200000>;
			hactive = <480>;
			vactive = <272>;
			hfront-porch = <8>;
			hback-porch = <47>;
			hsync-len = <41>;
			vback-porch = <2>;
			vfront-porch = <3>;
			vsync-len = <10>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <1>;
			pixelclk-active = <0>;
		};

		port {
			lcd_in: endpoint {
				remote-endpoint = <&dpi_out>;
			};
		};
	};
};

and…

From JumpNow but for kernel 5.4.x

/*
 * Copyright (C) 2020 Jumpnow Technologies, LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "bbb-i2c1.dtsi"
#include "bbb-i2c2.dtsi"
#include "bbb-uart4.dtsi"


/ {
	model = "TI AM335x BeagleBone Black";
	compatible = "ti,am335x-bone-black", "ti,am33xx";
};

&ldo3_reg {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
	regulator-always-on;
};

&mmc1 {
	vmmc-supply = <&vmmcsd_fixed>;
};

&mmc2 {
	vmmc-supply = <&vmmcsd_fixed>;
	pinctrl-names = "default";
	pinctrl-0 = <&emmc_pins>;
	bus-width = <8>;
	status = "okay";
};

&am33xx_pinmux {
	lcd_pins: lcd_pins {
		pinctrl-single,pins = <
			0xa0 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data0 */
			0xa4 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data1 */
			0xa8 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data2 */
			0xac (PIN_OUTPUT | MUX_MODE0)            /* lcd_data3 */
			0xb0 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data4 */
			0xb4 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data5 */
			0xb8 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data6 */
			0xbc (PIN_OUTPUT | MUX_MODE0)            /* lcd_data7 */
			0xc0 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data8 */
			0xc4 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data9 */
			0xc8 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data10 */
			0xcc (PIN_OUTPUT | MUX_MODE0)            /* lcd_data11 */
			0xd0 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data12 */
			0xd4 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data13 */
			0xd8 (PIN_OUTPUT | MUX_MODE0)            /* lcd_data14 */
			0xdc (PIN_OUTPUT | MUX_MODE0)            /* lcd_data15 */
			0xe0 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)   /* lcd_vsync */
			0xe4 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)   /* lcd_hsync */
			0xe8 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)   /* lcd_pclk */
			0xec (PIN_OUTPUT_PULLDOWN | MUX_MODE0)   /* lcd_ac_bias_en */
			/* LCD enable */
			0x1a4 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* P9.27, gpio3_19 */
		>;
	};

	backlight_pin: backlight_pin {
		pinctrl-single,pins = <
			0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE6)    /* P9.14, gpio1[18]/ehrpwm1A */
		>;
	};

	ar1021_irq_pin: ar1021_irq_pin {
		pinctrl-single,pins = <
			0x180 (PIN_INPUT_PULLUP | MUX_MODE7)    /* P9.26, gpio0[14] */
		>;
	};
};

&epwmss1 {
	status = "okay";
};

&ehrpwm1 {
	pinctrl-names = "default";
	pinctrl-0 = <&backlight_pin>;
	status = "okay";
};

&lcdc {
	status = "okay";
};

&i2c1 {
	ar1021: ar1021@4d {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "microchip,ar1021-i2c";
		reg = <0x4d>;
		pinctrl-names = "default";
		pinctrl-0 = <&ar1021_irq_pin>;
		interrupts = <14 2>;
		interrupt-parent = <&gpio0>;
		touchscreen-inverted-y;
	};
};

/ {
	backlight {
		status = "okay";
		compatible = "pwm-backlight";
		pwms = <&ehrpwm1 0 500000 0>;
		brightness-levels = <
			0  1  2  3  4  5  6  7  8  9
			10 11 12 13 14 15 16 17 18 19
			20 21 22 23 24 25 26 27 28 29
			30 31 32 33 34 35 36 37 38 39
			40 41 42 43 44 45 46 47 48 49
			50 51 52 53 54 55 56 57 58 59
			60 61 62 63 64 65 66 67 68 69
			70 71 72 73 74 75 76 77 78 79
			80 81 82 83 84 85 86 87 88 89
			90 91 92 93 94 95 96 97 98 99
			100
		>;
		default-brightness-level = <100>;
	};

	panel {
		#address-cells = <1>;
		#size-cells = <1>;

		status = "okay";
		compatible = "ti,tilcdc,panel";
		pinctrl-names = "default";
		pinctrl-0 = <&lcd_pins>;
		enable-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;

		panel-info {
			ac-bias           = <255>;
			ac-bias-intrpt    = <0>;
			dma-burst-sz      = <16>;
			bpp               = <16>;
			fdd               = <0x80>;
			sync-edge         = <0>;
			sync-ctrl         = <1>;
			raster-order      = <0>;
			fifo-th           = <0>;
		};

		display-timings {
			native-mode = <&timing0>;
			timing0: 800x480 {
				clock-frequency = <30000000>;
				hactive = <800>;
				vactive = <480>;
				hfront-porch = <40>;
				hback-porch = <40>;
				hsync-len = <48>;
				vback-porch = <30>;
				vfront-porch = <13>;
				vsync-len = <3>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <1>;
				pixelclk-active = <0>;
			};
		};

		fb {
			compatible = "ti,am33xx-tilcdc";
			reg = <0x4830e000 0x1000>;
			interrupt-parent = <&intc>;
			interrupts = <36>;
			ti,hwmods = "lcdc";
		};
	};
};

&rtc {
	system-power-controller;
};

There are some major differences and kernel differences. So, this may well be the isssue but we shall see.

I will get my board out soon and test.

Seth

P.S. In the JumpNow .dts, I have not gone through their files yet. These files here is what I am discussing:

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "bbb-i2c1.dtsi"
#include "bbb-i2c2.dtsi"
#include "bbb-uart4.dtsi"

But…those files could shine some light on what the main .dts from above is telling us currently.

Hi Silver2row,

Have you got your touchscreen out and given it a go yet?
We are still stuck.

Thanks.

1 Like

Hello @Thomas_Miller ,

No sir, I have not gotten to it yet. Please forgive me. I will try this Fri. or Sat. evening. I will have some extra time to cause you more grief. Just kiddin’.

Seriously, I will do it. This Friday Funday or on Sat. evening. Shucks, I may get it out tonight but I cannot be sure yet.

Seth

P.S. I thought you were on 4.19.x kernels? In the JumpNow Tech. site you mentioned, they are using 5.4.x kernels.

Anyway, I will try both and see where it takes me. Should I follow their instructions and do my own thing? This way, we can do a contrast and compare or something like that idea.

@Thomas_Miller ,

Hey man, sir, um…

Look here: Beagle Board Blog | Learn More about the lastes News and content

There are three blog entries that are dedicated to handling building against the kernel w/ u-boot. A lot of it has to do w/ device tree mechanisms in u-boot and in the kernel that beagleboard.org hosts online at github.

Seth

P.S. I am sure you already know things. I am not saying you do not but those short, curt entries in that blog are helpful. I think they can better describe to you what it is that needs to take place compared to my raving and rants. I will keep it up though. I am not quitting yet!

Hello,

Do you have a 5v @ 2A power adapter going in the barrel jack?

Seth

P.S. Anyway…I know this is not your idea of help and debugging but!

  1. Linux BeagleBone 5.10.109-ti-r45 #1bullseye SMP PREEMPT Fri May 6 16:59:02 UTC 2022 armv7l GNU/Linux
  2. BeagleBoard.org Debian Bullseye Xfce Image 2022-05-01
  3. and then ls -l /etc/systemd/system/*
ls -l /etc/systemd/system/*
lrwxrwxrwx 1 root root   42 May  1 11:01 /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service -> /lib/systemd/system/wpa_supplicant.service
lrwxrwxrwx 1 root root   37 May  1 11:01 /etc/systemd/system/dbus-org.bluez.service -> /lib/systemd/system/bluetooth.service
lrwxrwxrwx 1 root root   40 May  1 11:01 /etc/systemd/system/dbus-org.freedesktop.Avahi.service -> /lib/systemd/system/avahi-daemon.service
lrwxrwxrwx 1 root root   44 May  1 11:11 /etc/systemd/system/dbus-org.freedesktop.network1.service -> /lib/systemd/system/systemd-networkd.service
lrwxrwxrwx 1 root root   44 May  1 11:11 /etc/systemd/system/dbus-org.freedesktop.resolve1.service -> /lib/systemd/system/systemd-resolved.service
lrwxrwxrwx 1 root root   45 May  1 11:06 /etc/systemd/system/dbus-org.freedesktop.timesync1.service -> /lib/systemd/system/systemd-timesyncd.service
lrwxrwxrwx 1 root root   35 May  1 11:08 /etc/systemd/system/display-manager.service -> /lib/systemd/system/lightdm.service
lrwxrwxrwx 1 root root   31 May  1 11:01 /etc/systemd/system/sshd.service -> /lib/systemd/system/ssh.service
lrwxrwxrwx 1 root root   35 May  1 11:01 /etc/systemd/system/syslog.service -> /lib/systemd/system/rsyslog.service

/etc/systemd/system/bluetooth.target.wants:
total 0
lrwxrwxrwx 1 root root 37 May  1 11:01 bluetooth.service -> /lib/systemd/system/bluetooth.service

/etc/systemd/system/default.target.wants:
total 0
lrwxrwxrwx 1 root root 40 May  1 10:57 e2scrub_reap.service -> /lib/systemd/system/e2scrub_reap.service

/etc/systemd/system/getty.target.wants:
total 0
lrwxrwxrwx 1 root root 34 May  1 10:58 getty@tty1.service -> /lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 41 May  1 11:03 serial-getty@ttyGS0.service -> /lib/systemd/system/serial-getty@.service

/etc/systemd/system/graphical.target.wants:
total 0
lrwxrwxrwx 1 root root 35 May  1 11:07 udisks2.service -> /lib/systemd/system/udisks2.service

/etc/systemd/system/multi-user.target.wants:
total 0
lrwxrwxrwx 1 root root 40 May  1 11:01 avahi-daemon.service -> /lib/systemd/system/avahi-daemon.service
lrwxrwxrwx 1 root root 42 May  1 11:11 bb-usb-gadgets.service -> /lib/systemd/system/bb-usb-gadgets.service
lrwxrwxrwx 1 root root 56 May  1 11:11 beagle-flasher-init-shutdown.service -> /lib/systemd/system/beagle-flasher-init-shutdown.service
lrwxrwxrwx 1 root root 41 May  1 11:07 console-setup.service -> /lib/systemd/system/console-setup.service
lrwxrwxrwx 1 root root 32 May  1 11:01 cron.service -> /lib/systemd/system/cron.service
lrwxrwxrwx 1 root root 38 May  1 11:01 networking.service -> /lib/systemd/system/networking.service
lrwxrwxrwx 1 root root 33 May  1 11:01 nginx.service -> /lib/systemd/system/nginx.service
lrwxrwxrwx 1 root root 35 May  1 11:11 nodered.service -> /lib/systemd/system/nodered.service
lrwxrwxrwx 1 root root 36 May  1 10:58 remote-fs.target -> /lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 33 May  1 11:01 rsync.service -> /lib/systemd/system/rsync.service
lrwxrwxrwx 1 root root 35 May  1 11:01 rsyslog.service -> /lib/systemd/system/rsyslog.service
lrwxrwxrwx 1 root root 31 May  1 11:01 ssh.service -> /lib/systemd/system/ssh.service
lrwxrwxrwx 1 root root 44 May  1 11:11 systemd-networkd.service -> /lib/systemd/system/systemd-networkd.service
lrwxrwxrwx 1 root root 44 May  1 11:11 systemd-resolved.service -> /lib/systemd/system/systemd-resolved.service
lrwxrwxrwx 1 root root 42 May  1 11:01 wpa_supplicant.service -> /lib/systemd/system/wpa_supplicant.service

/etc/systemd/system/network-online.target.wants:
total 0
lrwxrwxrwx 1 root root 38 May  1 11:01 networking.service -> /lib/systemd/system/networking.service

/etc/systemd/system/sockets.target.wants:
total 0
lrwxrwxrwx 1 root root 39 May  1 11:01 avahi-daemon.socket -> /lib/systemd/system/avahi-daemon.socket
lrwxrwxrwx 1 root root 43 May  1 11:11 systemd-networkd.socket -> /lib/systemd/system/systemd-networkd.socket

/etc/systemd/system/sys-subsystem-net-devices-wlan0.device.wants:
total 0
lrwxrwxrwx 1 root root 43 May  1 11:11 wpa_supplicant@wlan0.service -> /lib/systemd/system/wpa_supplicant@.service

/etc/systemd/system/sysinit.target.wants:
total 0
lrwxrwxrwx 1 root root 42 May  1 11:07 keyboard-setup.service -> /lib/systemd/system/keyboard-setup.service
lrwxrwxrwx 1 root root 42 May  1 10:58 systemd-pstore.service -> /lib/systemd/system/systemd-pstore.service
lrwxrwxrwx 1 root root 45 May  1 11:06 systemd-timesyncd.service -> /lib/systemd/system/systemd-timesyncd.service

/etc/systemd/system/systemd-networkd-wait-online.service.d:
total 4
-rw-r--r-- 1 root root 120 May  1 11:03 override.conf

/etc/systemd/system/timers.target.wants:
total 0
lrwxrwxrwx 1 root root 37 May  1 10:57 e2scrub_all.timer -> /lib/systemd/system/e2scrub_all.timer
lrwxrwxrwx 1 root root 32 May  1 10:57 fstrim.timer -> /lib/systemd/system/fstrim.timer
lrwxrwxrwx 1 root root 35 May  1 11:01 logrotate.timer -> /lib/systemd/system/logrotate.timer

That may shed some light if you guys do not want to install the image from the .org. Also, if you get bored, try to install some images. I say that b/c I just tested and my screen is captured, Desktop OS, and the cursor works w/ the slight touch of my finger!

Oh!

Update

Maybe the eMMC is taking over the use of the a particular pin? I will have to double check, though. Looking in the schematics will prove useful if you get around to it.

Hi thanks for all your help, please find below the uEnv.txt file. It looks to me as though we are loading the bbb-gen4-4dcape50t.dtb as we desire. We have also tried some images that Robert mentioned and they all work perfectly.

uEnv.txt:
uEnv.txt (958 Bytes)
This is the exact compiled dtb file we are using too:
bbb-gen4-4dcape50t.dtb (36.2 KB)

“Maybe the eMMC is taking over the use of the a particular pin? I will have to double check, though. Looking in the schematics will prove useful if you get around to it.”
What do you mean by this?

Hi again,
I have just had a look through our dts file (meta-bbb/bbb-gen4-4dcape50t.dts at dunfell · jumpnow/meta-bbb · GitHub) and have noticed that none of the GPIO pins setup there are exported to /sys/class/gpio whereas on the latest images, this dts (bb.org-overlays/BB-BONE-4D5R-01-00A1.dts at master · beagleboard/bb.org-overlays · GitHub) I can see, for example, touch interrupt GPIO14 in /sys/class/gpio. Could this mean I am not loading in the dtb file correctly? However, I find it weird that the LCD screen is still displaying things.

Hello,

There are many more skilled people than are involved in .dts files but yes. You will need to alter the device tree to handle the correct path to your GPIO peripherals.

So, if they are indeed located at /sys/class/gpio/gpio68 for instance, then putting the device tree portions in your .dts file will need to have that available.

bb.org-overlays was an older set of scripts from what I understand. BeagleBoard-DeviceTrees are what gets “used” currently now (I think).

Seth

P.S. I listed what I found earlier from the .dtbo that gets loaded for these specific Capes. See here: Beaglebone Black and the 4D Systems gen4-4DCAPE-50T resistive touchscreen touch input not working - #11 by Thomas_Miller .

So, if you are not using pinctrl or the helper pinmuxing files, then arranging the hex and offset will need to take place.

I mean that if things are in the way, then even the .dts or .dtsi file(s) will not provide the correct support.

If you have a peripheral in use, I am sure you understand, then the other peripheral may not be available for use. For instance…

config-pin p9.22 uart
- This command allows the uart to be muxed
- If you try to use a gpio pin while p9.22 is muxed to uart, then it is faulty

So, what I mean is that if you have extra modules and peripherals being used by the am335x, not all of what is available is actually available b/c of only being able to use a type at a time.

I am not sure if this is your case or not. I just wanted to let you know. Another example…

/*
 * Copyright (C) 2020 Deepak Khatri <deepaklorkhatri7@gmail.com>
 * https://lorforlinux.github.io/GSoC2020_BeagleBoard.org/
 *
 * See Cape Interface Spec page for more info on Bone Buses
 * https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec
 *
 * BBBAI Overlay for 4D Systems GEN4-4DCAPE-43CT-CLB Cape and similar Displays
 *
 * Based on older BB-BONE-4D4C-01-00A1.dts from TI for kernel < 4.14
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
 
/dts-v1/;
/plugin/;
 
&{/chosen} {
	overlays {
		BBAI-4D4C-00A1 = __TIMESTAMP__;
	};
};
 
/*
 * Update the default pinmux of the pins.
 * See these files for the phandles (&P9_* & &P8_*)
 * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am335x-bone-common-univ.dtsi
 * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi
 */
&ocp {
	P8_45_pinmux { pinctrl-0 = <&P8_45_lcd_pin>;};	/* lcd: lcd_data0 */
	P8_46_pinmux { pinctrl-0 = <&P8_46_lcd_pin>;};	/* lcd: lcd_data1 */
	P8_43_pinmux { pinctrl-0 = <&P8_43_lcd_pin>;};	/* lcd: lcd_data2 */
	P8_44_pinmux { pinctrl-0 = <&P8_44_lcd_pin>;};	/* lcd: lcd_data3 */
	P8_41_pinmux { pinctrl-0 = <&P8_41_lcd_pin>;};	/* lcd: lcd_data4 */
	P8_42_pinmux { pinctrl-0 = <&P8_42_lcd_pin>;};	/* lcd: lcd_data5 */
	P8_39_pinmux { pinctrl-0 = <&P8_39_lcd_pin>;};	/* lcd: lcd_data6 */
	P8_40_pinmux { pinctrl-0 = <&P8_40_lcd_pin>;};	/* lcd: lcd_data7 */
	P8_37_pinmux { pinctrl-0 = <&P8_37_lcd_pin>;};	/* lcd: lcd_data8 */
	P8_38_pinmux { pinctrl-0 = <&P8_38_lcd_pin>;};	/* lcd: lcd_data9 */
	P8_36_pinmux { pinctrl-0 = <&P8_36_lcd_pin>;};	/* lcd: lcd_data10 */
	P8_34_pinmux { pinctrl-0 = <&P8_34_lcd_pin>;};	/* lcd: lcd_data11 */
	P8_35_pinmux { pinctrl-0 = <&P8_35_lcd_pin>;};	/* lcd: lcd_data12 */
	P8_33_pinmux { pinctrl-0 = <&P8_33_lcd_pin>;};	/* lcd: lcd_data13 */
	P8_31_pinmux { pinctrl-0 = <&P8_31_lcd_pin>;};	/* lcd: lcd_data14 */
	P8_32_pinmux { pinctrl-0 = <&P8_32_lcd_pin>;};	/* lcd: lcd_data15 */
 
	P8_27_pinmux { pinctrl-0 = <&P8_27_lcd_pin>;};	/* lcd: lcd_vsync */
	P8_29_pinmux { pinctrl-0 = <&P8_29_lcd_pin>;};	/* lcd: lcd_hsync */
	P8_28_pinmux { pinctrl-0 = <&P8_28_lcd_pin>;};	/* lcd: lcd_pclk */
	P8_30_pinmux { pinctrl-0 = <&P8_30_lcd_pin>;};	/* lcd: lcd_ac_bias_en */
 
	P9_27_pinmux { pinctrl-0 = <&P9_27_gpio_pin>;};	/* lcd: gpio4_15 DISPEN */
 
	P9_14_pinmux { pinctrl-0 = <&P9_14_pwm_pin>;};	/* pwm: ehrpwm1a PWM_BL */
 
	P9_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>;};	/* i2c1_sda */
	P9_17_pinmux { pinctrl-0 = <&P9_17_i2c_pin>;};	/* i2c1_scl */
	P9_26_pinmux { pinctrl-0 = <&P9_26_gpio_pin>;};	/* touch interrupt on gpio6_14 */
};

If I wanted to use p9.26 as a gpio or the exact interrupt to the gpio, I would not declare it in the .dts unless I was sure I wanted to use it in the .dtbo if this is what was going to get published for use.

Seth

P.S. Now, there are more files, .dtsi files in question that the above script/.dts file uses. So, I think reading over the files in question would be very beneficial. I can run and answer when prompted but if the correct questions are not asked, I am inclined to not just help forthright. So, ask away and I will get back to you. Or…

if you no longer want my assistance, that is okay too. I can bow out and not get upset.

I just know that these files are fickle. They do not necessarily work unless perfect. So, if you have for instance a tab instead of eight spaces in two separate .dtsi files, then your .dts needs to be tabbed and not spaced.

@Thomas_Miller ,

Hello again…I know I am chatting now instead of giving direct answers to complications you are facing. Please forgive me.

Oh! w/ your files, uEnv.txt and bbb-gen3-4dcape50t.dtb, please just post them in six back ticks instead. I do not want to download a bunch of files for researching on how to help.

For instance…

Like this...

Or…w/ a double back tick.

like this