-
Notifications
You must be signed in to change notification settings - Fork 493
HardKernel Odroid OGST TFT on Android #577
Comments
The task of fbtft_device is to add a device describing the display. In your case this is the device added:
On most systems the fb_ili9340 module/driver would be loaded automatically by udev when the device is added and the driver would register the framebuffer. |
Thanks for the help! That did the trick and created a framebuffer device and initiated the display with the backlight coming on. I haven't gotten it to display anything yet though. I'm attempting to compile a static version of mplayer for my purposes. |
I seem to be still having a problem, at least according to what you posted in another issue thread. As soon as the framebuffer device is created after issuing |
So, I'm unsure how to do this from the command line calling fbtft_device via modprobe. The following are the default pins for my board... [ 781.757402] fbtft_device: 'reset' = GPIO480 However, pins 480 and 483 are active low, while 473 is active high. I do not know if the hktft9340 module "knows" this or not. If it doesn't, I would presume that is my problem with the display not initializing correctly and the reason for the blank white screen after fb_ili9340 loading. How can I specify the pin state when I load fbtft_device via modprobe. I know to specify the pin is gpios=reset:480....etc... |
This is a typical controller that has not been initialized correctly.
fbtft_device can't do that. It's possible when adding the device through Device Tree, but things have changed over the years and I'm not sure about this, it might depend on the kernel version. reset should be active high in old fbtft and active low since Linux 5.3: torvalds/linux@b918d1c |
Ok...I've double and triple checked my wiring and labeled everything and re-hooked it all up. I am loading the following.... modprobe -d /vendor/lib/modules fbtft_device name=hktft9340 busnum=0 rotate=270 gpios=reset:472,led:473,dc:482 Now before I load the modules, I/O 484 - wPi 12 - MOSI - ALT4 - 1 I/O 472 - wPi 26 - IO.472 - IN - 0 (Reset) And after loading the above modules with those parameters I get... I/O 484 - wPi 12 - MOSI - ALT4 - 0 I/O 472 - wPi 26 - IO.472 - IN - 1 (Reset) So, that still gets me a blank back lit white screen. So, I got a hold of the HardKernel dtbo file and initialized fbtft_device with the values and arguments present in it. Followed by the same Which yielded me the same thing, and the following dmesg output. [ 234.541364] fbtft_device: unknown parameter 'reg' ignored Then I figured I would do some research on the Amlogic SPICC controller module. I found that it only supports up to 30mhz, so I tried dropping the bus speed down to 30mhz, then 20mhz, and then 10mhz, and got the same result as well. Not quite sure what to try now. BTW: This build of android is using kernel 4.9, so I assume the led output should be active high per your previous comment. Thanks again for the help. |
This doesn't look right, IN? You could try and see if backlight can be toggled by writing 0 and 4 to /sys/class/backlight//bl_power I don't know what else to try except looking at the wires with a scope. |
Ugh, my bad, typo. They switch to out after initialization. I am able to write directly to the backlight pin and toggle it on and off. I got a reply on the Odroid forum from one of the devs behind some software for the Odroid-Go handheld, that uses the same small 2.4" TFT. He stated that the display in that with the init sequence he has will always display white until something is written to it. I presume that the Now I just need to get a build of ffmpeg or mplayer setup for android so I can test it out. The builds of ffmpeg that I found, for some reason, refused to write directly to the framebuffer and claimed it was an invalid output format. Thank you again for all the help! I really appreciate it. Have good weekend. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Hello,
I have an Odroid N2 made by HardKernel. I am using an OGST Gaming Case (https://ameridroid.com/products/ogst-gaming-console-case-for-odroid-xu4) that is designed for an Odroid XU4. I am trying to get that built in 2.4" TFT to work. Now here is some basic background info. I am running a custom LineageOS 18.1 image made by a gentleman over on the Odroid forums by the name of voodik. Under /dev/graphics there are 4 framebuffer devices listed. Their resolution as reported by
cat /sys/class/graphics/fb*/virtual_size
is..
1920, 2160
32, 32
32, 32
32, 32
The reason that I mention these devices is that I have no idea what fb1 - 3 refer to.
Now, when I enter the following command over adb,
modprobe -d /vendor/lib/modules fbtft_device name=hktft9340 busnum=0 rotate=270
I get the following dmesg output...
[ 212.921957] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 212.923830] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[ 212.924264] spidev spi0.0: spidev spi0.0 100000kHz 8 bits mode=0x00
[ 212.924310] meson-fb meson-fb: meson-fb id=-1 pdata? no
[ 212.924343] spidev spi0.0: Deleting spi0.0
[ 212.924632] spi spi0.0: setup mode 0, 8 bits/w, 40000000 Hz max --> 0
[ 212.924747] meson-spicc ffd13000.spi: registered child spi0.0
[ 212.924750] fbtft_device: GPIOS used by 'hktft9340':
[ 212.924752] fbtft_device: 'reset' = GPIO480
[ 212.924754] fbtft_device: 'dc' = GPIO483
[ 212.924755] fbtft_device: 'led' = GPIO473
[ 212.924759] spi spi0.0: fb_ili9340 spi0.0 40000kHz 8 bits mode=0x00
[ 214.249383] ffs_retry_malloc_buffer
As can be seen, there is never an additional framebuffer device that is ceated...
odroidn2:/dev/graphics # ls /dev/graphics
fb0 fb1 fb2 fb3
...and the fb1-3 devices report the same display size, so fbtft is not binding to one of them.
I haven't been able to readily find any real info on doing this under Android. Odroid had this working under Android with their XU4 boards, but I haven't been able to find any real details on how they got that working. Any ideas?
The text was updated successfully, but these errors were encountered: