Jump to content

Pine A64 MIPI DSI mainline


Learnincurve

Recommended Posts

Really great news that somebody is working on this!

 

Thank you so much!

 

I see that there are also new nightly builds for the Pine64, now with kernel 5.4.2 and that Jagan's patches are still maturing slowly at

https://lore.kernel.org/patchwork/project/lkml/list/?submitter=21112

 

 

I'm happy to help with some simple testing if given instructions, but am unfortunately not technical enough for any code/script changes.

Please let me know if I can help.

 

BR.

 

Link to comment
Share on other sites

@karlitos Hi, haven't made any progress the last 2 weeks, am on leave for holidays and only return on the 13th Jan when I can catch up on other test's that are being done during this time by someone else. He's currently checking through other kernel builds, so will generate patches once we can comfirm we have things workings on the I2c side.

Link to comment
Share on other sites

2 minutes ago, Gavinb said:

@karlitos Hi, haven't made any progress the last 2 weeks, am on leave for holidays and only return on the 13th Jan when I can catch up on other test's that are being done during this time by someone else. He's currently checking through other kernel builds, so will generate patches once we can comfirm we have things workings on the I2c side.

Allright, have a nice holiday

Link to comment
Share on other sites

Great! Thank you so much fr your effort! I would love to try.  I assume I can try the build script from https://github.com/GavinBa/build/tree/v9-a64-dsi and should be using the https://github.com/amarula/linux-amarula/tree/v9-a64-dsi kernel ? How do I tell the script to use the kernel ? I tried to find the answer in https://docs.armbian.com/Developer-Guide_Build-Options/ but no luck 

Link to comment
Share on other sites

Hi,

 

  Great that we now have a version that supports the screen.  Many thanks for all the work!

 

  A couple of questions:

1. Looks like 5.6 mainline will contain all but HDMI Audio and MsgBox.  Are we likely to have an official build based on 5.6 shortly after that becomes available?

 

 

2. Using the vagrant build method I tried cloning first just Gavinb's v9-a64-dsi branch, but got an early error in compile.sh when trying to create the config file

Should we clone the whole repo then point build at the specific branch? If so, how do we do that?

 

BR.

 

 

 

Link to comment
Share on other sites

Quote

1. Looks like 5.6 mainline will contain all but HDMI Audio and MsgBox.  Are we likely to have an official build based on 5.6 shortly after that becomes available?

2. Using the vagrant build method I tried cloning first just Gavinb's v9-a64-dsi branch, but got an early error in compile.sh when trying to create the config file

Should we clone the whole repo then point build at the specific branch? If so, how do we do that?

 

1 - Can't say how Armbian itself will move forward, as this is a specific branch for my requirements.

2 - Haven't worked with vagrant, so can't answer. Not that this branch has, and probably will remain fallen behind Armbian master.

 

Link to comment
Share on other sites

I tried today several times to compile an image, but the script always ends with:

Image build error : Unable to locate package armbian-firmware

My setup:

  • current Virtualbox with Ubuntu 18.04. minimal image
  • cloned the https://github.com/GavinBa/build.git repository
  • ./compile.sh LIB_TAG=v9-a64-dsi
  • then selected:
  • Full OS image for flashing, Don't change the kernel configuration, Target board: pine64so, Kernel next (Mainline), Target OS: stretch Debian 9, Image with console interface

