Pinctrl

149 views
Skip to first unread message

jennifer Dsilva

unread,
Dec 21, 2019, 4:21:31 AM12/21/19
to BeagleBoard

Hi,

There is a file in /sys/kernel/debug/pinctrl = "44e10800.pinmux" on this file there is another file called "pins". On pins all the gpio pins are written in beagle bone black.


Who created this file, TI or linux somehow takes information from CPU? A developer needs to create these?

droland

unread,
Jun 26, 2020, 3:32:02 AM6/26/20
to BeagleBoard
Hello,

I have a problem with this. I could not find pinctrl under /sys/kernel/debug. That folder is empty.
I have a custom build linux 5.4. It was built with CONFIG_DEBUG_FS option, but the folder empty....

What should I set for "pinctrl" folder?

Drew Fustini

unread,
Jun 26, 2020, 7:50:50 AM6/26/20
to Beagle Board
Those entries are created by debugfs handlers in the pinctrl subsystem:

/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinconf-groups
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinconf-pins
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-functions
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/gpio-ranges
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pingroups
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pins
/sys/kernel/debug/pinctrl/pinctrl-handles
/sys/kernel/debug/pinctrl/pinctrl-maps
/sys/kernel/debug/pinctrl/pinctrl-devices

The BeagleBone pinctrl driver is pinctrl-single implements the generic
pin_dbg_show handler with pcs_pin_dbg_show():
https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/pinctrl-single.c#L302

static const struct pinctrl_ops pcs_pinctrl_ops = {
.get_groups_count = pinctrl_generic_get_group_count,
.get_group_name = pinctrl_generic_get_group_name,
.get_group_pins = pinctrl_generic_get_group_pins,
.pin_dbg_show = pcs_pin_dbg_show,
.dt_node_to_map = pcs_dt_node_to_map,
.dt_free_map = pcs_dt_free_map,
};

The information it displays is primarily a result of the device tree
properties that the pinctrl-single drivers parses and then uses to mux
the pins appropriately.

Is there something specific that you are trying to find? Or some goal
that you are trying to accomplish?

-Drew

Drew Fustini

unread,
Jun 26, 2020, 7:53:47 AM6/26/20
to Beagle Board
Maybe you do not have debugfs mounted?

On our BeagleBoard.org Debian images, we have it mounted:

debian@beaglebone:~$ mount |grep debugfs
debugfs on /sys/kernel/debug type debugfs (rw,relatime,gid=999,mode=755)

debian@beaglebone:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Auto generated by RootStock-NG: setup_sdcard.sh
#
/dev/mmcblk0p1 / ext4 noatime,errors=remount-ro 0 1
debugfs /sys/kernel/debug debugfs mode=755,uid=root,gid=gpio,defaults 0 0

If it is mounted and you do not see pinctrl directory, then it could
be some other issue with your kernel config. In that case, please
reply with your .config file attached.

-Drew

droland

unread,
Jun 26, 2020, 9:05:57 AM6/26/20
to BeagleBoard
Thank you for your reply.

The debugfs was not mounted....

Thank you.
Reply all
Reply to author
Forward
0 new messages