For the life of me, I cannot find a single tutorial that would show how to set up an ads7846/xpt2046 touchscreen (over spi) while using an ubuntu system image.
There are plenty of tutorials that show how to enable various touchscreen variants that use the ads7846 drivers, both on rpi and bpi:
however, all of them are geared towards raspbian. They show necessary editing of /boot/config.txt but there is no such file in the ubuntu images (or using raspi-config which is also unavailable on ubuntu) .
Thanks for the info. Is there per chance a more in depth explanation on how to achieve what i’m looking for? I managed to compile and run the bpi-r2-bsp source (kernel 4.4) on ubuntu 16.04.
i managed to find the dts file (this is from the kernel 4.4 source)
./linux-mt/arch/arm/boot/dts/mt7623n-bpi-r2.dts
what am i supposed to edit over here? Surely I can’t just take the one linked in the other post, that one is for kernel version 4.14?
Sorry, this is my first time dealing with changing something in the kernel source.
you have a mt7623.dtsi (basic declarations) and then a dts (you’ve found the right for your kernel it’s only different name)
first the node itself must exist in the dtsi, if it isn’t there you can copy declaration from 4.14 for the spi to 4.4…then enable it in dts-file and compile. if there any references (&xx) the corresponding node must also exist (spi0_pins_a inside of &pio in dts)
Sorry, this really doesn’t clear any confusion for me Where can i find some info about actually using and modifying these dts files?
Also, i am unable to compile the 4.4 kernel from your git:
make[1]: Entering directory ‘/home/toby/Documents/LIME/BPI-R2-4.4/linux-mt’
drivers/net/wireless/mediatek/Kconfig:10: can’t open file “drivers/net/wireless/mediatek/mt76/Kconfig”
this is from the main branch.
trying to paste the bananapi-bpi-r2.dts from 4.14 to 4.4 (from the BSP git) also does not work, make just gives a parsing error for the dts file while building
using the pre-built 4.14.14 from the google drive link results in pi not booting
the error came from git submodule which seems not to be updated in your clone…as you don’t need that module, you can disable it in your config
./build.sh and choosing 4 for menuconfig and disabkle it
│ Symbol: MT76 [=m] │
│ Type : tristate │
│ Prompt: MediaTek MT76x2 802.11ac chips support │
│ Location: │
│ -> Device Drivers │
│ -> Network device support (NETDEVICES [=y]) │
│ -> Wireless LAN (WLAN [=y]) │
│ (1) -> Mediatek Wireless LAN support (WL_MEDIATEK [=y])
or commenting out “CONFIG_MT76=m” (with #) in linux-mt/arch/arm/configs/mt7623n_evb_bpi_defconfig
I have now removed submodule and added files direct to repo to avoid such problems, git pull to update
I have activated from ./build.sh menuconfig Device Driver -> SPI Support -> User Mode SPI device driver support and all of the spı controller supports… You mean these supports. Right?
Right, user mode driver should be spidev…have you buildtin (*) or module (m)?
Maybe there is a lack of driver-support…nearly the half of bpi-r2 is currently supported. For some features are patches for 4.15,but i did not seen anything for spi yet…but also not focused on it
Maybe gary or someone from bpi-team can say whats missing
@frank-w; we bought XPT2046 5" TFT screen and I tried to build your kernel on your GitHub repository, but I could not succeed. We have Banana-Pi R2 for sure.
It says that I should not use administrator account. After the kernel configuration and while the kernel is building, it gives errors. Do you have a precompiled Ubuntu image for Banana-Pi R2 with SPI working?
Moreover, I found out that your kernel includes working SPI configuration. Is that right?
Furthermore, could I use XPT2046 via only SPI (via GPIO)? The screen has HDMI and micro usb inputs. Couldn’t we pass data via usb? Or could we use only SPI (via GPIO)?
I cannot test spi because i have no spi-device. Imho you nedd to define driver in dts so you have to do it for yourself.
Please make crosscompile and not on r2 directly. I have accepted a patch for direct compile but i don’t use it and don’t want to give support for this.
You can try hdmi…imho usb should be only for touch-function
I have one more question @frank-w, are you working on building Bananian Linux for Banana R2?
Moreover, I have a question for BPI company, when companies sell computers, they build a good OS for that computer. Won’t you build a stable OS for Banana-Pi R2? I need answers.
As i said before display has to be defined in dts (maybe dto,needs no kernel-rebuild but difficulter to setup). System is a basic system without any special configuration except network. You can install which is available on official debian repo. For Kernel download my repo and activate drivers you need
Try to get it working with modified dts and then i make a dto and add driver-module