Jump to content

Recommended Posts

Posted

When I run pygame for any significant length of time on legacy kernel it crashes with a kernel timeout error.  I haven't been able to get past this, and from what I tell, it should be fixed in later kernels.  So, I'm trying my hand with the mainline kernel, and I have two hurdles I haven't been able to pass yet.

 

I'm using an Orange Pi Zero, hardware Ethernet, mainline distro, with a 2.4" SPI TFT LCD.  Frame buffer is /dev/fb0 created with

     modprobe fbtft_device custom name=fb_ili9341 gpios=reset:1,dc:0,led:3 speed=48000000 rotate=90 busnum=0 txbuflen=65536

 

Whenever I create a display I get an error that it cannot open mouse.  The following toy world program:
 

#! /usr/bin/env python
import pygame
screen = pygame.display.set_mode((320, 240))
while 1:    
  pass

returns:

Traceback (most recent call last):
File "./bar", line 5, in <module>
  screen = pygame.display.set_mode((320, 240))

pygame.error: Unable to open mouse

Using the same hardware with the legacy distro does not give the same error.

 

On larger programs I'm also getting a slew of ALSA messages too, but I'm not sure how critical they are.  I'm hoping they're informational, but I'll look at them closer when I get past the mouse error.  I'll include them here to be complete in case they are critical to the main issue:

Spoiler

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default

 

 

I know mainline is experimental and not supported, but since I've hit a dead-end on legacy I thought I'd work on this distro before moving to other systems.  Please hit me up with any suggestions, or share the laugh with me if I'm doing something really dumb.

Posted

If I might ask a rather broad question -- has anyone got an il9341 2.4" TF display to work with mainline kernel on an orange pi zero? 

 

I can get the device to register with modprobe, and the backlight becomes active, but I haven't been able to get anything else happen to the display.  I'm wondering just how far in over my head I am.

Posted

Yes it work fine for me. This are my fbtft options:

name=fb_ili9341 gpios=dc:0,led:3,reset:1 speed=16000000 busnum=1 rotate=0 bgr=1

 

I think your problem is busnum. In OPIZero the SPI bus=0 is connected to a SPI flash you should use bus 1.

 

 

 

 

 

Posted

Thanks for the lead!  But when I use busnum 1 I get an error modprobe: ERROR: could not insert 'fbtft_device': Invalid argument

 

Using busnum 0 executes with no terminal messages, the backlight turns on and the screen is all white, and dmesg looks good.

Spoiler

this is for busnum 1

[   66.320840] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[   66.327470] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[   66.329307] spi spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[   66.329420] fbtft_device: spi_busnum_to_master(1) returned NULL
[   66.335387] fbtft_device: failed to register SPI device

 

this is for busnum 0
[  138.255917] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  138.257495] spi spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[  138.257608] spi spi0.0: Deleting spi0.0
[  138.258610] fbtft_device: GPIOS used by 'fb_ili9341':
[  138.258621] fbtft_device: 'dc' = GPIO0
[  138.258629] fbtft_device: 'led' = GPIO3
[  138.258635] fbtft_device: 'reset' = GPIO1
[  138.258655] spi spi0.0: fb_ili9341 spi0.0 16000kHz 8 bits mode=0x00
[  138.274176] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned.
[  138.620939] Console: switching to colour frame buffer device 30x40
[  138.622607] graphics fb0: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB buffer memory, fps=20, spi0.0 at 16 MHz

 

But I can't get any pygame programs to work even if I add os.putenv('SDL_FBDEV','/dev/fb0') before pygame.init().  Argh!

Posted

Hi ldiaz,

 

Would you mind giving some more information about how you set up an LCD to work with the Orange Pi Zero? it would be most appreciated!

 

I'm trying to set up a Waveshare Spotpear 3.5" LCD; I would really like to set up an Adafruit 2.8 capacitive touch screen, but that is for later.

 

Here are some questions:

  1. What armbian distribution are you using?
  2. What LCD did you use?
  3. What GPIOs on the Orange Pi did you use and how do they match with the LCD?
  4. Did you make any modifications to script.bin.? 
  5. Did you download any drivers or other packages?
  6. Did you user overlays?
  7. Did you have to modify any other files to get it to work?

Thank you very much,

Rod

 

 

Posted

rlsten -- do you want info for legacy?  I've got my 2.4" working well on that, but pygame won't run for long periods without throwing an error.  That's why I'm moving up to the newer mainline environment with the current kernel.  For legacy I did not need to make script.bin changes, only had to add python-pygame package, and no overlay work.

Posted

Touch is possible, but not something I did in any of my projects.  There are additional pins on the display for touch that will need to be connected, and if you use x windows the display may need to be calibrated.  

Posted

Hi

  • Im using main-line/dev version not legacy.
  • The GPIO are those of the SPI1 interface + some extra for additional signals required. in my case gpios=dc:0,led:3,reset:1.
  • For display only its not needed to install any overlay only notro's fbtft.
  • In case that what to use the touch screen then you need to use a device tree overlay using with spidev and spi-add-cs1 overlays. (attached my version)
  • For touch you need and additional CS GPIO defined in spi-add-cs1 and one more for IRQ from the touch screen. I picked "PA7".

 

