GPIO on Ayufan 0.9.14 Build
#1
Hello

I'm trying to use the GPIOs on the Ayufan Ubuntu Build (bionic-mate-rockpro64-0.9.14-1159-armhf), but can't seem to get it working.
Apperently the libgpiod uses /dev/Gpiochip0, which is not on this version.

Problem is, that i have to use a Desktop Image, which supports the Pine Touchdisplay, for the Rest of the Program, and i can't seem to get the other Versions (like focal-mate-rockpro64-0.10.12-1184-armhf) running. 

So is there a way to use the GPIO pins on the 0.9.14 Version?
  Reply
#2
(04-22-2023, 11:16 AM)Thisone Wrote: I'm trying to use the GPIOs on the Ayufan Ubuntu Build (bionic-mate-rockpro64-0.9.14-1159-armhf), but can't seem to get it working.
Apperently the libgpiod uses /dev/Gpiochip0, which is not on this version.

Problem is, that i have to use a Desktop Image, which supports the Pine Touchdisplay, for the Rest of the Program, and i can't seem to get the other Versions (like focal-mate-rockpro64-0.10.12-1184-armhf) running. 

So is there a way to use the GPIO pins on the 0.9.14 Version?

Debian kernel 6.1.20-2 (and later) support the Pine Touchdisplay, so if you install Debian Bookworm, it should all work*?
I think you're needlessly limiting yourself by only looking at Ayufan's images ... which also seem (a bit) dated.

*) don't use guided partition with using the whole disk (option 2 iirc) as that would create an unbootable system (as 1st partition starts at 1MB, overwriting u-boot). This is a bug in d-i
  Reply
#3
(04-22-2023, 04:15 PM)diederik Wrote:
(04-22-2023, 11:16 AM)Thisone Wrote: I'm trying to use the GPIOs on the Ayufan Ubuntu Build (bionic-mate-rockpro64-0.9.14-1159-armhf), but can't seem to get it working.
Apperently the libgpiod uses /dev/Gpiochip0, which is not on this version.

Problem is, that i have to use a Desktop Image, which supports the Pine Touchdisplay, for the Rest of the Program, and i can't seem to get the other Versions (like focal-mate-rockpro64-0.10.12-1184-armhf) running. 

So is there a way to use the GPIO pins on the 0.9.14 Version?

Debian kernel 6.1.20-2 (and later) support the Pine Touchdisplay, so if you install Debian Bookworm, it should all work*?
I think you're needlessly limiting yourself by only looking at Ayufan's images ... which also seem (a bit) dated.

*) don't use guided partition with using the whole disk (option 2 iirc) as that would create an unbootable system (as 1st partition starts at 1MB, overwriting u-boot). This is a bug in d-i
So i just have to Flash the Debian image (https://d-i.debian.org/daily-images/arm6...399.img.gz) on the eMMC, without the partition (https://d-i.debian.org/daily-images/arm6...ion.img.gz) to get it working? (files are from the Getting started page).

I can't seem to get the debian Image working on the Rockpro. What Steps do I have to take, to get it working?
  Reply
#4
It would be nice to have a good Step by Step forum Thread, (seperatly from this one) that explains how to Install the Image on a RockPro, i often find Posts, that explain a bit, but i honestly do not understand, since I'm a beginner, and never really did that stuff. The Ayufan  0.9.14 image was pretty easy to Install, get the image, flash it on the eMMC and it basiclly works, i often Read something with a U-Boot, which i don't even know how to use.
  Reply
#5
(04-23-2023, 06:06 AM)Thisone Wrote:
(04-22-2023, 04:15 PM)diederik Wrote: Debian kernel 6.1.20-2 (and later) support the Pine Touchdisplay, so if you install Debian Bookworm, it should all work*?
I think you're needlessly limiting yourself by only looking at Ayufan's images ... which also seem (a bit) dated.

*) don't use guided partition with using the whole disk (option 2 iirc) as that would create an unbootable system (as 1st partition starts at 1MB, overwriting u-boot). This is a bug in d-i
So i just have to Flash the Debian image (https://d-i.debian.org/daily-images/arm6...399.img.gz) on the eMMC, without the partition (https://d-i.debian.org/daily-images/arm6...ion.img.gz) to get it working? (files are from the Getting started page).

I can't seem to get the debian Image working on the Rockpro. What Steps do I have to take, to get it working?

As the README.concatenateable_images file describes, you need both and you need to zcat them together to create an installer image and you put that on the eMMC. That should start the (normal) Debian Installer with which you can install Debian.

You could try it with the dailies, but maybe Debian Installer Bookworm RC1 is a better choice (which you can also try if the daily fails).
  Reply
#6
Is there anything specific i have to do during the installation, to use the Pine Touch Display as Display?
  Reply
#7
Or the better question is, how do i use the Display with Debian?
  Reply
#8
(04-23-2023, 09:58 AM)Thisone Wrote: Is there anything specific i have to do during the installation, to use the Pine Touch Display as Display?

It certainly won't work with the RC1 installer as that doesn't have the 6.1.20-2 kernel.
The daily build should have the needed kernel module, but I recommend forgetting about running Debian Installer with the Touch Display as that looks way too complicated.
Once Debian is installed, then try to make the Touch Display work ...

(04-23-2023, 11:11 AM)Thisone Wrote: Or the better question is, how do i use the Display with Debian?

... as I just noticed something which I didn't before.
Next to the needed kernel module, you also need to have the touchscreen 'enabled' in the Device Tree (which describes the hardware).
While I had seen that that was added in the upstream kernel what I failed to notice before is the
Code:
status = "disabled"
part. To have it working you need to have 'status = "okay"', probably for various nodes.

But how to do that is a bit tricky ... at least for me as I'm just starting to learn about these things.

It's probably best to create a new/separate topic for that (or heavily modify the title of this thread).

If you install the 'device-tree-compiler' package on your system, you get f.e. the 'fdtget' and 'fdtput' (some doc) with which you can read and write (respectively) to the device tree.
While that may be useful to directly try it, I don't know if that would survive a reboot. It may be possible to 'script' it ones you've found the exact sequence of commands to do that, but it isn't the most user friendly.

Another option is to modify Device Tree source code files (which are in the Linux kernel) and then build (and deploy) the modified dtb files (from dts(i) files).
And then there's a 3rd option and that's actually the best suited: Device Tree Overlays.
But there are some issues with that as it doesn't just work with the upstream and thus Debian kernel (OOTB).

Getting started with fdtget/fdtput is possibly doable. Modifying kernel source code and building custom dtbs is likely doable for me, but there are some possible drawbacks to that solution. It could also have a rather steep learning curve, especially if you're not used to compiling from source.

I don't know enough about DTO and how to make that work, so you need to ask someone else for that.
It's probably a worthwhile topic to discuss (and answer by someone who does have the required knowledge) as this is a useful general thing which applies to all (?) devices that use Device Trees (~ all ARM devices, amongst others).


But GPIO should just work OOTB once you've installed the Debian system.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 Thisone 4 2,446 07-14-2023, 04:22 AM
Last Post: hunderteins
  Compiling ayufan mainline - DT-overlay missing Mentaluproar 0 1,713 07-24-2021, 09:46 PM
Last Post: Mentaluproar
  ayufan kernel update unbootable TheHunter 2 3,713 03-12-2021, 05:17 PM
Last Post: LMM
Question Ayufan RockPro64 updates? hemertje 3 7,039 10-22-2020, 01:16 PM
Last Post: dukla2000
  Kernel Update from 4.4 (Ayufan) on Ubuntu 20.04 db579 3 6,166 10-22-2020, 01:12 PM
Last Post: dukla2000
Thumbs Up First Manjaro Mainline build! Luke 10 18,151 10-20-2020, 04:29 AM
Last Post: vfr400racer
  Gpio indicator of drive activity possible? Mentaluproar 1 2,939 08-11-2020, 11:04 PM
Last Post: tllim
  Slow/dead ethernet on (non-Ayufan) Linux Mainline (fixed) mmatyas 1 4,085 04-17-2020, 02:53 AM
Last Post: Thra11
  New Pre-release 0.10.9 from Ayufan Bullet64 0 2,648 04-09-2020, 06:49 AM
Last Post: Bullet64
  Ayufan 5.4.0 rc1 release - cannot boot Mentaluproar 2 5,905 01-05-2020, 02:39 PM
Last Post: mmiigg

Forum Jump:


Users browsing this thread: 3 Guest(s)