I tried to google for the above error message, but not lock so far :(

Bildschirmfoto 2020-01-29 um 16.13.12.png

Link to comment
Share on other sites

@Learnincurve You were right! I was actually able to build an image over the last weekend, since @Gavinb was so kind and responded to my personal message. I was able to boot the image on my Pine A64 LTS using a SD card, still not able to see anything on the display. Currently I am trying also to figure out how to boot from eMMC. I hope I will find time this evening to attach a serial cable and look on the booting process.

Kernel 5.6-rc1 was released two days ago, I wonder if there is possibility to try it using the armbian build-tool

Edited by karlitos
mentioning kernel 5.6-rc1
Link to comment
Share on other sites

17 minutes ago, karlitos said:

@Learnincurve You were right! I was actually able to build an image over the last weekend, since @Gavinb was so kind and responded to my personal message. I was able to boot the image on my Pine A64 LTS using a SD card, still not able to see anything on the display. Currently I am trying also to figure out how to boot from eMMC. I hope I will find time this evening to attach a serial cable and look on the booting process.

Kernel 5.6-rc1 was released two days ago, I wonder if there is possibility to try it using the armbian build-tool

 

That's good news!  Probably the instructions at https://www.armbian.com/pine64/

 

Quote

Pine64’s own LCD with touchscreen support can simply be activated in /boot/armbianEnv.txt by setting pine64_lcd=on and adding gt9xxf_ts to /etc/modules followed by a reboot.

aren't valid for the mainline mipi-dsi kernel module and you'll either have to tweak the script that reads armbianEnv.txt or  load the modules and configure x manually.  I'm guessing that that should be much more straightforward now that the standard mechanisms are in place and you can disable the allwinner-specific way of doing it with the 3.11 kernel., but someone else will need to advise you on that.

 

  I'm going to hang on now, as 5.6-rc1 is already out and it can't be long until we have a mainline image including the dsi stuff.... although it is hard to wait!

Link to comment
Share on other sites

@Gavinb Many thanks for your reply. I actually created an Image without the desktop environment since I am going to create a minimal kiosk-browser environment for OpenHab. I already created new user since the board is connected to LCD screen over HDMI. Can this be the cause ? I actually never tried to boot with unplugged HDMI :unsure: Also I added the pine64_lcd=on to armbianEnv.txt, and gt9xxf_ts to /etc/modules

Link to comment
Share on other sites

So booting from SD card and doing nand-sata-install solved my problem with the eMMC :D My Pine A64-LTS runs from an eMMC module now

 

But still no luck regarding the LCD. I did  dmesg | grep dsi and here is the output

[    8.577279] sun4i-drm display-engine: failed to bind 1ca0000.dsi (ops 0xffff000010b79400): -517
[    8.592781] sun6i-mipi-dsi 1ca0000.dsi: Couldn't register our component
[    8.609448] sun4i-drm display-engine: failed to bind 1ca0000.dsi (ops 0xffff000010b79400): -517
[    8.610876] sun6i-mipi-dsi 1ca0000.dsi: Couldn't register our component
[    8.641097] sun4i-drm display-engine: failed to bind 1ca0000.dsi (ops 0xffff000010b79400): -517
[    8.645801] sun6i-mipi-dsi 1ca0000.dsi: Couldn't register our component
[    8.660508] sun4i-drm display-engine: failed to bind 1ca0000.dsi (ops 0xffff000010b79400): -517
[    8.661052] sun6i-mipi-dsi 1ca0000.dsi: Couldn't register our component
[    8.676834] sun4i-drm display-engine: failed to bind 1ca0000.dsi (ops 0xffff000010b79400): -517
[    8.699172] sun6i-mipi-dsi 1ca0000.dsi: Couldn't register our component
[    8.738486] sun6i-mipi-dsi 1ca0000.dsi: Attached device fy07024di26a30d
[    8.743141] sun4i-drm display-engine: bound 1ca0000.dsi (ops 0xffff000010b79400)

I of course tried to boot without HDMI - no luck so far. I was also forced to comment-out the gt9xxf_ts entry in /etc/modules because there was an error message during the boot stating, that the module is not available

Link to comment
Share on other sites

Are the ribbon cables connected correctly, i.e. no misalignment etc.

 

[ 8.738486] sun6i-mipi-dsi 1ca0000.dsi: Attached device fy07024di26a30d

show's that it's attached the display unit.

 

I didn't have to add/change anything after booting up, ie no need to change armbianEnv.txt

 

Link to comment
Share on other sites

Thank you @Gavinb for your suggestion - you were right! After pulling out the board from the enclosure I realized,  on end of the the flat-ribbon LCD was connected upside down (the part on the extension PCB). But this just opened a new can of worms :(

 

After plugging everything together I inserted the DC barrel jack (original 5V 3A power supply) and then the LED goes on only for 1-2 seconds and then goes off.  The serial output always goes only so far:

U-Boot SPL 2019.04-armbian (Feb 02 2020 - 16:05:24 +0100)
DRAM: 2048 MiB
Trying to boot from MMC2
NOTICE:  BL3-1: Running on A64/H64 (1689) in SRAM A2 (@0x44000)
NOTICE:  Configuring SPC Controller
NOTICE:  BL3-1: v1.0(debug):c9f55c0
NOTICE:  BL3-1: Built : 16:05:19, Feb  2 2020
NOTICE:  DT: sun50i-a64-sopine-baseboard
INFO:    Configuring AXP PMIC
NOTICE:  PMIC: fixing DRAM voltage from 1.24

With the LCD ribbon cable unplugged the board boots normally. I am trying now to find some (Android) image to see whether it is not a LCD issue.

Link to comment
Share on other sites

It looks like the mipi-dsi patch is now in the default build script at 

https://github.com/armbian/build

 

I'm now building a standard image based on that script and will try it with the LCD screen when I get a chance.

 

@ any other windows sufferers out there, you might need to add the following block to your Vagrantfile to allow symlinks to work:

 

config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end

 

Link to comment
Share on other sites

On 3/18/2020 at 2:04 PM, anuj said:

I had tried many images till not but LCD is not working in any image. I had even tried old 3.10 image too. Any suggestions would be helpfull.

I had Pine A64-LTS,  LCD and Wi-Fi+BT module all from pine itself

Hi @anuj, I've managed to have LCD working with the "ARMBIAN 5.83 stable Ubuntu 16.04.6 LTS 3.10.107-pine64" image. Seems that's the very last image where LCD with touch (original from Pine's Kickstarter campaign) still works. I think this is the download link: https://dl.armbian.com/_old/pine64/archive/Armbian_5.83_Pine64_Ubuntu_xenial_default_3.10.107_desktop.7z

Link to comment
Share on other sites

1 hour ago, Mac_Ha said:

Hi @anuj, I've managed to have LCD working with the "ARMBIAN 5.83 stable Ubuntu 16.04.6 LTS 3.10.107-pine64" image. Seems that's the very last image where LCD with touch (original from Pine's Kickstarter campaign) still works. I think this is the download link: https://dl.armbian.com/_old/pine64/archive/Armbian_5.83_Pine64_Ubuntu_xenial_default_3.10.107_desktop.7z

@Mac_Ha Thanks for reply by I had Pine A64-LTS not Pine A64. My board is compatible with Sopine images but i had tried all 3.10 images for pine64so directory. with all images there is a blink on HDMI and then blue led starts flashing after some time white led blinks. there is nothing on lcd

Link to comment
Share on other sites

I'm still trying to get it working using the mainline images and images (mainline) built from trunk. The Teki patches seem to be applied, so I'm guessing all that is needed is a configuration of the boot environment. Trying to follow the generic allwinner instructions, adding monitor=lcd in armbian-config, adding saveenv to boot.cmd and recompiling, but sun6i_mipi_dsi is not loading and lcd monitor is black.

 

Wondering whether to start with Gavinb's build, then update to latest and greatest kernel.

 

 

 

Link to comment
Share on other sites

Built full desktop environment from Gavinb's build-9-a64-dsi branch (only downloaded that specific branch). Board boots, I added the user and rebooted, but nothing. Added monitor=lcd to end of uboot environment file using armbian-config and added saveenv to boot.cmd -> recompiled boot.scr. Still black screen and 

 

# dmesg | grep sun4i
[    2.273463] sun4i-usb-phy 1c19400.phy: failed to get clock usb0_phy
[    2.505354] sun4i-drm display-engine: bound 1100000.mixer (ops 0xffff800010bde840)
[    2.506971] sun4i-drm display-engine: bound 1200000.mixer (ops 0xffff800010bde840)
[    2.507338] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    2.507349] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xffff800010bdad40)
[    2.507555] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xffff800010bdad40)
[    2.507628] sun4i-drm display-engine: failed to bind 1ee0000.hdmi (ops 0xffff800010bddbe8): -517
[    2.507939] sun4i-drm display-engine: Couldn't bind all pipelines components
[    2.508055] sun4i-drm display-engine: master bind failed: -517
[    2.701844] sun4i-drm display-engine: bound 1100000.mixer (ops 0xffff800010bde840)
[    2.703439] sun4i-drm display-engine: bound 1200000.mixer (ops 0xffff800010bde840)
[    2.703825] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    2.703836] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xffff800010bdad40)
[    2.704033] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xffff800010bdad40)
[    2.705824] sun4i-drm display-engine: bound 1ee0000.hdmi (ops 0xffff800010bddbe8)
[    2.706137] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0

