Beaglebone black - Debian 4.1 - PRU - prussdrv_open() failed with -1 - linux

I am running the example as root http://mythopoeic.org/BBB-PRU/pru-helloworld/example.c
and I receive the Error:
"prussdrv_open() failed with -1" during the execution
BBB has Debian 4.1
These are the commands used:
sudo cp EBB-PRU-Example‐00A0.dtbo /lib/firmware
echo EBB-PRU-Example > /sys/devices/platform/bone_capemgr/slots
cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,EBB-PRU-Example
modprobe uio_pruss
dmesg
[ 195.985512] bone_capemgr bone_capemgr: part_number 'EBB-PRU-Example', version 'N/A'
[ 195.994182] bone_capemgr bone_capemgr: slot #4: override
[ 195.999703] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 196.006752] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,EBB-PRU-Example'
[ 196.039095] pruss_uio 4a300000.pruss: No children
[ 196.057144] gpio-of-helper ocp:gpio_helper: ready
[ 196.070956] bone_capemgr bone_capemgr: slot #4: dtbo 'EBB-PRU-Example-00A0.dtbo' loaded; overlay id #0
and
/boot/uEnv.txt has disabled the HDMI
EBB-PRU-Example.dts
/* Device Tree Overlay for enabling the pins that are used in Chapter 13
* This overlay is based on the BB-PRU-01 overlay
* Written by Derek Molloy for the book "Exploring BeagleBone: Tools and
* Techniques for Building with Embedded Linux" by John Wiley & Sons, 2014
* ISBN 9781118935125. Please see the file README.md in the repository root
* directory for copyright and GNU GPLv3 license information.
*/
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
part-number = "EBB-PRU-Example";
version = "00A0";
/* This overlay uses the following resources */
exclusive-use =
"P9.11", "P9.13", "P9.27", "P9.28", "pru0";
fragment#0 {
target = <&am33xx_pinmux>;
__overlay__ {
gpio_pins: pinmux_gpio_pins { // The GPIO pins
pinctrl-single,pins = <
0x070 0x07 // P9_11 MODE7 | OUTPUT | GPIO pull-down
0x074 0x27 // P9_13 MODE7 | INPUT | GPIO pull-down
>;
};
pru_pru_pins: pinmux_pru_pru_pins { // The PRU pin modes
pinctrl-single,pins = <
0x1a4 0x05 // P9_27 pr1_pru0_pru_r30_5, MODE5 | OUTPUT | PRU
0x19c 0x26 // P9_28 pr1_pru0_pru_r31_3, MODE6 | INPUT | PRU
>;
};
};
};
fragment#1 { // Enable the PRUSS
target = <&pruss>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pru_pru_pins>;
};
};
fragment#2 { // Enable the GPIOs
target = <&ocp>;
__overlay__ {
gpio_helper {
compatible = "gpio-of-helper";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpio_pins>;
};
};
};
};

There are two pre compiled versions of the 4.1 kernel for the BBB in the repos: The "TI" version and the "Bone" version. The TI version uses a newer API for controlling the PRU and the Bone version has the same API as the 3.8 kernel and the prussdrv_open() function should work fine.
To install the 4.1 "bone" kernel, you can do:
cd /opt/scripts/tools
sudo ./update_kernel.sh --bone-rt-kernel --lts-4_1
More info: https://groups.google.com/forum/#!topic/beagleboard/cyM3f935wMA

Hmmm looks similar to a previous issue.. The problem was that the PRU was not enabled, and I quote :
echo BB-BONE-PRU-01 > /sys/devices/bone_capemgr.8/slots fixed it.

You could try to use the 4.1.5-ti-r10 version of the kernel. Apparently pruss_uio does not work for some 4.1.x kernels.
Moreover, the dts file you are using was not working for me either (don't know why). I used the following, and prussdrv_open does not fail:
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "BB-ENABLE-PRU";
/* version */
version = "00A0";
fragment#1 { // Enable the PRUSS
target = <&pruss>;
__overlay__ {
status = "okay";
};
};
};
If found all this out on that thread: https://groups.google.com/forum/#!category-topic/beagleboard/VBNEoCbEHUQ

Related

Modified Device Tree for BeagleBone Black Running Yocto Poky to Enable UART4 causing Kernel Halt

