Yes, I'm starting to look around now for a way to control this.
I'm a Linux n00b, so bear with me, I'm gonna confirm below what I understand so far:
- The pins are not exposed to the system for easy manipulation
- Also, the pins addresses and stuff are not the same for each hardware model
- It would pollute the environment if they were set up automatically because not used most of the time
The way to do this is by using the Device Tree. This exposes stuff. But not necessarily everything.
So if we want to expose more stuff (like our PWM pins or USB pins) we have to add these to the DT.
Except that it's not good practice, since the DT gets updated during Kernel update so the changes would be lost.
Instead we have to create an Overlay which would contains only our changes, which will get applied on top of the DT.
Now on my Nanopi Neo3, I have checked the available Overlays as some are provided.
In /boot/dtb/rockship/overlay there are some of them.
The README there describes what each of these does.
In my case (nanopi Neo3), I'm looking to control GPIO2_A6 aka PWM2 from what I can see here.
But, the readme doesn't seem to indicate any available overlay which would expose this.
This link you have given us, chwe, is for us to create our own overlay so we can expose it ourselves.
I understand that once this will be done, we can expect to hit that pin through sysfs. Like with something like /sys/class/pwm/pwmchip0.
Indeed right now I don't have pwmchip0, this folder is empty.
Am I right so far?
Yeah, didn't even think about the causes. From htop I can see the CPU freq and at idle it's about 408mhz. Upon charge, it climbs up to 1.3Ghz.
But it was with these 408mhz that we reached around 50°C idle before setting up our fans. I'm not sure tweaking the max clock speed would change much as with 408mhz it's already very hot
Can't test without the eth disabled as I don't have the debug console and do everything through SSH using eth.
I'm now curious as well as to why this is hot idling!