BBB: queries on some pins fail

Hello,

Request for status of some pins fails (whereas on others works):

debian@beaglebone:~$ config-pin -q p9.25
P9_25 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocpP9_25_pinmux/state
debian@beaglebone:~$ sudo config-pin -q p9.31
P9_31 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp
P9_31_pinmux/state

debian@beaglebone:~$ config-pin -q p9.24
P9_24 Mode: default Direction: in Value: 1
debian@beaglebone:~$

Why ?

Sincerely,

Pavel

Hello,

Request for status of some pins fails (whereas on others works):

debian@beaglebone:~$ config-pin -q p9.25
P9_25 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_25_pinmux/state
debian@beaglebone:~$ sudo config-pin -q p9.31
P9_31 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_31_pinmux/state

P9_25 and P9_31 default to hdmi audio, disable that overlay in
/boot/uEnv.txt and then config-pin will have generic access..

Regards,

Thanks !
The defaults are specified probably in one of .dts (or .dtsi) files. Which one ?
Regards.

It's lots of overlays: adc, hdmi, hdmi-audio, emmc, wireless, etc..

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

Regards,

Well, but where this default specified ?
I mean on Power On how BBB “knows” that P.9.31 is reserved for audio ?
This default meaning is specified somewhere in device tree, isn’t it ?
Regards.

For the BBB, the default image has eMMC, HDMI with Audio, and ADC enabled..

debian@bbb-pwr01-ser09:~$ sudo /opt/scripts/tools/version.sh | grep UBOOT
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-14-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0]

The main *.dts file loaded (but compiled) is:

am335x-boneblack-uboot-univ.dts

With 4 overlays:
AM335X-PRU-RPROC-4-14-TI-00A0.dtbo -> provides pru
BB-ADC-00A0.dtbo -> provides ADC
BB-BONE-eMMC1-01-00A0.dtbo -> provides eMMC
BB-HDMI-TDA998x-00A0.dtbo -> provinces HDMI with Audio..

With the out - of box image, use this to disable those overlays:

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

On the mainline kernel, am335x-boneblack.dts has all these enabled by default.

We allow users to disable them to grab the pins for other features.

Regards,

Request for status of some pins fails (whereas on others works):

  Suggest you install GitHub - mvduin/bbb-pin-utils: Pin utilities for BeagleBone Black

debian@beaglebone:~$ config-pin -q *p9.25*
P9_25 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_25_pinmux/state

P9.25 / audio osc 107 fast rx up 0 asp 0 tx hclk
mcasp@48038000 (mcasp0_pins)

debian@beaglebone:~$ sudo config-pin -q *p9.31*
P9_31 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_31_pinmux/state

P9.31 / hdmi audio clk 100 fast down 0 asp 0 tx clk
mcasp@48038000 (mcasp0_pins)

debian@beaglebone:~$ config-pin -q *p9.24*
P9_24 Mode: default Direction: in Value: 1

P9.24 97 fast rx up 7 gpio 0.15 << hi P9_24
(pinmux_P9_24_default_pin)

  You would have to disable the mcasp unit and maybe HDMI to free the
affected pins from dedicated usage and allow them to be exported -- this is
likely a device tree operation. Start with editing /boot/uEnv.txt