Am33x Driver

2 views
Skip to first unread message

Elwanda Menhennett

unread,
Aug 5, 2024, 11:23:43 AM8/5/24
to voiparmeipho
Iam trying to get the tilcdc panel driver working with the DRM subsystem but without the TFP410. We have the Sitara connected directly to a TFT panel, like on the EVMSK board - but a different panel. When I boot the board, because there is no TFP410 in the device tree the DRM finds no encoders or connectors:

[ 0.983480] Error: Driver 'tfp410' is already registered, aborting...

[ 0.993494] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[ 0.999902] [drm] No driver support for vblank timestamp query.

[ 1.006064] tilcdc 4830e000.lcdc: No connectors reported connected with modes

[ 1.013105] [drm] Cannot find any crtc or sizes - going 1024x768

[ 1.060119] Console: switching to colour frame buffer device 128x48

[ 1.092459] tilcdc 4830e000.lcdc: fb0: frame buffer device

[ 1.097898] tilcdc 4830e000.lcdc: registered panic notifier

[ 1.133064] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0


I showed how to use pre-built fbtft kernel modules to provide the necessary Linux device driver. However, what if you want to use fbtft modules with a newer version of the Linux kernel?


Linux device drivers like this are typically architecture independent. These fbtft drivers (in drivers/staging/ dir of the Linux kernel src) can be built on x86, too. However, I don't have any way to connect a SPI device like this Adafruit TFT LCD to my x86 laptop.


First, i am new to the Linux USB stack and i am trying to understand it a little bit more in order to achieve the following result : i need to reconnect/disconnect a specific USB device because sometimes, tough not often, this device does not respond anymore and the only solution is to physically disconnect/reconnect the USB cable from the device.


However, when i do the same procedure using musb-hdrc driver on musb-hdrc.1.auto and musb-hdrc.0.auto devices, it works well except that all my usb devices are turned off/on...and i would like to be more specific about the 2-1.4:1.0 usb devices interface.


Why the unbind command say that the device does not exist then ? Maybe there is a way to indicate, a kind of path inside the device tree to indicate to the driver that i want to unbind to this specific device interface 2-1.4:1.0 ?


First of all, keep in mind that there is a difference between a (logical) Device and a Device Driver. When a hardware device is physically connected, Linux creates a (logical) device instance and then tries to bind the device to a matching device driver instance.


After some research, I found a USBDEVFS_RESET ioctl, but there is a warning that suggests to avoid it. In any case, other people have found it useful. The post mentions the authorized interface as a way to re-configure the device, through an auth cycle:


I recently bought a 2.2" TFT display on Ebay (come on, 7 bucks...) and was up to use it with my BeagleBone. Luckily for me there was no Linux driver for the ILI9341 controller so it's just to roll up my sleeves and get to work.


This simply tells the boot code to look for a device tree binary (DTB) appended to the zImage. Without this option, the kernel expects the address of a dtb in the r2 register (on ARM architectures), but that does not work on my ancient bootloader.


Every directory in the kernel structure contains at least two files, a Makefile and a Kconfig. The Makefile tells the make buildsystem which files to compile and the Kconfig file is interpreted by (menukxold....)config.


Deferred IO is a way to delay and repurpose IO. It uses host memory as a buffer and the MMU pagefault as a pretrigger for when to perform the device IO.You simple tell the kernel the minimum delay between the triggers should occours, this allows you to do burst transfers to the device at a given framerate. This has the big benefit that if the userspace updates the framebuffer several times in this period, we will only write it once.


The deferred_io callback is where you would perform all your IO to the displaydevice. You receive the pagelist which is the list of pages that were writtento during the delay. You must not modify this list. This callback is calledfrom a workqueue.


The driver is quite straight forward and there was no really hard problem with the driver itself. However, I had problem to get a high framerate because the SPI communication took time. All SPI communication is asynchronious and all jobs is stacked on a queue before it gets scheduled. This takes time. One obvious solution is to write bigger chunks with each transfer, and that is what I did.


It defines the DMA_MIN_BYTES which is arbitrarily set to 160. The code then compare the data length to this constant and determine if it should use DMA or not. It shows up that the DMA-transfer-code itself is broken.


There is the Xorg Kernel Mode Setting Driver : an extremely basic frame buffer driver and the fallback driver if no better Xorg driver is found. It has extremely limited functionality and does not support screen rotation.


