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)
Feb 9 2024, 12:31 AM
Unknown Object (File)
Feb 8 2024, 10:28 PM
Unknown Object (File)
Jan 19 2024, 12:40 PM
Unknown Object (File)
Jan 14 2024, 4:37 AM
Unknown Object (File)
Dec 20 2023, 1:32 AM
Unknown Object (File)
Sep 14 2023, 1:37 AM
Unknown Object (File)
Sep 11 2023, 6:30 AM
Unknown Object (File)
Sep 2 2023, 10:43 PM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 14722
Build 14843: arc lint + arc unit

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

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

So this isn't in GENERIC? Why not?

sys/arm/conf/RPI-B
93

It's already in GENERIC on armv7 and arm64

I see no further issues

sys/arm/conf/RPI-B
93

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

This revision was automatically updated to reflect the committed changes.