regards,

touch.dts

Posted

@ldiaz - you had to install notro's fbtft in mainline?  I've been trying to get things to work with the fb included in the distro.  Since I could get the backlight to respond with modprobe and the messages looked like it created a good /dev/fb0 I thought it was okay as-is.

 

If you added notro's fbtft, would you tell me specifics on what you added (which src/bin's you downloaded and installed)?

Posted

The fbtft is included in main-line build you don't need to download or install anything else. As you say the once ftft_device is activated if wiring is correct the screen works with out problem in /dev/fb0. X windows also works with out problem.

 

For touch screen you need to load the overlay I posted.

 

 

 

 

Posted

Sorry for hijacking your thread.

This option was working ok for me for 3.5 inch raspberry lcd on legacy kernel but for mainline it doesn't work : (My /etc/modprobe.d/fbtft.conf)

options fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 txbuflen=32768 rotate=270

I also have a "fbtft.conf" file /etc/module-load.d/ which contains : fbtft_device .

it used to work ok in legacy but in kernel I get onlt white screen and the screen does not initialize.

modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 txbuflen=32768 rotate=270  gives me error : ERROR: could not insert 'fbtft_device': Invalid argument

 

can you please help me why this is not working in mainline kernel ?

Best regards.

Posted

You are not hijacking the thread at all! Your experience is very close to mine, and I started this thread.

 

In your case, have you tried to use busnum=0?  Modprobe completes without errors for me with busnum 0 works, but not busnum 1.

Posted

@A-P There is no more detail in dmesg about the error?

 

It's very strange that @glow solution to busnum=0 works as OPIZERO has no pins to connect to SPI0 bus in the GPIO header. Check this:

 

Orange-Pi-Zero-Pinout-banner2.jpg?fit=12

 

Busnum=1 will use the pins for SPI1: SPI1_CLK,SPI1_MISO,SPI_MOSI and SPI1_CS.

 

For other needed pins (this will depend on the screen) you need to select the GPIOS manually. Be aware of the mapping:

Orange-Pi-Zero-pinout.jpg

Check your wiring to verify it is correct with fbtft parameters. What errors are shown in dmesg?

 

For checking that thet SPI1 works well you can use the spi-dev overlay simply puting this in /boot/armbianEnv.txt:

overlays= <other overlays> spi-spidev  

param_spidev_spi_bus=1

after reboot /dev/spi*  files should be present.

 

Posted

@ldiaz I'm not sure how to explain my results with busnum -- my zero does not have spi flash on it (the space for the chip on the back is empty).  Does your zero have spi flash memory?

Posted

@glow. Mine has a spi flash.  But the fact is that H2+ gpios for SPI0 are not accesible in the GPIO header, so in any case you need to connect the display to the SPI1 not the 0. As you have done here:

Quote

pin

21 - miso

15 - led

23 - sck

19 - mosi

13 - dc

11 - reset

24 - cs

06 - gnd

01 - vcc

 

  Try the overlay spi-dev  with busnum=1 as I commented in my previus post. Then try to load the driver for the display with modprobe.

 

Quote

overlays= <other overlays> spi-spidev  

param_spidev_spi_bus

 

Posted

I'm comfortable in nix environments, but overlays are new to me.  I last recall using 'overlays' on a heathkit with 4k ram, but that's a different story.

 

I've verified my pin connections - they are identical to yours.   Since I'm new to overlays I followed your earlier message and  added the following to the end of /boot/armbianEnv.txt

     overlays= <other overlays> spi-spidev
     param_spidev_spi_bus=1

 

After reboot there are no /dev/sp* devices.  (there weren't any before the reboot either, perhaps the /dev/spi* devices are specifically tied to spi memory, and not the spi bus???  at no time do I have an /dev/spi* entry)

 

modprobe fbtft_device custom name=fb_ili9341 gpios=dc:0,led:3,reset:1 speed=16000000 busnum=1 rotate=0 bgr=1 generates an error

modprobe: ERROR: could not insert 'fbtft_device': Invalid argument and dmesg shows:

[  112.942447] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[  112.949365] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  112.951171] spi spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[  112.951279] fbtft_device: spi_busnum_to_master(1) returned NULL
[  112.957422] fbtft_device: failed to register SPI device

 

if I then change busnum=0 in modprobe it works and dmesg shows

[  144.264907] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  144.266482] spi spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[  144.266595] spi spi0.0: Deleting spi0.0
[  144.267381] fbtft_device: GPIOS used by 'fb_ili9341':
[  144.267390] fbtft_device: 'dc' = GPIO0
[  144.267396] fbtft_device: 'led' = GPIO3
[  144.267402] fbtft_device: 'reset' = GPIO1
[  144.267419] spi spi0.0: fb_ili9341 spi0.0 16000kHz 8 bits mode=0x00
[  144.282605] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned.
[  144.635818] Console: switching to colour frame buffer device 30x40
[  144.637480] graphics fb0: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB buffer memory, fps=20,
 spi0.0 at 16 MHz

 

I have another brand new zero so my next step is use it with another display and a fresh mainline image and see if I get the same results.

 

