I am working with the beaglebone black design and have migrated the code we have running on the 3.8 version of the kernel to 4.19. we have almost full functionality on this unit now.
My problem is that one of the pins that needs to be assinned to the pru is not being set in the device tree when working in the 4.19 version. there has been no change from the 3.8 device tree in this area which was working fine. all the other pins seem to configure ok.
I have tried to write to this pin (p9.25) from ti's omapconf tool (super handy for debug by the way, can read any register it would appear). the write fails to change the register contents.
It appears like something is blocking the pin register from being set at the kernel level.
I am trying to assign pin p.9.25 (pinmux address 0x44e109AC) to the value 0x05 which will point it to the pru register as an output
it always returns as 0x27 . this is the gpio mode as an input (presumably the default)
Please advise if more or different information is needed. I have attached the listings that seem relevant below.
Really appreciate the effort you all put in to the support here. we would not be able to function without it.
root@beaglebone:/home/iontouch# sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
eeprom:[A335BNLT00C01216BBBK0504]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-UIO-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-UART4-00A0]
kernel:[4.19.94-ti-r42]
nodejs:[v10.24.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/PP1-DCARD-TEST-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=/lib/firmware/BB-ADC-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr6=/lib/firmware/BB-UART4-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210401.0-0~buster+20210401]
pkg:[bb-wl18xx-firmware]:[1.20200813.1-0~buster+20200813]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 46.481795] remoteproc remoteproc0: wkup_m3 is available
[ 46.497624] remoteproc remoteproc0: powering up wkup_m3
[ 46.497658] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[ 46.497952] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[ 0.858395] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[ 0.862201] gpio-of-helper ocp:gpio_helper: ready
[ 0.862874] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END
U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC1
Loading Environment from EXT4... ** File not found /boot/uboot.env **
** Unable to read "/boot/uboot.env" from mmc0:1 **
U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137
CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** File not found /boot/uboot.env **
** Unable to read "/boot/uboot.env" from mmc0:1 **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: found invalid cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2203 bytes read in 24 ms (88.9 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.19.94-ti-r42 ...
10095592 bytes read in 655 ms (14.7 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb ...
loading /boot/dtbs/4.19.94-ti-r42/am335x-boneblack-uboot.dtb ...
57419 bytes read in 58 ms (965.8 KiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
650 bytes read in 114 ms (4.9 KiB/s)
uboot_overlays: loading /lib/firmware/PP1-DCARD-TEST-00A0.dtbo ...
8971 bytes read in 554 ms (15.6 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
650 bytes read in 114 ms (4.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-UART4-00A0.dtbo ...
1022 bytes read in 245 ms (3.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1584 bytes read in 861 ms (1000 Bytes/s)
uboot_overlays: uboot loading of [/lib/firmware/BB-HDMI-TDA998x-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_video=1]...
uboot_overlays: loading /lib/firmware/AM335X-PRU-UIO-00A0.dtbo ...
877 bytes read in 1140 ms (0 Bytes/s)
uboot_overlays: add [enable_uboot_cape_universal=1] to /boot/uEnv.txt to enable...
loading /boot/initrd.img-4.19.94-ti-r42 ...
7047360 bytes read in 465 ms (14.5 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:6b88c0 88000000] ...
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8f947000, end 8ffff8c0 ... OK
Loading Device Tree to 8f8d4000, end 8f946fff ... OK
Starting kernel ...
[ 0.000856] timer_probe: no matching timers found
[ 0.120339] l4_wkup_cm:clk:0010:0: failed to disable
[ 1.263038] omap_voltage_late_init: Voltage driver support not added
rootfs: clean, 86988/230144 files, 564756/920576 blocks
[FAILED] Failed to start Initialize Iontouch Hardware.
See 'systemctl status iontouch-initialize.service' for details.
[ OK ] Started Login Service.
[ OK ] Started LSB: Load kernel m…ded to enable cpufreq scaling.
Starting LSB: set CPUFreq kernel parameters...
Starting Hostname Service...
[ OK ] Started LSB: set CPUFreq kernel parameters.
[ OK ] Started Hostname Service.
[ OK ] Found device /dev/ttyS0.
[ OK ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
[ OK ] Started Helper to synchronize boot up for ifupdown.
Starting Raise network interfaces...
[ OK ] Started Raise network interfaces.
[ OK ] Reached target Network.
Starting A high performanc… and a reverse proxy server...
Starting Generic Board Startup...
Starting OpenBSD Secure Shell server...
Starting Permit User Sessions...
[ OK ] Started Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Started OpenBSD Secure Shell server.
[ OK ] Started A high performance…er and a reverse proxy server.
[ OK ] Found device /dev/ttyGS0.
[ OK ] Started Serial Getty on ttyGS0.
[ OK ] Reached target Login Prompts.
Starting dnsmasq - A light…DHCP and caching DNS server...
[ OK ] Started dnsmasq - A lightw…t DHCP and caching DNS server.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Started Generic Board Startup.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
Debian GNU/Linux 10 beaglebone ttyS0
BeagleBoard.org Debian Buster IoT Image 2020-04-06
default username:password is [debian:temppwd]
beaglebone login:
.
.
.
.
.
.
.
.
.
.
.
.