I have recently tried to take some steps into learning how to use Yocto and leverage some of the functionality provided. I have a BeagleBone Black and wanted to use this as my device to build a custom kernel using Yocto. I have been following the following tutorial series to understand the basics of yocto: https://www.youtube.com/watch?v=9vsu67uMcko&list=PLEBQazB0HUyTpoJoZecRK6PpDG31Y7RPB.
My current objective is to patch the existing device tree used by the Poky reference distribution to enable UART4, the UART port that is accessible through the BeagleBone Black through GPIO header.
I have taken a look at the am335x-boneblack.dts file and the included dtsi files and understand which files need to be modified to enable the UART4 port. In specific, I see that the am335x-bone-common.dtsi and am33xx-l4.dtsi files have pertinent snippets of information related to UART.
The patch file that I add to a new layer and apply is shown below:
diff --git a/orig/am335x-bone-common.dtsi b/altered/am335x-bone-common.dtsi
index 0ccdc7c..8a2541c 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
## -95,6 +95,14 ##
AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
>;
};
+
+ uart4_pins: pinmux_uart4_pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE6)
+ AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_OUTPUT_PULLDOWN, MUX_MODE6)
+ >;
+ };
+
clkout2_pin: pinmux_clkout2_pin {
pinctrl-single,pins = <
## -191,6 +199,13 ##
status = "okay";
};
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins>;
+
+ status = "okay";
+};
+
&usb0 {
dr_mode = "peripheral";
interrupts-extended = <&intc 18 &tps 0>;
diff --git a/orig/am33xx-l4.dtsi b/altered/am33xx-l4.dtsi
index c9629cb..637a1a7 100644
--- a/arch/arm/boot/dts/am33xx-l4.dtsi
+++ b/arch/arm/boot/dts/am33xx-l4.dtsi
## -1802,7 +1802,7 ##
clock-frequency = <48000000>;
reg = <0x0 0x1000>;
interrupts = <45>;
- status = "disabled";
+ status = "okay";
};
};
When I build my kernel, the resulting .dtb file reflects the changes, however when I try to boot off of the SD card, the beaglebone halts at
Starting kernel ...
If anyone can offer some help, I'd be greatful!
Regards
So, it would seem that the kernel doesn't really hang when enabling UART4.
For some reason, UART4 gets mapped to ttyS0 - which breaks the console output.
Setup:
Beaglebone Black - Yocto Kirkstone - Machine: beaglebone-yocto.
This is the relevant part from am335x-bone-common.dtsi:
uart0_pins: pinmux_uart0_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0) /* Debug Header - UART0_RX */
AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0) /* Debug Header - UART0_TX */
>;
};
uart1_pins: pinmux_uart1_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT_PULLUP, MUX_MODE0) /* P9-26 UART1_RX */
AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0) /* P9-24 UART1_TX */
>;
};
uart2_pins: pinmux_uart2_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT_PULLUP, MUX_MODE1) /* P9-22 UART2_RX */
AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* P9-21 UART2_TX */
>;
};
uart4_pins: pinmux_uart4_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT, MUX_MODE6) /* P9-11 UART4_RX */
AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_OUTPUT_PULLDOWN, MUX_MODE6) /* P9-13 UART4_TX */
>;
};
Once the board boots - I can SSH into it from Ethernet. Here's the output from pinctrl and serial:
root#beaglebone-yocto:~# cat /sys/kernel/debug/pinctrl/pinctrl-maps
Pinctrl maps:
device 44e10800.pinmux
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_clkout2_pin
function pinmux_clkout2_pin
device 48022000.serial
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_uart1_pins
function pinmux_uart1_pins
device 48024000.serial
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_uart2_pins
function pinmux_uart2_pins
device 4819c000.i2c
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_i2c2_pins
function pinmux_i2c2_pins
device 481a8000.serial
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_uart4_pins
function pinmux_uart4_pins
device 4a100000.switch
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group cpsw_default
function cpsw_default
device 4a100000.switch
state sleep
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group cpsw_sleep
function cpsw_sleep
device 4a101000.mdio
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group davinci_mdio_default
function davinci_mdio_default
device 4a101000.mdio
state sleep
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group davinci_mdio_sleep
function davinci_mdio_sleep
device 44e09000.serial
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_uart0_pins
function pinmux_uart0_pins
device 44e0b000.i2c
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_i2c0_pins
function pinmux_i2c0_pins
device 48060000.mmc
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_mmc1_pins
function pinmux_mmc1_pins
device 481d8000.mmc
state default
type MUX_GROUP (2)
controlling device 44e10800.pinmux
group pinmux_emmc_pins
function pinmux_emmc_pins
root#beaglebone-yocto:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:8250 mmio:0x481A8000 irq:35 tx:871 rx:0 RTS|CTS|DTR|DSR
1: uart:8250 mmio:0x48022000 irq:24 tx:0 rx:0 CTS|DSR|CD|RI
2: uart:8250 mmio:0x48024000 irq:25 tx:0 rx:0 CTS|DSR
3: uart:8250 mmio:0x44E09000 irq:18 tx:0 rx:0 CTS|D
As you can see, UART4 gets mapped to /dev/ttyS0 and UART0 gets mapped to /dev/ttyS3 after bootup.
I'm not sure why UART4 gets mapped to ttyS0 and not ttyS4.
I can't even see /dev/ttyS4 despite it being an alias in the am33xx.dtsi
root#beaglebone-yocto:~# ls -la /dev/ttyS*
crw--w---- 1 root tty 4, 64 Mar 9 12:45 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Jan 1 2000 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Jan 1 2000 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Jan 1 2000 /dev/ttyS3

