WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: OSOYOO 3.5 inch SPI Touchscreen with PiCore 14 and Raspberry Pi Zero W  (Read 777 times)

Offline creitzel

  • Newbie
  • *
  • Posts: 45
I am trying to get this (https://www.amazon.com/dp/B085TC5YMR?ref=ppx_yo2ov_dt_b_fed_asin_title) 3.5" display to work with a Raspberry Pi Zero W for a project.  No matter what I've tried, the display just displays a white screen. 

The vendor provides instructions to get it setup and working on Raspbian (here: https://osoyoo.com/2022/12/15/osoyoo-3-5-inch-spi-touch-display-for-rpi/), but I can't figure out how they translate to PiCore v14. 

I've tried a couple times using their device tree overlays, but I must be missing something.

Does anyone have any experience in getting one of these setup on PiCore?

Oh, and while it would be nice if the touch screen also worked on this project, it is definitely not mandatory.

Thanks in advance,

Chris

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1418
Are you trying to run Xorg?   What specifically is your goal?  What software?

Since the don’t give device tree source files, it’s going to be limited….. likely back to a version 5.x kernel.

This looks like a knockoff of the waveshare display, which has slightly better documentation….
 But these types of displays were always problematic

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1418
You might have better luck with a current 16.x image using the current generic overlay dtoverlay=fbtft,

https://github.com/raspberrypi/linux/blob/rpi-6.12.y/arch/arm/boot/dts/overlays/README

Offline creitzel

  • Newbie
  • *
  • Posts: 45
I'm pretty new to the graphics stack on Linux, so forgive me if I misspeak in any of my reply.   :)

Quote
Are you trying to run Xorg?   What specifically is your goal?  What software?

I'm really just looking for a way to do custom graphics on it with as little middleware as possible, but if I had to run a desktop (which I presume is what Xorg does), I would be ok with that.

I have a 2.4" Waveshare SPI display that I was able to get working under PiCore 14, but I had to build a little SPI driver in C for it, and basically I can blit an image to the screen with it.  Waveshare provided some starter code for that driver, and I modified it to suit my needs.  I then wrote some python code using the driver to display my output.

I would like the same functionality with this display if possible, but I can find no information on how to interact with it via the SPI interface.  I've even gone as far as contacting their support line.  They basically just told me that the link I provided is the only documentation they have for it. 

All of that said, if there is a different way to do this, I'm completely open to it.  Basically, I just want to be able to display custom output on the screen while my project is running.

Quote
You might have better luck with a current 16.x ...

I will have to check that out, and see if I can get it working.  I'm fine with using a newer version of PiCore if necessary.

Their pinout is different than the 2.4" LCD's, so I also might try remapping the driver pinout to match theirs and see if it comes to life.


Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 759
If you get it working with raspbian, you want to take a look at the output of lsmod and what the overlay of the device tree. To see what modules being loaded.

Offline creitzel

  • Newbie
  • *
  • Posts: 45
So, their instructions and premade raspbian images suck.  lol.  Their premade images just don't work at all.  The display always shows an empty white screen.

Following their instructions using a fresh image of raspbian from the official site, I was never able to get the GUI to come up at all, it would just display an empty black screen.  Finally I went into raspi-config and told it to just boot to the CLI, and poof now the display is working and I can see the CLI on it.

Realistically, this is all I need, as I wasn't planning on using the GUI on this project anyway.

I did notice that whatever driver they are loading seems to be creating a 2nd frame buffer, as I have both /dev/fb0 and a /dev/fb1.

I did some playing around and have been able to successfully write to both of the frame buffers and produce graphics on the display.  (both frame buffers appear to be mapped to this one display).

So, after getting this far I did an lsmod and got the following results:

Code: [Select]
Module                  Size  Used by
binfmt_misc             7741  1
rfcomm                 39311  4
cmac                    3296  3
algif_hash              5797  1
aes_arm                 4436  3
aes_generic            29166  1 aes_arm
ecb                     2031  1
algif_skcipher          4371  1
af_alg                 16845  6 algif_hash,algif_skcipher
bnep                   12229  2
fb_ili9486              3160  1
fbtft                  33131  1 fb_ili9486
syscopyarea             3232  1 fbtft
sysfillrect             3732  1 fbtft
sysimgblt               3299  1 fbtft
fb_sys_fops             2217  1 fbtft
ads7846                13106  0
brcmfmac              299656  0
8021q                  23069  0
garp                    7841  1 8021q
stp                     2585  1 garp
llc                     6489  2 garp,stp
hci_uart               35506  1
btbcm                  11186  1 hci_uart
bluetooth             522246  31 hci_uart,bnep,btbcm,rfcomm
ecdh_generic            4957  2 bluetooth
ecc                    33732  1 ecdh_generic
libaes                  6966  3 bluetooth,aes_arm,aes_generic
brcmutil               11424  1 brcmfmac
sha256_generic          4067  0
libsha256               5645  1 sha256_generic
cfg80211              816273  1 brcmfmac
joydev                 11830  0
bcm2835_codec          36102  0
bcm2835_v4l2           34640  0
v4l2_mem2mem           31048  1 bcm2835_codec
bcm2835_isp            21282  0
bcm2835_mmal_vchiq     24734  3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
videobuf2_vmalloc       5782  1 bcm2835_v4l2
videobuf2_dma_contig     8960  2 bcm2835_isp,bcm2835_codec
videobuf2_memops        2345  2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2         23371  4 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
raspberrypi_hwmon       2678  0
rfkill                 23804  6 bluetooth,cfg80211
videobuf2_common       52312  8 bcm2835_isp,bcm2835_codec,videobuf2_dma_contig,videobuf2_vmalloc,videobuf2_memops,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
snd_bcm2835            15588  1
snd_pcm               112723  1 snd_bcm2835
videodev              241042  6 bcm2835_isp,bcm2835_codec,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
i2c_bcm2835             7931  0
snd_timer              25352  1 snd_pcm
spi_bcm2835            11936  0
snd                    81085  5 snd_timer,snd_bcm2835,snd_pcm
vc_sm_cma              22121  2 bcm2835_isp,bcm2835_mmal_vchiq
mc                     44829  6 bcm2835_isp,bcm2835_codec,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
uio_pdrv_genirq         4146  0
uio                    11896  1 uio_pdrv_genirq
fixed                   4791  0
i2c_dev                 6915  0
drm                   518552  0
fuse                  115597  1
drm_panel_orientation_quirks     1311  1 drm
backlight              12083  2 fbtft,drm
ip_tables              13982  0
x_tables               29223  1 ip_tables
ipv6                  494288  28

I assume the important lines here are:

Code: [Select]
fb_ili9486              3160  1
fbtft                  33131  1 fb_ili9486

when I do a lsmod on PiCore, I don't see either of these drivers.  Here's what I get:

Code: [Select]
Module                  Size  Used by    Not tainted
brcmfmac              300624  0
brcmutil               11492  1 brcmfmac
sha256_generic          4099  0
libsha256               5905  1 sha256_generic
cfg80211              819747  1 brcmfmac
rfkill                 23831  2 cfg80211
squashfs               38483 24
zram                   16254  2
zsmalloc               17773  1 zram
raspberrypi_hwmon       2738  0
i2c_bcm2835             8113  0
spi_bcm2835            11885  0
raspberrypi_gpiomem     4085  0

Unfortunately I don't have access to the dtb source file, only the binary so I'm not in fact sure that the 2 drivers in question are what I need.

So, being a newbie to linux drivers/kernel modules how do I go about getting the 2 drivers I think I need onto PiCore in a permanent fashion?

Thanks a bunch for your help so far.

Chris

Offline gadget42

  • Hero Member
  • *****
  • Posts: 886
visited https://osoyoo.com and by appearances they are offering products and details in earnest.

for future visitors to this thread who have not yet purchased hardware, a visit to and thru their webpages/website is probably a very good idea and several hours may be required depending on everything you are researching.

with respect to their 3.5 inch screen offerings we note at this time that there are several(all links work at post time):

osoyoo shows model number 2019018400 on this webpage:
https://osoyoo.com/2024/05/23/osoyoo-3-5-inch-dsi-screen-for-raspberry-pi/

osoyoo shows model number 2022013800 on this webpage:
https://osoyoo.com/2022/12/15/osoyoo-3-5-inch-spi-touch-display-for-rpi/

osoyoo shows model number 2024008300 on this webpage:
https://osoyoo.com/2025/01/23/osoyoo-3-5-inch-dsi-screen-v3-0-for-raspberry-pi-model-2024008300/

osoyoo shows model number 2024009100 on this webpage:
https://osoyoo.com/2024/11/25/osoyoo-3-5-inch-hdmi-capacitive-touch-screen-v3-0/

also osoyoo references this RPiconfig webpage as well:
https://elinux.org/RPiconfig

some of their offerings mention other operating systems such as Ubuntu, RetroPie, and OctoPrint in addition to Raspberry Pi so it appears they are attempting to satisfy a fairly broad range of usages.

worthy of note as well are the numerous warnings regarding improper handling, order of assembly/setup, and usage(usually in larger red font).

please keep us posted on your progress and/or successes!
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12153
Hi creitzel
... So, being a newbie to linux drivers/kernel modules how do I go about getting the 2 drivers I think I need ...
Install  graphics-KERNEL.tcz.

Offline creitzel

  • Newbie
  • *
  • Posts: 45
Quote
Install  graphics-KERNEL.tcz.

That was the magic I was missing.  The display is now up and running and I can see the CLI on it, just like on the raspbian install.

I don't know if the GUI will work with this or not, but like I said before I don't actually want the GUI on this project, so I'm going to switch over to writing my custom code now.

Thanks a bunch for the help guys!  Much appreciated!