DoubleHP

Members
  • Content Count

    41
  • Joined

  • Last visited


Reputation Activity

  1. Like
    DoubleHP got a reaction from guidol in OrangePi Zero, mainline kernel, SPI LCD + touchscreen   
    Update:
     
    I have bought
    https://www.fasttech.com/products/0/10020192/5321900-3-5-320-480-tft-lcd-display-touch-board-for
    Sold with the following specs:
    which seems to me very similar to
    https://www.amazon.fr/gp/product/B06X191RX7/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1
     
    I started with image Armbian_5.35_Orangepizero_Ubuntu_xenial_next_4.13.16.img
     
    And then, ran the following commands to get the LCD working on oPi0:

     
    aptitude dist-upgrade vim /root/myili9431.dts # see previous message reboot aptitude install linux-headers-next-sunxi armbian-add-overlay myili9431.dts reboot modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1  
    and now I have a console in portrait mode.
     
    # cat /root/myili9431.dts /* author: Adrian Brzezinski: adrb at wp.pl, adrian.brzezinski at adrb.pl */ /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target-path = "/aliases"; __overlay__ { spi1 = "/soc/spi@01c69000"; }; }; fragment@1 { target = <&spi1>; __overlay__ { status = "okay"; spidev { compatible = "spidev"; reg = <0>; spi-max-frequency = <50000000>; }; }; }; }; To get X:

     
    # Some of the following packages may be facultative. aptitude install startx xinit x11-xserver-utils xinput-calibrator xinput xserver-xorgxserver-xorg-video-all xterm x11-utils startx # gives a black console # or xinit # gives a white console  
    Mouse does not work very well. Did not try keyboard. No touchpad (I don't need it, so, no time to loose on this).
     
    Rotation of screen works, but produces crappy output.
     
    # Need reboot each time modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 rotate=90 modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 rotate=180 modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 rotate=270 # 90 and 270 produce a rectangle in landscape orientation; unusable in neither console or X. # 180 works fine. Bed time; more tries later.
     
    Some tips to make conf persistent:
    https://kaspars.net/blog/linux/spi-display-orange-pi-zero
  2. Like
    DoubleHP got a reaction from guidol in OrangePi Zero, mainline kernel, SPI LCD + touchscreen   
    In the end, what worked for me:
     
    0: my system: "ARMBIAN 5.35 user-built Debian GNU/Linux 8 (jessie) 4.13.16-sunxi" (called next)
    1: I am not going to try using the touch layer.
    2: wire things as described (with LED directly on 3.3V)
    3: aptitude install linux-headers-next-sunxi
    4: copy the content of "Configuration for the first spi bus" from initial post, except last line about EOF, into /root/myili9431.dts
    5: armbian-add-overlay myili9431.dts
    6: edit /boot/armbianEnv.txt and edit this line (some parts may be useless or overkill) overlays=usbhost2 usbhost3 spi-spidev spidev myili9431 (this appeared to be useless)
    7: reboot
    8: modprobe fbtft_device custom name=fb_ili9341 gpios=dc:3,reset:0,led:6 speed=16000000 busnum=1
    ... and immediately the LCD turned from all white, into classic console (black background with prompt at the top)
     
    Here is my dmesg:
     
    [ 166.951033] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 166.962129] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned. [ 166.967576] fbtft_device: GPIOS used by 'fb_ili9341': [ 166.967602] fbtft_device: 'dc' = GPIO3 [ 166.967627] fbtft_device: 'reset' = GPIO0 [ 166.967649] fbtft_device: 'led' = GPIO6 [ 166.967703] spi spi1.0: fb_ili9341 spi1.0 16000kHz 8 bits mode=0x00 [ 166.983929] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned. [ 167.341354] Console: switching to colour frame buffer device 30x40 [ 167.344793] graphics fb0: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB buffer memory, fps=20, spi1.0 at 16 MHz https://kaspars.net/blog/linux/spi-display-orange-pi-zero mentions rotate=90 ... could be usefull for someone
     
    9: xinit worked immediately