Page MenuHomeFreeBSD

Implement pinctl functionality for Raspberr Pi platform

Authored by gonzo on Jan 29 2018, 2:59 AM.



On Raspberry Pi platform GPIO controller also responsible for pins
multiplexing. Pi code predates proper FDT support in FreeBSD so a
lot of pinmux info is hardcoded. This patch:

  • Implements pinctl methods in bcm2835_gpio
  • Converts all devices with ad-hoc pinmux info to proper pin control mechanisms and adds pinmux info in FreeBSD's custom dts files.
  • Add fdt_pinctl option to RPI2 kernel

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

At first glance this looks ok, I'll review more and test on different RPI tonight.
Thank you for working on this.

Do not include GPL bindings header

Just this comment but otherwise it looks good.
Thanks for working on this

Tested-On: RPI-B
Tested-On: RPI-0 v1.2

1234 ↗(On Diff #38645)

It misses an OF_prop_free(pins) here

4 ↗(On Diff #38645)

This should be in the relevant kernel config files

  • Fix memory leak
  • Move fdt_pinctrl to relevant config files
This revision is now accepted and ready to land.Feb 1 2018, 11:17 AM
imp added inline comments.
93 ↗(On Diff #38750)

So this isn't in GENERIC? Why not?

93 ↗(On Diff #38750)

It's already in GENERIC on armv7 and arm64

I see no further issues

93 ↗(On Diff #38750)

That's what I get for grepping for fdt_pinmux :)

This revision was automatically updated to reflect the committed changes.