I remember my excitement when I used the same hw with a legacy image and it worked like a charm.  Too bad the programs would crash after running for a substantial period of time.

Posted

overlay is nothing special is only hardware definition SPI o IC2 have not hw discovery mechanims. Try spi-dev overlay without loading the driver and check if spi1 devices are created.

 

My wiring is the following:

display      ZERO GPIOS
VCC       -  3.3 V pin 1
GND       -  GND pin 25 (any GND would do as they internaly connected)
CS      -  SPI1 CS0 pin 24
RESET     -  GPIO1 pin 11
DC      -  GPIO0 pin 13
MOSI       -  SPI1 MOSI pin 19
SCK      -  SPI1 SCLK pin 23
LED      -  GPIO3 pin 15
MISO      -  SPI1 MISO pin 21

 

SPI port are fixed pins, you must configure only DC/RESET/LED according to your wiring.
name=fb_ili9341 gpios=dc:0,led:3,reset:1 speed=16000000 busnum=1 rotate=0 bgr=1

 

 

 

Posted

@ldiaz

by adding :  overlays= <other overlays> spi-spidev and param_spidev_spi_bus=1 to armbianEnv.txt I have /dev/spi1.0 .

but fbtft options still give me error wih busnum=1 and the screen dos not work.

As I said before same options and the way I load fbtft_device works in legacy kernel but in mainline itdoes not work. so pin numbers and options are correct.

Any help ?

Posted

@A-P Honestly I have not tested the ili9486 you are using but the li9341 that @glow is ussing. However they should work both. I think the best way to trouble shoot this is:

1. Could you share your screan pinout and wiring to the OpiZero?

2. Could you share dmesg after modprobe of the driver?

3. what is on your armbianEnv.txt?

 

Regards,

Posted

Dear @ldiaz

The ili9487 is 3.5 inch HAT raspberry pi lcd. pinout for raspberry pi is as below :

 

PIN NO. SYMBOL DESCRIPTION
1, 17 3.3V Power positive (3.3V power input)
2, 4 5V Power positive (5V power input)
3, 5, 7, 8, 10, 12, 13, 15, 16 NC NC
6, 9, 14, 20, 25 GND Ground
11 TP_IRQ Touch Panel interrupt, low level while the Touch Panel detects touching
18 LCD_RS Instruction/Data Register selection
19 LCD_SI / TP_SI SPI data input of LCD/Touch Panel
21 TP_SO SPI data output of Touch Panel
22 RST Reset
23 LCD_SCK / TP_SCK SPI clock of LCD/Touch Panel
24 LCD_CS LCD chip selection, low active
26 TP_CS Touch Panel chip selection, low active

 

according to raspberry pi to orange pi transfrom pinout formula Reset pin for orange pi is GPIO2 and DC pin is GPIO18.

 

Output of dmesg :

Spoiler

root@orangepizero:~# modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 txbuflen=32768 rotate=270
modprobe: ERROR: could not insert 'fbtft_device': Invalid argument
root@orangepizero:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.10.11-sun8i (root@devel) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #5 SMP Mon May 1 02:56:07 CEST 2017
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Xunlong Orange Pi Zero
[    0.000000] cma: Reserved 16 MiB at 0x4ec00000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 65130
[    0.000000] free_area_init_node: node 0, pgdat c0b54600, node_mem_map ce9c0000
[    0.000000]   Normal zone: 573 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65130 pages, LIFO batch:15
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 14 pages/cpu @cfe07000 s26380 r8192 d22772 u57344
[    0.000000] pcpu-alloc: s26380 r8192 d22772 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64557
[    0.000000] Kernel command line: root=UUID=4f5d3473-9def-435f-8591-83a518b0cb35 rootwait rootfstype=ext4 console=tty1 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 loglevel=1 ubootpart=deb8ce5e-01 ubootsource=mmc   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] allocated 264616 bytes of page_ext
[    0.000000] Memory: 225004K/260520K available (6144K kernel code, 340K rwdata, 2356K rodata, 1024K init, 327K bss, 19132K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xd0000000 - 0xff800000   ( 760 MB)
                   lowmem  : 0xc0000000 - 0xcfe6a000   ( 254 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf800000 - 0xbfe00000   (   6 MB)
                     .text : 0xc0008000 - 0xc0700000   (7136 kB)
                     .init : 0xc0a00000 - 0xc0b00000   (1024 kB)
                     .data : 0xc0b00000 - 0xc0b55200   ( 341 kB)
                      .bss : 0xc0b57000 - 0xc0ba8f88   ( 328 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]     Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000011] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000027] Switching to timer-based delay loop, resolution 41ns
