Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4829

Device Tree • Re: BeagleBone style GPIO pin management

$
0
0
As a concrete example, and in fact the very one that inspired all of this: Consider the 4 PWM outputs on a Raspberry Pi 5. With the existing PWM overlays, it is not trivial at all to figure out exactly what goes into config.txt for whatever combination of the 4 PWM outputs I want.

Now, in the BeagleBone Style, I just add dtoverlay=pwmchip0 (an overlay I wrote myself for a proof of concept) to config.txt to enable the PWM controller.

After the system has booted and a quick peek at the RP1 datasheet page 15, I do pinctrl set 18 a3 to enable the PWM output I want to use.

Fun fact: I wrote the original (and sometimes reviled) compiled config-pin program for the BeagleBone. Unlike the original config-pin script, which contained huge and hard to maintain tables of GPIO pin capabilities of the various BeagleBone boards, my program gathers most of the same information via introspection of files in /sys. Robert Nelson asked to import it into his code tree when he found out about it.

Statistics: Posted by pmunts — Fri Jan 26, 2024 11:47 pm



Viewing all articles
Browse latest Browse all 4829

Trending Articles