There is the tilcdc Driver: Released by Ron Clark at the beginning of 2013. This driver, if installed, is configured via the Device Tree. For example, see the BB-BONE-LCD7-*.dts files. These files contain the pin connection info and the LCD display configuration information and will be used by the tilcdc driver to configure the display. Note: I do not know what configuration options are supported for userland configuration[ie setting rotation on bootup, or configuring rotation in the Xorg.conf file] This drivers sourcecode is located at drivers/gpu/tilcdc


There is the omap frame buffer driver: Located at drivers/video/omap This driver requires LCD panel configuration information which is available for some LCD panels in the same directory as the driver. Does this work for the BeagleBoneBlack?


There is the omap2 frame buffer driver: Located at drivers/video/omap2/omapfb. This driver requires LCD panel configuration, of which many are already written - see drivers/video/omap2/displays for them. Does this work for the BeagleBoneBlack?


There is the PVRSRVKVM Driver: Uses the built in SGX graphcis processor to accelerate graphics processing and offload processing from the CPU. This driver may not work under Linux Kernel version 3.8. According to the latest release notes, _4_10_00_01, version 4.10.00.01 works for the Linux 3.8 kernel. From the release notes:


To add to the confusion, many of these drivers are used in combination. For example, you might have both the Omap 2 Framebuffer Driver AND the SGX Driver installed. The SGX driver overrides some of the functions in the Omap driver(?). Xorg configuration would be for the Omap driver, not the SGX driver[?]


There is the Xorg Kernel Mode Setting Driver : an extremely basic frame

buffer driver and the fallback driver if no better Xorg driver is found. It

has extremely limited functionality and does not support screen rotation.


There is the tilcdc Driver: Released by Ron Clark at the beginning of 2013.

TI LCDC DRM driver [LWN.net] This driver, if installed, is configured

via the Device Tree. For example, see the BB-BONE-LCD7-*.dts files. These

files contain the pin connection info and the LCD display configuration

information and will be used by the tilcdc driver to configure the display.

Note: I do not know what configuration options are supported for userland

configuration[ie setting rotation on bootup, or configuring rotation in the

Xorg.conf file] This drivers sourcecode is located at drivers/gpu/tilcdc


There is the omap frame buffer driver: Located at drivers/video/omap This

driver requires LCD panel configuration information which is available for

some LCD panels in the same directory as the driver. Does this work for the

BeagleBoneBlack?


There is the omap2 frame buffer driver: Located at

drivers/video/omap2/omapfb. This driver requires LCD panel configuration,

of which many are already written - see drivers/video/omap2/displays for

them. Does this work for the BeagleBoneBlack?


There is the PVRSRVKVM Driver: Uses the built in SGX graphcis processor to

accelerate graphics processing and offload processing from the CPU. This

driver may not work under Linux Kernel version 3.8. According to the

latest release notes, _4_10_00_01,

version 4.10.00.01 works for the Linux 3.8 kernel. From the release notes:


To add to the confusion, many of these drivers are used in combination.

For example, you might have both the Omap 2 Framebuffer Driver AND the SGX

Driver installed. The SGX driver overrides some of the functions in the

Omap driver(?). Xorg configuration would be for the Omap driver, not the

SGX driver[?]


There is the tilcdc Driver: Released by Ron Clark at the beginning of 2013.

This driver, if installed, is configured

via the Device Tree. For example, see the BB-BONE-LCD7-*.dts files. These

files contain the pin connection info and the LCD display configuration

information and will be used by the tilcdc driver to configure the display.

Note: I do not know what configuration options are supported for userland

configuration[ie setting rotation on bootup, or configuring rotation in the

Xorg.conf file] This drivers sourcecode is located at drivers/gpu/tilcdc


>

> There is the tilcdc Driver: Released by Ron Clark at the beginning of

> 2013.

> TI LCDC DRM driver [LWN.net] This driver, if installed, is

> configured

> via the Device Tree. For example, see the BB-BONE-LCD7-*.dts files.

> These

> files contain the pin connection info and the LCD display configuration

> information and will be used by the tilcdc driver to configure the

> display.

> Note: I do not know what configuration options are supported for

> userland

> configuration[ie setting rotation on bootup, or configuring rotation in

> the

> Xorg.conf file] This drivers sourcecode is located at

> drivers/gpu/tilcdc


Last time I checked there was no built-in support for AX88179 chipsets in the ArchLinux kernel for BeagleBone Black yet. As these chips are now being used more widely in USB 3.0 adapters for gigabit ethernet, this post describes how to install the kernel driver manually.

3a8082e126
Reply all
Reply to author
Forward
0 new messages