SPI1 used to work.
Update/Upgraded my BBBW.
debian@beaglebone:~/pylepton$ uname -a
Linux beaglebone 4.4.88-ti-r125 #1 SMP Thu Sep 21 19:23:24 UTC 2017 armv7l GNU/Linux
Trying to use SPI1 but config-pin returns “Invalid mode: spi”
For example:
debian@beaglebone:~/pylepton$ config-pin P9.28 spi
Invalid mode: spi
debian@beaglebone:~/pylepton$ config-pin P9.29 spi
(ok)
debian@beaglebone:~/pylepton$ config-pin P9.30 spi
(ok)
debian@beaglebone:~/pylepton$ config-pin P9.31 spi
Invalid mode: spi
Even i2c pins stopped.
debian@beaglebone:~$ config-pin P9.19 i2c
P9_19 pinmux file not found!
Pin has no cape: P9_19
debian@beaglebone:~$ config-pin P9.20 i2c
P9_20 pinmux file not found!
Pin has no cape: P9_20
Hallo Davide, did you found solution? I have a same problem.
Best regards!
Hi! No, sorry. I restored an old image and I'm not upgrading. If you eventually solve this, please let me know.
I upgraded kernel/system but still I cannot config-pin.
debian@beaglebone:~$ config-pin P9.28 spi
Invalid mode: spi
debian@beaglebone:~$ config-pin P9.29 spi
debian@beaglebone:~$ config-pin P9.31 spi
Invalid mode: spi
debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[fac16ce5790a9b98fe69edd11c1e41f31685990c]
eeprom:[A335BNLTBWA51650BBWG2922]
dogtag:[BeagleBoard.org Debian Image 2017-09-21]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.09-00003-g11d92ba68a]
kernel:[4.4.91-ti-r139]
nodejs:[v6.12.2]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20171207.0-0rcnee1~stretch+20171207]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1~stretch+20170829]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
I upgraded kernel/system but still I cannot config-pin.
debian@beaglebone:~$ config-pin P9.28 spi
Invalid mode: spi
config-pin P9.28 spi_cs
debian@beaglebone:~$ config-pin P9.29 spi
debian@beaglebone:~$ config-pin P9.31 spi
Invalid mode: spi
config-pin P9.31 spi_sclk
This got changed recently, because there are pin's that have multiple
spi options aka (spi/spi_cs/spi_sclk)...
P9.42 (spi_cs/spi_sclk)
Regards,
Hi Robert,
thank you. A couple of questions:
- What about i2c then? Doesn’t need to set it with config-pin?
- Where can I keep me updated about this changes? Is there a webpage?
Hi Robert,
thank you. A couple of questions:
1) What about i2c then? Doesn't need to set it with config-pin?
Most of the i2c pins should be defaulted to i2c, but if they are not,
then config-pin i2c is needed..
2) Where can I keep me updated about this changes? Is there a webpage?
the spi pins are the only breaking change. The pocketbeagle has a lot
of pins that have multiple spi modes, in the process of fixing that
one, i discovered there was another spi mode available on P9.42
The other recent change, pin's P9_19 & P9_20 are now carved out, and
you can use config-pin to swich them from their default i2c mode to
can/etc..
Otherwise just use config-pin -l
debian@test-bbb-2:~$ config-pin -l P9.42
default gpio gpio_pu gpio_pd spi_cs spi_sclk uart pwm
Regards,
Hi Davide,
bellow is the explanation how you can configure the pins.
I worked on Debian 9.1. from 31/08/2017. Kernelversion is 4.9.45-ti-57
sudo apt update
· **sudo apt install bb-cape-overlays**
· **cd /opt/scripts/tools**
· **sudo git pull**
· **sudo ./update_kernel.sh --lts-4_4 --ti-channel**
· **git clone https://github.com/beagleboard/bb.org-overlays**
· **cd ./bb.org-overlays**
· **./install.sh**
· sudo reboot
· cd bb.org-overlays/tools/pinmux-generator
· sudo nano BeagleBone_Black_config-pin.txt
add this after line 414:
P9_19_PRU=“45”
P9_19_GPIO=“13”
P9_19_PIN=“i2c”
P9_19_PINMUX=“default gpio gpio_pu gpio_pd spi_cs can i2c pru_uart timer”
P9_19_INFO=“i2c2_scl default gpio0_13 gpio0_13 gpio0_13 spi1_cs1 dcan0_rx i2c2_scl pru_uart timer5”
P9_19_CAPE=“”
P9_20_PRU=“44”
P9_20_GPIO=“12”
P9_20_PIN=“i2c”
P9_20_PINMUX=“default gpio gpio_pu gpio_pd spi_cs can i2c pru_uart timer”
P9_20_INFO=“i2c2_sda default gpio0_12 gpio0_12 gpio0_12 spi1_cs0 dcan0_tx i2c2_sda pru_uart timer6”
P9_20_CAPE=“”
sudo nano BeagleBone_Black.dts
On my BBB Wireless only spi works. Invalid mode only comes up when I use spi_cs or spi_sclk
That's fine, you just have an older kernel/config-pin
Regards,