Problems interfacing custom cape+display combo (1024x600) without EEPROM, Beaglebone Black

[super newbie here] Hi, I have been working with a custom cape+display combo to interface with the beaglebone black and I followed these instructions to build u-boot and kernel (4.19-rt) with EEPROM check disabled. The datasheet for the display has been attached, and I have a stand-alone device tree overlay for the same (also attached). There have been problems loading it in since I am not sure if my steps are right. Based on suggestions on this post, I may also have to edit the panel_simple.c to add an entry for my display. Not sure what or how to do it at all. Any help would be appreciatedSPF-PH102600T009-IBC_002_CTP_HighRes (1).pdf|attachment (1.8 MB)

Hi @sxramchnd for this display, i’d actually start with just the Device tree before patching the panel_simple.c driver… (in the end it’ll use the same values, it’s just much quicker to rebuild the overlay and reboot, then wait for the kernel module to build, install, etc…)

First, not sure why your upload failed, it’s this display right?

The Magic numbers we need to look at are:

Looks like a 24bit RGB display:


So i’d start with this Overlay: bb.org-overlays/BB-BONE-NH7C-01-A0.dts at master · beagleboard/bb.org-overlays · GitHub

Next looking at all these magic numbers;


We need to list those here:

Those parameters are shown on a diagram here: panel-timing.yaml « panel « display « bindings « devicetree « Documentation - kernel/git/torvalds/linux.git - Linux kernel source tree

They don’t have to be perfect, start with something close and then adjust till your video output is scaled properly…

Regards,

1 Like

Hi @RobertCNelson, It’s great to e-meet you! I tried out your suggestions and the overlay loaded! I see /dev/fb0 initializing. However, the touch side of things are still not loading properly I guess. Here is the kernel log -

[ 3.086811] edt_ft5x06 2-0038: touchscreen probe failed
[ 3.092533] edt_ft5x06: probe of 2-0038 failed with error -121

And here is the i2c2 node for FT5426 (the IC that is currently with the display, according to the kernel driver, edt-5x06.c should work for 5426 as well)

&i2c2 {
        status = "okay";

        clock-frequency = <100000>;

        #address-cells = <1>;
        #size-cells = <0>;

        edt-ft5x06@38 {
                status = "okay";
                compatible = "edt,edt-ft5406";
                reg = <0x38>;
                pinctrl-names = "default";
                pinctrl-0 = <&edt_ft5x06_pins>;
                interrupt-parent = <&gpio3>;
                interrupts = <19 0>;
                //reset-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>;

                touchscreen-size-x = <1024>;
                touchscreen-size-y = <600>;
                //touchscreen-swapped-x-y;
        };
};

Any help would be appreciated! Thanks!

awesome!

Let’s double check a few things, which pin’s are you i2c interrupt and i2c physically wired too…

Regards,

I see this as the output when I run i2cdetect on bus 0. Buses 1 and 2 do not have anything (all dashes)

sudo i2cdetect 0
Warning: Can’t use SMBus Quick Write command, will skip some addresses
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00:
10:
20:
30: – – – – 34 – – –
40:
50: UU – – – – – – – – – – – – – – –
60:
70:

based on that, i’d change your i2c bus address to 0x34 from 0x38…

We still need to verify the ‘gpio-reset’ and ‘gpio-irq’ from the ft5x06, right now you have the gpio-irq setup as:

                interrupt-parent = <&gpio3>;
                interrupts = <19 0>;

That would be GPIO3_19, so let’s verify how you wired those 2 other pins…

Regards,

Hi Robert, any advice on how to figure this out? The board was actually made in house by a different team. Also, do I have to change the node name to i2c0 from i2c2?

Did they share a schematic?

So the cape actually connects to a 4D systems adaptor sitting on top of the beaglebone, and here are the connections between the adaptor and the beaglebone black.

Hi @sxramchnd weird, that’s only a 18bit interface, so it doesn’t match your screen (24bit)…

Regards,

