• Content Count

  • Joined

  • Last visited

About nobody0472

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ok, another update: Got also ads7846 working. It's like the dts i've posted above. Together with the modprobe fbtft_device and the about fbtft.conf the display and touch works. What has bothered me: I wanted to have console output on the lcd, even if/when a HDMI connection is plugged in. Then it's unclear, if fb0 is HDMI or LCD (when from boot onwards, fb0 is HDMI; when HDMI connected later on, fb0 is lcd). Therefore I've written an udev-rule like you have done for hdmi. Fint attached the rule and a script, that maps the con2fbmap to the right framebuffer (put the script to /usr/local/bin, like your hdmi-script). The rules is active for all fb_ili* drivers, that are getting loaded (so LCDs). Can be generalized, if needed. Maybe you find this helpful and can put it in the built-tree? Thanks, best, Olaf 90-fb.rules lcd_fbcon
  2. Hi again, I got an update. When directly trying the ili9486 it doesn't work, as described. BUT: when using the piscreen "name" for module-loading, the 3.5 inch display works, and it also loads the ili9486. in /etc/ : options fbtft_device rotate=90 name=piscreen speed=16000000 gpios=reset:2,dc:71 txbuflen=32768 fps=25 This makes the 3.5 inch display working. It loads then the ili9486 module corretly. It is slow (16MHz, 20 is also possible), but that is know with this controller chip. But it gives a great picture. I do have no idea how to put that in an overlay, as piscreen is no module-name. Hope that helps a little bit. Working now in ads7846 to fit to this screen Cheers, Olaf
  3. Hi again, with the WaveShare I can only get it half working. I figured out in my WaveShare 3.5a Display, that the LCD_RS Reset is Pin22 (GPIO171). This gives me a half-display for console (other half stays gray) and no X. As afar as I have read, it seems, that the ili9486 driver wants 16Bit for color information and that somehow bit's might need to be swapped. The parameter "regwidth" is completly ignored by the driver-module, as it says it's unknow. For ili9341, 3.2 inch Display, I got it working. Here it's a question of right GPIOs. But there the driver module works fine. Do you have any experience with the 3.5inch display? I have seen, that there is an overly for them, but for me it doesn't work. Thanks, best, Olaf
  4. Hi, that's great, thanks. I'm working on advanced hdmi-hotplug scripts, you made the baseline some time ago, as I've seen, so that lcd & hdmi can work and switching is possible. In this setup it's also desired to have X11vnc with stable resolutions. That's why I'm on the hotplug issues. In the next days I will work on the WaveShare Display, so that we can also see some content there. I will provide dts/dtbo for this after testing. Are you also interested in X11 xorg.conf.d files for touchscreen & lcd? Thanks, best, Olaf
  5. Hi again, I figured it out. Based on your work, thanks for this, I was able to draft a DTS-File for the ADS7846. Here is a short How-To for all those people, who are interested: In order to compile/decompile DTS/DTBO files, I needed to get the latest version of the DTC (DT-Compiler). This was doable via cloning the git-repo from here: and compiling via "make install". With this DTC one can compile DTS into DTBO and viceversa. Then I build the "rockchip-ads7846.dts" File: /* * Generic Device Tree overlay for the ADS7846 touch controller * */ /dts-v1/; /plugin/; / { compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288"; fragment@0 { target = <&spi2>; __overlay__ { status = "okay"; }; }; fragment@1 { target = <&gpio5>; __overlay__ { ads7846_pins: ads7846_pins { rockchip,pins = <5 12 0 &pcfg_pull_up>; }; }; }; fragment@2 { target = <&spi2>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; ads7846: ads7846@1 { compatible = "ti,ads7846"; reg = <1>; spi-max-frequency = <2000000>; interrupts = <12 2>; // high-to-low edge triggered interrupt-parent = <&gpio5>; pendown-gpio = <&gpio5 12 0>; ti,x-plate-ohms = /bits/ 16 <60>; ti,pressure-max = /bits/ 16 <255>; }; }; }; }; What can be seen: The GPIO-PIN for pendown is GPIO5B4 (physical PIN 11). This is encoded in "12" according to the table presented in: GPIO5B4 is the standard for WaveShare Displays, and therefore this rebuilds the TouchScreen part for WaveShares. In my case I needed to modify this towards GPIO5C3 (19) in order to work with my touchscreen. Then the DTS file needs to be compiled into a DTBO: dtc -O dtb -o rockchip-ads7846.dtbo -b 0 -@ rockchip-ads7846.dts Then the new kernel and module for ADS7846 (from your work above) needs to be installed. Lastly the armbianEnv.txt needs to be modified to read: "i2c1 i2c4 spi2 ads7846 uart1 uart2" under overlays. Reboot and voila. For the Display-Part itself: one CAN use DTS files for this, like yours, but don't have to, as the ili9x-drivers are built as modules and do accept options from an option-file (see above). With this, it should be possible to power Touchscreens based on ili9x and ads7846. Thanks for your work and help. Can you make sure, that the building of the ADS7846 module is added to the next-kernel permanently, so that we can use it from now on? Thanks, kind regards, Olaf
  6. Hi, sorry for the confusion. I was assuming, that you are going to build a DTS for the ADS7846 and maybe a second one for the ili9x Display to support the WaveShare Display. I do have a WaveShare display and a second one, driver-wise compatible, but using different pins. For the ili-Display I used options in the module-loading to adapt from WaveShare to the other Display with the ili-driver-module. For the ADS I know, that there can't be options in the module, so they need to be used at the DTS. For DTS / DT Overlays I have read half a day how it works, and found with google, that they can be decomplied forth and back. But this doesn't work for me somehow. Still a beginner there. Sorry again, and I do appreciate your help. If you can point me to a guide, how to rebuild the kernel with DTS and so on, that I can follow, I'm willing to learn and try. Thanks in advance, kind regards, Olaf
  7. Hi there, thanks so far. What I got: The touchscreen in my waveshare module is working. The Display itself NOT, also nothing appears. The touchscreen is mapped to /dev/input/event2 and if I "cat" that and touch the screen, something is coming up. That's good. As my original Display is NOT WaveShare and therefore attached the pendown to a different pin, it seems, that this is not working. That's why I've asked for the dts file. I can't decompile the dtbo back to a dts, as the dtc compiler throws errors and aborts. For the display: Same loading here, but nothing to see. [ 15.404331] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/spi@ff130000/waveshare32b-ts@1[0]' - status (0) [ 15.404394] ads7846 spi2.1: spi2.1 supply vcc not found, using dummy regulator [ 15.404438] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/spi@ff130000/waveshare32b@0[0]' - status (0) [ 15.404455] ads7846 spi2.1: Linked as a consumer to regulator.0 [ 15.404470] of_get_named_gpiod_flags: parsed 'dc-gpios' property of node '/spi@ff130000/waveshare32b@0[0]' - status (0) [ 15.430951] ads7846 spi2.1: touchscreen, irq 244 [ 15.431280] input: ADS7846 Touchscreen as /devices/platform/ff130000.spi/spi_master/spi2/spi2.1/input/input2 [ 15.846870] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 32 KiB buffer memory, fps=25, spi2.0 at 16 MHz .... [ 15.402109] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 15.404298] fbtft_of_value: buswidth = 8 [ 15.404303] fbtft_of_value: debug = 0 [ 15.404306] fbtft_of_value: rotate = 270 [ 15.404309] fbtft_of_value: fps = 25 [ 15.404311] fbtft_of_value: txbuflen = 32768 For the ili9340 module I'm using in MY Display the following OPTIONs in modprobe.d/fbtft_device.conf options fbtft_device custom name=fb_ili9341 busnum=2 buswidth=8 speed=48000000 gpios=reset:162,dc:163,led:167 rotate=90 bgr=1 cs=0 How can I access the build system, where I can pull the commit? Any link to that? Or can I grad the things tomorrow by downloading the NEXT-Built? What do you need, to get better infos? Is there a chance to pass parameters to the overlay via armbianEnv.txt? Thanks, best, Olaf
  8. ok, sounds great. Are you compiling a new module, or a new kernel version with the touchscreen driver? Thanks & cheers BTW: can you produce also the DTS (beside .DTB) for the new overlay, so that I may change PINs, etc. for different LCDs/touchscreens based on the same chips?
  9. Hi there, thanks for the positive reply. The display is basically like a waveshare model, meaning, when a waveshare works, this will also work. I have no idea about kernel-config and DT overlays, as the AllWinner boards worked with FEX-Files. I have found the following DTS-File: But unfortunately I have no idea what to do with it.... sorry. I would like to use the IRQ. The ADS7846 PenDown is connected to PIN22, which is GPIO 171. But I have no idea how to bring it to life with the DTS file. Do I need beyond the DT overlay also a module, that can be loaded? Can you help me in the process? Thanks so far, kind regards, Olaf
  10. Hi all, I'm running Armbian 4.19 (both stable kernel 5.77 and nightly) on an TinkerBoard S. I'm trying to connect a 3.2inch resistive Touch Display to SPI2. The display works with ili9341 module on SPI2 CS0. I have the touch screen of it on the SPI2@1 (CS1) but no way of getting a module or overlay dts for the ADS7846 TouchScreen. I've seen, there is a generice resisitive-adc-touch module, but I can't get it running. Using the ADS7846 on armbian with AllWinner and several other boards for many years. Works great so far. Any hints, how to get it running in such a way, that it will be there with downstream updates (meaning without having a special kernel for it)? Thanks, kind regards, Olaf