Mainline:Broadcom Kona/Pin control (PADCTRL): Difference between revisions

No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
== Pin description ==
== Pin description ==


There are two ways in whicn pins are described in the downstream kernel (<code>arch/arm/mach-{codename}/{codename}_pinmux.c</code>): * using PIN_CFG and PIN_BSC_CFG, as seen in rhea. * using a custom <code>PIN_DESC</code> shorthand, as seen in hawaii/java; this wraps around <code>PIN_CFG</code>.
There are two ways in whicn pins are described in the downstream kernel (<code>arch/arm/mach-{codename}/{codename}_pinmux.c</code>):
 
* using PIN_CFG and PIN_BSC_CFG, as seen in rhea.
* using a custom <code>PIN_DESC</code> shorthand, as seen in hawaii/java; this wraps around <code>PIN_CFG</code>.


== Pins ==
== Pins ==
Line 21: Line 24:
== Functions ==
== Functions ==


Each pin can have 6 alternative functions. The names (and thus numbers) for these are defined separately in the downstream drivers. They cover a lot more cases than just the base pins, including things like every GPIO. (This is a fairly standard pin muxing setup.)
Each pin can have 4 (BCM28155) or 6 (BCM2166x) alternative functions. The names (and thus numbers) for these are defined separately in the downstream drivers. They cover a lot more cases than just the base pins, including things like every GPIO. (This is a fairly standard pin muxing setup.)
 
The currently selected function is saved to the '''pinsel''' register, which represents the currently selected function in 3 bits. Which bit belongs to which function is described in <code>arch/arm/mach-{codename}/{codename}_pinmux.c</code>.


The currently selected function is saved to the '''selector''' register, which represents the currently selected function in 3 bits. Which bit belongs to which function is described in <code>arch/arm/mach-{codename}/{codename}_pinmux.c</code>.
* [[/BCM21664 pins]]