I am trying to upgrade my SquareWave application I used with Bullseye 5.10. My kernel version is now 6.1.83. I have created a overlay that allows me to use /sys/class/gpio and export the pins I need using the command line $ echo out > /sys/class/gpio/gpio362/direction, and change the values on P8_16.
The problem that I have that this does’nt work any more for the starting the application for
/dev/remoteproc/j7-pru0_0.
The commmands are as follows:
$ sudo echo /lib/firmware/SquareWave0 > /dev/remoteproc/j7-pru0_0/firmware
$ cat /dev/remoteproc/j7-pru0_0/firmware
SquareWave0
$ sudo echo start > /dev/remoteproc/j7-pru0_0/state
-bash: echo: write error: No such file or directory
$ ls /dev/remoteproc/j7-pru0_0
coredump device firmware name power recovery state subsystem uevent
$ cat /dev/remoteproc/j7-pru0_0/state
offline
I have seen this behavior before and I have associated it with something wrong with my overlay.
Below is my overlay, My_GPIO.dts
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
- DT Overlay for GPIO connections within the expansion header.
- Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include “ti/k3-pinctrl.h”
/*
- Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
My_GPIO.kernel = TIMESTAMP;
};
};
&main_pmx0 {
my_gpio: my-gpio-pins{
pinctrl-single,pins = <
J721E_IOPAD(0x40, PIN_INPUT, 7) /* P8_10 (AC24) PRG1_PRU0_GPO15 (gpio0_16) MCAN6_TX /
J721E_IOPAD(0xF0, PIN_INPUT, 7) / P8_12 (AH28) PRG0_PRU0_GPO16 (gpio0_59) PRG0_PWM0_A2 /
J721E_IOPAD(0x130, PIN_INPUT, 7) / P8_14 (AF27) PRG0_PRU1_GPO12 (gpio0_75) PRG0_PWM1_A0 /
J721E_IOPAD(0xFC, PIN_INPUT, 7) / P8_16 (AB28) PRG0_PRU0_GPO19 (gpio0_62) PRG0_PWM0_TZ_OUT /
J721E_IOPAD(0x0C, PIN_INPUT, 7) / P8_17 (AF22) PRG1_PRU0_GPO2 (gpio0_3) PRG1_PWM2_A0 /
J721E_IOPAD(0xFC, PIN_INPUT, 7) / P8_18 (AJ23) PRG1_PRU0_GPO3 (gpio0_4) PRG1_PWM3_A2 /
J721E_IOPAD(0xD0, PIN_INPUT, 7) / P8_26 (AC27) PRG0_PRU0_GPO8 (gpio0_51) PRG0_PWM2_A1 /
J721E_IOPAD(0xB8, PIN_INPUT, 7) / P9_12 (AE27) PRG0_PRU0_GPO2 (gpio0_45) MCASP0_ACLKR /
J721E_IOPAD(0xC0, PIN_INPUT, 7) / P9_15 (AD25) PRG0_PRU0_GPO4 (gpio0_47) PRG0_PRU0_GPO4 /
J721E_IOPAD(0x130, PIN_INPUT, 0) / P8_14 (AF27) PRG0_PRU1_GPO12 (gpio0_75) PRG0_PWM1_A0 /
J721E_IOPAD(0xFC, PIN_INPUT, 0) / P8_16 (AB28) PRG0_PRU0_GPO19 (gpio0_62) PRG0_PWM0_TZ_OUT */
>;
};
};
&{/} {
gpio_pins {
pinctrl-names = “default”;
pinctrl-0 = <&my_gpio>;
compatible = “gpio-leds”;
P8_10_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 16 GPIO_ACTIVE_HIGH>;
};
P8_12_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 59 GPIO_ACTIVE_HIGH>;
};
P8_14_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 75 GPIO_ACTIVE_HIGH>;
};
P8_16_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 62 GPIO_ACTIVE_HIGH>;
};
P8_17_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
};
P8_18_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
};
P8_26_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 51 GPIO_ACTIVE_HIGH>;
};
P9_12_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 45 GPIO_ACTIVE_HIGH>;
};
P9_15_default_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 47 GPIO_ACTIVE_HIGH>;
};
P8_14_pruout_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 75 GPIO_ACTIVE_HIGH>;
};
P8_16_pruout_pin {
linux,default_trigger = "default-off";
status = "disabled";
gpios = <&main_gpio0 62 GPIO_ACTIVE_HIGH>;
};
};
};