Page MenuHomeFreeBSD

arm64: rockchip: Add interface for rk_pinctrl
ClosedPublic

Authored by manu on Dec 17 2019, 11:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 19 2024, 8:03 PM
Unknown Object (File)
Jan 13 2024, 11:21 AM
Unknown Object (File)
Jan 9 2024, 10:33 AM
Unknown Object (File)
Dec 20 2023, 8:22 AM
Unknown Object (File)
Dec 15 2023, 11:03 PM
Unknown Object (File)
Dec 13 2023, 9:55 PM
Unknown Object (File)
Dec 8 2023, 12:28 AM
Unknown Object (File)
Dec 8 2023, 12:28 AM

Details

Summary

The gpio controller in rockchips SoC in a child of the pinctrl driver and cannot control
pullups and pulldowns. Add an interface for accessing pin capabilities and setting them.
We can now report that every pins is capable of being IN or OUT function and PULLUP PULLDOWN.
If the pin isn't in gpio mode no changes will be allowed.

Test Plan

Tested ok rk3328 and rk3399.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imho, some bits of this should be implemented as part of generic fdt_pinctr interface.
We should have at least
FDT_PINCTRL_IS_GPIO()
FDT_PINCTRL_SWITCH_TO__GPIO()
FDT_PINCTRL_SET_GPIO_FLAGS()
FDT_PINCTRL_GET_GPIO_FLAGS()
Major issue is how to get right reference to appropriate pinctrl instance(within gpoio driver) and how to convert pin numbers from gipo nomenclature to pinctrl nomenclature. This should be covered by "gpio-range = <>" property, but world is not ideal :(

This revision is now accepted and ready to land.Jan 8 2020, 9:11 AM

Use the new fdt_pinctrl methods.

This revision now requires review to proceed.Jan 8 2020, 7:27 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 16 2020, 9:21 PM
This revision was automatically updated to reflect the committed changes.