New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pin number assignment for allwinner h616 #749
base: main
Are you sure you want to change the base?
Conversation
@twa127 since you originally added this board, do you know if something changed on the board or could it be an OS-specific thing? |
Away from home until 15th Dec, will respond when I get back. |
No worries. Thank you. 🙏 |
Any updates on this request? |
@twa127 have you had a chance to look at this? |
Very sorry for the delay in getting back to you. I am no longer using the OrangePi Zero 2 but have tested this change on my old board which is running 'Orange Pi buster with Linux 4.9.170-sun50iw9' and this proposed change does not run. The error message is as follows: Traceback (most recent call last): The existing version of pin.py does continue to work on my version of the OS. Also tried updating Blinka to the latest version, still the same result. I wonder if this user is using the OrangePi OS rather than Debian or Ubuntu and perhaps that is an issue. |
I believe that is the case. They say they have archlinux, 6.1.31 orange pi official kernel. Thanks for your input @twa127. |
Hi, I've managed to install Armbian Bookworm on my OPi Zero2 I get exactly the same results, ie. runs okay with existing version, fails with the proposed new version |
I've done a bit more testing and have installed the OPios which is based on ArchLinux. I cannot successfully install Blinka as the package manager (pacman) does not appear to work in this image and hence I cannot load the prerequisites. I would have not expected Blinka to function without perhaps some work in PlatformDetect. |
Also Thanks for testing @twa127. On my system (archlinux, 6.1.31 kernel) I was able to solve the problem by using this modification, I think it might be a difference in the underlying bsp of the kernel that is causing the problem, I'm on a business trip right now and it might take me as long as April to verify the problem. When I get back, I'll verify the issue with the official orange pi os 4.4, 5.4 and 6.1 kernels. |
Hi, Did a bit more testing and was able to get OPios installed and pacman working, installed libgpiod and pip3, used pip3 to install Blinka. As in the previous case the existing pin.py worked okay and the modified version failed. I tested using Python3 as below:
|
Thank you for your further testing, could you please provide the kernel version you are running? Could you please test this issue on 6.1 kernel? |
[root@orange-os /]# uname -r |
Using the existing pin.py
|
I installed Blinka using pip3 install --break-system-packages adafruit-blinka |
I tried your btn = digitalio.DigitalInOut(board.PC11) on both the existing and modified versions of pin.py, again worked for the existing and failed with the modified. |
The reason why I used the format 'PC11 = Pin((1, 75))' is that if you run gpiodetect it gives ie. there are 2 gpio devices on the chip, so need to distinguish between them as per the guide at https://learn.adafruit.com/adding-a-single-board-computer-to-blinka/adding-the-chip-file |
Thanks for all your reply, after I get back, I'll test it ! |
Link to #689
Modify the format of the pin parameter to fix errors bellow:
Tested on orange pi zero2, archlinux, 6.1.31 orange pi official kernel.