I should clarify. All the GPIO have both internal pull-up and pull-down resistors (approx 60kohms each). But, pins 29 and 33 are configured as pull-down by default and the rest are configured as pull-up by default. This is all internal to the S905 SOC. You can override the defaults.
Again, I’m not sure how/if this would affect your specific use case. I was just pointing out that there is this one difference with the 2 pins you are having issues with.
Lesson learned. This was crucial information, so by adding 4.7k pull-up resistors GPIOX_6 (pin 33) and GPIOX_17 (pin 29) the gpio-keys overlay started working OK for these pins as well. Apparently, the CPU stalled for continuous interruptions due to the internal pull-down resistors immediately when the overlay was enabled. Thanks again Tiki!
EDIT: @Tiki: Regarding to your comment “you can override the defaults” - do you mean that I could override this setting in the overlay somehow and then the external pull-up resistor would not be required?
What I meant is that if you are writing software that uses libgpiod you can set the bias on the GPIO pins when you configure them as inputs or outputs. You can also select whether inputs should be treated as active high or active low.
I believe you can also specify the bias for the GPIO pins in a custom overlay. But, I haven’t tried writing any overlays yet.
I am brand new to both Linux and single-board computing, so I’m hesitant to point you in the wrong direction. But, there is a post around here somewhere from LibreComputer where they linked to the source code on Github for the main device tree source (of course I can’t find it right now…). If you look through there, you will probably find some examples where they set the bias. You might also check the source code for some of the reference overlays.
Tried to merge and reboot but pull-up was not activated for some reason. Then tried to enable gpio-keys overlay for GPIOX_6 but again it stalled CPU. Should I combine the fragments in following way or how I get the pull-up working?
Well, this was an instructive case! The recompilation was indeed successful (of course there were quite a lot of warnings?), but with the help of the decompiled and edited dts file, the bias-disable property could be removed and the bias-pull-up property could be set instead after reboot. In the end, enabling the pwm_a overlay caused the respective GPIO pin to go up state and after this I was able to enable the actual gpio-keys overlay for push button events without CPU stall issues.
I have been trying to follow along with these posts, but am confused. I cannot find a /dtb/ or /amlogic/ folder on my SD card with latest Raspian OS from Libre Computer installed. They do not appear under /boot/efi/ for me. What am I missing?