[Q][GPIO/SPI] - How to configure GPIO/SPI on non-raspberrypi SBCs/boards

I’m newbie to klipper, so it might explain my inexperience.

I’m starting to use klipper on my printer.
Right now I’ve managed to install firmware on my printers mcu, and klipper itself on my x86 box and Pine H64b.
At this moment i have somewhat working condition (managed to print something) with bed mesh levelling working, but I’m struggling to set GPIO to work.

For x86 machine I’ve planned to use Rtk.GPIO for that purpose, but I’m guess that it might not provide SPI. That problem aside, it might be designed primarily to to play around with it through python libraries.

Pine H64b looks more promising to me. At least armbian build I’ve installed recognizes some GPIO devices.

Klipper documentation focuses mainly on Raspberry Pi. Since RPis at any flavour are at high demand, I’ve decided to purchase other SBC.

Can someone enlighten me and describe me briefly how klipper works with GPIO/SPI?
What is necessary to let them work?
On what stuff klipper relies on for that part?
How to know/guess pins names in klipper?

I’d like to know where to start looking for missing parts, but I want to learn some general concepts behind that.