error device-tree: can't request region for resource [mem 0x01c20800-0x01c20aff]

ERROR SHOW:
[ 156.303744] blinkled: loading out-of-tree module taints kernel.
[ 156.303871] blinkled: module verification failed: signature and/or required key missing - tainting kernel
[ 156.304614] Good ! device probed! 65
[ 156.304644] demo_file 1c20800.gpioa7: can't request region for resource [mem 0x01c20800-0x01c20aff]
[ 156.304663] demo_file: probe of 1c20800.gpioa7 failed with error -16
[ 156.304747] The blinkled driver is success
MY CODE DEVICETREE:
gpioa7: gpioa7#1c20800{
reg = < 0x1c20800 0x300 >;
clocks = < 0x03 0x36 0x12 0x13 0x00 >;
clock-names = "apb\0hosc\0losc";
gpio-controller;
#gpio-cells = < 0x03 >;
gpios = < 0x0c 0x07 0x01 0x04 >;
input;
interrupt-controller;
#interrupt-cells = < 0x03 >;
interrupt-parent = < 0x01 >;
interrupts = < 0x01 0x00 0x48 0x08 >;
compatible = "gpio,input-pa7-pin";
status = "okay";
};
Think error is caused because dts has 2 nodes with same address:
soc {
pinctrl#1c20800 {
......
};
};
But i don't know how to fix it? Thanks!

Flags mismatch irq 32 Driver A vs Driver A

Generally flag mismatch is for driver A vs Driver B. Could you give some pointers to solve. We are using imx6ul board.
What is the way to debug this.
I have checked others driver as well and none of them is registering irq 32.
It looks like we are registering same driver twice.
Erorr:
[ 7.315153] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
[ 7.332058] genirq: Flags mismatch irq 32. 00000004 (20cc000.snvs:snvs-powerkey) vs. 00000004 (20cc000.snvs:snvs-powerkey)
[ 7.343879] snvs_pwrkey 20cc000.snvs:snvs-powerkey: interrupt not available.
[ 7.366705] snvs_pwrkey: probe of 20cc000.snvs:snvs-powerkey failed with error -16
[ 7.394971] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
DTS
snvs: snvs#020cc000 {
compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
reg = <0x020cc000 0x4000>;
snvs_rtc: snvs-rtc-lp {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
regmap = <&snvs>;
offset = <0x34>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
};
snvs_poweroff: snvs-poweroff {
compatible = "syscon-poweroff";
regmap = <&snvs>;
offset = <0x38>;
value = <0x61>;
mask = <0x61>;
status = "disabled";
};
snvs_pwrkey: snvs-powerkey {
compatible = "fsl,sec-v4.0-pwrkey";
regmap = <&snvs>;
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
linux,keycode = <KEY_POWER>;
wakeup-source;
};
};

Why is the probe function in my kernel module not being called?

