• Content Count

  • Joined

  • Last visited

  1. The trick is to use the mainline kernel in combination with the flexfb module instead of fbtft_device custom name=fb_ili9486
  2. If you do mmc part in u-boot it'll tell you there is a DOS partition, I flashed the stock image so I guess its either really there or just recognized that way in u-boot. Actually I am booting from eMMC, but indeed it works on the PC as well, anyway, what I was trying to tell was: my drive ID is correct, blkid on PC shows /dev/sdc1: UUID="a26ac16a-d702-4a37-b486-8fb5073e7627" TYPE="ext4" PARTUUID="a11b0125-01" So the problem seems to be somewhere else. I knew that I did not change the rootdev entry and that the UUID was fine, so I was thinking that I was maybe missing something else?
  3. I figured that, but not as to why... of course it was too late for blkid because the system did not boot, although mounting the Tinker Board as mass storage in linux generated a mount point with the exact above UUID (which is also set in armbianEnv.txt). Just installing the -dev kernel .deb packages should not have modified the rootfs ID anyway... right? I tried listing partitions in uboot using "mmc part", but I could only see the DOS partition which has another id (this is also the case with a working 4.x kernel), so I fear its not as simple as that... From your answer I understand that it was actually supposed to work and no extra steps needed to be taken?
  4. Any hint how to try it out? I compiled the the dev branch kernel which gave me linux-5.2.y and installed the kernel .debs on a 5.90 tinkerboard armbian image, but it won't boot. ## Loading init Ramdisk from Legacy Image at 21000000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 6444072 Bytes = 6.1 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 01f00000 Booting using the fdt blob at 0x1f00000 Loading Ramdisk to 0f9da000, end 0ffff428 ... OK Loading Device Tree to 0f9cc000, end 0f9d9157 ... OK Starting kernel ... Loading, please wait... Starting version 241 Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems done. Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. .... Begin: Running /scripts/local-block ... done. done. Gave up waiting for root file system device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Missing modules (cat /proc/modules; ls /dev) ALERT! UUID=a26ac16a-d702-4a37-b486-8fb5073e7627 does not exist. Dropping to a shell! Rebooting automatically due to panic= boot argument [ 47.768428] reboot: Restarting system Should I have also installed the uboot-dev deb (I chickened out on that one) which was built alongside the dev kernel or what else am I missing?
  5. That would be great indeed... but please help me until then :> So I am now in a situation where the LCD is working with 4.4, but not with 4.19 while the touchscreen part of it is only working in 4.19 but not in 4.4. I was following this thread, however it focuses on the 4.19 kernel which did work with the touchscreen anyway, even with the original TinkerOS/Waveshare dtb overlays. I still tried a few things with the dts (i.e. defined the touchscreen pins as ads7846_pins as in the dts from the post (no, I am not really sure about what I was doing there), but nothing helped. The input as such is actually set up and I can select it when trying things out in evtest, but I do not receive any events when clicking on the screen... The only thing in dmesg regarding to the touchscreen that I see is (with my dtb): [ 8.277587] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/spi@ff130000/ads7846@1[0]' - status (0) [ 8.277633] spi2.1 supply vcc not found, using dummy regulator [ 8.277926] ads7846 spi2.1: touchscreen, irq 246 [ 8.278228] input: ADS7846 Touchscreen as /devices/platform/ff130000.spi/spi_master/spi2/spi2.1/input/input2 With the unmodified waveshare35a dtb: [ 8.138020] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/spi@ff130000/waveshare35a-ts@1[0]' - status (0) [ 8.138066] spi2.1 supply vcc not found, using dummy regulator [ 8.138342] ads7846 spi2.1: touchscreen, irq 246 [ 8.138645] input: ADS7846 Touchscreen as /devices/platform/ff130000.spi/spi_master/spi2/spi2.1/input/input2 If I compare the output to the 4.19 dmesg: [ 2.465547] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/spi@ff130000/waveshare35a-ts@1[0]' - status (0) [ 2.465622] spi2.1 supply vcc not found, using dummy regulator [ 2.466155] ads7846 spi2.1: touchscreen, irq 247 [ 2.466828] input: ADS7846 Touchscreen as /devices/platform/ff130000.spi/spi_master/spi2/spi2.1/input/input0 [ 2.467505] usbcore: registered new interface driver usbtouchscreen I assume the usb line that comes right after that (was not the case with 4.4) has nothing to do with all this? At this point I am clueless how to proceed, since I do not see any errors... it just does not generate any events. Any hints or help would be greatly appreciated! On a slightly different topic: I was trying to get rid of /dev/fb0 and the Mali related kernel errors (I do not need the GPU at this point), so I disabled it in the kernel configuration and recompiled the kernel, however I get the following in compile.log: drivers/built-in.o: In function `reg_init': board-info.c:(.text+0x1fa98): undefined reference to `dma_buf_get' board-info.c:(.text+0x1fac0): undefined reference to `dma_buf_begin_cpu_access' board-info.c:(.text+0x1fad4): undefined reference to `dma_buf_vmap' board-info.c:(.text+0x1fb5c): undefined reference to `dma_buf_vunmap' board-info.c:(.text+0x1fb70): undefined reference to `dma_buf_end_cpu_access' board-info.c:(.text+0x1fb78): undefined reference to `dma_buf_put' make: *** [vmlinux] Error 1 I tried various kernel config combinations, but did not succeed. Can the GPU be disabled at all in the rockchip kernel? linux-rockchip-default.config waveshare35a-tinker-overlay.dts waveshare35a-tinker-test-overlay.dts
  6. One more addition, its really weird, almost random... So I did play around modprobe without getting anywhere, then did yet another reboot and suddenly - I automatically get a nice picture, with nice gamma, everything as it should be. Of course the touch part is not responding now, will investigate that... The only thing I changed was adjusting the Xorg config to use /dev/fb1, but I tried that earlier as well killing and restarting Xorg and the screen stayed black... but now since the configuration was correct on boot it seems it worked? It all seems really shaky..
  7. Following your advice I did rebuild the 4.4 kernel with fbtft modules enabled, so now running 4.4.182-rockchip The LCD went black during bootup which at first made me happy, but then dmesg showed the same pinctrl error about the group, but it seems other options from the overlay have been applied: [ 10.394893] systemd-journald[235]: Received request to flush runtime journal from PID 1 [ 10.655296] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/spi@ff130000/waveshare35a-ts@1[0]' - status (0) [ 10.655346] spi2.1 supply vcc not found, using dummy regulator [ 10.667395] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 10.668333] ads7846 spi2.1: touchscreen, irq 246 [ 10.668642] input: ADS7846 Touchscreen as /devices/platform/ff130000.spi/spi_master/spi2/spi2.1/input/input2 [ 10.668812] fb_ili9486: module is from the staging directory, the quality is unknown, you have been warned. [ 10.669371] rockchip-pinctrl pinctrl: unable to find group for node waveshare35a_pins [ 10.669400] fbtft_of_value: regwidth = 16 [ 10.669404] fbtft_of_value: buswidth = 8 [ 10.669408] fbtft_of_value: debug = 0 [ 10.669411] fbtft_of_value: rotate = 270 [ 10.669415] fbtft_of_value: fps = 30 [ 10.669418] fbtft_of_value: txbuflen = 32768 [ 10.669637] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/spi@ff130000/waveshare35a@0[0]' - status (0) [ 10.669685] of_get_named_gpiod_flags: parsed 'dc-gpios' property of node '/spi@ff130000/waveshare35a@0[0]' - status (0) I then got a mali related kernel dump which I think should not influence the LCD: [ 10.781017] rk3288-crypto ff8a0000.cypto-controller: Crypto Accelerator successfully registered [ 10.781379] mali ffa30000.gpu: Failed to get leakage [ 10.781418] mali ffa30000.gpu: Failed to get pvtm [ 10.810253] mali ffa30000.gpu: GPU identified as 0x0750 r0p0 status 1 [ 10.810386] mali ffa30000.gpu: Protected mode not available [ 10.811053] devfreq ffa30000.gpu: Couldn't update frequency transition information. [ 10.811167] ERROR: Bad of_node_put() on /gpu@ffa30000 [ 10.811176] CPU: 0 PID: 302 Comm: systemd-udevd Tainted: G C 4.4.182-rockchip #1 [ 10.811180] Hardware name: Rockchip (Device Tree) [ 10.811200] [<c011126c>] (unwind_backtrace) from [<c010cb54>] (show_stack+0x20/0x24) [ 10.811214] [<c010cb54>] (show_stack) from [<c062917c>] (dump_stack+0x90/0xa4) [ 10.811227] [<c062917c>] (dump_stack) from [<c0a0f340>] (of_node_release+0x9c/0xa0) [ 10.811238] [<c0a0f340>] (of_node_release) from [<c062b4ac>] (kobject_put+0x9c/0xec) [ 10.811245] [<c062b4ac>] (kobject_put) from [<c0a0e820>] (of_node_put+0x24/0x28) [ 10.811258] [<c0a0e820>] (of_node_put) from [<c0a0a934>] (of_find_compatible_node+0x8c/0xe4) [ 10.811338] [<c0a0a934>] (of_find_compatible_node) from [<bf2657f0>] (get_model_dt_node+0x50/0x9c [midgard_kbase]) [ 10.811452] [<bf2657f0>] (get_model_dt_node [midgard_kbase]) from [<bf265c5c>] (kbase_ipa_model_add_param_string+0x34/0xe0 [midgard_kbase]) [ 10.811558] [<bf265c5c>] (kbase_ipa_model_add_param_string [midgard_kbase]) from [<bf2656c0>] (kbase_simple_power_model_init+0xd8/0xe8 [midgard_kbase]) [ 10.811667] [<bf2656c0>] (kbase_simple_power_model_init [midgard_kbase]) from [<bf265db8>] (kbase_ipa_init_model+0x6c/0xc0 [midgard_kbase]) [ 10.811776] [<bf265db8>] (kbase_ipa_init_model [midgard_kbase]) from [<bf265edc>] (kbase_ipa_init+0xd0/0x190 [midgard_kbase]) [ 10.811879] [<bf265edc>] (kbase_ipa_init [midgard_kbase]) from [<bf272308>] (kbase_devfreq_init+0x20c/0x5a8 [midgard_kbase]) [ 10.811983] [<bf272308>] (kbase_devfreq_init [midgard_kbase]) from [<bf25c724>] (kbase_platform_device_probe+0x488/0xc84 [midgard_kbase]) [ 10.812044] [<bf25c724>] (kbase_platform_device_probe [midgard_kbase]) from [<c075d0b8>] (platform_drv_probe+0x60/0xbc) [ 10.812057] [<c075d0b8>] (platform_drv_probe) from [<c075b2b0>] (driver_probe_device+0x1f4/0x2e8) [ 10.812069] [<c075b2b0>] (driver_probe_device) from [<c075b438>] (__driver_attach+0x94/0x98) [ 10.812079] [<c075b438>] (__driver_attach) from [<c0759380>] (bus_for_each_dev+0x5c/0xac) [ 10.812089] [<c0759380>] (bus_for_each_dev) from [<c075ab48>] (driver_attach+0x2c/0x30) [ 10.812098] [<c075ab48>] (driver_attach) from [<c075a73c>] (bus_add_driver+0x19c/0x220) [ 10.812107] [<c075a73c>] (bus_add_driver) from [<c075be8c>] (driver_register+0x88/0x104) [ 10.812115] [<c075be8c>] (driver_register) from [<c075d000>] (__platform_driver_register+0x50/0x58) [ 10.812176] [<c075d000>] (__platform_driver_register) from [<bf29901c>] (kbase_platform_driver_init+0x1c/0x1000 [midgard_kbase]) [ 10.812240] [<bf29901c>] (kbase_platform_driver_init [midgard_kbase]) from [<c0101b0c>] (do_one_initcall+0xa0/0x1f0) [ 10.812255] [<c0101b0c>] (do_one_initcall) from [<c020b38c>] (do_init_module+0x74/0x3a8) [ 10.812267] [<c020b38c>] (do_init_module) from [<c01b9b8c>] (load_module+0x1e50/0x2338) [ 10.812278] [<c01b9b8c>] (load_module) from [<c01ba294>] (SyS_finit_module+0x84/0x9c) [ 10.812286] [<c01ba294>] (SyS_finit_module) from [<c01081e0>] (__sys_trace_return+0x0/0x10) I now have /dev/fb0 which seems to be: [ 2.527468] rockchip-drm display-subsystem: fb0: frame buffer device and /dev/fb1 which is the LCD: [ 11.260867] graphics fb1: fb_ili9486 frame buffer, 480x320, 300 KiB video memory, 32 KiB DMA buffer memory, fps=31, spi2.0 at 15 MHz However, it stays black... I can revive the LCD somewhat using yesterday "custom" fbtft_device hack, but gamma is completely off and it seems that ili9486 does not support fbtft's gamma options. So basically, while the waveshare35a dtb overlay does apply with this kernel version, it does not result in a working LCD... which still leaves me wondering: what am I missing, as it apparently works for everyone else...? What should I look at? P.S. it also seems that the touchscreen does not work anymore either, although the ads7846 module got loaded automatically and configuration was present in the dtbo...
  8. Thanks for the explanation, so what would you suggest, what should I be using in order to get this LCD going? Downgrade back to 4.4 and recompile/wait till the modules hit the repo? Or go the opposite way and try my luck with the 5.x kernels? How usable is mainline for the Tinker? As its apparently such a common LCD I was surprised that it did not work "out of the box", is everyone using HDMI these days?
  9. Hi, I spent several days trying to figure this out, which is a bit confusing given all the information that is available and posts and wikis saying that "Waveshare" LCDs are supposed to work, but something is still not right, hope you guys can help. What I have: ASUS Tinker Board S, flashed with Armbian_5.90_Tinkerboard_Debian_buster_default_4.4.182_desktop.img Updated to 4.19.57-rockchip via armbian-config (in order to get the fbtft* modules that were missing in 4.4). The LCD is a 3.5" original Waveshare 32a panel. I started by adding the overlay for this screen (i.e. my armbianEnv.txt has these overlays: overlays=i2c1 i2c4 spi2 waveshare35a-tinker uart1 uart2): https://github.com/TinkerBoard/debian_kernel/blob/develop/arch/arm/boot/dts/overlays/waveshare35a-tinker-overlay.dts I have a serial console connection and I could see that the overlay is getting loaded upon boot: Applying kernel provided DT overlay rockchip-i2c1.dtbo 286 bytes read in 1 ms (279.3 KiB/s) Applying kernel provided DT overlay rockchip-i2c4.dtbo 311 bytes read in 1 ms (303.7 KiB/s) Applying kernel provided DT overlay rockchip-spi2.dtbo 2224 bytes read in 2 ms (1.1 MiB/s) Applying kernel provided DT overlay rockchip-waveshare35a-tinker.dtbo 287 bytes read in 2 ms (139.6 KiB/s) Applying kernel provided DT overlay rockchip-uart1.dtbo 287 bytes read in 1 ms (280.3 KiB/s) Applying kernel provided DT overlay rockchip-uart2.dtbo 232 bytes read in 1 ms (226.6 KiB/s) Applying kernel provided DT fixup script (rockchip-fixup.scr) Adding the above overlay made the touchscreen work out of the box, however the framebuffer device didn't. In dmesg I could see the following: [ 15.706674] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 15.712403] fb_ili9486: module is from the staging directory, the quality is unknown, you have been warned. [ 15.712696] rockchip-pinctrl pinctrl: unable to find group for node waveshare35a_pins [ 15.712708] fb_ili9486: probe of spi2.0 failed with error -22 I read the driver sources, pinctrl documentation, overlay documentation, but being a userspace coder I did not really know what to make of all this and the above pinctrl error message. The waveshare nodes were available in the live device tree, so I am not sure why this line triggers and where this "group" is supposed to be coming from: https://github.com/armbian/linux/blob/rockchip/drivers/pinctrl/pinctrl-rockchip.c#L566 I then tried to configure the fbtft_device driver manually using the following parameters (tried to use the values from the waveshare dts): modprobe fbtft_device custom name=fb_ili9486 gpios=dc:163,reet:171 speed=15000000 busnum=2 rotate=270 fps=30 txbuflen=32768 bgr=0 width=480 height=320 The above made half of the screen to react, settig the rotation to 0 allowed to access the whole screen (tried catting /dev/random into /dev/fb0 which fills the screen with random colored pixels). I added xorg settings as suggested in the tinkerboard wiki and started xorg: Section "Device" Identifier "Rockchip Graphics" Driver "fbdev" Option "fbdev" "/dev/fb0" Option "DRI" "2" EndSection However the image looked totally distorted (I had the feeling that its drawing every other line), it was however vaguely recognizable as some text / X login screen. Just out of curiosity I removed the overlay, rebooted and again loaded the driver as above with the same result (only that touchscreen did not work anymore as expected). I am adding a full dmesg output with the overlay applied, the first fbtft load attempt is the "automatic" one and shows the rockchip pinctrl error, the second fbtft loading comes from my manual modprobe line which I pasted earlier. I have no idea where to go from here, I thought those Waveshare screens are well supported, and from what I read they seem to work for others. What am I missing? Kind regards, Jin P.S. ...couple of hours later... Turned out that the results are a lot better if width and height parameters are left out. While the dts suggests to use bgr=0, bgr=1 gives correct colors, but it seems that the gamma is totally off. I also tried taking the init sequence from the dts and passing it to fbtft_device, but I could not see any difference. So right now I ended up with the following line and results: modprobe fbtft_device custom name=fb_ili9486 bgr=1 gpios=dc:163,reset:171 speed=15000000 busnum=2 fps=30 txbuflen=32768 Original image for comparison: So, some progress at last, I'd however be still interested in fixing the pinctrl problem and understanding why the dts would not work... Next question of course - how to come up with proper gamma values?