[    0.000375] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000986] Console: colour dummy device 80x30
[    0.001004] console [tty1] enabled
[    0.001040] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001058] pid_max: default: 32768 minimum: 301
[    0.001377] Security Framework initialized
[    0.001392] AppArmor: AppArmor disabled by boot time parameter
[    0.001477] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001488] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002762] CPU: Testing write buffer coherency: ok
[    0.003347] CPU0: update cpu_capacity 1024
[    0.003357] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003821] Setting up static identity map for 0x40100000 - 0x4010004c
[    0.005370] smp: Bringing up secondary CPUs ...
[    0.016469] CPU1: update cpu_capacity 1024
[    0.016479] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.027650] CPU2: update cpu_capacity 1024
[    0.027659] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.038814] CPU3: update cpu_capacity 1024
[    0.038824] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.038938] smp: Brought up 1 node, 4 CPUs
[    0.038951] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[    0.038958] CPU: All CPU(s) started in HYP mode.
[    0.038962] CPU: Virtualization extensions available.
[    0.040409] devtmpfs: initialized
[    0.058483] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.058991] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.059017] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.060340] xor: measuring software checksum speed
[    0.158629]    arm4regs  :   601.600 MB/sec
[    0.258723]    8regs     :   349.200 MB/sec
[    0.358824]    32regs    :   375.200 MB/sec
[    0.458922]    neon      :   611.600 MB/sec
[    0.458931] xor: using function: neon (611.600 MB/sec)
[    0.459089] pinctrl core: initialized pinctrl subsystem
[    0.460855] NET: Registered protocol family 16
[    0.463160] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.487984] cpuidle: using governor ladder
[    0.518000] cpuidle: using governor menu
[    0.519597] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.519607] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.719664] raid6: int32x1  gen()    84 MB/s
[    0.889683] raid6: int32x1  xor()    64 MB/s
[    1.060241] raid6: int32x2  gen()   118 MB/s
[    1.230048] raid6: int32x2  xor()    86 MB/s
[    1.400464] raid6: int32x4  gen()   121 MB/s
[    1.570521] raid6: int32x4  xor()    88 MB/s
[    1.740726] raid6: int32x8  gen()   117 MB/s
[    1.910933] raid6: int32x8  xor()    81 MB/s
[    2.081062] raid6: neonx1   gen()   230 MB/s
[    2.251385] raid6: neonx1   xor()   166 MB/s
[    2.421459] raid6: neonx2   gen()   307 MB/s
[    2.591742] raid6: neonx2   xor()   224 MB/s
[    2.761936] raid6: neonx4   gen()   374 MB/s
[    2.932112] raid6: neonx4   xor()   248 MB/s
[    3.102420] raid6: neonx8   gen()   326 MB/s
[    3.272555] raid6: neonx8   xor()   224 MB/s
[    3.272562] raid6: using algorithm neonx4 gen() 374 MB/s
[    3.272567] raid6: .... xor() 248 MB/s, rmw enabled
[    3.272573] raid6: using intx1 recovery algorithm
[    3.272959] reg-fixed-voltage usb0-vbus: could not find pctldev for node /soc/pinctrl@01f02c00/usb0_vbus_pin@0, deferring probe
[    3.274358] gpio-regulator gpio-regulator: could not find pctldev for node /soc/pinctrl@01f02c00/regulator_pins@0, deferring probe
[    3.275129] SCSI subsystem initialized
[    3.275478] libata version 3.00 loaded.
[    3.275924] usbcore: registered new interface driver usbfs
[    3.276022] usbcore: registered new interface driver hub
[    3.276155] usbcore: registered new device driver usb
[    3.276482] media: Linux media interface: v0.10
[    3.276557] Linux video capture interface: v2.00
[    3.276685] pps_core: LinuxPPS API ver. 1 registered
[    3.276693] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    3.276725] PTP clock support registered
[    3.277363] Advanced Linux Sound Architecture Driver Initialized.
[    3.279423] clocksource: Switched to clocksource arch_sys_counter
[    3.279673] VFS: Disk quotas dquot_6.6.0
[    3.279778] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.280930] simple-framebuffer 4fe79000.framebuffer: framebuffer at 0x4fe79000, 0x178e00 bytes, mapped to 0xd0080000
[    3.280947] simple-framebuffer 4fe79000.framebuffer: format=x8r8g8b8, mode=656x536x32, linelength=2880
[    3.295086] Console: switching to colour frame buffer device 82x33
[    3.308242] simple-framebuffer 4fe79000.framebuffer: fb0: simplefb registered!
[    3.324538] NET: Registered protocol family 2
[    3.325598] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    3.325656] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    3.325721] TCP: Hash tables configured (established 2048 bind 2048)
[    3.325807] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    3.325866] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    3.326178] NET: Registered protocol family 1
[    3.326839] RPC: Registered named UNIX socket transport module.
[    3.326848] RPC: Registered udp transport module.
[    3.326853] RPC: Registered tcp transport module.
[    3.326859] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.327262] Trying to unpack rootfs image as initramfs...
[    3.927829] Freeing initrd memory: 4964K
[    3.931003] audit: initializing netlink subsys (disabled)
[    3.931760] Initialise system trusted keyrings
[    3.932244] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    3.948376] zbud: loaded
[    3.955248] NFS: Registering the id_resolver key type
[    3.955286] Key type id_resolver registered
[    3.955292] Key type id_legacy registered
[    3.955312] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.955319] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    3.957695] JFS: nTxBlock = 1924, nTxLock = 15397
[    3.962269] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    3.976431] Key type asymmetric registered
[    3.976913] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    3.977163] io scheduler noop registered
[    3.977171] io scheduler deadline registered
[    3.977861] io scheduler cfq registered (default)
[    3.979827] sun4i-usb-phy 1c19400.phy: could not find pctldev for node /soc/pinctrl@01c20800/usb0_id_detect_pin@0, deferring probe
[    3.987687] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    3.991084] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[    4.102868] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    4.107795] console [ttyS0] disabled
[    4.128061] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 37, base_baud = 1500000) is a U6_16550A
[    4.128131] console [ttyS0] enabled
[    4.135652] brd: module loaded
[    4.147920] loop: module loaded
[    4.151788] m25p80 spi0.0: mx25l1606e (2048 Kbytes)
[    4.160105] 3 ofpart partitions found on MTD device spi0.0
[    4.160117] Creating 3 MTD partitions on "spi0.0":
[    4.160141] 0x000000000000-0x000000100000 : "uboot"
[    4.162592] 0x000000100000-0x000000200000 : "env"
[    4.164530] 0x000000200000-0x000000400000 : "data"
[    4.164540] mtd: partition "data" is out of reach -- disabled
[    4.167321] libphy: Fixed MDIO Bus: probed
[    4.169969] usbcore: registered new interface driver catc
[    4.170052] usbcore: registered new interface driver kaweth
[    4.170060] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    4.170142] usbcore: registered new interface driver pegasus
[    4.170234] usbcore: registered new interface driver rtl8150
[    4.170341] usbcore: registered new interface driver r8152
[    4.170420] usbcore: registered new interface driver lan78xx
[    4.170524] usbcore: registered new interface driver asix
[    4.170605] usbcore: registered new interface driver ax88179_178a
[    4.170683] usbcore: registered new interface driver cdc_ether
[    4.170764] usbcore: registered new interface driver cdc_eem
[    4.170855] usbcore: registered new interface driver dm9601
[    4.170935] usbcore: registered new interface driver sr9700
[    4.171043] usbcore: registered new interface driver CoreChips
[    4.171155] usbcore: registered new interface driver smsc75xx
[    4.171264] usbcore: registered new interface driver smsc95xx
[    4.171344] usbcore: registered new interface driver gl620a
[    4.171423] usbcore: registered new interface driver net1080
[    4.171515] usbcore: registered new interface driver plusb
[    4.171598] usbcore: registered new interface driver rndis_host
[    4.171679] usbcore: registered new interface driver cdc_subset
[    4.171761] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    4.171881] usbcore: registered new interface driver cdc_ncm
[    4.171964] usbcore: registered new interface driver huawei_cdc_ncm
[    4.172045] usbcore: registered new interface driver cdc_mbim
[    4.172059] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.172066] ehci-platform: EHCI generic platform driver
[    4.172558] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.172588] ohci-platform: OHCI generic platform driver
[    4.173085] usbcore: registered new interface driver cdc_wdm
[    4.173204] usbcore: registered new interface driver usb-storage
[    4.174580] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0
[    4.174593] sun6i-rtc 1f00000.rtc: RTC enabled
[    4.174694] i2c /dev entries driver
[    4.176700] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    4.179312] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    4.249477] sunxi-mmc 1c0f000.mmc: base:0xd03e9000 irq:24
[    4.251614] ledtrig-cpu: registered to indicate activity on CPUs
[    4.251764] hidraw: raw HID events driver (C) Jiri Kosina
[    4.252019] usbcore: registered new interface driver usbhid
[    4.252025] usbhid: USB HID core driver
[    4.252884] Initializing XFRM netlink socket
[    4.254422] NET: Registered protocol family 10
[    4.286139] Segment Routing with IPv6
[    4.286286] NET: Registered protocol family 17
[    4.286347] NET: Registered protocol family 15
[    4.286435] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.286531] 8021q: 802.1Q VLAN Support v1.8
[    4.286605] Key type dns_resolver registered
[    4.287346] Registering SWP/SWPB emulation handler
[    4.288484] registered taskstats version 1
[    4.288492] Loading compiled-in X.509 certificates
[    4.288615] zswap: loaded using pool lzo/zbud
[    4.291041] Btrfs loaded, crc32c=crc32c-generic
[    4.297009] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.299089] mmc0: new high speed SDXC card at address 0007
[    4.300579] mmcblk0: mmc0:0007 SD64G 58.2 GiB
[    4.302588]  mmcblk0: p1
[    4.306651] Key type encrypted registered
[    4.318979] ehci-platform 1c1a000.usb: EHCI Host Controller
[    4.319036] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    4.319559] ehci-platform 1c1a000.usb: irq 27, io mem 0x01c1a000
[    4.349516] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    4.349903] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    4.349917] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.349928] usb usb1: Product: EHCI Host Controller
[    4.349939] usb usb1: Manufacturer: Linux 4.10.11-sun8i ehci_hcd
[    4.349948] usb usb1: SerialNumber: 1c1a000.usb
[    4.351209] hub 1-0:1.0: USB hub found
[    4.351282] hub 1-0:1.0: 1 port detected
[    4.352492] ehci-platform 1c1b000.usb: EHCI Host Controller
[    4.352537] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 2
[    4.352842] ehci-platform 1c1b000.usb: irq 29, io mem 0x01c1b000
[    4.379455] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[    4.379850] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    4.379865] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.379875] usb usb2: Product: EHCI Host Controller
[    4.379886] usb usb2: Manufacturer: Linux 4.10.11-sun8i ehci_hcd
[    4.379896] usb usb2: SerialNumber: 1c1b000.usb
[    4.380993] hub 2-0:1.0: USB hub found
[    4.381057] hub 2-0:1.0: 1 port detected
[    5.449598] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    5.449649] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 3
[    5.449877] ohci-platform 1c1a400.usb: irq 28, io mem 0x01c1a400
[    5.523796] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[    5.523811] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.523822] usb usb3: Product: Generic Platform OHCI controller
[    5.523832] usb usb3: Manufacturer: Linux 4.10.11-sun8i ohci_hcd
[    5.523842] usb usb3: SerialNumber: 1c1a400.usb
[    5.524963] hub 3-0:1.0: USB hub found
[    5.525050] hub 3-0:1.0: 1 port detected
[    5.526184] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[    5.526225] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[    5.526432] ohci-platform 1c1b400.usb: irq 30, io mem 0x01c1b400
[    5.593770] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[    5.593785] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.593795] usb usb4: Product: Generic Platform OHCI controller
[    5.593806] usb usb4: Manufacturer: Linux 4.10.11-sun8i ohci_hcd
[    5.593816] usb usb4: SerialNumber: 1c1b400.usb
[    5.594930] hub 4-0:1.0: USB hub found
[    5.594995] hub 4-0:1.0: 1 port detected
[    5.596245] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    5.596842] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    5.596860] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5
[    5.597265] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[    5.597279] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.597290] usb usb5: Product: MUSB HDRC host driver
[    5.597301] usb usb5: Manufacturer: Linux 4.10.11-sun8i musb-hcd
[    5.597311] usb usb5: SerialNumber: musb-hdrc.1.auto
[    5.598261] hub 5-0:1.0: USB hub found
[    5.598338] hub 5-0:1.0: 1 port detected
[    5.631364] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[    5.849454] sunxi-mmc 1c10000.mmc: base:0xd0454000 irq:25
[    5.849912] of_cfs_init
[    5.850069] of_cfs_init: OK
[    5.850257] vcc3v0: disabling
[    5.850267] vcc5v0: disabling
[    5.850279] ALSA device list:
[    5.850283]   No soundcards found.
[    5.853539] Freeing unused kernel memory: 1024K
[    5.866549] mmc1: new high speed SDIO card at address 0001
[    5.974046] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    5.975053] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    5.983155] random: udevadm: uninitialized urandom read (16 bytes read)
[    5.986174] random: udevadm: uninitialized urandom read (16 bytes read)
[    5.986904] random: udevadm: uninitialized urandom read (16 bytes read)
[    5.987664] random: udevadm: uninitialized urandom read (16 bytes read)
[    5.988430] random: udevadm: uninitialized urandom read (16 bytes read)
[    5.989146] random: udevadm: uninitialized urandom read (16 bytes read)
[    5.990015] random: udevadm: uninitialized urandom read (16 bytes read)
[    5.990931] random: udevadm: uninitialized urandom read (16 bytes read)
[    7.378287] random: fast init done
[    7.433685] random: crng init done
[    8.006037] EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null)
[    8.491369] systemd[1]: System time before build time, advancing clock.
[    8.526254] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[    8.527233] systemd[1]: Detected architecture arm.
[    8.570578] systemd[1]: Set hostname to <orangepizero>.
[    9.088947] systemd[1]: Reached target Encrypted Volumes.
[    9.119743] systemd[1]: Reached target Swap.
[    9.149635] systemd[1]: Reached target Remote File Systems (Pre).
[    9.180011] systemd[1]: Listening on Journal Socket (/dev/log).
[    9.210457] systemd[1]: Created slice User and Session Slice.
[    9.239866] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    9.269980] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    9.781622] g_serial gadget: Gadget Serial v2.4
[    9.781636] g_serial gadget: g_serial ready
[    9.916407] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=remount-ro
[   11.660670] input: r_gpio_keys as /devices/platform/r_gpio_keys/input/input0
[   11.831125] thermal thermal_zone0: failed to read out thermal zone (-16)
[   12.590497] xradio_wlan mmc1:0001:1: missed interrupt
[   12.593934] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   13.384648] systemd-journald[382]: Received request to flush runtime journal from PID 1
[   13.547021] libphy: 1c30000.ethernet: probed
[   13.650242] Generic PHY 1c30000.ethernet:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1c30000.ethernet:01, irq=-1)
[   13.650297] sun8i-emac 1c30000.ethernet: device MAC address slot 0 02:42:eb:21:61:f1
[   13.651564] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.770262] sun8i-emac 1c30000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off
[   15.770349] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   20.132398] EXT4-fs (mmcblk0p1): resizing filesystem from 370432 to 14961968 blocks
[   30.810728] EXT4-fs (mmcblk0p1): resized to 8388608 blocks
[   32.612990] EXT4-fs (mmcblk0p1): resized filesystem to 14961968
[   60.734914] systemd[1]: apt-daily.timer: Adding 7h 57min 32.364837s random time.
[   61.438377] systemd[1]: apt-daily.timer: Adding 4h 18min 58.318312s random time.
[   61.938059] systemd[1]: apt-daily.timer: Adding 6h 53min 13.594719s random time.
[   71.016993] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   71.018096] ieee80211 phy0: Interface ID:0 of type:2 added
[   71.019116] ieee80211 phy0: configuring tx for vif 0
[   71.020061] ieee80211 phy0: configuring tx for vif 0
[   71.020813] ieee80211 phy0: configuring tx for vif 0
[   71.021574] ieee80211 phy0: configuring tx for vif 0
[   71.022338] ieee80211 phy0: ignore IEEE80211_CONF_CHANGE_MONITOR (1)IEEE80211_CONF_CHANGE_IDLE (1)
[   71.022627] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   71.746974] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  104.023397] systemd[1]: apt-daily.timer: Adding 3h 4min 13.210275s random time.
[  105.410015] systemd[1]: apt-daily.timer: Adding 6h 10min 563.997ms random time.
[  106.313143] Adding 131068k swap on /var/swap.  Priority:-1 extents:2 across:172028k SSFS
[  107.899846] systemd[1]: apt-daily.timer: Adding 11h 37min 5.798282s random time.
[  109.498336] systemd[1]: apt-daily.timer: Adding 9h 3min 3.976426s random time.
[  110.649740] systemd[1]: apt-daily.timer: Adding 9h 31min 48.252825s random time.
[  308.268459] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[  308.281149] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  308.284168] m25p80 spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[  308.284388] fbtft_device: spi_busnum_to_master(1) returned NULL
[  308.291574] fbtft_device: failed to register SPI device
[  418.056146] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  418.058972] m25p80 spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[  418.059177] fbtft_device: spi_busnum_to_master(1) returned NULL
[  418.066383] fbtft_device: failed to register SPI device
root@orangepizero:~#

 

