BBB: queries on some pins fail

235 views
Skip to first unread message

Pavel Yermolenko

unread,
Sep 15, 2020, 9:19:29 AM9/15/20
to BeagleBoard
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

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


Why ?

Sincerely,

Pavel

Robert Nelson

unread,
Sep 15, 2020, 10:18:33 AM9/15/20
to Beagle Board
On Tue, Sep 15, 2020 at 8:19 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> 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,

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



--
Robert Nelson
https://rcn-ee.com/

Pavel Yermolenko

unread,
Sep 15, 2020, 10:31:41 AM9/15/20
to BeagleBoard
Thanks !
The defaults are specified probably in one of .dts (or .dtsi) files. Which one ?
Regards.

On Tuesday, September 15, 2020 at 4:18:33 PM UTC+2, RobertCNelson wrote:

Robert Nelson

unread,
Sep 15, 2020, 10:34:39 AM9/15/20
to Beagle Board
On Tue, Sep 15, 2020 at 9:32 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> Thanks !
> The defaults are specified probably in one of .dts (or .dtsi) files. Which one ?

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,

Pavel Yermolenko

unread,
Sep 15, 2020, 10:39:47 AM9/15/20
to BeagleBoard
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.

On Tuesday, September 15, 2020 at 4:34:39 PM UTC+2, RobertCNelson wrote:

Robert Nelson

unread,
Sep 15, 2020, 10:48:06 AM9/15/20
to Beagle Board
On Tue, Sep 15, 2020 at 9:40 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> 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 ?

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.

Dennis Lee Bieber

unread,
Sep 15, 2020, 1:19:30 PM9/15/20
to Beagleboard
On Tue, 15 Sep 2020 06:19:29 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko
<py.ohayo-FOWRGO...@public.gmane.org> wrote:
>
>Request for status of some pins fails (whereas on others works):
>


Suggest you install https://github.com/mvduin/bbb-pin-utils


>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

-=-=-
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1 <================
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
-=-=-
and reboot...

debian@beaglebone:~$ sudo
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q
p9.25
P9_25 Mode: default Direction: in Value: 0
debian@beaglebone:~$ sudo
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q
p9.31
P9_31 Mode: default Direction: in Value: 0
debian@beaglebone:~$

P9.25 / audio osc 107 fast rx down 7 gpio 3.21 << lo P9_25
(pinmux_P9_25_default_pin)

P9.31 / hdmi audio clk 100 fast rx down 7 gpio 3.14 << lo P9_31
(pinmux_P9_31_default_pin)


--
Dennis L Bieber

Reply all
Reply to author
Forward
0 new messages