sppctl_func_set(9)
π sppctl_func_set(9) β or as I call it, "the glow-up for your pin routing"
Okay so bestie, welcome to the Kernel API Manual for sppctl_func_set β this is the function that literally sets the pin of a fully-pinmux function. No cap, it's giving "let me rearrange your whole vibe" energy. β¨
πΈ SYNOPSIS πΈ
void sppctl_func_set (struct sppctl_pdata *pctl , u8 func , u8 val );
π ARGUMENTS π
pctlβ honestly? undescribed. mysterious. main character energy but zero backstory. πfuncβ also undescribed. it's giving "we ran out of documentation budget" fr fr.valβ undescribed too. the trio of mystery. π
π₯ DESCRIPTION π₯
So here's the tea, bestie β the mask-fields and control-fields of a fully-pinmux function on the SP7021 are arranged like this, and yes it's giving spreadsheet realness:
func# | register | mask-field | control-field
-------+----------+--------------+--------------
0 | base[0] | (22 : 16) | ( 6 : 0)
1 | base[0] | (30 : 24) | (14 : 8)
2 | base[1] | (22 : 16) | ( 6 : 0)
3 | baeg[1] | (30 : 24) | (14 : 8)
: | : | : | :
(and yes, baeg[1] is literally what it says in the original β I'm not fixing it, that's not my job, I just report the lore π)
Now let me break it down for you because this is important:
The mask-fields? They're the bodyguards. They protect the control-fields from getting written into accidentally. So before you write a value into a control-field, you gotta set the corresponding bits in the mask-field first. Like, knock on the door before you walk in, y'know? πͺβ¨
The control-fields? They're the ones actually deciding where the function pin is going to be routed. They're the GPS. The vibe director. The "where are we going bestie" of the whole operation. πΊοΈ
β οΈ And here's the lowkey crucial part: mask-fields and control-fields of even number of'func'are located at bits(22:16)and(6:0)β while odd number of'func's are located at bits(30:24)and(14:8). So likeβ¦ even functions get the low bits, odd functions get the high bits. Don't mix them up or it's gonna be a whole mess. π
π¦ SEE ALSO π¦
Kernel file ./drivers/pinctrl/sunplus/sppctl.c β and the whole friend group of related functions:
They're all part of the same pinctrl sunplus squad, iykyk. π
And that's the whole manual page bestie β every bit, every flag, every mask-field accounted for. Shoutout to ./drivers/pinctrl/sunplus for being the source of truth, and to October 2026 for the date stamp β this page said "I'm from the future" and meant it. π«Ά
slay. periodt. go route those pins. π β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms