Page MenuHomeFreeBSD

Implement pinctl functionality for Raspberr Pi platform
ClosedPublic

Authored by gonzo on Jan 29 2018, 2:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 4:05 PM
Unknown Object (File)
Sat, Oct 26, 1:07 AM
Unknown Object (File)
Fri, Oct 25, 4:56 PM
Unknown Object (File)
Oct 5 2024, 7:09 AM
Unknown Object (File)
Oct 5 2024, 4:42 AM
Unknown Object (File)
Oct 4 2024, 8:18 PM
Unknown Object (File)
Oct 2 2024, 10:18 AM
Unknown Object (File)
Oct 1 2024, 3:01 AM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
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

sys/arm/broadcom/bcm2835/bcm2835_gpio.c
1234 ↗(On Diff #38645)

It misses an OF_prop_free(pins) here

sys/arm/broadcom/bcm2835/std.rpi
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.
sys/arm/conf/RPI-B
93 ↗(On Diff #38750)

So this isn't in GENERIC? Why not?

sys/arm/conf/RPI-B
93 ↗(On Diff #38750)

It's already in GENERIC on armv7 and arm64

I see no further issues

sys/arm/conf/RPI-B
93 ↗(On Diff #38750)

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

This revision was automatically updated to reflect the committed changes.