SPI display stops working after selecting non-dummy dac

Ok, it’s definitely about GPIO-18 even when using USB DAC
Here’s a screenshot of a part of dmesg

@jofemodo I didn’t try to make them work on a regular raspbian yet, I’ll try a little later, and will get back with the results

dmesg above show that the screen is still configured to use GPIO 18 for backlight.

I guess that the problem is somewhere in this spi-bcm2835 or fbtft_device in /etc/modules because I have a display hooked up to gpio-12 with dummy-dac and it works, but as soon as I switch dac to generic usb it stops working and I get the same message in dmesg about pin 18.

Just to make everything clear, I have spi-bcm2835 and fbtft_device in /etc/modules and options fbtft_device name=fb_ili9341 gpios=reset:25,dc:24,led:12 speed=16000000 bgr=1 rotate=90 custom=1 in /etc/modprobe.d/fbtft.conf and even with this config dmesg argues about gpio18.

If there’s no spi-bcm2835 or fbtft_device in /etc/modules I can make display work even with dac with sudo modprobe fbtft_device custom=1 name=fb_ili9341 gpios=reset:25,dc:24,led:12 speed=16000000 bgr=1 but I have no idea how show zynthian UI on it. Maybe I need to try to configure it without adding anything to /etc/modules

I guess that the problem is somewhere in this spi-bcm2835 or fbtft_device in /etc/modules because I have a display hooked up to gpio-12 with dummy-dac and it works, but as soon as I switch dac to generic usb it stops working and I get the same message in dmesg about pin 18.

That’s totaly crazy !

you can try to boot with the working config for the screen and no usb dac attached. UI should show you an error message. From the command line:

  • systemctl stop zyntian
  • Plug the usb dac,
  • aplay -L will give you the hardware name.
  • Edit /etc/systemd/system/jack2.service with the right settings
  • systemctl reload-daemon (or daemon-reload)
  • systemctl restart jack2
  • cd /zynthian/zynthian-ui
  • startx ./zynthian.sh

It’s geting late here. I hope that you will be able to get out from this mess.

1 Like

Thanks a lot, I’ll try that tomorrow, it’s also quite late here :slight_smile:

Also, you Can configure zynthian (with the webconf tool) to use the raspberry built in codec.

After some investigations I realized that following that tutorial was not the right thing to do in the first place. All this modprobe stuff is good to check if the display works, but what I really need is proper dtoverlay, seems like I didn’t use the right one and it was causing all the conflicts. I didn’t find the one that fits my case yet, but I’ve found some mentions that people use modified pitft for this kind of displays.
@le51 thanks for all your suggestions, it helped me get some understanding of how zynthian works

I got the 1.8" SPI 128*160 display based on ST7735S working (see this topic). It is now a display option in Zynthian:

This may not work but might be worth a try. You may find the topic useful if you want to progress things. (The overlay I created for this is suboptimal, e.g. rotation doesn’t work but does the job mostly.)

1 Like

Thanks! Seems like a lot of useful info in that topic, will definitely check it out

I got it working! Thanks for help everybody.

I’ve edited rpi-display-overlay, removed all the stuff related to touch, and changed pins a little and made sure gpio-18 is not in use. Compiled it on the PI using this command

sudo dtc -@ -I dts -O dtb -o /boot/overlays/foo.dtbo foo-overlay.dts

After that I’ve changed to my new overlay in webconfig and it worked. The only thing is for some reason I still had issues with using generic usb dac, display worked this time, but UI didn’t show up. Anyway I just used my i2s dac and it worked perfectly.

Here’s the source code of my dtoverlay in case anybody needs it
ili9341-overlay.dts (1.3 KB)

And here’s the display I used

Next stop: wiring the encoders :slight_smile:

2 Likes

Yes :+1:, that’s great ! I was considering buying one of these cheap lcd screen but your problems have frightened me a bit.

Are you sure that touch capability has to be removed ?

I’m not sure touch HAS to be removed, but this screen does not have touch, so I removed it just in case. At the moment I’m using keyboard with touchpad, but I hoped to make it usable with just encoders and without touch…

Ok, I see, screen has pins for touch control but the U1 chip isn’t populated

sure it is !

Indeed most functionality is designed around the encoders and touch is an after thought with some interface elements being suboptimal. We aspire to improve touch interface but it is not high on the agenda. The main thing that touch gives is the X-Y controller panel but the rest of Zynthian is completely controllable via four encoder switches.

Let us know, if you need a value in the option list.

You mean the predefined setup in a drop-down? I’m good with custom, thanks, but it might be useful to others…

Not as kit but “Wiring”.
It’s not a big deal. I am going to remove one soon. If you tell me yours and how I should name it, I would be glad to.

Well, at the moment I’ve called it mytft for the lack of understanding how this display should be called beside cheap tft from aliexpress :slight_smile:

WorldChips240x320?

And the compiled version should have a proper name. We should put the dts file into the image as well, so that it is taken when you select the display.

Ah, and you didn’t change any other values in the webconf to make it work?

World Chips is a distributor name, there are tons of other noname screens like this on ali. So I guess something like ILI9321-320x240-no-touch will fit better

yep, everything on the screenshot is all it is. I did change the pins and max speed in the dts, though. I was to lazy to rewire it the way default rpi-display should be wired :slight_smile: