GPIO on Ayufan 0.9.14 Build - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98) +--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101) +--- Thread: GPIO on Ayufan 0.9.14 Build (/showthread.php?tid=18158) |
GPIO on Ayufan 0.9.14 Build - Thisone - 04-22-2023 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? RE: GPIO on Ayufan 0.9.14 Build - diederik - 04-22-2023 (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. 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 RE: GPIO on Ayufan 0.9.14 Build - Thisone - 04-23-2023 (04-22-2023, 04:15 PM)diederik Wrote:So i just have to Flash the Debian image (https://d-i.debian.org/daily-images/arm64/daily/netboot/SD-card-images/firmware.rockpro64-rk3399.img.gz) on the eMMC, without the partition (https://d-i.debian.org/daily-images/arm64/daily/netboot/SD-card-images/partition.img.gz) to get it working? (files are from the Getting started page).(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. I can't seem to get the debian Image working on the Rockpro. What Steps do I have to take, to get it working? RE: GPIO on Ayufan 0.9.14 Build - Thisone - 04-23-2023 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. RE: GPIO on Ayufan 0.9.14 Build - diederik - 04-23-2023 (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*?So i just have to Flash the Debian image (https://d-i.debian.org/daily-images/arm64/daily/netboot/SD-card-images/firmware.rockpro64-rk3399.img.gz) on the eMMC, without the partition (https://d-i.debian.org/daily-images/arm64/daily/netboot/SD-card-images/partition.img.gz) to get it working? (files are from the Getting started page). 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). RE: GPIO on Ayufan 0.9.14 Build - Thisone - 04-23-2023 Is there anything specific i have to do during the installation, to use the Pine Touch Display as Display? RE: GPIO on Ayufan 0.9.14 Build - Thisone - 04-23-2023 Or the better question is, how do i use the Display with Debian? RE: GPIO on Ayufan 0.9.14 Build - diederik - 04-23-2023 (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" 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. |