no mention of DSI.

 

  Can anyone say what I've missed?

 

BR.

Link to comment
Share on other sites

This didn't work either. I must be missing something really simple as Gavinb said this should just work out of the box.

 

One possibility is that Windwoes is still getting in my way, as even with the vagrantfile tweak, the config-default.conf symlink is not being created and I have to manually copy the example file.

Another is that after reading the developer guide I am still simply missing something that si so obvious that it is expected that all armbian builders should simply know it, and not be so stupid as to leave it out??

 

I find the generic  documentation for getting the LCD monitor working from mainline allwinner builds quite confusing:

 

First "U-Boot supports HDMI and LCD output on Allwinner sunxi SoCs, LCD output requires the CONFIG_VIDEO_LCD_MODE Kconfig value to be set."

        - Does this need to be done in the build environment config file and in addition to changes to uboot which can be made in the running system from the armbian-config utility?/boot.cmd file? 

        - from the running 3.10 (legacy) system, I see that the mode is

 

 FBDEV(0): Virtual size is 1024x600 (pitch 1024)
[     9.811] (**) FBDEV(0):  Built-in mode "current": 55.0 MHz, 35.7 kHz, 56.2 Hz
[     9.811] (II) FBDEV(0): Modeline "current"x0.0   55.00  1024 1420 1440 1540  600 612 614 635 -hsync -vsync -csync (35.7 kHz b)

Should I set this in boot.cmd like so:

setenv video-mode sunxi:1024x600@56.2,monitor=lcd ?

saveenv

 

or at compile time in config-default.conf, like:

 

CONFIG_VIDEO_LCD_MODE="x:1024,y:600  ... ??? (not sure how to set the rest of these parameters.

 

there's also a file in the config/bootenv directory called pine64-fdefault.txt , containing

 

verbosity=1
console=both
disp_mode=720p60
camera_type=none
pine64_lcd=off

 

surely that last line needs to be changed to

 

pine64_lcd=on

 

BR.

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines