STRUCT TEGRA_PINGROUP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct tegra_pingroup(9) β€” kernel API manual, but make it make sense

okay so bestie, this is the page for struct tegra_pingroup from the kernel API manual (yes, the manual name is literally struct tegra_pingroup(9), we're doing this ✨). It's the little struct that describes one group of pins inside the Tegra pin controller, and honestly? It ate. Let's get into it πŸŽ€


🌸 NAME 🌸

struct tegra_pingroup β€” the Tegra pin group πŸ’–

Breaking down the doc-comment fields real quick, because they're part of the name blurb and we don't skip:

  • @name β€” the name of the pin group.
  • @pins β€” an array of pin IDs included in this pin group.
  • @npins β€” the number of entries in @pins.
  • @funcs β€” the mux functions which can be muxed onto this group.

periodt. now the actual struct πŸ‘‘

✨ SYNOPSIS ✨

struct tegra_pingroup {
    const char *name;
    const unsigned *pins;
    u8 npins;
    u8 funcs[4];
    s32 mux_reg;
    s32 pupd_reg;
    s32 tri_reg;
    s32 drv_reg;
    u32 mux_bank:2;
    u32 pupd_bank:2;
    u32 tri_bank:2;
    u32 drv_bank:2;
    s32 mux_bit:6;
    s32 pupd_bit:6;
    s32 tri_bit:6;
    s32 einput_bit:6;
    s32 odrain_bit:6;
    s32 lock_bit:6;
    s32 ioreset_bit:6;
    s32 rcv_sel_bit:6;
    s32 hsm_bit:6;
    s32 sfsel_bit:6;
    s32 schmitt_bit:6;
    s32 lpmd_bit:6;
    s32 drvdn_bit:6;
    s32 drvup_bit:6;
    s32 slwr_bit:6;
    s32 slwf_bit:6;
    s32 lpdr_bit:6;
    s32 drvtype_bit:6;
    s32 drvdn_width:6;
    s32 drvup_width:6;
    s32 slwr_width:6;
    s32 slwf_width:6;
    u32 parked_bitmask;
 };

look at all those bitfields, she's got range 😭πŸ”₯

πŸ¦‹ Members πŸ¦‹

okay, storytime for every single one of these, no skips, no cap:

  • mux_reg β€” Mux register offset. This register contains the mux, einput, odrain, lock, ioreset, rcv_sel parameters. the icon of the group fr.
  • pupd_reg β€” Pull-up/down register offset.
  • tri_reg β€” Tri-state register offset.
  • drv_reg β€” Drive fields register offset. This register contains hsm, schmitt, lpmd, drvdn, drvup, slwr, slwf, and drvtype parameters. she's carrying the whole drive squad πŸ’…
  • mux_bank β€” Mux register bank.
  • pupd_bank β€” Pull-up/down register bank.
  • tri_bank β€” Tri-state register bank.
  • drv_bank β€” Drive fields register bank.
  • mux_bit β€” Mux register bit.
  • pupd_bit β€” Pull-up/down register bit.
  • tri_bit β€” Tri-state register bit.
  • einput_bit β€” Enable-input register bit.
  • odrain_bit β€” Open-drain register bit.
  • lock_bit β€” Lock register bit.
  • ioreset_bit β€” IO reset register bit.
  • rcv_sel_bit β€” Receiver select bit.
  • hsm_bit β€” High Speed Mode register bit.
  • sfsel_bit β€” GPIO/SFIO selection register bit.
  • schmitt_bit β€” Schmitt register bit.
  • lpmd_bit β€” Low Power Mode register bit.
  • drvdn_bit β€” Drive Down register bit.
  • drvup_bit β€” Drive Up register bit.
  • slwr_bit β€” Slew Rising register bit.
  • slwf_bit β€” Slew Falling register bit.
  • lpdr_bit β€” Base driver enabling bit.
  • drvtype_bit β€” Drive type register bit.
  • drvdn_width β€” Drive Down field width.
  • drvup_width β€” Drive Up field width.
  • slwr_width β€” Slew Rising field width.
  • slwf_width β€” Slew Falling field width.
  • parked_bitmask β€” Parked register mask. 0 if unsupported. (so if you see a 0, she simply doesn't do that, don't come for her πŸ’€)

🌈 Description 🌈

okay this is the important lore, bestie, listen up 🫢

-1 in a *_reg field means that feature is unsupported for this group. *_bank and *_reg values are irrelevant when *_reg is -1. And when *_reg is valid, *_bit may be -1 to indicate an unsupported feature. so like, -1 is the universal "not my department" flag, iykyk πŸ™ˆ

Now the big picture: this struct is a representation of a group of pins (possibly just one pin β€” yes, a group of one, she's quirky like that) in the Tegra pin controller. Each group allows some parameter or parameters to be configured. The most common is mux function selection. Many others exist such as pull-up/down, tri-state, etc.

And here's the why: Tegra's pin controller is complex; certain groups may only support configuring certain parameters, hence each parameter is optional. it's giving "every group is a main character with her own boundaries" πŸ’œ

fr fr though β€” everything here is optional by design. don't assume a group can do a thing just because some other group can. vibe check the -1s first.

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/pinctrl/tegra/pinctrl-tegra.h
  • struct tegra_function(9)
  • struct tegra_pinctrl_soc_data(9)

go read those next, bestie, they're the friend group 🧚✨


and that's the whole page! πŸŽ€ this came from ./drivers/pinctrl/tegra, dated October 2026 β€” mwah, slay, drink water, and go configure some pins πŸ’–πŸ¦‹πŸ“

πŸ“¦ where this page comes from