Pin numbering in pinmux-pins

Hello, how are pin numbers in /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins related to any other numbering? (connectors or chip pins)

For example, there are 11 eMMC pins listed in that file:

pin 0 (44e10800.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 1 (44e10804.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 2 (44e10808.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 3 (44e1080c.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 4 (44e10810.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 5 (44e10814.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 6 (44e10818.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 7 (44e1081c.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins

pin 32 (44e10880.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins
pin 33 (44e10884.0): 481d8000.mmc (GPIO UNCLAIMED) function pinmux_emmc_pins group pinmux_emmc_pins

pin 88 (44e10960.0): 48060000.mmc (GPIO UNCLAIMED) function pinmux_mmc1_pins group pinmux_mmc1_pins

I would like to relate them to the 10 eMMC pins in the Reference Manual:

22 V8 MMC1_DAT5
23 U8 MMC1_DAT4
24 V7 MMC1_DAT1
5 R8 MMC1_DAT2
4 T9 MMC1_DAT7
3 R9 MMC1_DAT6
6 T8 MMC1_DAT3
25 U7 MMC1_DAT0
20 V9 MMC1_CMD
21 U9 MMC1_CLK

Hi,

Yes you are right. Some important points to consider for this numbering :

  • The pin number is the $PINS value and should not be confused with the GPIO.
  • Let us take an example of P8_12 ( $PINS value 12 ) in mode 0x27 ( Input Mode7 Pull Down ). Viewing this pins file helps in the corresponding readings.
  • You can see that pin 0 is allocated to eMMC. Moreover, you can query the value at the memory address. P8_12 is mapped at the memory address 44e10830.
  • “cat pingroups” will show you the registered pin groups.
    root@beaglebone:/sys/kernel/debug/pinctrl/44e10800.pinmux# cat pins |more
    registered pins: 142
    pin 0 (44e10800) 00000031 pinctrl-single
    pin 1 (44e10804) 00000031 pinctrl-single
    pin 2 (44e10808) 00000031 pinctrl-single
    pin 3 (44e1080c) 00000031 pinctrl-single
    pin 4 (44e10810) 00000031 pinctrl-single
    pin 5 (44e10814) 00000031 pinctrl-single
    pin 6 (44e10818) 00000031 pinctrl-single
    pin 7 (44e1081c) 00000031 pinctrl-single
    pin 8 (44e10820) 00000027 pinctrl-single
    pin 9 (44e10824) 00000027 pinctrl-single
    pin 10 (44e10828) 00000027 pinctrl-single
    pin 11 (44e1082c) 00000027 pinctrl-single
    pin 12 (44e10830) 00000027 pinctrl-single

The pin 12 on the P9 header ( GPIO1_28 - 1*32 + 28 ) is the GPIO60 ( not PIN60 ). If we search for the same offset (0x078) we see that pin 30 is 30 HEX ( 110000 in binary ) which relates to GPIO pin configuration settings ( mmode , puden , etc).

Hope it helps. Please correct me if I’m wrong.

Hi saumitra, thanks for your help but I still do not know how to relate the numbers in question 0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 38 to 22, 23, 24, 5, 4, 3, 6, 25, 20, 21.

Is it also that P8_12 is the 12th pin in the socket 9? It seems that there is 0x30 mentioned in the case of both.​