armbianEnv.txt  contents :

verbosity=1
logo=disabled
console=both
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
rootdev=UUID=4f5d3473-9def-435f-8591-83a518b0cb35
rootfstype=ext4
extraargs="fbcon=map:8"
extraargs="fbcon=rotate:2"

 

the only doubt I have is contents of /lib/modules/4.10.11-sun8i/kernel/drivers/video/fbdev/core/ which is different from 3.4.113 kernel. in mainline I only have : fb_sys_fops.ko  syscopyarea.ko  sysfillrect.ko  sysimgblt.ko.  but in 3.4.113I have a fbtft directory which has kernel files for every lcd type like :

fb_bd663474.ko  fb_ili9325.ko  fb_ra8875.ko   fb_ssd1331.ko    fb_tinylcd.ko
fb_hx8340bn.ko  fb_ili9340.ko  fb_s6d02a1.ko  fb_ssd1351.ko    fb_tls8204.ko
fb_hx8347d.ko   fb_ili9341.ko  fb_s6d1121.ko  fb_st7735r.ko    fb_upd161704.ko
fb_hx8353d.ko   fb_ili9486.ko  fb_ssd1289.ko  fbtft_device.ko  fb_watterott.ko
fb_ili9320.ko   fb_pcd8544.ko  fb_ssd1306.ko  fbtft.ko         flexfb.ko

 

Can you please check your /lib/modules/4.10.11-sun8i/kernel/drivers/video/fbdev/core/ directory and tell me if yours have different contents.

Thanks.

 

Posted

@A-P if you connect the screen to the PIZero as a Hat it sure SPI1 as SPI pins are those of this interface.  SP1 CS=0. Also DC, RST/DC seems correctly mapped.

 

The relevant part of the dmsg is this:

[  308.268459] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[  308.281149] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  308.284168] m25p80 spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[  308.284388] fbtft_device: spi_busnum_to_master(1) returned NULL
[  308.291574] fbtft_device: failed to register SPI device
[  418.056146] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  418.058972] m25p80 spi0.0: spi-nor spi0.0 10000kHz 8 bits mode=0x00
[  418.059177] fbtft_device: spi_busnum_to_master(1) returned NULL
[  418.066383] fbtft_device: failed to register SPI device

it seems the spi_busnum=1 is not activated / registered as present. This, in principle, could be accomplished by inserting this in the armbianEnv.txt

overlays=spi-spidev
param_spidev_spi_bus=1

As regards current location of drivers mine are here:

root@orangepizero:~# ls /lib/modules/4.11.5-sun8i/kernel/drivers/staging/fbtft/

fb_agm1264k-fl.ko  fb_hx8347d.ko  fb_ili9163.ko  fb_ili9340.ko fb_ili9486.ko  fb_s6d02a1.ko  fb_ssd1306.ko  fb_st7735r.ko  fb_tls8204.ko  fb_upd161704.ko  fbtft_device.ko