While following, among others, this tutorial (1) and reading certain chapters in the Linux Device Drivers book, I cannot get the pr_debug() statements in the probe function to show any output in dmesg.
Here's my code:
#include <linux/module.h> /*included for all kernel modules*/
#include <linux/kernel.h> /*included for KERN_DEBUG*/
#include <linux/init.h> /*included for __init and __exit macros*/
#include <linux/usb.h>
#include <linux/usb/input.h>
#include <linux/hid.h>
#define VENDOR_ID 0x0930
#define DEVICE_ID 0x6545
MODULE_LICENSE("GPL");
MODULE_AUTHOR("dev");
MODULE_DESCRIPTION("eusb driver");
static struct usb_device_id eusb_table[] = {
{ USB_DEVICE(VENDOR_ID, DEVICE_ID) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, eusb_table);
static int eusb_probe(struct usb_interface *interface, const struct usb_device_id *id)
{
pr_debug("USB probe function called\n");
return 0;
}
static void eusb_disconnect(struct usb_interface *interface)
{
pr_debug("USB disconnect function called\n");
}
static struct usb_driver eusb_driver = {
//.owner = THIS_MODULE,
.name = "eusb",
.probe = eusb_probe,
.disconnect = eusb_disconnect,
.id_table = eusb_table
};
static int __init eusb_init(void)
{
int result = 0;
pr_debug("Hello world!\n");
result = usb_register(&eusb_driver);
if(result){
pr_debug("error %d while registering usb\n", result);}
else{pr_debug("no error while registering usb\n");}
return 0;
}
static void __exit eusb_exit(void)
{
usb_deregister(&eusb_driver);
pr_debug("Exiting module\n");
}
module_init(eusb_init);
module_exit(eusb_exit);
and Makefile:
obj-m := eusb.o
CFLAGS_eusb.o := -DDEBUG
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Make finishes without errors, after insmod I can see the module listed in lsmod and the pr_debug() in the init and exit functions show output in dmesg.
When inserting the device however the probe function seems to not get called (or the pr_debug() statements do not show any output in dmesg).
Dmesg output:
[ 7777.521236] Hello world!
[ 7777.521264] usbcore: registered new interface driver eusb
[ 7777.521266] no error while registering usb
[ 7780.597087] usb 1-6: USB disconnect, device number 9
[ 7797.686970] usb 1-6: new high-speed USB device number 10 using xhci_hcd
[ 7797.857324] usb 1-6: New USB device found, idVendor=0930, idProduct=6545
[ 7797.857328] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7797.857330] usb 1-6: Product: DataTraveler 2.0
[ 7797.857331] usb 1-6: Manufacturer: Kingston
[ 7797.857333] usb 1-6: SerialNumber: 08606E6D407FED10571E5067
[ 7797.858787] usb-storage 1-6:1.0: USB Mass Storage device detected
[ 7797.858902] scsi host11: usb-storage 1-6:1.0
[ 7798.931417] scsi 11:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
[ 7798.931824] sd 11:0:0:0: Attached scsi generic sg3 type 0
[ 7800.184749] sd 11:0:0:0: [sdc] 60964864 512-byte logical blocks: (31.2 GB/29.0 GiB)
[ 7800.186338] sd 11:0:0:0: [sdc] Write Protect is off
[ 7800.186343] sd 11:0:0:0: [sdc] Mode Sense: 23 00 00 00
[ 7800.187948] sd 11:0:0:0: [sdc] No Caching mode page found
[ 7800.187952] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[ 7800.220477] sdc: sdc1 sdc2 sdc3
[ 7800.225068] sd 11:0:0:0: [sdc] Attached SCSI removable disk
[ 7802.798403] ISO 9660 Extensions: Microsoft Joliet Level 3
[ 7802.799507] ISO 9660 Extensions: RRIP_1991A
I have tried with another device, tried with printk() instead of pr_debug(). I found several questions on SO with the same problem, but my code is as far as I can tell almost/completely the same as the code in the answers.
I have also tried with:
USB_INTERFACE_INFO(
USB_INTERFACE_CLASS_HID,
USB_INTERFACE_SUBCLASS_BOOT,
USB_INTERFACE_PROTOCOL_KEYBOARD)
instead of USB_DEVICE() (the other device was a keyboard).
I noticed that some answers talk about platform_driver instead of usb_driver, but I think this is not relevant for me, as it is never mentioned in the tutorials.
Where am I going wrong?
Is your purpose just educational? Otherwise the driver is already there and it's called usb-storage. Seems even that driver enumerates your device first. Try to disable usb-storage and load your driver again. Or better use the virtual machine (KVM / Qemu) to try your drivers.
As you can see your Hello world! was printed which implies the module was loaded successfully. Often all the modules claiming to handle the device via usb_device_id* table are loaded. See 9.3.2.3. Module Loading.
Now, the probe function is called only for the driver the device was bound to. In the case where there is no priority set and two drivers are capable of binding, any of them might get the first opportunity.
I have written a blog post which might clear things further (if not, do comment here).
Further, you might want to go through these two relevant mailing list threads
https://lists.kernelnewbies.org/pipermail/kernelnewbies/2011-October/003639.html
https://marc.info/?l=linux-usb&m=162123892329464&w=2