Okay, upon further examination, I was able to find out that these two pins are being used by the custom cape for i2c SDA and SCL.

 19         D17         0x17c              0x97c            uart1_rtsn       uart1_rtsn         timer5        dcan0_rx               **i2c2_scl**                spi1_cs1                                            gpio0[13]
 20         D18         0x178              0x978            uart1_ctsn       uart1_ctsn         timer6        dcan0_tx               **i2c2_sda**                spi1_cs0                                            gpio0[12]

And the Touch IRQ pin is

 26         D16         0x180              0x980            uart1_rxd        uart1_rxd          mmc1_sdwp      dcan1_tx               i2c1_sda                                               pru1_r30_16         gpio0[14]

I think I need to figure out the actual names from dt-bindings include folder to edit my device tree overlay.

I ran dmesg to check if the tilcdc driver is properly loaded, it appears to be as I see /dev/fb0, but I also see errors below such as -

[ 2.199247] tilcdc-panel panel: found backlight
[ 2.204065] tilcdc-panel panel: found enable GPIO
[ 2.210277] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 2.216825] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 2.223895] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 2.357169] Console: switching to colour frame buffer device 128x37
[ 2.379207] tilcdc 4830e000.lcdc: fb0: DRM emulated frame buffer device
[ 2.387048] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0

Thanks for being very patient with me @RobertCNelson, I really appreciate your help on this!

That would be:

P9_26 96 0x980/180 UART1_RXD 14 gpio0[14]

Thus:

                interrupt-parent = <&gpio0>;
                interrupts = <14 0>;

Make sure you define the pin:

			edt_ft5x06_pins: pinmux_edt_ft5x06_pins {
				pinctrl-single,pins = <
					0x180 0x37	// INPUT_PULLUP | MODE7
				>;
			};

Regards,

I’m stilling working on that issue, the driver is buggy:

SO if you try to fix it, it breaks the display… Just have to ignore that error for now…

Regards,

Great. Thanks! This is good info. Is it still true that the 4D adaptor interface (18 bit) is not going to let me unlock the full potential of the display (24 bit)?

Exactly, unless it’s a different version of the 4D adapter then i’m use to that was updated to 24bit…

Regards,

1 Like

Hi @RobertCNelson, I made the changes and this is what I see -

[ 3.086644] pinctrl-single 44e10800.pinmux: pin PIN96 already requested by ocp:P9_26_pinmux; cannot claim for 2-0034
[ 3.097638] pinctrl-single 44e10800.pinmux: pin-96 (2-0034) status -22
[ 3.104212] pinctrl-single 44e10800.pinmux: could not request pin 96 (PIN96) from group pinmux_edt_ft5x06_pins on device pinctrl-single
[ 3.116536] edt_ft5x06 2-0034: Error applying setting, reverse things back
[ 3.123526] edt_ft5x06: probe of 2-0034 failed with error -22

I didn’t load any other overlay or anything that might request P9_26. I do have the cape universal overlay enabled as shown in my uEnv.txt below -

uname_r=4.19.212-bone-rt-r71

enable_uboot_overlays=1

disable_uboot_overlay_video=1

uboot_overlay_addr4=/lib/firmware/BB-BONE-POWERTIP-TRY1.dtbo

enable_uboot_cape_universal=1

You can either add:

P9_26_pinmux { status = "disabled"; };	/* touch interrupt on gpio0_14 */

to your overlay, or comment out: enable_uboot_cape_universal=1

Regards,

P9_26_pinmux { status = "disabled"; };	/* touch interrupt on gpio0_14 */

Worked like a charm!

I still see -

[    2.632941] edt_ft5x06 2-0034: touchscreen probe failed
[    2.638581] edt_ft5x06: probe of 2-0034 failed with error -121

appreciate your help on this!

Try putting it back to address 0x38, as that is what 4D used on their PCB… i2cdump might have been noise or something weird…

Regards,

1 Like

I was dumb :sweat_smile: I kept i2c2 instead of changing it to i2c0, the driver has loaded and I see a /dev/event0. However, when I run ts_calibrate, I don’t see the values updating. Could it be because of scaling issues?