Pin numbering in pinmux-pins

80 views
Skip to first unread message

ith...@gmail.com

unread,
Dec 25, 2016, 5:05:05 AM12/25/16
to BeagleBoard
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
R8 MMC1_DAT2
T9 MMC1_DAT7
R9 MMC1_DAT6
T8 MMC1_DAT3
25 U7 MMC1_DAT0
20 V9 MMC1_CMD
21 U9 MMC1_CLK

saumitra kapoor

unread,
Dec 26, 2016, 12:37:38 AM12/26/16
to beagl...@googlegroups.com, ith...@gmail.com
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.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/c93f7ef8-df5f-46f7-85d7-aa90aefd7981%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ithinu

unread,
Dec 26, 2016, 1:38:05 PM12/26/16
to saumitra kapoor, BeagleBoard
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.


> ( 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

There is thus 1_28, 60, 0x78, 30 and a two-character chip pin name. How is 0x78 related to 60? Why 0x078 is "the same offset"? Comparing to what?


Ithinu

unread,
Dec 26, 2016, 1:53:42 PM12/26/16
to BeagleBoard
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.​
Reply all
Reply to author
Forward
0 new messages