fb_bd663474.ko   fb_hx8353d.ko  fb_ili9320.ko  fb_ili9341.ko fb_pcd8544.ko  fb_s6d1121.ko  fb_ssd1331.ko  fb_st7789v.ko  fb_uc1611.ko   fb_watterott.ko  flexfb.ko

fb_hx8340bn.ko   fb_hx8357d.ko  fb_ili9325.ko  fb_ili9481.ko fb_ra8875.ko   fb_ssd1289.ko  fb_ssd1351.ko  fb_tinylcd.ko  fb_uc1701.ko   fbtft.ko

 

But I'm using 4.11 kernel version. It should not be relevant if the module system is propperly configured.

 

Hope It can be useful

 

 

 

 

 

 

Posted
16 minutes ago, ldiaz said:

But I'm using 4.11 kernel version. It should not be relevant if the module system is propperly configured.

Older kernel may not have required overlays for SPI activation and older image may not have the latest boot script installed.

Posted

I used different hardware, including a brand new opi zero that looks to have spi flash but it behaves the same;  Briefly, using a mainline image, apt-get update/install, and install python-pygame.  After modprobe using bus 0 the backlight on the display lights up, but nothing I do after that shows up on the display.. It remains white. My goal is to get pygame to display (I don't want to X windows), and I'm not interested in input at this time.  I only want to display information.

 

I've tried to add the overlay information as suggested to armbianEnv in /boot, tried busnum 1 (error) as well as 0 (creates /dev/fb0), and tried con2fbmap.  When using legacy pygame scripts work.  I'll retry the suggestions made by @ldiaz  to be sure I haven't overlooked anything.  Hopefully I'll find a step I overlooked and it'll start working.

Posted

Thank you @ldiaz, By adding overlays=spi-spidevparam_spidev_spi_bus=1 it worked .

Now can you please tell me a step-by-step guide how to enable touch  ? touch screen chip is xpt2046 and pinout is like the one I sent you before.

Again thanks for your time.

Posted

I thank you too @ldiaz.  Like @a-p I added overlays=spi-spidevparam_spidev_spi_bus=1 to armbianEnv and when I modprobe (using busnum=1 l like you said ) I got a console window on my display.  Progress! 

 

I appreciate your sticking with us on this.  I was about to give up. 

Posted

This is not directly relevant, but I wanted mention something as a follow up.  My immediate goal is to use the display as output (no input needed).  When I tried running my pygame programs I got the following message and my pygame programs would not run.

 

pygame.error: Unable to open mouse

 

Since I don't care about a mouse [at this time] I added a line after the device identifier and it seems to be working:

os.putenv('SDL_FBDEV','/dev/fb0')
os.putenv('SDL_MOUSEDEV', '/dev/null')   # workaround for unable to open mouse error

pygame.init()

 

If this is really dumb, please let me know.  For now, I'm back to being a kid in a candy shop.

Posted

I want to start by saying how much I appreciate the efforts of @glow, @ldiaz, and @A-P on this topic. Thanks to you, I have been able to get a Waveshare Spotpear 3.5(A) Touchscreen working with Legacy on both the Orange Pi Zero and the Orange Pi Zero Plus 2.

 

The Waveshare Screen has the identical pin outs and uses the same driver (ili_9486) as the screen used by @A-P, and his settings, supplemented by @ldiaz's additions to armbianEnv.txt regarding SPI Bus Number 1, worked for my screen as well. The only difference was in armbianEnv.txt, I had to use extraargs="fbcon=0". I don't know what controls the creation of the framebuffers in /dev, but I only had fb0.

 

Next, I will try to get the touch functionality working. My screen uses the same drivers as the one used by @ldiaz; earlier you attached the file you used to activate touch (touch.dt); my question is, where does this file go?

 

Finally, I apologize for asking this question, but on the LCD, I get a tty login screen, the same as I get using SSH. I can't open a desktop environment from this console (startx says command not found). Can someone explain what I have to do to have the LCD open to a desktop environment. I have xfce and lightdm already installed.

 

Thanks very much!

Posted

Hi,

   @glow I have not test any pygame in the zero as I use kivy that requires X windows for working on armbian so here I can't be very useful.

   

   As @A-P is interested in make also touch working a was able also to do it in the past with a Orange Pi Zero with XPT2046. This are the steps.

 

  1. You need to be sure that you have the module module for ADS7846 available in your build. If I remenber well its installed by default.
  2.  Add to your armbianEnv.txt another std overaly it is call spi-add-cs1. This will add an adtional line for CS of the toch screen in the pin 26 that is what is compatible with your screen (TP_CS).
  3. Need to compile the dts I provided but for your screen you nee to change "PA7" to "PA1" in the ads7846_pins section of the file. The compilation is done with a DTC compiler (I think is installed by default). this way:
./dtc -@ -I dts -O dtb -o /boot/overlay-user/ads7846-touch.dtbo touch.dts

# it will show some warnings. if dct is not available you can get an complie it by:
#git clone -b dt-overlays8 https://github.com/pantoniou/dtc
#sudo apt-get install -y flex bison
#cd dtc
#make
  1. Finally you need to add to you armbianEnv.txt this line: user_overlays= ads7846-touch
  2. Reboot.
  3. The dts has the possibility to tweak parameters for sensibility, dimension,etc.... This version is the default ported from raspberry Pi.

  Thats it!

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines