The way I read this from Ti sysconfig it appears the load cape P9_42 Sink1 must be controled by pru and not directly via gpio.
/* This file was auto-generated by TI PinMux on 8/7/2024 at 8:50:55 PM. */
/* This file should only be used as a reference. Some pins/peripherals, */
/* depending on your use case, may need additional configuration. */
&main_pmx0 {
mycpsw9g1_pins_default: mycpsw9g1-default-pins {
pinctrl-single,pins = <
J721E_IOPAD(0xdc, PIN_INPUT, 9) /* (AJ28) PRG0_PRU0_GPO11.CLKOUT */
>;
};
test_pin1_pins_default: test_pin1-default-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x1f0, PIN_OUTPUT_PULLUP, 7) /* (AC2) UART0_CTSn.GPIO0_123 */
>;
};
};
I reads like the input goes into pru then this implies pru controls the output pin. Have not had any luck getting control of the pins using lgpiod. This seems like it might be the reason why??
1 Like
@foxsquirrel ,
I am not inclined to say anything about PRU stuff now. Um, did you change the mode and offsets?
Seth
P.S. I was trying with this Cape a while back to update things.
compatible = "beagle,j721e-beagleboneai64", "ti,j721e";
fragment@0 {
target = <&main_pmx0>;
__overlay__ {
pinmux_P9_42_gpio: pinmux_P9_42_gpio {
pinctrl-single,pins = <
0x01f0 0x0018 /* P9_42 as GPIO0_123, OUTPUT, PULLUP */
>;
};
};
};
1 Like
You are trying to configure P9_42 as a GPIO pin ?
P9_42 is one of the double pad pins. Are you sure the other pad is set as an input ?
pinctrl-single,pins = <
0x01f0 0x0018 /* P9_42 as GPIO0_123, OUTPUT, PULLUP */
>;
Not looked at the macro J721E_IOPAD
but I would guess that the mux bits are the bottom 4 bits ? In which case aren’t you setting mux mode 8 which is undefined for pad AC2. Even if it isn’t the bottom 4 bits, you are not setting mode 7 as it would require 3 bits set to 1.
That explains why Ti sysconfig generates the input for the pru.
Going to reinstall a fresh image, the board has several locations for the overlays. The one that has been used is /boot/firmware/overlays/ it also has /boot/dtbs/5.10.168-ti-arm64-r115/ti/overlays. Not sure which path is the correct one?
You are right, It should be 0x07.
1 Like
I also found the overlays in /boot/firmware/ti/
.
I am not sure if your board has the /ti/ section on it in that file or not but keep it up.
Seth
P.S. I usually use /boot/firmware/overlays/
for extlinux.conf on the BBAI-64. Have you succeeded yet or are you starting slowly. And…are you planning on succeeding to completion? I started to use the BBAI-64 a bit more due to the Motor Cape and I am hoping people will still develop around this board, i.e. as it is pretty fast for embedded use, can handle high heat, and boots super fast.
It depends on how much time I have to spend on getting the device tree up. We have the same code running on beagley-ai and bbb, bbbi with telemetry buried to measure latency in the gpio and track outliers. To get any meaningful information the code has to be exactly the same, only changes need to be lines and gpiochip.
Not sure what is up with ai64, I got bealgley -ai up and running the rpi 8 channel relay board (din rail mounted version) and the load cape is running on bbb and bbbi boards. The ai64 has been an off and on relationship…
1 Like
@foxsquirrel ,
From what I read on the discord servers, some people are developing still for this board.
Seth
P.S. I am being patient, i.e. as I would also like to see other boards with Capes work. Let me see if I can quote anyone here:
No, with the beagley-ai, we figured out a way to set the default pinmux.
Then can libgpiod directly for pull up pull down high low...
[10:18 PM]
I've been backporting that to the AI 64 in the play
So, who knows? I think in time, all Capes may work well with the board.
It should work fine, big issue is the mux with other I/O. The load cape is one of the most useful to those building mechanical stuff. Even if the transistors are limited in current capacity you can still drive relays with it. Way better than trying to drive a relay directly from gpio pins. If memory is correct, the official BBB load cape overlay is running our BBB & BBBI boards. It was just overlooked in the later branches of BBDT. The beagly-ai we did here.
1 Like
I am waiting on big news…
Now, will I get it or will another person attain the “news” before me? Who knows? Waiting in solitude as usual!
Seth
P.S. There is the COMMS Cape too for those of us who like to build around old world technologies and incorporate them into current specs. and tech. Mouser still sells the Motor Cape and other Capes thankfully. I just found them again while searching for ideas on builds around the newer boards. And of course, I will need to get my hands on some electronics, e.g. UC2950T Texas Instruments | Integrated Circuits (ICs) | DigiKey and 74LVC1G57. I am still a sucker for building and learning how to do things with ease and/or difficulty.
This would be a good basis, I really like the din rail mount and the 8 relays. It has a many other possibilities. You will need to use the RPI 5 cooling fan with this board. It is fan ready out of the box, just plug it in.
1 Like
Neat…you made that piece of electronics? Busy-busy-busy!
Seth
P.S. I see BBAI-64 now. Neat.
@RobertCNelson What pin mux information are you using. I can apply labels then the pin mux I am using does not appear to be correct and it breaks so the labels will not apply.
fred@ai64:~$ gpioinfo
gpiochip0 - 84 lines:
line 0: unnamed "BOOT" input active-low [used]
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed "POWER" input active-low [used]
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
line 32: unnamed unused input active-high
line 33: unnamed unused input active-high
line 34: unnamed unused input active-high
line 35: unnamed unused input active-high
line 36: unnamed unused input active-high
line 37: unnamed unused input active-high
line 38: unnamed unused input active-high
line 39: unnamed unused input active-high
line 40: unnamed unused input active-high
line 41: unnamed unused input active-high
line 42: unnamed unused input active-high
line 43: unnamed unused input active-high
line 44: unnamed unused input active-high
line 45: unnamed unused input active-high
line 46: unnamed unused input active-high
line 47: unnamed unused input active-high
line 48: unnamed unused input active-high
line 49: unnamed unused input active-high
line 50: unnamed unused input active-high
line 51: unnamed unused input active-high
line 52: unnamed unused input active-high
line 53: unnamed unused input active-high
line 54: unnamed unused input active-high
line 55: unnamed unused input active-high
line 56: unnamed unused input active-high
line 57: unnamed unused input active-high
line 58: unnamed unused input active-high
line 59: unnamed unused input active-high
line 60: unnamed unused input active-high
line 61: unnamed unused input active-high
line 62: unnamed unused input active-high
line 63: unnamed unused input active-high
line 64: unnamed unused input active-high
line 65: unnamed unused input active-high
line 66: unnamed unused input active-high
line 67: unnamed unused input active-high
line 68: unnamed unused input active-high
line 69: unnamed unused input active-high
line 70: unnamed unused input active-high
line 71: unnamed unused input active-high
line 72: unnamed unused input active-high
line 73: unnamed unused input active-high
line 74: unnamed unused input active-high
line 75: unnamed unused input active-high
line 76: unnamed unused input active-high
line 77: unnamed unused input active-high
line 78: unnamed unused input active-high
line 79: unnamed unused input active-high
line 80: unnamed unused input active-high
line 81: unnamed unused input active-high
line 82: unnamed unused input active-high
line 83: unnamed unused input active-high
gpiochip1 - 128 lines:
line 0: "test_gpio0" unused input active-high
line 1: "test_gpio1" unused input active-high
line 2: "test_gpio2" unused input active-high
line 3: "test_gpio3" unused input active-high
line 4: "test_gpio4" unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed "reset" output active-high [used]
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
line 32: unnamed unused input active-high
line 33: unnamed unused input active-high
line 34: unnamed unused input active-high
line 35: unnamed unused input active-high
line 36: unnamed unused input active-high
line 37: unnamed unused input active-high
line 38: unnamed unused input active-high
line 39: unnamed unused input active-high
line 40: unnamed unused input active-high
line 41: unnamed unused input active-high
line 42: unnamed unused input active-high
line 43: unnamed unused input active-high
line 44: unnamed unused input active-high
line 45: unnamed unused input active-high
line 46: unnamed unused input active-high
line 47: unnamed unused input active-high
line 48: unnamed unused input active-high
line 49: unnamed "regulator-5" output active-high [used]
line 50: unnamed unused input active-high
line 51: unnamed unused input active-high
line 52: unnamed unused input active-high
line 53: unnamed unused input active-high
line 54: unnamed unused input active-high
line 55: unnamed unused input active-high
line 56: unnamed unused input active-high
line 57: unnamed unused input active-high
line 58: unnamed unused input active-high
line 59: unnamed unused input active-high
line 60: unnamed unused input active-high
line 61: unnamed unused input active-high
line 62: unnamed unused input active-high
line 63: unnamed unused input active-high
line 64: unnamed unused input active-high
line 65: unnamed unused input active-high
line 66: unnamed unused input active-high
line 67: unnamed unused input active-high
line 68: unnamed unused input active-high
line 69: unnamed unused input active-high
line 70: unnamed unused input active-high
line 71: unnamed unused input active-high
line 72: unnamed unused input active-high
line 73: unnamed unused input active-high
line 74: unnamed unused input active-high
line 75: unnamed unused input active-high
line 76: unnamed unused input active-high
line 77: unnamed unused input active-high
line 78: unnamed unused input active-high
line 79: unnamed unused input active-high
line 80: unnamed unused input active-high
line 81: unnamed unused input active-high
line 82: unnamed "regulator-3" output active-high [used]
line 83: unnamed unused input active-high
line 84: unnamed unused input active-high
line 85: unnamed unused input active-high
line 86: unnamed unused input active-high
line 87: unnamed unused input active-high
line 88: unnamed unused input active-high
line 89: unnamed unused input active-high
line 90: unnamed unused input active-high
line 91: unnamed unused input active-high
line 92: unnamed unused input active-high
line 93: unnamed unused input active-high
line 94: unnamed unused input active-high
line 95: unnamed "beaglebone:green:usr1" output active-high [used]
line 96: unnamed "beaglebone:green:usr0" output active-high [used]
line 97: unnamed "beaglebone:green:usr2" output active-high [used]
line 98: unnamed unused input active-high
line 99: unnamed unused input active-high
line 100: unnamed unused input active-high
line 101: unnamed unused input active-high
line 102: unnamed unused input active-high
line 103: unnamed unused input active-high
line 104: unnamed unused input active-high
line 105: unnamed unused input active-high
line 106: unnamed unused input active-high
line 107: unnamed unused input active-high
line 108: unnamed unused input active-high
line 109: unnamed "beaglebone:green:usr4" output active-high [used]
line 110: unnamed "beaglebone:green:usr3" output active-high [used]
line 111: unnamed unused input active-high
line 112: unnamed unused input active-high
line 113: unnamed unused input active-high
line 114: unnamed unused input active-high
line 115: unnamed unused input active-high
line 116: unnamed unused input active-high
line 117: unnamed "tlv71033" output active-high [used]
line 118: unnamed unused input active-high
line 119: unnamed unused input active-high
line 120: unnamed unused input active-high
line 121: unnamed unused input active-high
line 122: unnamed unused input active-high
line 123: unnamed unused input active-high
line 124: unnamed unused input active-high
line 125: unnamed unused input active-high
line 126: unnamed unused input active-high
line 127: unnamed unused input active-high
gpiochip2 - 36 lines:
line 0: "ch1" unused input active-high
line 1: "ch2" unused input active-high
line 2: "ch3" unused input active-high
line 3: "ch4" "typec-dir" input active-low [used]
line 4: "ch5" unused input active-high
line 5: "ch6" unused input active-high
line 6: "ch7" unused input active-high
line 7: "ch8" unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
line 32: unnamed unused input active-high
line 33: unnamed unused input active-high
line 34: unnamed unused input active-high
line 35: unnamed unused input active-high
fred@ai64:~$
/dts-v1/;
/plugin/;
/ {
compatible = "beagle,j721e-beagleboneai64";
fragment@0 {
target = <&main_gpio0>;
__overlay__ {
status = "okay";
gpio-line-names = "test_gpio0", "test_gpio1", "test_gpio2", "test_gpio3", "test_gpio4";
};
};
fragment@1 {
target = <&main_gpio1>;
__overlay__ {
status = "okay";
gpio-line-names = "ch1", "ch2", "ch3", "ch4", "ch5", "ch6", "ch7", "ch8";
};
};
};
dtc -O dtb -o test-gpio-overlay.dtbo -b 0 -@ test-gpio-overlay.dts
This is the macro I am using from k3 config
#define J721E_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
1 Like