Bonescript Unable to find devicetree fragment

I'm working with a BeagleBone Black and trying to get bonescript running. I'm running Debian Wheezy with the latest updates and the latest versions of node v0.10.21 and bonescript 0.2.4. I'm able to blink the internal LED, so I'm fairly certain my installation is working fine. My problem is that I'm unable to control any of the P8 or P9 gpios. Using the examples on the bonescript website I'm running the following script. I'm not sure exactly what this error means so even if someone can point me into the right direction I would appreciate it.
Thank you
Scottt
=============================================
var b = require('bonescript');
var led = "P8_3";
var state = 0;
b.pinMode(led, b.output);
toggleLED = function() {
state = state ? 0 : 1;
b.digitalWrite(led, state);
};
timer = setInterval(toggleLED, 100);
stopTimer = function() {
clearInterval(timer);
};
setTimeout(stopTimer, 30000);
=====================================================
I turned on bonescript debugging and get the following output regarding being unable to find the devicetree fragment.
root#debian-armhf:/usr/lib/node_modules/bonescript# nodejs blinkext.js
debug: cpuinfo = processor : 0
model name : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 660.76
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2
Hardware : Generic AM33XX (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
debug: index.js loaded
debug: pinMode(P8_3,,,,);
debug: templateFilename = /usr/lib/node_modules/bonescript/bspm_template.dts
debug: fragment = bspm_P8_3_2f
debug: command = dtc -O dtb -o /lib/firmware/bspm_P8_3_2f-00A0.dtbo -b 0 -# /lib/firmware/bspm_P8_3_2f-00A0.dts
error: Failed to find devicetree fragment: bspm_P8_3_2f
info: 0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
debug: Unable to configure mux for pin [object Object]: Error loading devicetree overlay for P8_3 using template bspm
debug: getPinMode(P8_3);
debug: getPinMode(P8_3): Error: ENOENT, no such file or directory '/sys/kernel/debug/pinctrl/44e10800.pinmux/pins'
debug: pinMode: mode = {"pin":"P8_3","name":"GPIO1_6","options":["gpmc_ad6","mmc1_dat6","NA","NA","NA","NA","NA","gpio1_6"],"gpio":{"allocated":false}}
debug: getPinMode(P8_3);
debug: getPinMode(P8_3): Error: ENOENT, no such file or directory '/sys/kernel/debug/pinctrl/44e10800.pinmux/pins'
info: Error loading devicetree overlay for P8_3 using template bspm
=======================================================
Here is what I believe is the overlay template bonescript creates.
/*
* This is a template-generated file from BoneScript
*/
/dts-v1/;
/plugin/;
/{
compatible = "ti,beaglebone", "ti,beaglebone-black";
part_number = "BS_PINMODE_P8_3_0x2f";
version = "00A0";
exclusive-use =
"P8.3",
"gpio1_6";
fragment#0 {
target = <&am33xx_pinmux>;
__overlay__ {
bs_pinmode_P8_3_0x2f: pinmux_bs_pinmode_P8_3_0x2f {
pinctrl-single,pins = <0x018 0x2f>;
};
};
};
fragment#1 {
target = <&ocp>;
__overlay__ {
bs_pinmode_P8_3_0x2f_pinmux {
compatible = "bone-pinmux-helper";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bs_pinmode_P8_3_0x2f>;
target = <&am33xx_pinmux>;
__overlay__ {
bs_pinmode_P8_3_0x2f: pinmux_bs_pinmode_P8_3_0x2f {
pinctrl-single,pins = <0x018 0x2f>;
};
};
};
fragment#1 {
target = <&ocp>;
__overlay__ {
bs_pinmode_P8_3_0x2f_pinmux {
compatible = "bone-pinmux-helper";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bs_pinmode_P8_3_0x2f>;
};
};
};
};
We have forked bonescript and released new package. We faced same error and now solved everything by re-writing lot of code in original bonescript. You can install and use in your projects. https://www.npmjs.org/package/octalbonescript

Resources